From ab9877122bc29a9b913916147b140661898d28d3 Mon Sep 17 00:00:00 2001 From: pratapbhanu Date: Wed, 5 Jul 2017 17:34:40 +0200 Subject: [PATCH] embeddings check condition in seq2seq_model --- seq2seq/models/seq2seq_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seq2seq/models/seq2seq_model.py b/seq2seq/models/seq2seq_model.py index ceb62820..6779f49f 100644 --- a/seq2seq/models/seq2seq_model.py +++ b/seq2seq/models/seq2seq_model.py @@ -136,7 +136,7 @@ def batch_size(self, features, labels): def source_embedding(self): """Returns the embedding used for the source sequence. """ - if self.embedding_mat: + if self.embedding_mat is not None: self.params.update({"embedding.dim":self.embedding_mat.shape[1]}) initializer = tf.constant(self.embedding_mat, dtype=tf.float32) shape_ = None