code: def create_resnet_network(network_name, fp16):
      # Input variables denoting the features and label data
      input_var = C.input_variable(
          (num_channels, image_height, image_width)
      )
      label_var = C.input_variable((num_classes))
  
      dtype = np.float16 if fp16 else np.float32
      if fp16:
          graph_input = C.cast(input_var, dtype=np.float16)
          graph_label = C.cast(label_var, dtype=np.float16)
      else:
          graph_input = input_var
          graph_label = label_var
  
      with C.default_options(dtype=dtype):
          # create model, and configure learning parameters
          if network_name == "resnet20":
              z = create_cifar10_model(graph_input, 3, num_classes)
          elif network_name == "resnet110":
              z = create_cifar10_model(graph_input, 18, num_classes)
          else:
              return RuntimeError("Unknown model name!")
  
          # loss and metric
          ce = cross_entropy_with_softmax(z, graph_label)
          pe = classification_error(z, graph_label)
  
      if fp16:
          ce = C.cast(ce, dtype=np.float32)
          pe = C.cast(pe, dtype=np.float32)
  
      return {
          "name": network_name,
          "feature": input_var,
          "label": label_var,
          "ce": ce,
          "pe": pe,
          "output": z,
      }
  
file_path: CNTK/Examples/Image/Classification/ResNet/Python/TrainResNet_CIFAR10_Distributed.py
imports: from __future__ import print_function
  import os
  import argparse
  import cntk
  import numpy
  import cntk
  from cntk import input, cross_entropy_with_softmax, classification_error, Trainer, cntk_py
  from cntk import data_parallel_distributed_learner, block_momentum_distributed_learner, Communicator
  from cntk.learners import momentum_sgd, learning_parameter_schedule, momentum_schedule
  from cntk.device import try_set_default_device, gpu
  from cntk.train.training_session import *
  from cntk.debugging import *
  from cntk.logging import *
  from resnet_models import *
  from TrainResNet_CIFAR10 import create_image_mb_source
label_desc: Use image node_id 1 for calling a global function with example usage: create_resnet_network(network_name, fp16) and returns: dict, RuntimeError