AttributeError: module ‘keras.backend‘ has no attribute ‘image_dim_ordering‘问题解决
作者:互联网
问题:
File "/home/pi/Desktop/Mobilenet-SSD-Essay-master/nets/ssd_layers.py", line 9, in __init__
if K.image_dim_ordering() == 'tf':
AttributeError: module 'keras.backend' has no attribute 'image_dim_ordering'
这个问题是由于Keras的版本不同造成的,定位代码
if K.image_dim_ordering() == "th"
代码改为
if K.image_data_format() == "channels_first"
标签:__,dim,no,ordering,attribute,image,module 来源: https://blog.csdn.net/qq_40076022/article/details/110138011