diff --git a/mindinsight/mindconverter/README.md b/mindinsight/mindconverter/README.md index 5d7d598a4aded3ef7a2b59334560da7512cfdadd..90b31972f77331c2e9fca1158e2e988c30726713 100644 --- a/mindinsight/mindconverter/README.md +++ b/mindinsight/mindconverter/README.md @@ -2,13 +2,6 @@ MindConverter is a tool that converting PyTorch scripts to MindSpore scripts. With minial manual editing and the guidance from conversion reports, users may easily migrate their model from PyTorch framework to MindSpore. - - -### System Requirements - -* PyTorch v1.5.0 -* MindSpore v0.2.0 - ### Installation This tool is part of MindInsight and accessible to users after installing MindInsight, no extra installation is needed. @@ -24,8 +17,6 @@ mindconverter commandline usage: mindconverter [-h] [--version] --in_file IN_FILE [--output OUTPUT] [--report REPORT] -MindConverter CLI entry point (version: 0.2.0) - optional arguments: -h, --help show this help message and exit --version show program's version number and exit @@ -36,13 +27,31 @@ optional arguments: directorys ``` -Usage example: +#### Use example: + +We have a collection of PyTorch model scripts +```buildoutcfg +~$ ls +models +~$ ls models +alexnet.py resnet.py vgg.py +``` + +Then we set the PYTHONPATH environment variable and convert alexnet.py +```buildoutcfg +~$ export PYTHONPATH=~/models +~$ mindconverter --in_file models/alexnet.py +``` + +Then we will see a conversion report and the output MindSpore script ```buildoutcfg -export PYTHONPATH=~/my_pt_proj/models -mindconverter --in_file lenet.py +~$ ls +alexnet_report.txt models output +~$ ls output +alexent.py ``` -Since the conversion is not 100% flawless, we encourage users to checkout the reports when fixing issues of the converted scripts. +Since the conversion is not 100% flawless, we encourage users to checkout the report when fixing issues of the converted script. ### Unsupported Situation #1