I imported tensorflow module but I'm unable to use tf.contrib. I don't know what the problem is. I tried running it in different versions but I keep getting the same output.
ModulesImported:
import tensorflow.compat.v1 as tf1
tf1.disable_v2_behavior()
import tensorflow as tf2
Code:
tf2.contrib.rnn.LSTMCell(num_units=num_nodes[li],
state_is_tuple=True,
initializer= tf.contrib.layers.xavier_initializer()
)
Output:
AttributeError: module 'tensorflow' has no attribute 'contrib'