images Tensor needs to be moved to CPU (cifar10_cnn_exercise.ipynb)
bfeeny opened this issue · 1 comments
bfeeny commented
This has an error in the last part of the notebook Visualize Sample Test Results
If student has images
Tensor on the GPU, then imshow(images[idx])
will fail with
TypeError: can't convert non-cpu tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.
The solution notebook has it correct, it should be changed to imshow(images.cpu()[idx])
gargarchit commented