Browse Source

!186 update readme for mindconverter

Merge pull request !186 from quyongxiu1/br_mindconver_read_0.3
pull/186/MERGE
mindspore-ci-bot Gitee 5 years ago
parent
commit
0059d26eaf
1 changed files with 22 additions and 13 deletions
  1. +22
    -13
      mindinsight/mindconverter/README.md

+ 22
- 13
mindinsight/mindconverter/README.md View File

@@ -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


Loading…
Cancel
Save