def process_args(args):
    ' Process the options got from get_args()\n    '
    if (args.frames_per_eg < 1):
        raise Exception('--egs.frames-per-eg should have a minimum value of 1')
    if (not common_train_lib.validate_minibatch_size_str(args.minibatch_size)):
        raise Exception('--trainer.optimization.minibatch-size has an invalid value')
    if (not os.path.exists(args.dir)):
        raise Exception('Directory specified with --dir={0} does not exist.'.format(args.dir))
    if ((not os.path.exists((args.dir + '/configs'))) and ((args.input_model is None) or (not os.path.exists(args.input_model)))):
        raise Exception('Either --trainer.input-model option should be supplied, and exist; or the {0}/configs directory should exist.{0}/configs is the output of make_configs.py'.format(args.dir))
    run_opts = common_train_lib.RunOpts()
    if (args.use_gpu in ['true', 'false']):
        args.use_gpu = ('yes' if (args.use_gpu == 'true') else 'no')
    if (args.use_gpu in ['yes', 'wait']):
        if (not common_lib.check_if_cuda_compiled()):
            logger.warning('You are running with one thread but you have not compiled\n                   for CUDA.  You may be running a setup optimized for GPUs.\n                   If you have GPUs and have nvcc installed, go to src/ and do\n                   ./configure; make')
        run_opts.train_queue_opt = '--gpu 1'
        run_opts.parallel_train_opts = '--use-gpu={}'.format(args.use_gpu)
        run_opts.combine_gpu_opt = '--use-gpu={}'.format(args.use_gpu)
        run_opts.combine_queue_opt = '--gpu 1'
        run_opts.prior_gpu_opt = '--use-gpu={}'.format(args.use_gpu)
        run_opts.prior_queue_opt = '--gpu 1'
    else:
        logger.warning('Without using a GPU this will be very slow. nnet3 does not yet support multiple threads.')
        run_opts.train_queue_opt = ''
        run_opts.parallel_train_opts = '--use-gpu=no'
        run_opts.combine_gpu_opt = '--use-gpu=no'
        run_opts.combine_queue_opt = ''
        run_opts.prior_gpu_opt = '--use-gpu=no'
        run_opts.prior_queue_opt = ''
    run_opts.command = args.command
    run_opts.egs_command = (args.egs_command if (args.egs_command is not None) else args.command)
    run_opts.num_jobs_compute_prior = args.num_jobs_compute_prior
    return [args, run_opts]
Process the options got from get_args()
def process_args(args):
    ' \n    '
    if (args.frames_per_eg < 1):
        raise Exception('--egs.frames-per-eg should have a minimum value of 1')
    if (not common_train_lib.validate_minibatch_size_str(args.minibatch_size)):
        raise Exception('--trainer.optimization.minibatch-size has an invalid value')
    if (not os.path.exists(args.dir)):
        raise Exception('Directory specified with --dir={0} does not exist.'.format(args.dir))
    if ((not os.path.exists((args.dir + '/configs'))) and ((args.input_model is None) or (not os.path.exists(args.input_model)))):
        raise Exception('Either --trainer.input-model option should be supplied, and exist; or the {0}/configs directory should exist.{0}/configs is the output of make_configs.py'.format(args.dir))
    run_opts = common_train_lib.RunOpts()
    if (args.use_gpu in ['true', 'false']):
        args.use_gpu = ('yes' if (args.use_gpu == 'true') else 'no')
    if (args.use_gpu in ['yes', 'wait']):
        if (not common_lib.check_if_cuda_compiled()):
            logger.warning('You are running with one thread but you have not compiled\n                   for CUDA.  You may be running a setup optimized for GPUs.\n                   If you have GPUs and have nvcc installed, go to src/ and do\n                   ./configure; make')
        run_opts.train_queue_opt = '--gpu 1'
        run_opts.parallel_train_opts = '--use-gpu={}'.format(args.use_gpu)
        run_opts.combine_gpu_opt = '--use-gpu={}'.format(args.use_gpu)
        run_opts.combine_queue_opt = '--gpu 1'
        run_opts.prior_gpu_opt = '--use-gpu={}'.format(args.use_gpu)
        run_opts.prior_queue_opt = '--gpu 1'
    else:
        logger.warning('Without using a GPU this will be very slow. nnet3 does not yet support multiple threads.')
        run_opts.train_queue_opt = 
        run_opts.parallel_train_opts = '--use-gpu=no'
        run_opts.combine_gpu_opt = '--use-gpu=no'
        run_opts.combine_queue_opt = 
        run_opts.prior_gpu_opt = '--use-gpu=no'
        run_opts.prior_queue_opt = 
    run_opts.command = args.command
    run_opts.egs_command = (args.egs_command if (args.egs_command is not None) else args.command)
    run_opts.num_jobs_compute_prior = args.num_jobs_compute_prior
    return [args, run_opts]