leviswind / pytorch-transformer

pytorch implementation of Attention is all you need
239 stars 58 forks source link

Fix a NameError in main() #11

Open Xtraordinaire9911 opened 3 years ago

Xtraordinaire9911 commented 3 years ago

I fixed a NameError in main(). But still there exist other issues is your class "positional_encoding", round line 100 in the file modules.py . I am not quite sure that self._backend is inherited from nn.Module; and there is an AttributeError induced by this code:

outputs = self._backend.Embedding.apply( position_ind, lookup_table, padding_idx, None, 2, False, False)

I will figure out further how to sort out the issue~