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
网友评论