code: def load_pretrained_weights_from_keras(
      arch: str, include_top: bool = True, num_classes: int = 1000
  ):
      """Function to load weights from Keras models.
  
      Args:
          arch: network architecture in ['ResNet50', 'ResNet101', 'ResNet152'].
          include_top: if True then include top linear classification layer.
          num_classees: number of classes. If include_top is True, num_classes should be 1000.
  
      Returns:
          Objax ResNetV2 models with pretrained weights from Keras.
      """
      model_registry = {
          "ResNet50": {"num_blocks": [3, 4, 6, 3]},
          "ResNet101": {"num_blocks": [3, 4, 23, 3]},
          "ResNet152": {"num_blocks": [3, 8, 36, 3]},
      }
      assert (
          tf is not None
      ), "Please install tensorflow dependency to be able to load keras weights."
      assert (
          arch in model_registry
      ), f"Model weights does not exist for {arch}."
      assert (
          not include_top or num_classes == 1000
      ), "Number of classes should be 1000 when including top layer."
  
      model_keras = getattr(tf.keras.applications, arch + "V2")(
          include_top=include_top,
          weights="imagenet",
          classes=1000,
          classifier_activation="linear",
      )
      model_objax = objax.zoo.resnet_v2.__dict__[arch](
          in_channels=3,
          num_classes=num_classes,
          normalization_fn=functools.partial(
              objax.nn.BatchNorm2D, momentum=0.99, eps=1.001e-05
          ),
      )
      convert_keras_model(
          model_keras,
          model_objax,
          model_registry[arch]["num_blocks"],
          include_top,
      )
      del model_keras
      return model_objax
  
imports: import functools
  from typing import Callable, Sequence, Union, Optional
  from jax import numpy
  import objax
  from objax.constants import ConvPadding
  from objax.nn import Conv2D
  from objax.typing import JaxArray, ConvPaddingInt
label_desc: Use image node_id 6 for calling a global function with example usage: load_pretrained_weights_from_keras(arch, include_top, num_classes) and returns: model_objax