PaddleSlim dependents on Paddle1.7. Please ensure that you have installed paddle correctly. Import Paddle and PaddleSlim as below:
```
import paddle
...
...
@@ -20,31 +18,32 @@ import paddle.fluid as fluid
import paddleslim as slim
```
## 2. 构建网络
## 2. Build Model
This section will build a classsification model based `MobileNetV1` for MNIST task. The shape of the input is `[1, 28, 28]` and the output number is 10.
To make you easily run this demo, it will training on MNIST dataset. The package `paddle.dataset.mnist` of Paddle defines the downloading and reading of MNIST dataset.
Define training data reader and test data reader as below: