def get_arguments(): parser = argparse.ArgumentParser(description='Tree segmentation') # Model parameters parser.add_argument( '--nfeatures', type=int, default=8, help='number of features present in the first layer of the network') parser.add_argument('--input', default='/storage/workspace/dtd/images/scaly', help='input image path') parser.add_argument('--display', action='store_true', default=False, help='display progress of generated images') parser.add_argument( '--image_size', type=int, default=32, help='the height / width of the input image to network') parser.add_argument('--beta1', type=float, default=0.5, help='beta1 for adam. default=0.5') parser.add_argument('--output', default="output", help="output path") common.add(parser) models.add_arguments(parser) return parser.parse_args()
def _get_arguments(argv): parser = argparse.ArgumentParser() config.add_arguments(parser) models.add_arguments(parser) solver.add_arguments(parser) loss_metrics.add_arguments(parser) input_pipeline.add_arguments(parser) custom_evaluator.add_arguments(parser) args = parser.parse_args(argv[1:]) config.check_args(args, parser) config.fill_default_args(args) return args
'--train_path', default='train.hdf5', help='Input path for pre-processed training data and labels') parser.add_argument( '--val_path', default='val.hdf5', help='Input path for pre-processed validation data and labels') parser.add_argument('--output_path', default='model.hdf5', help='Output path for model weights') parser.add_argument('--log_path', default='logs/UCSD/upscale/', help='Output path for TensorFlow logs') # model specification parser = models.add_arguments(parser) # training parser.add_argument( '--gpu_frac', type=float, default=0., help='Fraction of GPU memory to allocate (TensorFlow only)') parser.add_argument( '--tile_size', type=int, default='-1', help='Tile size: -1 for no tiling, 1 for patches, n>1 for nxn tiles') parser.add_argument('--batch_size', type=int, default=32, help='Batch size') parser.add_argument('--batches_per_epoch', type=int,