From 59af274f281a27e5406b7149ecd870e66159f143 Mon Sep 17 00:00:00 2001 From: quyongxiu1 Date: Thu, 28 May 2020 10:58:10 +0800 Subject: [PATCH] update readme update readme and delete version --- mindinsight/mindconverter/README.md | 35 ++++++++++++++++++----------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/mindinsight/mindconverter/README.md b/mindinsight/mindconverter/README.md index 5d7d598..90b3197 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 -- GitLab