问题:AttributeError: module ‘tensorflow’ has no attribute ‘python’
出错代码行:
import tensorflow as tf model_lstm_attention = tf.python.keras.Model(inputs=inp, outputs=x)
解决方案
from tensorflow.python import keras as tpk model_lstm_attention = tpk.Model(inputs=inp, outputs=x)



