When converting Theano-based Keras model definition to TensorFlow, is it enough to change the order of input_shape
on the input layer?
For example, the foll
Answer from Francois Chollet:
I think the question means "what
input_shape
should I pass to my first layer given that I'm using TensorFlow and that my default setting fordim_ordering
is"tf"
". The answer is yep, that's how you do it,(img_width, img_height, 3)
.Important to note that if you want to load saved models that were trained with Theano with
dim_ordering="th"
, into a model definition for TF withdim_ordering="tf"
, you will need to convert the convolution kernels. Keras has utils for that.