Apress / advanced-applied-deep-learning

Source Code for 'Advanced Applied Deep Learning' by Umberto Michelucci
Other
39 stars 33 forks source link

[ISSUE] In page 111 of this book, under Keras 2.3.1, Tensorflow 1.13.1, a error repoted about AttributeError: module 'keras.backend' has no attribute 'set_image_dim_ordering' #9

Closed ScGPS closed 1 year ago

ScGPS commented 1 year ago

Issue

image

Fixed method

Ref: AttributeError: module 'keras.backend' has no attribute 'image_dim_ordering' https://github.com/keras-team/keras/issues/12649#issuecomment-481813598

Change

import keras.backend as K
K.set_image_dim_ordering('th')

To

import keras.backend as K
K.common.set_image_dim_ordering('th')