You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when running the train.py file i got:
/media/vivien/A/NEW-SMT/Neural-Machine-Translation/data/deu.txt
Traceback (most recent call last):
File "train.py", line 124, in
loss = train(input_variable, target_variable, encoder, decoder, encoder_optimizer, decoder_optimizer, criterion)
File "train.py", line 53, in train
encoder_outputs)
File "/home/vivien/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/media/vivien/A/NEW-SMT/Neural-Machine-Translation/src/attention_decoder.py", line 55, in forward
attention_weights = self.attention(rnn_output.squeeze(0), encoder_outputs)
File "/home/vivien/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/media/vivien/A/NEW-SMT/Neural-Machine-Translation/src/attention.py", line 41, in forward
energies[i] = self._score(hidden, encoder_outputs[i])
File "/media/vivien/A/NEW-SMT/Neural-Machine-Translation/src/attention.py", line 51, in _score
energy = hidden.dot(energy)
RuntimeError: dot: Expected 1-D argument self, but got 2-D
The text was updated successfully, but these errors were encountered:
when running the train.py file i got:
/media/vivien/A/NEW-SMT/Neural-Machine-Translation/data/deu.txt
Traceback (most recent call last):
File "train.py", line 124, in
loss = train(input_variable, target_variable, encoder, decoder, encoder_optimizer, decoder_optimizer, criterion)
File "train.py", line 53, in train
encoder_outputs)
File "/home/vivien/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/media/vivien/A/NEW-SMT/Neural-Machine-Translation/src/attention_decoder.py", line 55, in forward
attention_weights = self.attention(rnn_output.squeeze(0), encoder_outputs)
File "/home/vivien/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/media/vivien/A/NEW-SMT/Neural-Machine-Translation/src/attention.py", line 41, in forward
energies[i] = self._score(hidden, encoder_outputs[i])
File "/media/vivien/A/NEW-SMT/Neural-Machine-Translation/src/attention.py", line 51, in _score
energy = hidden.dot(energy)
RuntimeError: dot: Expected 1-D argument self, but got 2-D
The text was updated successfully, but these errors were encountered: