vanzytay / EMNLP2018_NLI

Repository for NLI models (EMNLP 2018)
GNU General Public License v3.0
61 stars 10 forks source link

tensorflow version #2

Open zjjj opened 5 years ago

zjjj commented 5 years ago

Hi, thanks for sharing this repo.

I tried to run the following example command with tf version 1.11.0, but got this error

python train_acc.py --rnn_type SOFT_HP_CHAR_CAFE_RESFM_HIGH_LSTM --char_enc RNN --char_max 16 --use_cudnn 1 --batch-size 128 --gpu 0 --opt Adam --lr 1E-3 --epochs 100 --early_stop 0 --num_dense 2 --dataset SNLI --decay_lr 0.96 --decay_epoch 10 --l2_reg 1E-8 --cnn_size 64 --translate_proj 1 --num_proj 1 --rnn_size 200 --hdim 300 --rnn_layers 3 --sort_batch 1 --use_pos 1 --pos_emb_size 10 --clip_norm 5 --aggr_layers 2

... EMNLP2018_NLI/tylib/lib/cudnn_rnn_ops.py", line 20, in <module>
    from tensorflow.contrib.cudnn_rnn.ops import gen_cudnn_rnn_ops
ImportError: No module named ops

Could you please give the version and dependencies information? Thanks.

vanzytay commented 5 years ago

Hey. This works with Tensorflow 1.7.0.

I also recently upgraded to 1.11.0 and also got the same error. I believe this was because some TF functions disappeared when the version upgraded. I'm trying to refactor this module to suit newer versions of TF.