From 716383db64e5b83f4a633fc2c4fbde453d6abf84 Mon Sep 17 00:00:00 2001 From: "Wang,Jeff" Date: Fri, 8 Jun 2018 14:50:23 -0700 Subject: [PATCH] fix several typos --- 03.image_classification/README.cn.md | 2 +- 03.image_classification/README.md | 6 +++--- 03.image_classification/index.cn.html | 2 +- 03.image_classification/index.html | 6 +++--- 03.image_classification/train.py | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/03.image_classification/README.cn.md b/03.image_classification/README.cn.md index cef4636..59180d1 100644 --- a/03.image_classification/README.cn.md +++ b/03.image_classification/README.cn.md @@ -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 diff --git a/03.image_classification/README.md b/03.image_classification/README.md index f01d0af..f24fbde 100644 --- a/03.image_classification/README.md +++ b/03.image_classification/README.md @@ -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 diff --git a/03.image_classification/index.cn.html b/03.image_classification/index.cn.html index 84f3966..dbd1f1c 100644 --- a/03.image_classification/index.cn.html +++ b/03.image_classification/index.cn.html @@ -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 diff --git a/03.image_classification/index.html b/03.image_classification/index.html index 7919a04..0a37e70 100644 --- a/03.image_classification/index.html +++ b/03.image_classification/index.html @@ -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 diff --git a/03.image_classification/train.py b/03.image_classification/train.py index 50bc52f..10ce9df 100644 --- a/03.image_classification/train.py +++ b/03.image_classification/train.py @@ -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 -- GitLab