Skip to content

Commit

Permalink
Fixed share_decoder_embeddings AttributeError (but maybe not the righ…
Browse files Browse the repository at this point in the history
…t way)
  • Loading branch information
bpopeters committed Jul 16, 2017
1 parent 7e809ba commit 9fc0eb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def main():
nn.Linear(opt.rnn_size, dicts['tgt'].size()),
nn.LogSoftmax())
if opt.share_decoder_embeddings:
generator[0].weight = decoder.word_lut.weight
generator[0].weight = decoder.embeddings.word_lut.weight

model = onmt.Models.NMTModel(encoder, decoder, len(opt.gpus) > 1)

Expand Down

0 comments on commit 9fc0eb2

Please sign in to comment.