def get_parser() -> argparse.ArgumentParser: parser = options.get_trainer_options() # General opts parser.add_argument('-v', '--verbose', action='store_true', default=False, help='Set verbose mode') # Data options parser.add_argument('--checkpoint-dir', type=str, default='./checkpoint', help='Set directory to place training snapshots into') parser.add_argument('--checkpoint-name', type=str, default='mnist_autoencoder', help='Name to prepend to all checkpoints') parser.add_argument('--load-checkpoint', type=str, default=None, help='Load a given checkpoint') parser.add_argument('--overwrite', action='store_true', default=False, help='Overwrite existing processed data files') return parser
def get_parser() -> argparse.ArgumentParser: parser = options.get_trainer_options() parser.add_argument('-v', '--verbose', action='store_true', default=False, help='Set verbose mode') parser.add_argument('--find-lr', action='store_true', default=False, help='Search for optimal learning rate') parser.add_argument('--num-layers', type=int, default=28, help='Number of layers for Resnet model') parser.add_argument('--num-classes', type=int, default=10, help='Number of output classes for classification') parser.add_argument('--widen-factor', type=int, default=1, help='Widen factor for wide Resnet') # Data options parser.add_argument('--checkpoint-dir', type=str, default='./checkpoint', help='Set directory to place training snapshots into') parser.add_argument('--checkpoint-name', type=str, default='resnet-cifar10', help='Name to prepend to all checkpoints') return parser
def get_parser() -> argparse.ArgumentParser: parser = options.get_trainer_options() # add some extra options for this particular example parser.add_argument('-v', '--verbose', action='store_true', default=False, help='Set verbose mode') parser.add_argument('--find-lr', action='store_true', default=False, help='Search for optimal learning rate') # Figure output parser.add_argument('--fig-name', type=str, default='figures/cifar10net_train.png', help='Name of file to place output figure into') # Checkpoint options parser.add_argument('--checkpoint-dir', type=str, default='./checkpoint', help='Set directory to place training snapshots into') parser.add_argument('--checkpoint-name', type=str, default='cifar10', help='Name to prepend to all checkpoints') # TODO : implement this... parser.add_argument('--load-checkpoint', type=str, default=None, help='Load a given checkpoint') return parser
def get_parser(): parser = options.get_trainer_options() parser = options.get_lr_finder_options(parser) # General opts parser.add_argument('-v', '--verbose', action='store_true', default=False, help='Set verbose mode') parser.add_argument('--draw-plot', default=False, action='store_true', help='Display plots') parser.add_argument( '--find-only', action='store_true', default=False, help='Only perform the parameter find step (no training)') # model, size options parser.add_argument( '--model', type=str, default='resnet', help='Type of model to use in example. (default: resnet)') parser.add_argument('--resnet-depth', type=int, default=58, help='Depth of resnet to use for resnet models') # Schedule options parser.add_argument('--exp-decay', type=float, default=0.001, help='Exponential decay term') parser.add_argument('--sched-stepsize', type=int, default=0, help='Size of step for learning rate scheduler') # Data options parser.add_argument('--checkpoint-dir', type=str, default='./checkpoint', help='Set directory to place training snapshots into') parser.add_argument('--checkpoint-name', type=str, default='lr_find_ex_cifar10', help='Name to prepend to all checkpoints') parser.add_argument('--load-checkpoint', type=str, default=None, help='Load a given checkpoint') parser.add_argument('--overwrite', action='store_true', default=False, help='Overwrite existing processed data files') return parser
def get_parser() -> argparse.ArgumentParser: parser = options.get_trainer_options() # General opts parser.add_argument('-v', '--verbose', action='store_true', default=False, help='Set verbose mode') # Network options parser.add_argument('--zvec-dim', type=int, default=128, help='Dimension of z vector') parser.add_argument('--g-num-filters', type=int, default=64, help='Number of filters to use in generator') parser.add_argument('--d-num-filters', type=int, default=64, help='Number of filters to use in discriminator') # DCGAN trainer options parser.add_argument('--beta1', type=float, default=0.5, help='beta1 parameter for ADAM optimizer') # Data options parser.add_argument( '--image-size', type=int, default=64, help= 'Resize all images to this size using a transformer before training') parser.add_argument('--dataset-root', type=str, default='/mnt/ml-data/datasets/celeba/', help='Path to root of dataset') parser.add_argument('--dataset', type=str, default=None, help='Path to dataset in LMDB format (default: None)') # checkpoint options parser.add_argument('--checkpoint-dir', type=str, default='./checkpoint/', help='Set directory to place training snapshots into') parser.add_argument('--checkpoint-name', type=str, default='lmdb_dcgan', help='Name to prepend to all checkpoints') parser.add_argument('--load-checkpoint', type=str, default=None, help='Load a given checkpoint') return parser
def get_parser() -> argparse.ArgumentParser: parser = options.get_trainer_options() # General opts parser.add_argument('-v', '--verbose', action='store_true', default=False, help='Set verbose mode') parser.add_argument( '--infer', action='store_true', default=False, help='Do an inference pass on the models after training') parser.add_argument( '--data-dir', type=str, default='./data', help='Path to location where data will be downloaded (default: ./data)' ) parser.add_argument( '--loss-history-file', type=str, default='figures/dae_loss_history.png', help= 'File to write loss history to (default: figures/dae_loss_history.png') # Noise options parser.add_argument( '--noise-bias', type=float, default=0.25, help='Amount to bias image by during noise application (default: 0.25)' ) parser.add_argument( '--noise-factor', type=float, default=0.1, help='Amount of noise to add to image overall (default: 0.1)') # Data options parser.add_argument('--checkpoint-dir', type=str, default='./checkpoint', help='Set directory to place training snapshots into') parser.add_argument('--checkpoint-name', type=str, default='denoise_auto_mnist', help='Name to prepend to all checkpoints') return parser
def get_parser() -> argparse.ArgumentParser: parser = options.get_trainer_options() parser = options.get_lr_finder_options(parser) # General opts parser.add_argument('-v', '--verbose', action='store_true', default=False, help='Set verbose mode') parser.add_argument('--find-lr', action='store_true', default=False, help='Search for optimal learning rate') parser.add_argument('--checkpoint-dir', type=str, default='./checkpoint', help='Set directory to place training snapshots into') parser.add_argument('--checkpoint-name', type=str, default='mnist', help='Name to prepend to all checkpoints') return parser
def get_parser() -> argparse.ArgumentParser: parser = options.get_trainer_options() parser = options.get_lr_finder_options(parser) # General opts parser.add_argument('-v', '--verbose', action='store_true', default=False, help='Set verbose mode' ) parser.add_argument('--draw-plot', default=False, action='store_true', help='Display plots' ) # Data options parser.add_argument('--checkpoint-dir', type=str, default='./checkpoint', help='Set directory to place training snapshots into' ) parser.add_argument('--load-checkpoint', type=str, default=None, help='Load a given checkpoint' ) parser.add_argument('--tensorboard-dir', default=None, type=str, help='Directory to save tensorboard runs to. If None, tensorboard is not used. (default: None)' ) parser.add_argument('--sched-type', type=str, default='TriangularScheduler', help='Type of learning rate scheduler to use. Must be the name of a class in lernomatic.train.schedule. (default: TriangularScheduler)' ) return parser
def get_parser() -> argparse.ArgumentParser: parser = options.get_trainer_options() # General opts parser.add_argument('-v', '--verbose', action='store_true', default=False, help='Set verbose mode') parser.add_argument('--find-lr', action='store_true', default=False, help='Search for optimal learning rate') # Dataset options parser.add_argument('--train-dataset', type=str, default='hdf5/cvd_train.h5', help='Path to training dataset') parser.add_argument('--test-dataset', type=str, default='hdf5/cvd_test.h5', help='Path to test dataset') parser.add_argument('--val-dataset', type=str, default='hdf5/cvd_val.h5', help='Path to validation dataset') # Data options parser.add_argument('--checkpoint-dir', type=str, default='./checkpoint', help='Set directory to place training snapshots into') parser.add_argument('--checkpoint-name', type=str, default='cvd_', help='Name to prepend to all checkpoints') return parser
def get_parser() -> argparse.ArgumentParser: parser = options.get_trainer_options() # General opts parser.add_argument('-v', '--verbose', action='store_true', default=False, help='Set verbose mode' ) # Network options parser.add_argument('--gen-type', type=str, default='resnet', help='Type of generator to use (resnet or unet)' ) parser.add_argument('--disc-type', type=str, default='pixel', help='Type of discriminator to use (nlayer or pixel)' ) # Data options parser.add_argument('--train-dataset-h5', type=str, default=None, help='If specified, load this *.h5 dataset as training data' ) parser.add_argument('--val-dataset-h5', type=str, default=None, help='If specified, load this *.h5 dataset as validation data' ) parser.add_argument('--train-data-path', type=str, default='/home/kreshnik/ml-data/night2day/train/', help='Path to training data' ) parser.add_argument('--val-data-path', type=str, default='/home/kreshnik/ml-data/night2day/val/', help='Path to training data' ) parser.add_argument('--checkpoint-dir', type=str, default='./checkpoint', help='Set directory to place training snapshots into' ) parser.add_argument('--checkpoint-name', type=str, default='pix2pix', help='Name to prepend to all checkpoints' ) parser.add_argument('--load-checkpoint', type=str, default=None, help='Load a given checkpoint' ) parser.add_argument('--overwrite', action='store_true', default=False, help='Overwrite existing processed data files' ) return parser