标签:var alt data pat command pre add 技术 script
这是什么鬼?
看着挺好玩
再插入一个代码行
1 import argparse 2 3 # 解析命令行参数 4 parser = argparse.ArgumentParser( 5 description=‘Train Mask R-CNN to detect balloons.‘) 6 parser.add_argument("command", 7 metavar="<command>", 8 help="‘train‘ or ‘splash‘") 9 parser.add_argument(‘--dataset‘, required=False, 10 metavar="/path/to/balloon/dataset/", 11 help=‘Directory of the Balloon dataset‘) 12 parser.add_argument(‘--weights‘, required=True, 13 metavar="/path/to/weights.h5", 14 help="Path to weights .h5 file or ‘coco‘") 15 parser.add_argument(‘--logs‘, required=False, 16 default=DEFAULT_LOGS_DIR, 17 metavar="/path/to/logs/", 18 help=‘Logs and checkpoints directory (default=logs/)‘) 19 parser.add_argument(‘--image‘, required=False, 20 metavar="path or URL to image", 21 help=‘Image to apply the color splash effect on‘) 22 parser.add_argument(‘--video‘, required=False, 23 metavar="path or URL to video", 24 help=‘Video to apply the color splash effect on‘) 25 args = parser.parse_args() 26 27 # 验证参数,使用assert语法。 28 if args.command == "train": 29 assert args.dataset, "Argument --dataset is required for training" 30 elif args.command == "splash": 31 assert args.image or args.video, "Provide --image or --video to apply color splash"
标签:var alt data pat command pre add 技术 script
原文地址:https://www.cnblogs.com/DdFly/p/10281445.html