multi-class-text-classification-cnn-rnn icon indicating copy to clipboard operation
multi-class-text-classification-cnn-rnn copied to clipboard

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

Open mjqgit opened this issue 8 years ago • 1 comments

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'

mjqgit avatar May 23 '17 03:05 mjqgit

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)

Dhrumil1808 avatar Dec 01 '17 11:12 Dhrumil1808