practical_seq2seq
practical_seq2seq copied to clipboard
basic_cell = tf.contrib.rnn.core_rnn_cell.DropoutWrapper( AttributeError: module 'tensorflow.contrib.rnn' has no attribute 'core_rnn_cell'
I am on python 3 and tensorflow version 0.12.0
i am getting this error while calling 03-twitter-chatbot.py can someone help me solve this
Thank you
replace this code in place of previous code: use tensorflow>=1.0
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)
Shouldnt it be something like tf.nn.rnn_cell.... ?
It's tf.contrib.rnn.your requirements. Like to.contrib.rnn.basiclstm or dropout. You need to use tensorflow =1.2 or above
If you have further questions mail me at [email protected]
On 02-Jan-2018 6:51 PM, "zwep" [email protected] wrote:
Shouldnt it be something like tf.nn.rnn_cell.... ?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/suriyadeepan/practical_seq2seq/issues/47#issuecomment-354765193, or mute the thread https://github.com/notifications/unsubscribe-auth/AZf77cMLrZsD7aII5k0IqHM2XWplw9W-ks5tGi1zgaJpZM4Pnvx2 .
.nn or contrib depends on the tensorflow version . E.g.if on tensorflow 1.0 and above use contrib, if using the 0.9 and below use nn.
Sent from my iPhone
On Jan 2, 2018, at 6:52 PM, zwep <[email protected]mailto:[email protected]> wrote:
Shouldnt it be something like tf.nn.rnn_cell.... ?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/suriyadeepan/practical_seq2seq/issues/47#issuecomment-354765193, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKaB9K8N5_vBFq47grXDfKx7GEUMUZjwks5tGi1zgaJpZM4Pnvx2.
it the tf.VERSION > 1.0 , Then use 'tf.contrib.rnn.DropoutWrapper()' to replace 'tf.contrib.rnn.core_rnn_cell.DropoutWrapper()' the same way for the 'tf.contrib.rnn.BasicLSTMCell ()' and the 'tf.contrib.rnn.MultiRNNCell()'
this will be ok
@zp672087110 : i am using python 3.6.4 and tf version 1.2.1. i modified as you suggested above and getting following error message basic_cell = tf.contrib.rnn.DropoutWrapper(tf.contrib.rnn.BasicLSTMCell(emb_dim, state_is_tuple=True),output_keep_prob=self.keep_prob) AttributeError: module 'tensorflow.contrib.rnn' has no attribute 'DropoutWrapper'
It worked after changing the tf version to 1.0.0
It should technically work for anything above tf version 1.0.0 . But I'm glad it's working for you .
Sent from my iPhone
On Mar 13, 2018, at 3:54 PM, ombits <[email protected]mailto:[email protected]> wrote:
It worked after changing the tf version to 1.0.0
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/suriyadeepan/practical_seq2seq/issues/47#issuecomment-372797000, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKaB9JkmTIeYRypBeMyzTZ2gsgZHKJfgks5teCPbgaJpZM4Pnvx2.
@ombits sorry i just see now, the version i use is 1.2.
@karanpande maybe you need to check the seq2seq_wrapper.py or update it