| 16 | |
| 17 | |
| 18 | def parse_args(): |
| 19 | parser = argparse.ArgumentParser(description='convert caffe model to onnx') |
| 20 | |
| 21 | parser.add_argument(dest='proto_file', |
| 22 | action='store', |
| 23 | help='the path for prototxt file, the file name must end with .prototxt') |
| 24 | |
| 25 | parser.add_argument(dest='caffe_model_file', |
| 26 | action='store', |
| 27 | help='the path for caffe model file, the file name must end with .caffemodel!') |
| 28 | |
| 29 | parser.add_argument('-o', |
| 30 | dest='onnx_file', |
| 31 | action='store', |
| 32 | help='the path for generate onnx file') |
| 33 | args = parser.parse_args() |
| 34 | return args |