suriyadeepan / practical_seq2seq

A simple, minimal wrapper for tensorflow's seq2seq module, for experimenting with datasets rapidly
http://suriyadeepan.github.io/2016-12-31-practical-seq2seq/
GNU General Public License v3.0
570 stars 270 forks source link

module' object has no attribute 'core_rnn_cell' #53

Closed bandarikanth closed 6 years ago

bandarikanth commented 6 years ago
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
bandarikanth commented 6 years ago

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.