raghakot / keras-vis

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

FIX: Condition that check if channel need to be swapped #101

Closed PrimozGodec closed 5 years ago

PrimozGodec commented 6 years ago

Issue

seed_input can have a shape with unknown values, e.g. [1, None, None, 3] in the channel_last case. That causes the fixed condition is False and representation changes from channel_last to channel_first and vice-versa.

Fix

Condition fixed to check only whether the channel is channel_last or channel_first. One of condition always keeps when the same representation.

PrimozGodec commented 6 years ago

https://github.com/raghakot/keras-vis/issues/90

PrimozGodec commented 6 years ago

@raghakot can you consider this pull request. Unitests are failing due to previous bugs.