code: def AddInput(model, batch_size, db, db_type):
      """Adds the data input part."""
      data_uint8, label = model.TensorProtosDBInput(
          [],
          ["data_uint8", "label"],
          batch_size=batch_size,
          db=db,
          db_type=db_type,
      )
      data = model.Cast(data_uint8, "data_nhwc", to=core.DataType.FLOAT)
      data = model.NHWC2NCHW(data, "data")
      data = model.Scale(data, data, scale=float(1.0 / 256))
      data = model.StopGradient(data, data)
      return data, label
  
file_path: pytorch/caffe2/experiments/python/convnet_benchmarks.py
imports: import argparse
  import time
  from caffe2.python import cnn, workspace, core
  import caffe2.python.SparseTransformer
label_desc: Use image node_id 8 for calling a global function with example usage: AddInput(model, batch_size, db, db_type) and returns: data,  label