提交 716383db 编写于 作者: W Wang,Jeff

fix several typos

上级 77a8f48a
......@@ -476,7 +476,7 @@ def load_image(file):
im = im.resize((32, 32), Image.ANTIALIAS)
im = np.array(im).astype(np.float32)
# The storage order of the loaded image is W(widht),
# The storage order of the loaded image is W(width),
# H(height), C(channel). PaddlePaddle requires
# the CHW order, so transpose them.
im = im.transpose((2, 0, 1)) # CHW
......
......@@ -314,7 +314,7 @@ During the training, it will calculate the `avg_loss` from the prediction.
In the context of supervised learning, labels of training images are defined in `fluid.layers.data` as well. During training, the cross-entropy loss function is used and the loss is the output of the network. During testing, the outputs are the probabilities calculated in the classifier.
**NOTE:** A train program should return an array and the first return argument has to be `avg_cost`.
**NOTE:** A train program should return an array and the first returned argument has to be `avg_cost`.
The trainer always implicitly use it to calculate the gradient.
```python
......@@ -477,7 +477,7 @@ After training is completed, users can use the trained model to classify images.
### Generate input data for inferring
`dog.png` is an example image of a dog. Turn it into an numpy array to match the data feeder format.
`dog.png` is an example image of a dog. Turn it into a numpy array to match the data feeder format.
```python
# Prepare testing data.
......@@ -490,7 +490,7 @@ def load_image(file):
im = im.resize((32, 32), Image.ANTIALIAS)
im = np.array(im).astype(np.float32)
# The storage order of the loaded image is W(widht),
# The storage order of the loaded image is W(width),
# H(height), C(channel). PaddlePaddle requires
# the CHW order, so transpose them.
im = im.transpose((2, 0, 1)) # CHW
......
......@@ -518,7 +518,7 @@ def load_image(file):
im = im.resize((32, 32), Image.ANTIALIAS)
im = np.array(im).astype(np.float32)
# The storage order of the loaded image is W(widht),
# The storage order of the loaded image is W(width),
# H(height), C(channel). PaddlePaddle requires
# the CHW order, so transpose them.
im = im.transpose((2, 0, 1)) # CHW
......
......@@ -356,7 +356,7 @@ During the training, it will calculate the `avg_loss` from the prediction.
In the context of supervised learning, labels of training images are defined in `fluid.layers.data` as well. During training, the cross-entropy loss function is used and the loss is the output of the network. During testing, the outputs are the probabilities calculated in the classifier.
**NOTE:** A train program should return an array and the first return argument has to be `avg_cost`.
**NOTE:** A train program should return an array and the first returned argument has to be `avg_cost`.
The trainer always implicitly use it to calculate the gradient.
```python
......@@ -519,7 +519,7 @@ After training is completed, users can use the trained model to classify images.
### Generate input data for inferring
`dog.png` is an example image of a dog. Turn it into an numpy array to match the data feeder format.
`dog.png` is an example image of a dog. Turn it into a numpy array to match the data feeder format.
```python
# Prepare testing data.
......@@ -532,7 +532,7 @@ def load_image(file):
im = im.resize((32, 32), Image.ANTIALIAS)
im = np.array(im).astype(np.float32)
# The storage order of the loaded image is W(widht),
# The storage order of the loaded image is W(width),
# H(height), C(channel). PaddlePaddle requires
# the CHW order, so transpose them.
im = im.transpose((2, 0, 1)) # CHW
......
......@@ -102,7 +102,7 @@ def infer(use_cuda, inference_program, params_dirname=None):
im = im.resize((32, 32), Image.ANTIALIAS)
im = np.array(im).astype(np.float32)
# The storage order of the loaded image is W(widht),
# The storage order of the loaded image is W(width),
# H(height), C(channel). PaddlePaddle requires
# the CHW order, so transpose them.
im = im.transpose((2, 0, 1)) # CHW
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册