code: def convnetlrn_cifar10_dataaug(
      reader_train, reader_test, epoch_size=50000, max_epochs=80
  ):
      _cntk_py.set_computation_network_trace_level(0)
  
      # 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))
  
      # apply model to input
      scaled_input = C.element_times(C.constant(0.00390625), input_var)
  
      with C.layers.default_options(activation=C.relu, pad=True):
          z = C.layers.Sequential(
              [
                  C.layers.For(
                      range(2),
                      lambda: [
                          C.layers.Convolution2D((3, 3), 64),
                          C.layers.Convolution2D((3, 3), 64),
                          LocalResponseNormalization(
                              1.0, 4, 0.001, 0.75
                          ),
                          C.layers.MaxPooling((3, 3), (2, 2)),
                      ],
                  ),
                  C.layers.For(
                      range(2),
                      lambda i: [
                          C.layers.Dense([256, 128][i]),
                          C.layers.Dropout(0.5),
                      ],
                  ),
                  C.layers.Dense(num_classes, activation=None),
              ]
          )(scaled_input)
  
      # loss and metric
      ce = C.cross_entropy_with_softmax(z, label_var)
      pe = C.classification_error(z, label_var)
  
      # training config
      minibatch_size = 64
  
      # Set learning parameters
      lr_per_sample = (
          [0.0015625] * 20
          + [0.00046875] * 20
          + [0.00015625] * 20
          + [0.000046875] * 10
          + [0.000015625]
      )
      lr_schedule = C.learning_parameter_schedule_per_sample(
          lr_per_sample, epoch_size=epoch_size
      )
      mms = [0] * 20 + [0.9983347214509387] * 20 + [0.9991670137924583]
      mm_schedule = C.learners.momentum_schedule_per_sample(
          mms, epoch_size=epoch_size
      )
      l2_reg_weight = 0.002
  
      # trainer object
      learner = C.learners.momentum_sgd(
          z.parameters,
          lr_schedule,
          mm_schedule,
          unit_gain=True,
          l2_regularization_weight=l2_reg_weight,
      )
      progress_printer = C.logging.ProgressPrinter(
          tag="Training", num_epochs=max_epochs
      )
      trainer = C.Trainer(z, (ce, pe), learner, progress_printer)
  
      # define mapping from reader streams to network inputs
      input_map = {
          input_var: reader_train.streams.features,
          label_var: reader_train.streams.labels,
      }
  
      C.logging.log_number_of_parameters(z)
      print()
  
      # perform model training
      for epoch in range(max_epochs):  # loop over epochs
          sample_count = 0
          while (
              sample_count < epoch_size
          ):  # loop over minibatches in the epoch
              data = reader_train.next_minibatch(
                  min(minibatch_size, epoch_size - sample_count),
                  input_map=input_map,
              )  # fetch minibatch.
              trainer.train_minibatch(data)  # update model with it
              sample_count += (
                  trainer.previous_minibatch_sample_count
              )  # count samples processed so far
  
          trainer.summarize_training_progress()
          z.save(
              os.path.join(
                  model_path,
                  "ConvNet_CIFAR10_DataAug_{}.dnn".format(epoch),
              )
          )
  
      ### Evaluation action
      epoch_size = 10000
      minibatch_size = 16
  
      # process minibatches and evaluate the model
      metric_numer = 0
      metric_denom = 0
      sample_count = 0
      minibatch_index = 0
  
      while sample_count < epoch_size:
          current_minibatch = min(
              minibatch_size, epoch_size - sample_count
          )
          # Fetch next test min batch.
          data = reader_test.next_minibatch(
              current_minibatch, input_map=input_map
          )
          # minibatch data to be trained with
          metric_numer += (
              trainer.test_minibatch(data) * current_minibatch
          )
          metric_denom += current_minibatch
          # Keep track of the number of samples processed so far.
          sample_count += data[label_var].num_samples
          minibatch_index += 1
  
      print("")
      print(
          "Final Results: Minibatch[1-{}]: errs = {:0.2f}% * {}".format(
              minibatch_index + 1,
              (metric_numer * 100.0) / metric_denom,
              metric_denom,
          )
      )
      print("")
  
      return metric_numer / metric_denom
  
file_path: CNTK/Examples/Image/Classification/ConvNet/Python/ConvNetLRN_CIFAR10_DataAug.py
imports: from __future__ import print_function
  import os
  import math
  import numpy
  import cntk
  import _cntk_py
  import cntk.io.transforms
label_desc: Use image node_id 3 for calling a global function with example usage: convnetlrn_cifar10_dataaug(reader_train, reader_test, epoch_size, max_epochs) and returns: unknown