Hi, I try to build your project but i can't deal with some problems.
My environment is windows and python version is 3.6, pytorch version is 0.4.1 and cuda is 8.0.
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.1.4\helpers\pydev\pydevd.py", line 1664, in
main()
File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.1.4\helpers\pydev\pydevd.py", line 1658, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.1.4\helpers\pydev\pydevd.py", line 1068, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.1.4\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:/GEC/deep-text-corrector-master/eval.py", line 73, in
output_tensor = evaluate(input_variable, len_inputs)
File "D:/GEC/deep-text-corrector-master/eval.py", line 30, in evaluate
decoder_hidden, encoder_outputs)
File "C:\Users\ETHAN\Anaconda3\envs\DeepTxtCorrection\lib\site-packages\torch\nn\modules\module.py", line 477, in call
result = self.forward(*input, *kwargs)
File "D:\GEC\deep-text-corrector-master\seq2seq\seq2seq.py", line 80, in forward
attn_weights = self.attn(rnn_output, encoder_outputs)
File "C:\Users\ETHAN\Anaconda3\envs\DeepTxtCorrection\lib\site-packages\torch\nn\modules\module.py", line 477, in call
result = self.forward(input, **kwargs)
File "D:\GEC\deep-text-corrector-master\seq2seq\seq2seq.py", line 118, in forward
attn_energies[:, i] = self.score(hidden, encoder_outputs[:, i])
RuntimeError: expand(torch.cuda.FloatTensor{[100, 1, 1]}, size=[100]): the number of sizes provided (1) must be greater or equal to the number of dimensions in the tensor (3)
I have no idea with this RunTime error, please help me.
Hi, I try to build your project but i can't deal with some problems. My environment is windows and python version is 3.6, pytorch version is 0.4.1 and cuda is 8.0.
Traceback (most recent call last): File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.1.4\helpers\pydev\pydevd.py", line 1664, in
main()
File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.1.4\helpers\pydev\pydevd.py", line 1658, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.1.4\helpers\pydev\pydevd.py", line 1068, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.1.4\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:/GEC/deep-text-corrector-master/eval.py", line 73, in
output_tensor = evaluate(input_variable, len_inputs)
File "D:/GEC/deep-text-corrector-master/eval.py", line 30, in evaluate
decoder_hidden, encoder_outputs)
File "C:\Users\ETHAN\Anaconda3\envs\DeepTxtCorrection\lib\site-packages\torch\nn\modules\module.py", line 477, in call
result = self.forward(*input, *kwargs)
File "D:\GEC\deep-text-corrector-master\seq2seq\seq2seq.py", line 80, in forward
attn_weights = self.attn(rnn_output, encoder_outputs)
File "C:\Users\ETHAN\Anaconda3\envs\DeepTxtCorrection\lib\site-packages\torch\nn\modules\module.py", line 477, in call
result = self.forward(input, **kwargs)
File "D:\GEC\deep-text-corrector-master\seq2seq\seq2seq.py", line 118, in forward
attn_energies[:, i] = self.score(hidden, encoder_outputs[:, i])
RuntimeError: expand(torch.cuda.FloatTensor{[100, 1, 1]}, size=[100]): the number of sizes provided (1) must be greater or equal to the number of dimensions in the tensor (3)
I have no idea with this RunTime error, please help me.