Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't work with python2.7 and tensorflow0.9 #15

Open
mjqgit opened this issue May 23, 2017 · 1 comment
Open

don't work with python2.7 and tensorflow0.9 #15

mjqgit opened this issue May 23, 2017 · 1 comment

Comments

@mjqgit
Copy link

mjqgit commented May 23, 2017

Traceback (most recent call last):
File "/home/mjq/PycharmProjects/multi-class-text/multi-class-text-classification-cnn-rnn/train.py", line 167, in
train_cnn_rnn()
File "/home/mjq/PycharmProjects/multi-class-text/multi-class-text-classification-cnn-rnn/train.py", line 63, in train_cnn_rnn
l2_reg_lambda=params['l2_reg_lambda'])
File "/home/mjq/PycharmProjects/multi-class-text/multi-class-text-classification-cnn-rnn/text_cnn_rnn.py", line 56, in init
lstm_cell = tf.contrib.rnn.DropoutWrapper(lstm_cell, output_keep_prob=self.dropout_keep_prob)
AttributeError: 'module' object has no attribute 'DropoutWrapper'

@Dhrumil1808
Copy link

Instead of this:
lstm_cell = tf.contrib.rnn.DropoutWrapper(lstm_cell, output_keep_prob=self.dropout_keep_prob)

Use this:
lstm_cell = tf.nn.rnn_cell.DropoutWrapper(lstm_cell, output_keep_prob=self.dropout_keep_prob)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants