eric-haibin-lin 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_r201191551
########## 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: is dtype casting no longer necessary? ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services