type=str, default='mse', choices=allowed_losses(), help="loss criterion") parser.add_argument('--print_freq', type=int, default=10000, help="print every x iterations") parser.add_argument('--save_freq', type=int, default=100000, help="save every x interations") parser.add_argument('--metric', type=str, default='rmse', choices=allowed_metrics(), help="metric to use during evaluation") parser.add_argument('--metric_1', type=str, default='mae', choices=allowed_metrics(), help="metric to use during evaluation") parser.add_argument('--wlid', type=float, default=0.1, help="weight base loss") parser.add_argument('--wrgb', type=float, default=0.1, help="weight base loss") parser.add_argument('--wpred', type=float, default=1, help="weight base loss") parser.add_argument('--wguide', type=float, default=0.1, help="weight base loss") # Cudnn parser.add_argument("--cudnn",
parser.add_argument('--optimizer', type=str, default='adam', help='adam or sgd') parser.add_argument('--weight_init', type=str, default='kaiming', help='normal, xavier, kaiming, orhtogonal weights initialisation') parser.add_argument('--weight_decay', type=float, default=0, help='L2 weight decay/regularisation on?') parser.add_argument('--lr_decay', action='store_true', help='decay learning rate with rule') parser.add_argument('--niter', type=int, default=50, help='# of iter at starting learning rate') parser.add_argument('--niter_decay', type=int, default=400, help='# of iter to linearly decay learning rate to zero') parser.add_argument('--lr_policy', type=str, default=None, help='{}learning rate policy: lambda|step|plateau') parser.add_argument('--lr_decay_iters', type=int, default=7, help='multiply by a gamma every lr_decay_iters iterations') parser.add_argument('--clip_grad_norm', type=int, default=0, help='performs gradient clipping') parser.add_argument('--gamma', type=float, default=0.5, help='factor to decay learning rate every lr_decay_iters with') # Loss settings parser.add_argument('--loss_criterion', type=str, default='mse', choices=allowed_losses(), help="loss criterion") parser.add_argument('--print_freq', type=int, default=10000, help="print every x iterations") parser.add_argument('--save_freq', type=int, default=100000, help="save every x interations") parser.add_argument('--metric', type=str, default='rmse', choices=allowed_metrics(), help="metric to use during evaluation") parser.add_argument('--metric_1', type=str, default='mae', choices=allowed_metrics(), help="metric to use during evaluation") parser.add_argument('--wlid', type=float, default=0.1, help="weight base loss") parser.add_argument('--wrgb', type=float, default=0.1, help="weight base loss") parser.add_argument('--wpred', type=float, default=1, help="weight base loss") parser.add_argument('--wguide', type=float, default=0.1, help="weight base loss") # Cudnn parser.add_argument("--cudnn", type=str2bool, nargs='?', const=True, default=True, help="cudnn optimization active") parser.add_argument('--gpu_ids', default='1', type=str, help='gpu device ids for CUDA_VISIBLE_DEVICES') parser.add_argument("--mask_intersec", type=str2bool, nargs='?', const=True, default=False, help="use mask_gt - mask_input as final mask for loss calculation") parser.add_argument('--num_bins', type=int, default=1, help="Number of bins for weight map") parser.add_argument('--multi', action='store_true', help='use multiple gpus') parser.add_argument("--seed", type=str2bool, nargs='?', const=True, default=True, help="use seed")