Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zheyuye committed Jul 29, 2020
1 parent 995e5d7 commit 232e0b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gluonnlp/models/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1402,6 +1402,8 @@ def hybrid_forward(self, F, step_data, states):
step_data = step_data * np.sqrt(self.model.dec_units)
if self.model.pos_embed_type is not None:
step_data = step_data + self.model.tgt_pos_embed_layer(position)
if self.model.layernorm_embedding:
step_data = self.tgt_embed_ln(step_data)
out, new_states =\
self.model.decoder.incremental_decode(F, step_data, dec_states,
mem_data, mem_valid_length)
Expand Down

0 comments on commit 232e0b6

Please sign in to comment.