pytricks

作者: 谢小帅 | 来源:发表于2019-01-08 10:50 被阅读19次
    1. 显示 parser 的参数列表
    parser = argparse.ArgumentParser()
    # Path related arguments
    parser.add_argument('--test_imgs', required=True, nargs='+', type=str,
                        help='a list of image paths that needs to be tested')
    parser.add_argument('--model_path', required=True,
                        help='folder to model path')
    parser.add_argument('--suffix', default='_epoch_20.pth',
                        help="which snapshot to load")
    
    args = parser.parse_args()
    print("Input arguments:")
    for key, val in vars(args).items():  # 显示参数列表
        print("{:16} {}".format(key, val))
    
    Input arguments:
    test_imgs        ['ADEChallengeData2016/images/validation/ADE_val_00001519.jpg']
    model_path       baseline-resnet50dilated-ppm_deepsup
    suffix           _epoch_20.pth
    

    相关文章

      网友评论

          本文标题:pytricks

          本文链接:https://www.haomeiwen.com/subject/jqlvrqtx.html