Closed bfeeny closed 3 years ago
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
images
imshow(images[idx])
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])
imshow(images.cpu()[idx])
I just have a look and found that it is duplicate of #258 Also, a PR is already raised for this issue #226
This has an error in the last part of the notebook Visualize Sample Test Results
If student has
images
Tensor on the GPU, thenimshow(images[idx])
will fail withTypeError: 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])