Skip to content

Commit

Permalink
Merge pull request #128 from haoransh/master
Browse files Browse the repository at this point in the history
fix the access of embedding_fn of helper
  • Loading branch information
ZhitingHu committed Apr 10, 2019
2 parents c7af509 + fc976e2 commit 29cef64
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions texar/modules/decoders/transformer_decoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,12 +533,7 @@ def _build(self, # pylint: disable=arguments-differ, too-many-statements
self.max_decoding_length = max_decoding_length
if beam_width is None: # Inference-like decoding
# Prepare helper
if helper is not None:
# Ignore `decoding_strategy`
# pylint: disable=protected-access
self.embedding = helper._embedding_fn

else:
if helper is None:
if decoding_strategy == "infer_greedy":
helper = tx_helper.GreedyEmbeddingHelper(
embedding, start_tokens, end_token)
Expand Down

0 comments on commit 29cef64

Please sign in to comment.