Esempio n. 1
0
def define_imagenet_flags(dynamic_loss_scale=False, fp16_implementation=False):
  resnet_run_loop.define_resnet_flags(
      resnet_size_choices=['18', '34', '50', '101', '152', '200'],
      dynamic_loss_scale=dynamic_loss_scale,
      fp16_implementation=fp16_implementation)
  flags.adopt_module_key_flags(resnet_run_loop)
  flags_core.set_defaults(train_epochs=90)
def define_imagenet_flags():
    resnet_run_loop.define_resnet_flags()
    flags.DEFINE_integer(
        name='train_data_size',
        short_name='tds',
        help=flags_core.help_wrap('The number of training images'))

    # flags.DEFINE_integer(
    #   name='validation_data_size', short_name='vds',
    #   help=flags_core.help_wrap('The number of validation images')
    # )

    flags.DEFINE_integer(name='image_size',
                         short_name='is',
                         help=flags_core.help_wrap('size of the square image'))

    flags.DEFINE_integer(name='num_classes',
                         short_name='nc',
                         help=flags_core.help_wrap('number of classes'))

    flags.DEFINE_integer(name='kernel_size',
                         short_name='ks',
                         help=flags_core.help_wrap('convolution kernel size'))

    flags.DEFINE_integer(name='num_filters',
                         short_name='is',
                         help=flags_core.help_wrap('size of the square image'))

    flags.DEFINE_float(name='learning_rate',
                       short_name='lr',
                       help=flags_core.help_wrap('learning_rate'))

    flags.adopt_module_key_flags(resnet_run_loop)
Esempio n. 3
0
def define_imagenet_flags():
    resnet_run_loop.define_resnet_flags(
        resnet_size_choices=['18', '34', '50', '101', '152', '200'])
    flags.adopt_module_key_flags(resnet_run_loop)
    flags_core.set_defaults(train_epochs=90)
    flags.DEFINE_string('tfrecords_directory', None,
                        'should point to tfrecords part of our bucket')
Esempio n. 4
0
def define_zj_flags():
    resnet_run_loop.define_resnet_flags()
    flags.adopt_module_key_flags(resnet_run_loop)
    flags_core.set_defaults(model_dir='zj_model_3',
                            resnet_size='32',
                            train_epochs=250,
                            epochs_between_evals=1,
                            batch_size=128)
Esempio n. 5
0
def define_cifar_flags():
    resnet_run_loop.define_resnet_flags()
    flags.adopt_module_key_flags(resnet_run_loop)
    flags_core.set_defaults(data_dir='/tmp/cifar10_data',
                            model_dir='/tmp/cifar10_model',
                            resnet_size='32',
                            train_epochs=250,
                            epochs_between_evals=1,
                            batch_size=128)
Esempio n. 6
0
def define_cifar_flags():
  resnet_run_loop.define_resnet_flags()
  flags.adopt_module_key_flags(resnet_run_loop)
  flags_core.set_defaults(data_dir='/tmp/cifar10_data',
                          model_dir='/tmp/cifar10_model',
                          resnet_size='32',
                          train_epochs=250,
                          epochs_between_evals=10,
                          batch_size=128)
Esempio n. 7
0
def define_cifar_flags():
    resnet_run_loop.define_resnet_flags()
    flags.adopt_module_key_flags(resnet_run_loop)
    flags_core.set_defaults(data_dir='./cifar10_data',
                            model_dir=sys.argv[1],
                            resnet_size='32',
                            train_epochs=250,
                            epochs_between_evals=10,
                            batch_size=BATCH_SIZE)
Esempio n. 8
0
def define_cifar_flags():
    resnet_run_loop.define_resnet_flags()
    flags.adopt_module_key_flags(resnet_run_loop)
    flags_core.set_defaults(data_dir='/tmp/cifar10_data/cifar-10-batches-bin',
                            model_dir='/tmp/cifar10_model',
                            resnet_size='56',
                            train_epochs=182,
                            epochs_between_evals=10,
                            batch_size=128,
                            image_bytes_as_serving_input=False)
Esempio n. 9
0
def define_cifar_flags():
  resnet_run_loop.define_resnet_flags()
  flags.adopt_module_key_flags(resnet_run_loop)
  flags_core.set_defaults(data_dir='/tmp/cifar10_data/cifar-10-batches-bin',
                          model_dir='/tmp/cifar10_model',
                          resnet_size='56',
                          train_epochs=182,
                          epochs_between_evals=10,
                          batch_size=128,
                          image_bytes_as_serving_input=False)
Esempio n. 10
0
def define_cifar_flags():
  resnet_run_loop.define_resnet_flags()
  flags.adopt_module_key_flags(resnet_run_loop)
  flags_core.set_defaults(data_dir='/content/my_drive/tmp/TIMBERLAND_data',
                          model_dir='/content/my_drive/tmp/TIMBERLAND_model',
                          resnet_size='56',
                          train_epochs=182,
                          epochs_between_evals=10,
                          batch_size=3,
                          image_bytes_as_serving_input=False)
def define_imagenet_flags():
    resnet_run_loop.define_resnet_flags(
        resnet_size_choices=['18', '34', '50', '101', '152', '200'])
    flags.adopt_module_key_flags(resnet_run_loop)
    flags_core.set_defaults(model_dir=path_to_resnet_model,
                            resnet_size='50',
                            train_epochs=100,
                            epochs_between_evals=20,
                            batch_size=64,
                            use_synthetic_data=True)
Esempio n. 12
0
def define_mydata_flags():
    resnet_run_loop.define_resnet_flags(
        resnet_size_choices=['18', '34', '50', '101', '152', '200'],
        dynamic_loss_scale=True,
        fp16_implementation=True)
    flags.adopt_module_key_flags(resnet_run_loop)
    flags_core.set_defaults(
        train_epochs=20,
        use_train_and_evaluate=False,
        data_format='channels_last',
    )
    flags_core.set_defaults(data_dir='_path/record/')
Esempio n. 13
0
def define_cifar_flags():
    ## input flags
    flags.DEFINE_string("job_name", "", "Either 'ps' or 'worker'")
    flags.DEFINE_integer("task_index", 0, "Index of task within the job")
    FLAGS = flags.FLAGS
    # try make all flags as tf.Variable - not here
    resnet_run_loop.define_resnet_flags()

    flags.adopt_module_key_flags(resnet_run_loop)
    flags_core.set_defaults(data_dir='/tmp/cifar10_data',
                            model_dir='/tmp/cifar10_model',
                            resnet_size='8',
                            train_epochs=1,
                            epochs_between_evals=1,
                            batch_size=1,
                            image_bytes_as_serving_input=False)
def define_imagenet_flags():
  resnet_run_loop.define_resnet_flags(
      resnet_size_choices=['18', '34', '50', '101', '152', '200'])
  flags.adopt_module_key_flags(resnet_run_loop)
  flags_core.set_defaults(train_epochs=90)
Esempio n. 15
0
def define_imagenet_flags():
  resnet_run_loop.define_resnet_flags(
      resnet_size_choices=['18', '34', '50', '101', '152', '200'])
  flags.adopt_module_key_flags(resnet_run_loop)
  flags_core.set_defaults(train_epochs=100)
Esempio n. 16
0
def define_imagenet_flags(dynamic_loss_scale=False):
  resnet_run_loop.define_resnet_flags(
      resnet_size_choices=['18', '34', '50', '101', '152', '200'],
      dynamic_loss_scale=dynamic_loss_scale)
  flags.adopt_module_key_flags(resnet_run_loop)
  flags_core.set_defaults(train_epochs=90)