I got error when using rf.plot_gradient_at() function
AlexanderZhujiageng opened this issue · 2 comments
AlexanderZhujiageng commented
Hi, I'm trying to plot gradient using mnist dataset.
the image here is the first image of mnitst dataset and the shape of the image is (28,28).
Other methods are all ok, but when I use the
rf.plot_gradient_at((5, 5), image=image, figsize=(7, 7))
function, it shows me:
TypeError: Invalid dimensions for image data
and for more detail, it shows:
69 ax = plt.subplot(111)
70 plt.title("Normalized gradient map")
---> 71 im = plt.imshow(receptive_field_grad, cmap='coolwarm')
72 plt.xlabel("x")
73 plt.ylabel("y")
It seems that the receptive_field_grad is wrong, how can I fix this problem
kmkolasinski commented
Hi, sorry for the late answer. I have pushed few fixes to the master branch. Could you please try the recent code, by directly cloning the master branch and installing receptivefield from source ?
kmkolasinski commented
Closing. This issue has be solved already.