from tensorflow.contrib.rnn import LSTMStateTuple
报错:ModuleNotFoundError: No module named ‘tensorflow.contrib‘
更改代码:
import tensorflow._api.v2.compat.v1 as tf
tf.disable_v2_behavior()
from tensorflow._api.v2.compat.v1.nn.rnn_cell import LSTMStateTuple