解决module 'keras.backend' has no attribute 'image_dim_ordering'
if K.image_dim_ordering() == 'tf':
AttributeError: module 'keras.backend' has no attribute 'image_dim_ordering'
改为K.set_image_data_format(‘channels_first’)
且“channels_last”对应原本的“tf”,“channels_first”对应原本的“th”。