help="use sgd instead of adam") parser.add_argument('--onyx', type=h.str2bool, nargs='?', const=True, default=False, help="should output onyx") parser.add_argument('--save-dot-net', type=h.str2bool, nargs='?', const=True, default=False, help="should output in .net") parser.add_argument('--update-test-net-name', type=str, choices=h.getMethodNames(models), default=None, help="update test net name") parser.add_argument( '--normalize-layer', type=h.str2bool, nargs='?', const=True, default=True, help="should include a training set specific normalization layer") parser.add_argument( '--clip-norm', type=h.str2bool, nargs='?', const=True,
def printNet(self, f): self.net.printNet(f) # Training settings parser = argparse.ArgumentParser(description='PyTorch DiffAI Example', formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('--batch-size', type=int, default=10, metavar='N', help='input batch size for training') parser.add_argument('--test-freq', type=int, default=1, metavar='N', help='number of epochs to skip before testing') parser.add_argument('--test-batch-size', type=int, default=10, metavar='N', help='input batch size for testing') parser.add_argument('--sub-batch-size', type=int, default=3, metavar='N', help='input batch size for curve specs') parser.add_argument('--test', type=str, default=None, metavar='net', help='Saved net to use, in addition to any other nets you specify with -n') parser.add_argument('--update-test-net',type=h.str2bool, nargs='?', const=True, default=False, help="should update test net") parser.add_argument('--onyx', type=h.str2bool, nargs='?', const=True, default=False, help="should output onyx") parser.add_argument('--update-test-net-name', type=str, choices = h.getMethodNames(models), default=None, help="update test net name") parser.add_argument('--epochs', type=int, default=1000, metavar='N', help='number of epochs to train') parser.add_argument('--log-freq', type=int, default=10, metavar='N', help='The frequency with which log statistics are printed') parser.add_argument('--save-freq', type=int, default=1, metavar='N', help='The frequency with which nets and images are saved') parser.add_argument('--number-save-images', type=int, default=0, metavar='N', help='The number of images to save. Should be smaller than test-size.') parser.add_argument('--lr', type=float, default=0.001, metavar='LR', help='learning rate') parser.add_argument('--threshold', type=float, default=-0.01, metavar='TH', help='threshold for lr schedule') parser.add_argument('--patience', type=int, default=0, metavar='PT', help='patience for lr schedule') parser.add_argument('--factor', type=float, default=0.5, metavar='R', help='reduction multiplier for lr schedule') parser.add_argument('--max-norm', type=float, default=10000, metavar='MN', help='the maximum norm allowed in weight distribution') parser.add_argument('--curve-width', type=float, default=None, metavar='CW', help='the width of the curve spec') parser.add_argument('--width-weight', type=float, default=0, metavar='CW', help='the weight of width in a combined loss')