code: def infer_command(args):
      files = []
      files.append(args.config)
      if args.param:
          files.append(args.param)
      batch_size = args.batch_size
      if batch_size < 1:
          batch_size = None
  
      class ForwardConfig:
          pass
  
      config = ForwardConfig
  
      # To improve load performance
      os.environ["NNABLA_CUDNN_ALGORITHM_BY_HEURISTIC"] = "1"
      info = load.load(
          files, prepare_data_iterator=False, batch_size=batch_size
      )
  
      inputs = []
      for input_filename in args.inputs:
          if args.data_type == "uint8":
              inputs.append(np.fromfile(input_filename, np.uint8))
          elif args.data_type == "int32":
              inputs.append(np.fromfile(input_filename, np.int32))
          elif args.data_type == "float32":
              if "int32" in input_filename:
                  inputs.append(np.fromfile(input_filename, np.int32))
              elif "uint8" in input_filename:
                  inputs.append(np.fromfile(input_filename, np.uint8))
              else:
                  inputs.append(np.fromfile(input_filename, np.float32))
          else:
              logger.critical(
                  'Type is one of ("uint8", "int32" or "float32").'
              )
              return False
  
      result, outputs = infer(info, inputs)
  
      for i, o in enumerate(outputs):
          if args.output is not None:
              (np.array(o).astype(np.float32)).tofile(
                  "{}_{}.bin".format(args.output, i)
              )
      return True
  
imports: import csv
  import os
  import nnabla.utils.callback
  import nnabla.utils.load
  import numpy
  from nnabla.logger import logger
  from nnabla.utils.cli.utility import let_data_to_variable, is_float, compute_full_path
  from nnabla.utils.data_iterator import data_iterator_cache
  from nnabla.utils.data_iterator import data_iterator_csv_dataset
  from nnabla.utils.data_source_loader import FileReader
  from nnabla.utils.image_utils import imsave
  from nnabla.utils.progress import configure_progress, progress
  from six.moves import map
label_desc: Use image node_id 6 for calling a global function with example usage: infer_command(args) and returns: True, False