module' object has no attribute 'core_rnn_cell'
Closed this issue · 1 comments
Building Graph Traceback (most recent call last):
File "/home/kusuma/Pictures/seq2seq-master/03-Twitter-chatbot.py", line 32, in
num_layers=3
File "/home/kusuma/Pictures/seq2seq-master/seq2seq_wrapper.py", line 80, in init
graph()
File "/home/kusuma/Pictures/seq2seq-master/seq2seq_wrapper.py", line 46, in graph
basic_cell = tf.nn.rnn_cell.BasicRNNCell.DropoutWrapper(
AttributeError: type object 'BasicRNNCell' has no attribute 'DropoutWrapper'
basic_cell = tf.contrib.rnn.core_rnn_cell.DropoutWrapper(
AttributeError: 'module' object has no attribute 'core_rnn_cell'
Process finished with exit code 1
I used tensorflow0.12.0
replace this code in place of previous code:
basic_cell = tf.contrib.rnn.DropoutWrapper(
tf.contrib.rnn.BasicLSTMCell(emb_dim, state_is_tuple=True),
output_keep_prob=self.keep_prob)
# stack cells together : n layered model
stacked_lstm = tf.contrib.rnn.MultiRNNCell([basic_cell] * num_layers, state_is_tuple=True)
I solved it.