I would like to run this function from a script instead of the command line. For example, the function is:
def main():
parser = argparse.ArgumentParser(description='Caffe prototxt to mxnet model parameter converter.\
Note that only basic functions are implemented. You are welcomed to contribute to this file.')
parser.add_argument('caffe_prototxt', help='The prototxt file in Caffe format')
parser.add_argument('caffe_model', help='The binary model parameter file in Caffe format')
parser.add_argument('save_model_name', help='The name of the output model prefix')
args = parser.parse_args()
...
How can i run it like this?
file.main('file_1.csv', 'file_2.csv', 'name')
And why would someone write a function that I can only run from the command line? It feels inconvenient.