-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Recognize digits new api first draft #528
Recognize digits new api first draft #528
Conversation
@@ -124,183 +136,179 @@ PaddlePaddle provides a Python module, `paddle.dataset.mnist`, which downloads a | |||
|t10k-labels-idx1-ubyte | Evaluation labels | 10,000 | | |||
|
|||
|
|||
## Fluid API Overview |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good summarization. Should we include that in Chapter 1? @daming-lu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
02.recognize_digits/README.md
Outdated
predict = paddle.layer.fc(input=img, | ||
size=10, | ||
act=paddle.activation.Softmax()) | ||
return predict | ||
``` | ||
|
||
- Multi-Layer Perceptron: this network has two hidden fully-connected layers, one with ReLU and the other with softmax activation: | ||
- Multi-Layer Perceptron: this network has two hidden fully-connected layers, both are using ReLU as activation functino. The output layer is using softmax activation: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
functino -> function
02.recognize_digits/README.md
Outdated
|
||
`batch` is a special decorator, which takes a reader and outputs a *batch reader*, which doesn't yield an instance, but a minibatch at a time. | ||
```python | ||
use_cude = False # set to True if training with GPU |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cude -> cuda
``` | ||
|
||
PaddlePaddle provides a special layer `layer.data` for reading data. Let us create a data layer for reading images and connect it to a classification network created using one of above three functions. We also need a cost layer for training the model. | ||
#### Train Program Configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you intend to make this section a child under Program Functions Configuration? Or it should be just ###
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do feel it should be under the Program Functions Configuration
since it is a program function. What do you think? @nickyfantasy
@@ -124,183 +136,179 @@ PaddlePaddle provides a Python module, `paddle.dataset.mnist`, which downloads a | |||
|t10k-labels-idx1-ubyte | Evaluation labels | 10,000 | | |||
|
|||
|
|||
## Fluid API Overview |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
@@ -124,183 +136,177 @@ PaddlePaddle provides a Python module, `paddle.dataset.mnist`, which downloads a | |||
|t10k-labels-idx1-ubyte | Evaluation labels | 10,000 | | |||
|
|||
|
|||
## Fluid API Overview | |||
|
|||
The demo will be using the latest paddle fluid API. Fluid API is the latest Paddle API. It simplifies the model configurations without sacrifice the performance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without sacrificing
|
||
The demo will be using the latest paddle fluid API. Fluid API is the latest Paddle API. It simplifies the model configurations without sacrifice the performance. | ||
We recommend using Fluid API as it is much easier to pick up. | ||
Here are the quick overview on the major fluid API complements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is a quick
We recommend using Fluid API as it is much easier to pick up. | ||
Here are the quick overview on the major fluid API complements. | ||
|
||
1. `inference_program`: A function that specify how to get the prediction from the data input. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
specifies
|
||
1. `inference_program`: A function that specify how to get the prediction from the data input. | ||
This is where you specify the network flow. | ||
1. `train_program`: A function that specify how to get avg_cost from `inference_program` and labels. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
specifies
@@ -315,27 +321,25 @@ Usually, with MNIST data, the softmax regression model achieves an accuracy arou | |||
|
|||
## Application | |||
|
|||
After training, users can use the trained model to classify images. The following code shows how to inference MNIST images through `paddle.infer` interface. | |||
After training, users can use the trained model to classify images. The following code shows how to inference MNIST images through `fluid.Inferencer`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how to infer or do inference
This PR cover a bit of the Chinese version. Please don't mind them. I will focus on the English version first. and port the update to Chinese later.