shyamupa / snli-entailment

attention model for entailment on SNLI corpus implemented in Tensorflow and Keras
178 stars 43 forks source link
attention-model entailment tensorflow

Implementations of a attention model for entailment from this paper in keras and tensorflow.

Compatible with keras v1.0.6 and tensorflow 0.11.0rc2

I implemented the model to learn the APIs for keras and tensorflow, so I have not really tuned on the performance. The models implemented in keras is a little different, as keras does not expose a method to set a LSTMs state.

To train,

python amodel.py -train <TRAIN> -dev <DEV> -test <TEST>

for using the keras implementation, or

python tf_model.py -train <TRAIN> -dev <DEV> -test <TEST>

for using the tensorflow implementation. Look at the get_params() method in both scripts to see how to specify different parameters.

Log is written out in *.log file with callback for accuracy.

For comments, improvements, bug-reports and suggestions for tuning, email shyamupa@gmail.com