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

Commit

Permalink
embeddings check condition in seq2seq_model
Browse files Browse the repository at this point in the history
  • Loading branch information
pratapbhanu committed Jul 10, 2017
1 parent 6403218 commit ab98771
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion seq2seq/models/seq2seq_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ab98771

Please sign in to comment.