GluonCV CIFAR10 demo problem


#1

I am getting an error when I run this demo …

https://gluon-cv.mxnet.io/build/examples_classification/demo_cifar10.html

After I run the transform …

transform_fn = transforms.Compose([
transforms.Resize(32),
transforms.CenterCrop(32),
transforms.ToTensor(),
transforms.Normalize([0.4914, 0.4822, 0.4465], [0.2023, 0.1994, 0.2010])
])

img = transform_fn(img)
plt.imshow(nd.transpose(img, (1,2,0)).asnumpy())
plt.show()

I get …

Floating point image RGB values must be in the 0..1 range.

Any help is appreciated!


#2

It’s an error from matplotlib, update it to latest will resolve the problem


#3

That resolved the issue. Thank you!