parser.add_argument( '--freeze-bn', action='store_true', help= "freeze running statistics in BatchNorm layers during training (default: False)" ) parser.add_argument( '--label-smooth', action='store_true', help="use label smoothing regularizer in cross entropy loss") # Architecture parser.add_argument('-a', '--arch', type=str, default='resnet50', choices=models.get_names()) # Miscs parser.add_argument('--print-freq', type=int, default=10, help="print frequency") parser.add_argument('--seed', type=int, default=1, help="manual seed") parser.add_argument('--resume', type=str, default='', metavar='PATH') parser.add_argument( '--load-weights', type=str, default='', help="load pretrained weights but ignores layers that don't match in size") parser.add_argument('--evaluate', action='store_true', help="evaluation only") parser.add_argument( '--eval-step',
parser.add_argument('--stepsize', default=[20, 40], nargs='+', type=int, help="stepsize to decay learning rate") parser.add_argument('--gamma', default=0.1, type=float, help="learning rate decay") parser.add_argument('--weight-decay', default=5e-04, type=float, help="weight decay (default: 5e-04)") parser.add_argument('--fixbase-epoch', default=0, type=int, help="epochs to fix base network (only train classifier, default: 0)") parser.add_argument('--fixbase-lr', default=0.0003, type=float, help="learning rate (when base network is frozen)") parser.add_argument('--freeze-bn', action='store_true', help="freeze running statistics in BatchNorm layers during training (default: False)") parser.add_argument('--label-smooth', action='store_true', help="use label smoothing regularizer in cross entropy loss") # Architecture parser.add_argument('-a', '--arch', type=str, default='resnet50', choices=models.get_names()) parser.add_argument('--pool', type=str, default='avg', choices=['avg', 'max']) # Miscs parser.add_argument('--print-freq', type=int, default=10, help="print frequency") parser.add_argument('--seed', type=int, default=1, help="manual seed") parser.add_argument('--resume', type=str, default='', metavar='PATH') parser.add_argument('--load-weights', type=str, default='', help="load pretrained weights but ignores layers that don't match in size") parser.add_argument('--evaluate', action='store_true', help="evaluation only") parser.add_argument('--eval-step', type=int, default=-1, help="run evaluation for every N epochs (set to -1 to test after training)") parser.add_argument('--start-eval', type=int, default=0, help="start to evaluate after specific epoch")