Closed karthikbmk closed 5 years ago
This seems to have been fixed in #67. I installed through pip and I see the older version (return np.uint8(cm.jet(grads)[..., :3] * 255)[0]) in my copy. I've cleaned my previous installation and installed from source using setup.py. This works for me now. I ran attention.ipynb in the examples/mnist folder and I get grads as an array of size (28, 28) now. I do not know why pip install wasn't picking up the latest version though.
I'm curious, is there a way to recover grads[0] from *np.uint8(cm.jet(grads)[...,:3]255)[0]**?
Bug : Currently, visualize_saliency returns 3D gradients for 1D Inputs.
Possible Fix : In visualize_saliency_with_losses function, replace *return np.uint8(cm.jet(grads)[..., :3] 255)[0] with return grads[0]**