Exemple #1
0
    def __init__(self, resnet_size_choices=None):
        super(ResnetArgParser, self).__init__(parents=[
            parsers.BaseParser(),
            parsers.PerformanceParser(),
            parsers.ImageModelParser(),
            parsers.ExportParser(),
            parsers.BenchmarkParser(),
        ])

        self.add_argument(
            '--version',
            '-v',
            type=int,
            choices=[1, 2],
            default=resnet_model.DEFAULT_VERSION,
            help='Version of ResNet. (1 or 2) See README.md for details.')

        self.add_argument(
            '--resnet_size',
            '-rs',
            type=int,
            default=50,
            choices=resnet_size_choices,
            help='[default: %(default)s] The size of the ResNet model to use.',
            metavar='<RS>' if resnet_size_choices is None else None)
Exemple #2
0
    def __init__(self):
        super(DANArgParser, self).__init__(parents=[
            parsers.BaseParser(),
            parsers.PerformanceParser(),
            parsers.ImageModelParser(),
        ])

        self.add_argument(
            "--data_dir_test",
            "-ddt",
            default=None,
            help="[default: %(default)s] The location of the test data.",
            metavar="<DD>",
        )

        self.add_argument(
            '--dan_stage',
            '-ds',
            type=int,
            default=1,
            choices=[1, 2],
            help='[default: %(default)s] The stage of the DAN model.')

        self.add_argument('--mode',
                          '-mode',
                          type=str,
                          default='train',
                          choices=['train', 'eval', 'predict'])

        self.add_argument('--num_lmark', '-nlm', type=int, default=68)
Exemple #3
0
 def __init__(self):
     super(SimpNetArgParser, self).__init__(parents=[
         parsers.BaseParser(),
         parsers.PerformanceParser(),
         parsers.ImageModelParser(),
         parsers.BenchmarkParser(),
     ])
 def __init__(self):
     super(TestParser, self).__init__(parents=[
         parsers.BaseParser(),
         parsers.PerformanceParser(num_parallel_calls=True, inter_op=True,
                                   intra_op=True, use_synthetic_data=True),
         parsers.ImageModelParser(data_format=True),
         parsers.BenchmarkParser(benchmark_log_dir=True)
     ])
Exemple #5
0
    def __init__(self):
        super(MNISTArgParser, self).__init__(parents=[
            parsers.BaseParser(),
            parsers.ImageModelParser(),
        ])

        self.set_defaults(data_dir='/tmp/mnist_data',
                          model_dir='/tmp/mnist_model',
                          batch_size=100,
                          train_epochs=40)
Exemple #6
0
    def __init__(self):
        super(MNISTArgParser, self).__init__(parents=[
            parsers.BaseParser(),
            parsers.ImageModelParser(),
            parsers.ExportParser(),
        ])

        self.set_defaults(
            data_dir='/home/jcf/models-master/official/mnist/mnist_data',
            model_dir='/tmp/mnist_model',
            batch_size=100,
            train_epochs=40)
Exemple #7
0
 def __init__(self):
   super(WideDeepArgParser, self).__init__(parents=[parsers.BaseParser()])
   self.add_argument(
       '--model_type', '-mt', type=str, default='wide_deep',
       choices=['wide', 'deep', 'wide_deep'],
       help='[default %(default)s] Valid model types: wide, deep, wide_deep.',
       metavar='<MT>')
   self.set_defaults(
       data_dir='/tmp/census_data',
       model_dir='/tmp/census_model',
       train_epochs=40,
       epochs_between_evals=2,
       batch_size=40)
Exemple #8
0
  def __init__(self, resnet_size_choices=None):
    super(ResnetArgParser, self).__init__(parents=[
        parsers.BaseParser(),
        parsers.PerformanceParser(),
        parsers.ImageModelParser(),
    ])

    self.add_argument(
        '--resnet_size', '-rs', type=int, default=50,
        choices=resnet_size_choices,
        help='[default: %(default)s]The size of the ResNet model to use.',
        metavar='<RS>'
    )
 def __init__(self):
   super(WideDeepArgParser, self).__init__(parents=[
       parsers.BaseParser(multi_gpu=False, num_gpu=False)])
   self.add_argument(
       '--model_type', '-mt', type=str, default='wide',
       choices=['wide', 'deep', 'wide_deep'],
       help='[default %(default)s] Valid model types: wide, deep, wide_deep.',
       metavar='<MT>')
   self.set_defaults(
       data_dir='/home/vivek/Work/kaggle/DontGetKicked/data/train',
       model_dir='/home/vivek/Work/kaggle/DontGetKicked/model',
       train_epochs=400,
       epochs_between_evals=2,
       batch_size=80)
  def __init__(self, resnet_size_choices=None):
    super(ResnetArgParser, self).__init__(parents=[
        parsers.BaseParser(),
        parsers.PerformanceParser(),
        parsers.ImageModelParser(),
        parsers.ExportParser(),
        parsers.BenchmarkParser(),
    ])

    self.add_argument('--dataset','-d',default="cifar10",
        help='Which dataset to use (currently cifar10/cifar100)'
    )

    self.add_argument(
        '--version', '-v', type=int, choices=[1, 2],
        default=rncm.RESNET_DEFAULT_VERSION,
        help='Version of ResNet. (1 or 2) See README.md for details.'
    )

    self.add_argument(
        '--resnet_size', '-rs', type=int, default=50,
        choices=resnet_size_choices,
        help='[default: %(default)s] The size of the ResNet model to use.',
        metavar='<RS>' if resnet_size_choices is None else None
    )

    self.add_argument(
        '--continu',type=int,default=0,
        help='Continue with an existing model, or start from scratch'
    )

    self.add_argument(
        '--scratch',type=int,default=0,
        help='Start from scratch even if model exist'
    )

    self.add_argument(
        '--ncmmethod', default=rncm.NCM_DEFAULT_METHOD,
        help='[default: %(default)s] Which NCM method to use',
    )

    self.add_argument(
        '--ncmparam', default=rncm.NCM_DEFAULT_PARAMETER, type=float,
        help='[default: %(default)s] additional NCM parameter to use',
    )

    self.add_argument(
        '--initial_learning_scale', '-l', default=0.1, type=float,
        help='Intial Learning Scale (default: %(default)s)',
    )
Exemple #11
0
    def __init__(self):
        super(WideDeepArgParser, self).__init__(parents=[parsers.BaseParser()])
        self.add_argument(
            '--mode',
            '-m',
            type=str,
            default='ndcg',
            choices=['train', 'retrain', 'ndcg'],
            help='[default: %(default)s] Model types: train, retrain, ndcg.',
            metavar='<M>')

        self.add_argument(
            '--params',
            '-p',
            type=str,
            default='configs/std_params.json',
            help=
            '[default: %(default)s] Hyper-parameter setting: a json object.',
            metavar='<P>')

        self.add_argument('--name',
                          '-n',
                          type=str,
                          default='tmp_model',
                          help='[default: %(default)s] Model name.',
                          metavar='<N>')

        self.add_argument('--loss',
                          '-l',
                          type=str,
                          default='focal',
                          choices=['focal', 'xent', 'mse'],
                          help='[default: %(default)s] Model loss.',
                          metavar='<L>')

        self.add_argument('--device',
                          '-d',
                          type=str,
                          default='gpu',
                          choices=['cpu', 'gpu'],
                          help='[default: %(default)s] Select device.',
                          metavar='<d>')

        self.set_defaults(data_dir='./data/',
                          model_dir='./model_saved/',
                          train_epochs=100,
                          epochs_between_evals=1,
                          batch_size=64)
Exemple #12
0
    def __init__(self):
        super(MNISTEagerArgParser, self).__init__(parents=[
            parsers.BaseParser(
                epochs_between_evals=False, multi_gpu=False, hooks=False),
            parsers.ImageModelParser()
        ])

        self.add_argument(
            '--log_interval',
            '-li',
            type=int,
            default=10,
            metavar='N',
            help=
            '[default: %(default)s] batches between logging training status')
        self.add_argument(
            '--output_dir',
            '-od',
            type=str,
            default=None,
            metavar='<OD>',
            help=
            '[default: %(default)s] Directory to write TensorBoard summaries')
        self.add_argument('--lr',
                          '-lr',
                          type=float,
                          default=0.01,
                          metavar='<LR>',
                          help='[default: %(default)s] learning rate')
        self.add_argument('--momentum',
                          '-m',
                          type=float,
                          default=0.5,
                          metavar='<M>',
                          help='[default: %(default)s] SGD momentum')
        self.add_argument('--no_gpu',
                          '-nogpu',
                          action='store_true',
                          default=False,
                          help='disables GPU usage even if a GPU is available')

        self.set_defaults(
            data_dir='/tmp/tensorflow/mnist/input_data',
            model_dir='/tmp/tensorflow/mnist/checkpoints/',
            batch_size=100,
            train_epochs=10,
        )
Exemple #13
0
    def __init__(self):
        super(MNISTArgParser, self).__init__(
            parents=[parsers.BaseParser(),
                     parsers.ImageModelParser()])

        self.add_argument(
            '--export_dir',
            type=str,
            help=
            '[default: %(default)s] If set, a SavedModel serialization of the '
            'model will be exported to this directory at the end of training. '
            'See the README for more details and relevant links.')

        self.set_defaults(data_dir='/tmp/mnist_data',
                          model_dir='/tmp/mnist_model',
                          batch_size=100,
                          train_epochs=40)
 def __init__(self):
     super(WideDeepArgParser, self).__init__(parents=[parsers.BaseParser()])
     self.add_argument(
         '--model_type',
         '-mt',
         type=str,
         default='wide_deep',
         choices=['wide', 'deep', 'wide_deep'],
         help=
         '[default %(default)s] Valid model types: wide, deep, wide_deep.',
         metavar='<MT>')
     self.set_defaults(
         data_dir=
         'Users/Smith/AppData/Local/Programs/Python/Python36/Python testing/',
         model_dir=
         'Users/Smith/AppData/Local/Programs/Python/Python36/Python testing/',
         train_epochs=40,
         epochs_between_evals=2,
         batch_size=40)
Exemple #15
0
    def __init__(self, resnet_size_choices=None):
        super(ResnetArgParser, self).__init__(parents=[
            parsers.BaseParser(),
            parsers.PerformanceParser(),
            parsers.ImageModelParser(),
            parsers.ExportParser(),
            parsers.BenchmarkParser(),
        ])

        self.add_argument(
            '--version',
            '-v',
            type=int,
            choices=[1, 2],
            default=resnet_model.DEFAULT_VERSION,
            help='Version of ResNet. (1 or 2) See README.md for details.')

        self.add_argument(
            '--resnet_size',
            '-rs',
            type=int,
            default=50,
            choices=resnet_size_choices,
            help='[default: %(default)s] The size of the ResNet model to use.',
            metavar='<RS>' if resnet_size_choices is None else None)

        self.add_argument(
            '--enable_ml_comm',
            '-mc',
            type=int,
            choices=[0, 1],
            default=1,
            help=
            '[default: %(default)s] Whether to use Cray ML-Comm Distributed Training Plugin'
        )

        self.add_argument(
            '--global_perf_log_freq',
            '-pf',
            type=int,
            default=50,
            help=
            '[default: %(default)s] Number of steps after which to report global (all process averages) training loss and performance'
        )

        self.add_argument(
            '--warmup_epochs',
            '-we',
            type=int,
            default=0,
            help=
            '[default: %(default)s] Number of warmup epochs when using LARS')

        self.add_argument(
            '--base_lr',
            '-blr',
            type=float,
            default=1.0,
            help=
            '[default: %(default)s] Learning rate to start after warmup epochs finish when using LARS'
        )

        self.add_argument(
            '--init_lr',
            '-ilr',
            type=float,
            default=0.1,
            help=
            '[default: %(default)s] Learning rate to start warmup with when using LARS'
        )

        self.add_argument(
            '--weight_decay',
            '-wd',
            type=float,
            default=1e-4,
            help='[default: %(default)s] Weight decay to use during training')