What is the right case for input images


#1

Hi
In which case we use the options of “th” OR “tf” as Dimension order?
Regards
J.Dud


#2

Hi
th is used when your input dimension ordering is according to Theano backend
input_shape = (no_channel, img_rows, img_cols)
and tf is use for Tensorflow backend
input_shape = ( img_rows, img_cols, no_channel)

By default is “th” in DLS

So Let me take an example with an image size (3,32,32) i.e is “th” dimension ordering
and now i am going to apply a conv layer with “tf” dimension ordering and check the output dimension


Ideally the output size of the layer should be (64,30,30) but it is (1,30,64) due to different dimension ordering.
So it just that theano and tensorflow follows different dimension ordering.
So you should them according to your input dimension.
Regards
Rajat