Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
|
|
5 years ago | |
|---|---|---|
| .. | ||
| base | 5 years ago | |
| common | 5 years ago | |
| conf | 5 years ago | |
| dataset | 5 years ago | |
| network | 5 years ago | |
| README.md | 5 years ago | |
| README_CN.md | 5 years ago | |
| __init__.py | 5 years ago | |
| cli.py | 5 years ago | |
| create_project.py | 5 years ago | |
MindWizard is a tool for quickly generating classic network scripts. It collects user preference on the combination of network parameters, such models, hyperparameters and datasets, then automatically generates target network scripts. The generated scripts can be used for training and evaluation in the Ascend or GPU environment.
This tool is part of MindInsight and accessible to users after installing MindInsight, no extra installation is needed.
mindwizard [-h] [--version] name
positional arguments:
name Specify the new project name.
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
Run the mindwizard command and answer the following questions as prompted:
Select a network(LeNet / AlexNet / ResNet50 / ...)
1.1. Select a Loss Function(SoftmaxCrossEntropyWithLogits / ...)
Default: SoftmaxCrossEntropyWithLogits
1.2. Select a Optimizer(Adam / Momentum / SGD ...)
Default: Momentum
Select a Dataset(MNIST / Cifar10 / ImageNet / ...)
Default: MNIST or ImageNet
After the project is generated, user can perform training and evaluation. For details, see README in the network project.
project
|- script
| |- run_standalone_train.sh # launch standalone training
| |- run_distribute_train.sh # launch distributed training
| |- run_eval.sh # launch evaluation
| |- ...
|- src
| |- config.py # parameter configuration
| |- dataset.py # data preprocessing
| |- lenet.py/resent.py/... # network definition
| |- ...
|- eval.py # evaluate network
|- train.py # train network
|- README.md
Generate LeNet project.
$ mindwizard project
>>> Please select a network:
1: alexnet
2: lenet
3: resnet50
: 2
Your choice is lenet.
>>> Please select a loss function:
1: SoftmaxCrossEntropyWithLogits
[1]: 1
Your choice is SoftmaxCrossEntropyWithLogits.
>>> Please select an optimizer:
1: Adam
2: Momentum
3: SGD
[2]: 2
Your choice is Momentum.
>>> Please select a dataset:
1: MNIST
[1]: 1
Your choice is MNIST.
project is generated in $PWD/project
$ cd $PWD/project/scripts
Distributed training
# Ascend
Usage: bash run_distribute_train.sh [RANK_TABLE_FILE] [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)
# GPU
Usage: bash run_distribute_train_gpu.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)
Standalone training
# Ascend
Usage: bash run_standalone_train.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)
# GPU
Usage: bash run_standalone_train_gpu.sh [DATASET_PATH] [PRETRAINED_CKPT_PATH](optional)
# Ascend
Usage: bash run_eval.sh [DATASET_PATH] [CHECKPOINT_PATH]
# GPU
Usage: bash run_eval_gpu.sh [DATASET_PATH] [CHECKPOINT_PATH]
MindInsight为MindSpore提供了简单易用的调优调试能力。在训练过程中,可以将标量、张量、图像、计算图、模型超参、训练耗时等数据记录到文件中,通过MindInsight可视化页面进行查看及分析。
SVG Text Python Vue CSV other