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.
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 isFalse
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.