fastai / course-v3

The 3rd edition of course.fast.ai
https://course.fast.ai/
Apache License 2.0
4.91k stars 3.57k forks source link

nb2 06_cnn_cuda_hooks_init.ipynb plotting errors #584

Open itsa-mee-mario opened 2 years ago

itsa-mee-mario commented 2 years ago

plotting the means and std dev as given in the notebooks, for example:

for o in act_means: plt.plot(o)
plt.legend(range(5));

gives an error as o is a list of lists

to correct this, we can use

for o in act_means: plt.plot(torch.tensor(o))
plt.legend(range(5));