Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Adding a new layer to this model #12

Open
liperrino opened this issue Aug 11, 2019 · 1 comment
Open

Adding a new layer to this model #12

liperrino opened this issue Aug 11, 2019 · 1 comment

Comments

@liperrino
Copy link

Hi. Please i would like to know how to add a new layer in your Transformer model between the Encoder and Decoder Layers so that the outputs coming from the Encoder are given to that new layer before going to the decoder. I am new language translation and i am trying to play with model that i see. I am interested in yours and would like to add a new model to it just for fun. Please can you guide me since that new model should have:

  • nn.Dropout
  • nn.Embedding
  • nn.LSTM
  • nn.Linear
  • nn.Dropout

Please i want the dimension since of each layers considering the output size of your encoder.

Cheers.

@liperrino
Copy link
Author

Hi. Please i would like to know how to add a new layer in your Transformer model between the Encoder and Decoder Layers so that the outputs coming from the Encoder are given to that new layer before going to the decoder. I am new language translation and i am trying to play with model that i see. I am interested in yours and would like to add a new model to it just for fun. Please can you guide me since that new model should have:

  • nn.Dropout
  • nn.Embedding
  • nn.LSTM
  • nn.Linear
  • nn.Dropout

Please i want the dimension since of each layers considering the output size of your encoder.

Cheers.

Here is what i get as an error when i try to do what i want:
RuntimeError: size mismatch, m1: [8 x 13725], m2: [16 x 16] at /pytorch/aten/src/TH/generic/THTensorMath.cpp:752

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant