Hi all, I am new to tensorflow.
There is this function related to LSTMs which is written in
tf.contrib in the
1.x.x versions of tensorflow -
tf.contrib.rnn.CoupledInputForgetGateLSTMCell | TensorFlow Core v1.15.0
I am not able to find the corresponding function in
tensorflow 2.x.x. I also tried doing
tf.compat.v1.contrib.rnn.CoupledInputForgetGateLSTMCell() but I am getting the following error -
AttributeError: module 'tensorflow._api.v2.compat.v1' has no attribute 'contrib'
More generally, where are the functions in
tf.contrib located in
Any help will be greatly appreciated.
August 2, 2021, 3:12pm
I think you can learn a little bit the history of the
This file has been truncated.
# Sunsetting `tf.contrib`
| Status | *Accepted* |
:-------------- |:---------------------------------------------------- |
| **Author(s)** | Martin Wicke (firstname.lastname@example.org) |
| **Sponsor** | Edd Wilder-James (email@example.com) |
| **Updated** | 2019-04-09 |
The `tf.contrib` module plays several important roles in the TensorFlow
ecosystem: It has made it easy for members of the community to contribute to
TensorFlow, and have their contributions tested and maintained. It is also used
as a staging ground to test early-stage and experimental features in TensorFlow.
However, as the community has grown, the lack of scalability of the current
approach for maintaining and supporting `tf.contrib` has become apparent.
Thank you so much for your response
@Bhack and apologies for my late reply. I will read the post and get back if I have any questions.
Have you checked
tfa.rnn.LayerNormLSTMCell for your case?
It is a part of TF Addons package which is compatible with TF 2.X versions
(TF Addons package contains a subset tf.contrib* functionality)
@Yasir_Modak, thanks. I’ll check out tf add-ons. Is tfa.rnn.LayerNormLSTMCell same as CoupledInputForgetGateLSTMCell() though?