diff --git a/03.image_classification/README.cn.md b/03.image_classification/README.cn.md index c55d2300bdc7750c8e8b52e7bb6233aabe687bfe..cef463665eb6455cc2c65165c4b0da040079ea4d 100644 --- a/03.image_classification/README.cn.md +++ b/03.image_classification/README.cn.md @@ -480,10 +480,6 @@ def load_image(file): # H(height), C(channel). PaddlePaddle requires # the CHW order, so transpose them. im = im.transpose((2, 0, 1)) # CHW - # In the training phase, the channel order of CIFAR - # image is B(Blue), G(green), R(Red). But PIL open - # image in RGB mode. It must swap the channel order. - im = im[(2, 1, 0), :, :] # BGR im = im / 255.0 # Add one dimension to mimic the list format. diff --git a/03.image_classification/README.md b/03.image_classification/README.md index d304be8b6ba767309932ea4c54e4927292a84bcd..f01d0afeeb3c47472b49ce06c9705b0a774869d8 100644 --- a/03.image_classification/README.md +++ b/03.image_classification/README.md @@ -494,10 +494,6 @@ def load_image(file): # H(height), C(channel). PaddlePaddle requires # the CHW order, so transpose them. im = im.transpose((2, 0, 1)) # CHW - # In the training phase, the channel order of CIFAR - # image is B(Blue), G(green), R(Red). But PIL open - # image in RGB mode. It must swap the channel order. - im = im[(2, 1, 0), :, :] # BGR im = im / 255.0 # Add one dimension to mimic the list format. diff --git a/03.image_classification/index.cn.html b/03.image_classification/index.cn.html index 069b62200345fdcfb5374cafb6740de8b64983cb..84f3966f4f02786d71412be837e4eefe483c47b5 100644 --- a/03.image_classification/index.cn.html +++ b/03.image_classification/index.cn.html @@ -522,10 +522,6 @@ def load_image(file): # H(height), C(channel). PaddlePaddle requires # the CHW order, so transpose them. im = im.transpose((2, 0, 1)) # CHW - # In the training phase, the channel order of CIFAR - # image is B(Blue), G(green), R(Red). But PIL open - # image in RGB mode. It must swap the channel order. - im = im[(2, 1, 0), :, :] # BGR im = im / 255.0 # Add one dimension to mimic the list format. diff --git a/03.image_classification/index.html b/03.image_classification/index.html index 54634a012a9f8db5974bc7a41b3d471d984e038a..7919a0410dbb13a56866cad863e00dae9d0702a4 100644 --- a/03.image_classification/index.html +++ b/03.image_classification/index.html @@ -536,10 +536,6 @@ def load_image(file): # H(height), C(channel). PaddlePaddle requires # the CHW order, so transpose them. im = im.transpose((2, 0, 1)) # CHW - # In the training phase, the channel order of CIFAR - # image is B(Blue), G(green), R(Red). But PIL open - # image in RGB mode. It must swap the channel order. - im = im[(2, 1, 0), :, :] # BGR im = im / 255.0 # Add one dimension to mimic the list format. diff --git a/03.image_classification/train.py b/03.image_classification/train.py index 87d3cf2b7935d0e17fd7eacfec4af2048400bf24..50bc52f3138755e1b8d5df0dfb78107a8d541da9 100644 --- a/03.image_classification/train.py +++ b/03.image_classification/train.py @@ -106,10 +106,6 @@ def infer(use_cuda, inference_program, params_dirname=None): # H(height), C(channel). PaddlePaddle requires # the CHW order, so transpose them. im = im.transpose((2, 0, 1)) # CHW - # In the training phase, the channel order of CIFAR - # image is B(Blue), G(green), R(Red). But PIL open - # image in RGB mode. It must swap the channel order. - im = im[(2, 1, 0), :, :] # BGR im = im / 255.0 # Add one dimension to mimic the list format.