输出:
# 命令行输入 python myfile.py --help # 输出 usage:myfile.py [-h] optional arguments: -h, --help show this help message and exit来看看输出:
# 命令行输入 python myfile.py --help # 输出 # 注意看这里group组添加的参数中是最多只能选一个的模样 usage: myfile.py [-h](--network-path NETWORK | --network-offtheshelf NETWORK)[--dataset DATASET][--gpu-id N] Myfile.py is a testing file optional arguments: -h, --help show this help message and exit --network-path NETWORK pretrained network or network path (destination where network is save) --network-offtheshelf NETWORK off-the-shelf network --datasets DATASETS comma separated list of test datasets # 注意这里有个短参数的用法 --gup-id N,-g N gpu id used for testing (default: '0')