python超参传递

1
2
3
4
5
6
7
import argparse

parser = argparse.ArgumentParser()
parser.add_argument("-in", "--inputA", help="this is parameter a", type=str, default="")
parser.add_argument("-out", "--outputB", help="this is parameter b", type=str, default="")
args = parser.parse_args()
print(args.inputA)
1
python3 /Users/PeppaZhu/Desktop/studio_light/zoom_VB/test_V4_1NGF.py -in test_video_gfdebug/peppa_13test.mov -out peppa_13test_V4_4