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



在TensorFlow 2.x中不支持使用tf.contrib.rnn.LayerNormBasicLSTM。在TensorFlow 2.x中,我可以用什么代替这段代码?

In Tensorflow 2。X,可以使用

tf.compat.v1.nn.rnn_cell.LSTMCell

为获得更好的性能,可选择

tf.keras.layers.LSTMCell

相关内容

最新更新