code: def model_creator(config):
      wd = config["wd"]
      use_bf16 = config["bf16"]
      import tensorflow as tf
      import tensorflow.keras as keras
  
      if use_bf16:
          from tensorflow.keras.mixed_precision import (
              experimental as mixed_precision,
          )
  
          policy = mixed_precision.Policy("mixed_bfloat16")
          # policy = mixed_precision.Policy('float32')
          mixed_precision.set_policy(policy)
  
      model = tf.keras.applications.resnet50.ResNet50(
          weights=None, classes=1001
      )
      model_config = model.get_config()
      for layer, layer_config in zip(
          model.layers, model_config["layers"]
      ):
          if hasattr(layer, "kernel_regularizer"):
              regularizer = keras.regularizers.l2(wd)
              rg_config = {
                  "class_name": regularizer.__class__.__name__,
                  "config": regularizer.get_config(),
              }
              layer_config["config"]["kernel_regularizer"] = rg_config
          if type(layer) == keras.layers.BatchNormalization:
              layer_config["config"]["momentum"] = 0.9
              layer_config["config"]["epsilon"] = 1e-5
  
      model = tf.keras.models.Model.from_config(model_config)
      if use_bf16:
          model = tf.keras.models.Sequential(
              [
                  model,
                  tf.keras.layers.Lambda(
                      lambda x: tf.cast(x, dtype=tf.float32)
                  ),
              ]
          )
      return model
  
imports: from zoo.orca import init_orca_context, stop_orca_context
  import os
  import argparse
  import tensorflow
label_desc: Use image node_id 13 for calling a global function with example usage: model_creator(config) and returns: model