I tried to execute some tutorial transfer learning project. But I've got attribute error.
I checked my tensorflow and keras version.
tensorflow : 1.14.0 keras : 2.2.5
and python 3.6.9 version.
the code is here.
if(K.image_dim_ordering() == 'th'):
input_tensor = Input(shape=(3, 299, 299))
error message here.
AttributeError: module 'keras.backend' has no attribute 'image_dim_ordering'
keras.backend.common
module has image_dim_ordering()
if(K.common.image_dim_ordering() == 'th'):
input_tensor = Input(shape=(3, 299, 299))
Replace image_dim_ordering
to image_data_format
if(K.image_dim_ordering() == 'th'):
input_tensor = Input(shape=(3, 299, 299))
change the above code to
if K.image_data_format() == 'th':
input_tensor = Input(shape=(3, 299, 299))
Keras Backend utilities
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With