在 TensorFlow 2.x 中我可以用什么代替 tf.contrib.rnn.LayerNormBasicLSTM?

What can I use instead of tf.contrib.rnn.LayerNormBasicLSTM in TensorFlow 2.x?

TensorFlow 2.x 中弃用了 tf.contrib.rnn.LayerNormBasicLSTM。在 TensorFlow 2.x?

在 Tensorflow 2.x 中,您可以使用

tf.compat.v1.nn.rnn_cell.LSTMCell

为了获得更好的性能,备选方案是

tf.keras.layers.LSTMCell