raghakot / keras-vis

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

Support _Conv.data_format for visualize methods #170

Open Qinusty opened 5 years ago

Qinusty commented 5 years ago

Currently visualize_cam and visualize_saliency assume models follow the standard keras.backend.image_data_format() which leaves the function unusable with models which aren't using this.

See saliency.py L174 for an example of usage here.

Potentially adding a data_format parameter or extracting this information from the penultimate_layer with penultimate_layer.data_format .