Beispiel #1
0
                                  resnet_size=params['resnet_size'],
                                  weight_decay=weight_decay,
                                  learning_rate_fn=learning_rate_fn,
                                  momentum=0.9,
                                  data_format=params['data_format'],
                                  version=params['version'],
                                  loss_filter_fn=loss_filter_fn,
                                  multi_gpu=params['multi_gpu'])


def main(unused_argv):
    input_function = FLAGS.use_synthetic_data and get_synth_input_fn(
    ) or input_fn
    resnet.resnet_main(FLAGS, cifar10_model_fn, input_function)


if __name__ == '__main__':
    tf.logging.set_verbosity(tf.logging.INFO)

    parser = resnet.ResnetArgParser()
    # Set defaults that are reasonable for this model.
    parser.set_defaults(data_dir='/tmp/cifar10_data',
                        model_dir='/tmp/cifar10_model',
                        resnet_size=32,
                        train_epochs=250,
                        epochs_per_eval=10,
                        batch_size=128)

    FLAGS, unparsed = parser.parse_known_args()
    tf.app.run(argv=[sys.argv[0]] + unparsed)
Beispiel #2
0
        boundary_epochs=[30, 60, 80, 90],
        decay_rates=[1, 0.1, 0.01, 0.001, 1e-4])

    return resnet.resnet_model_fn(features,
                                  labels,
                                  mode,
                                  ImagenetModel,
                                  resnet_size=params['resnet_size'],
                                  weight_decay=1e-4,
                                  learning_rate_fn=learning_rate_fn,
                                  momentum=0.9,
                                  data_format=params['data_format'],
                                  version=params['version'],
                                  loss_filter_fn=None,
                                  multi_gpu=params['multi_gpu'])


def main(unused_argv):
    input_function = FLAGS.use_synthetic_data and get_synth_input_fn(
    ) or input_fn
    resnet.resnet_main(FLAGS, imagenet_model_fn, input_function)


if __name__ == '__main__':
    tf.logging.set_verbosity(tf.logging.INFO)

    parser = resnet.ResnetArgParser(
        resnet_size_choices=[18, 34, 50, 101, 152, 200])
    FLAGS, unparsed = parser.parse_known_args()
    tf.app.run(argv=[sys.argv[0]] + unparsed)