Show_image doesn't work - lesson 4

I’m brand new to fastai.

I’m running the notebook 04 mnist basics.ipynb
in Colab.

The following cell is supposed to show an image.

show_image(three_tensors[1])

Instead it prints the message

<matplotlib.axes._subplots.AxesSubplot at 0x7fe86efe0c50>

In case you want to see the plot/image inline, use

%matplotlib inline

in the header (before the imports).

If you want to show the graphic in a window, add the line

plt.show()

at the end (make sure you have imported import matplotlib.pyplot as plt in the header).

2 Likes