提交 15ccc5c5 编写于 作者: W wukesong

modify lenet&alexnet

上级 b48d663c
......@@ -25,7 +25,7 @@ This is the simple tutorial for training AlexNet in MindSpore.
python train.py --data_path cifar-10-batches-bin
```
You can get loss with each step similar to this:
You will get the loss value of each step as following:
```bash
epoch: 1 step: 1, loss is 2.2791853
......@@ -36,17 +36,16 @@ epoch: 1 step: 1538, loss is 1.0221305
...
```
Then, test AlexNet according to network model
Then, evaluate AlexNet according to network model
```python
# test AlexNet, 1 epoch training accuracy is up to 51.1%; 10 epoch training accuracy is up to 81.2%
# evaluate AlexNet, 1 epoch training accuracy is up to 51.1%; 10 epoch training accuracy is up to 81.2%
python eval.py --data_path cifar-10-verify-bin --mode test --ckpt_path checkpoint_alexnet-1_1562.ckpt
```
## Note
There are some optional arguments:
Here are some optional parameters:
```bash
-h, --help show this help message and exit
--device_target {Ascend,GPU}
device where the code will be implemented (default: Ascend)
--data_path DATA_PATH
......
......@@ -19,8 +19,8 @@ This is the simple and basic tutorial for constructing a network in MindSpore.
│ t10k-labels.idx1-ubyte
└─train
train-images.idx3-ubyte
train-labels.idx1-ubyte
train-images.idx3-ubyte
train-labels.idx1-ubyte
```
## Running the example
......@@ -30,7 +30,7 @@ This is the simple and basic tutorial for constructing a network in MindSpore.
python train.py --data_path MNIST_Data
```
You can get loss with each step similar to this:
You will get the loss value of each step as following:
```bash
epoch: 1 step: 1, loss is 2.3040335
......@@ -41,17 +41,16 @@ epoch: 1 step: 1741, loss is 0.05018193
...
```
Then, test LeNet according to network model
Then, evaluate LeNet according to network model
```python
# test LeNet, after 1 epoch training, the accuracy is up to 96.5%
# evaluate LeNet, after 1 epoch training, the accuracy is up to 96.5%
python eval.py --data_path MNIST_Data --mode test --ckpt_path checkpoint_lenet-1_1875.ckpt
```
## Note
There are some optional arguments:
Here are some optional parameters:
```bash
-h, --help show this help message and exit
--device_target {Ascend,GPU,CPU}
device where the code will be implemented (default: Ascend)
--data_path DATA_PATH
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册