-
Notifications
You must be signed in to change notification settings - Fork 350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
runtime error #8
Comments
same problem here, can't figure out why this is happening, but for me this happens during the inference. When the decoding time step is greater than 512, then this issue jumps out |
I‘m testing the model on customerized dataset, and during the inference, this weird issue just keep showing up |
It might be the problem of params here. Set max_seq_len a larger value is ok for me!class PositionalEncoder(nn.Module): |
the whole error is as follows:, x = x + pe got different size?
creating dataset and iterator...
model weights will be saved every 20 minutes and at end of epoch to directory weights/
training model...
Traceback (most recent call last):
File "train.py", line 192, in
main()
File "train.py", line 120, in main
train_model(model, opt)
File "train.py", line 37, in train_model
preds = model(src, trg_input, src_mask, trg_mask)
File "/home/tensorflow/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/tensorflow/reaction/Transformer/Models.py", line 50, in forward
d_output = self.decoder(trg, e_outputs, src_mask, trg_mask)
File "/home/tensorflow/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/tensorflow/reaction/Transformer/Models.py", line 36, in forward
x = self.pe(x)
File "/home/tensorflow/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/tensorflow/reaction/Transformer/Embed.py", line 40, in forward
x = x + pe
RuntimeError: The size of tensor a (230) must match the size of tensor b (200) at non-singleton dimension 1
The text was updated successfully, but these errors were encountered: