AttributeError: module ‘keras.backend’ has no attribute ‘set_session’
出现这个错误主要是因为tensorflow2.0以上的版本已经没有set_session了,所有需改一下:
from keras import backend as K
tf_session = tf.compat.v1.Session(graph=tf.compat.v1.get_default_graph(),config=config)
K.set_session