Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit ab98771

Browse files
committed
embeddings check condition in seq2seq_model
1 parent 6403218 commit ab98771

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

seq2seq/models/seq2seq_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def batch_size(self, features, labels):
136136
def source_embedding(self):
137137
"""Returns the embedding used for the source sequence.
138138
"""
139-
if self.embedding_mat:
139+
if self.embedding_mat is not None:
140140
self.params.update({"embedding.dim":self.embedding_mat.shape[1]})
141141
initializer = tf.constant(self.embedding_mat, dtype=tf.float32)
142142
shape_ = None

0 commit comments

Comments
 (0)