code: def create_trainer(
      network, epoch_size, num_quantization_bits, progress_printer
  ):
      # Set learning parameters
      lr_per_mb = (
          [0.01] * 20
          + [0.001] * 20
          + [0.0001] * 20
          + [0.00001] * 10
          + [0.000001]
      )
      lr_schedule = C.learning_parameter_schedule(
          lr_per_mb, epoch_size=epoch_size
      )
      mm_schedule = C.learners.momentum_schedule(0.9)
      l2_reg_weight = 0.0005  # CNTK L2 regularization is per sample, thus same as Caffe
  
      # Create learner
      local_learner = C.learners.momentum_sgd(
          network["output"].parameters,
          lr_schedule,
          mm_schedule,
          unit_gain=False,
          l2_regularization_weight=l2_reg_weight,
      )
      # Since we reuse parameter settings (learning rate, momentum) from Caffe, we set unit_gain to False to ensure consistency
      parameter_learner = data_parallel_distributed_learner(
          local_learner,
          num_quantization_bits=num_quantization_bits,
          distributed_after=0,
      )
  
      # Create trainer
      return C.Trainer(
          network["output"],
          (network["ce"], network["pe"]),
          parameter_learner,
          progress_printer,
      )
  
file_path: CNTK/Examples/Image/Classification/VGG/Python/VGG16_ImageNet_Distributed.py
imports: from __future__ import print_function
  import os
  import math
  import argparse
  import numpy
  import _cntk_py
  import cntk.io.transforms
  import cntk
  from cntk.logging import *
  from cntk.ops import placeholder, minus, constant, relu
  from cntk.train.distributed import data_parallel_distributed_learner, Communicator
  from cntk.io import ImageDeserializer, MinibatchSource, StreamDef, StreamDefs, FULL_DATA_SWEEP
  from cntk.layers import Convolution2D, Activation, MaxPooling, Dense, Dropout, default_options, Sequential, For
  from cntk.initializer import normal
  from cntk.train.training_session import *
label_desc: Use image node_id 3 for calling a global function with example usage: create_trainer(network, epoch_size, num_quantization_bits, progress_printer) and returns: C