def add_train_command(subparsers): # Train subparser = subparsers.add_parser('train', help='Training with NNP.') subparser.add_argument( '-r', '--resume', help='resume from last saved parameter.', action='store_true') subparser.add_argument( '-c', '--config', help='path to nntxt', required=True) subparser.add_argument( '-p', '--param', help='path to parameter file', required=False) subparser.add_argument( '-o', '--outdir', help='output directory', required=True) callback.add_train_command_arg(subparser) subparser.set_defaults(func=train_command)
def add_train_command(subparsers): # Train subparser = subparsers.add_parser('train', help='Training with NNP.') subparser.add_argument('-r', '--resume', help='Resume from last saved parameter', action='store_true') subparser.add_argument('-c', '--config', help='Path to nntxt', required=True) subparser.add_argument('-p', '--param', help='Path to parameter file', required=False) subparser.add_argument('-o', '--outdir', help='Output directory', required=True) subparser.add_argument('-O', '--enable-ooc', help='Enable Out Of Core training', action='store_true') subparser.add_argument( '-m', '--ooc-gpu-memory-size', help='OOC gpu memory size (INTEGER or NUMeNUM or NUM[KkMmGgTtPp])', default=None) subparser.add_argument('-o', '--outdir', help='output directory', required=True) subparser.add_argument('-C', '--context', help='Force exec context (cpu or cudnn[:DEVID])', default=None) subparser.add_argument( '-w', '--ooc-window-length', help='OOC window length (INTEGER or NUMeNUM or NUM[KkMmGgTtPp])', default=None) callback.add_train_command_arg(subparser) subparser.set_defaults(func=train_command)