From c158cdb1dade90ff92892bf86521e6d164916b25 Mon Sep 17 00:00:00 2001 From: akYoung Date: Wed, 3 May 2017 22:41:23 +0800 Subject: [PATCH] Corretions for model test example The sentences of test data in sentence entailment example should be generated with integers limited to vocab_size. --- .../keras_parikh_entailment/keras_decomposable_attention.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/keras_parikh_entailment/keras_decomposable_attention.py b/examples/keras_parikh_entailment/keras_decomposable_attention.py index c8aaffd25..f9f912501 100644 --- a/examples/keras_parikh_entailment/keras_decomposable_attention.py +++ b/examples/keras_parikh_entailment/keras_decomposable_attention.py @@ -256,9 +256,9 @@ def test_fit_model(): settings = {'lr': 0.001, 'dropout': 0.2, 'gru_encode':True} model = build_model(vectors, shape, settings) - train_X = _generate_X(20, shape[0], vectors.shape[1]) + train_X = _generate_X(20, shape[0], vectors.shape[0]) train_Y = _generate_Y(20, shape[2]) - dev_X = _generate_X(15, shape[0], vectors.shape[1]) + dev_X = _generate_X(15, shape[0], vectors.shape[0]) dev_Y = _generate_Y(15, shape[2]) model.fit(train_X, train_Y, validation_data=(dev_X, dev_Y), nb_epoch=5,