raghakot / keras-vis

Neural network visualization toolkit for keras
https://raghakot.github.io/keras-vis
MIT License
2.97k stars 664 forks source link

The size of the saliency output is different from the input image size #113

Open sodaGH opened 6 years ago

sodaGH commented 6 years ago

The size of my input image is 494140, and I can get the saliency output of my CNN model. But the attention map size is 49*41, not the original 3-dimension size. I want to know how can I get the 3D attention map with the same size as my input image. Thanks a lot!

keisen commented 6 years ago

Your neural network is composed of Conv2D instead of Conv3D, isn't it? You should use Conv3D when you using three-dimensional data.

If you are using Conv2D, please retry following steps.

  1. Reshape the data shape from (49, 41, 40) to (49, 41, 40, 1)
  2. Change Cov2D to Conv3D
    • All related Pooling etc. are changed as well
  3. Execute learning
  4. Generate saliency output via keras-vis