You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/07/10 20:22:44 UTC

[GitHub] rahul003 commented on a change in pull request #11533: Fix image classification scripts and Improve Fp16 tutorial

rahul003 commented on a change in pull request #11533: Fix image classification scripts and Improve Fp16 tutorial
URL: https://github.com/apache/incubator-mxnet/pull/11533#discussion_r201481397
 
 

 ##########
 File path: example/gluon/data.py
 ##########
 @@ -109,18 +111,17 @@ def transform(image, label):
         # resize the shorter edge to 224, the longer edge will be greater or equal to 224
         resized = mx.image.resize_short(image, 224)
         # center and crop an area of size (224,224)
-        cropped, crop_info = mx.image.center_crop(resized, 224)
+        cropped, crop_info = mx.image.center_crop(resized, (224, 224))
         # transpose the channels to be (3,224,224)
-        transposed = nd.transpose(cropped, (2, 0, 1))
-        image = mx.nd.cast(image, dtype)
-        return image, label
+        transposed = mx.nd.transpose(cropped, (2, 0, 1))
 
 Review comment:
   Not in this script as it does astype() later. And that will also be more general for any dataset iterator

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services