errors with keras image_dim_ordering()
nyck33 opened this issue · 5 comments
nyck33 commented
When I try to run the second cell in predict.ipynb
I get:
/media/nobu/Ubuntu Backup1/1DeepLearning/2pixelation/age-gender-estimation/wide_resnet.py in __init__(self, image_size, depth, k)
24 self._weight_init = "he_normal"
25
---> 26 if K.backend.image_data_format() == "th":
27 logging.debug("image_dim_ordering = 'th'")
28 self._channel_axis = 1
AttributeError: module 'keras.backend' has no attribute 'image_dim_ordering'
Tried changing to `K.backend.imaged_data_format()` but error stays the same.
yu4u commented
What's the Keras and TensorFlow versions?
AlecVandenbroeck commented
I'm having the same issue. I think it's because I'm using Keras v2, where the function has been renamed to 'image_data_format()'. Not sure if @nyck33 made a spelling error (you wrote imaged instead of image) when commenting here or if he actually mistyped it.
AlecVandenbroeck commented
I've fixed it by switching to keras v2.2.4 instead of 2.2.5.
nyck33 commented
@AlecVandenbroeck I'll have to check that but thanks!