简体   繁体   中英

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

The tf.contrib.rnn.LayerNormBasicLSTM is deprecated in TensorFlow 2.x. What is equivalent to this code or what can I use instead of it in TensorFlow 2.x?

In Tensorflow 2.x, you can use

tf.compat.v1.nn.rnn_cell.LSTMCell

For better performance, alternative is

tf.keras.layers.LSTMCell

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM