Hassan
Hassan

Reputation: 161

Error : keras.backend has no attribute 'set_image_dim_ordering'

when try to do set_image_dim_ordering('th')

from keras import backend as K

K.set_image_dim_ordering('th')

I got attribute error:

AttributeError: module 'keras.backend' has no attribute 'set_image_dim_ordering'

Upvotes: 1

Views: 10118

Answers (1)

Shubham Shaswat
Shubham Shaswat

Reputation: 1310

Use this instead:

K.set_image_data_format('channels_first')

The latest version has replaced the image_dim_ordering to image_data_format.

For more info refer to thies issue

Upvotes: 6

Related Questions