Warm tip: This article is reproduced from serverfault.com, please click

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

发布于 2020-09-29 11:06:39

I tried to execute some project. But I've got an attribute error. I checked my Tensorflow and Keras version.

Name: tensorflow
Version: 2.3.1
Name: Keras
Version: 2.4.3
Summary: Deep Learning for humans
python 3.8.2 

The code is here.

self.dim_ordering = K.common.image_dim_ordering()

Error message:

self.dim_ordering = K.common.image_dim_ordering()
AttributeError: module 'keras.backend' has no attribute 'common'

Is it okay to use K.image_data_format() instead of k.common.image_dim_ordering() ?

Questioner
Sai Praneeth
Viewed
0
Vidya Ganesh 2020-12-03 20:17:38

Yes. It is okay to use k.image_data_format()

In Keras v2 the method has been renamed to image_data_format