Transformer
Transformer copied to clipboard
Adding a new layer to this model
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.
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