Currently looking at this keras tensorflow enet implementation:
What exactly are these lines doing?
The first permute is changing tf’s default
[Batch#, Y, X, Channel] and turning it into
[Batch#, Y, Channel, X]. The last permute is reversing that operation back to
[Batch#, Y, X, Channel]. The pad_featmaps line is looking at the difference in channels (features) between input and output. And then the zeropadding is just ensuring that the output is zero-padded (on the right hand side) up to the desired number of features?
I’m guessing the reason they did this is because zeropadding works on pixel data, so pretend X,Channel are pixels?
Finally, how might one get this code to work in keras over theano, considering TensorVariable objects have no attribute ‘get_shape’? And using
inp.shape returns the useless
Thank you so much @all.