I'm following Karpathy's Makemore tutorial step by step. When I get to the part where he uses plt.imshow(N) to create a plot inside the notebook, my kernel crashes. I've been troubleshooting this for half the day, including completely reinstalling Anaconda, Python and, for what it's worth, CUDA and my graphics drivers. I've created a brand new environment with Python and have tried %matplotlib agg. I've also check to make sure Jupyter is using the Python from my Pytorch environment. This code works: import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt plt.plot([1,2,3]) plt.savefig('test.png') So it seems to be plt.imshow(). I have run out of ideas. Thanks to anyone who tries to give me a hand. Continue reading...