Skip to content
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

Why do I report errors when using CPU methods for training #16

Open
DubheRen opened this issue Dec 10, 2019 · 10 comments
Open

Why do I report errors when using CPU methods for training #16

DubheRen opened this issue Dec 10, 2019 · 10 comments

Comments

@DubheRen
Copy link

Traceback (most recent call last):
File "/Users/dubhe/anaconda2/envs/hrl-re/lib/python3.5/multiprocessing/process.py", line 249, in _bootstrap
self.run()
File "/Users/dubhe/anaconda2/envs/hrl-re/lib/python3.5/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/Users/dubhe/Project/HRL-RE-master/code/TrainProcess.py", line 55, in worker
acc, cnt, tot, loss = workProcess(model, datas, sample_round, mode)
File "/Users/dubhe/Project/HRL-RE-master/code/TrainProcess.py", line 25, in workProcess
preoptions, preactions)
File "/Users/dubhe/anaconda2/envs/hrl-re/lib/python3.5/site-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "/Users/dubhe/Project/HRL-RE-master/code/Model.py", line 80, in forward
prehid, prec = self.preLSTML(wvs[x], (prehid, prec))
File "/Users/dubhe/anaconda2/envs/hrl-re/lib/python3.5/site-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "/Users/dubhe/anaconda2/envs/hrl-re/lib/python3.5/site-packages/torch/nn/modules/rnn.py", line 936, in forward
self.check_forward_input(input)
File "/Users/dubhe/anaconda2/envs/hrl-re/lib/python3.5/site-packages/torch/nn/modules/rnn.py", line 759, in check_forward_input
if input.size(1) != self.input_size:
IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)

@liuzhencheng
Copy link

Hello did you solve it? I encountered the same problem

@Gavin4th
Copy link

same problem

@Gavin4th
Copy link

maybe the problem of version

@ZechenLiu
Copy link

maybe the problem of version

maybe the problem of version

Did you solve it?I've met the same problem

@rhmm
Copy link

rhmm commented Apr 10, 2020

Traceback (most recent call last):
File "/Users/dubhe/anaconda2/envs/hrl-re/lib/python3.5/multiprocessing/process.py", line 249, in _bootstrap
self.run()
File "/Users/dubhe/anaconda2/envs/hrl-re/lib/python3.5/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/Users/dubhe/Project/HRL-RE-master/code/TrainProcess.py", line 55, in worker
acc, cnt, tot, loss = workProcess(model, datas, sample_round, mode)
File "/Users/dubhe/Project/HRL-RE-master/code/TrainProcess.py", line 25, in workProcess
preoptions, preactions)
File "/Users/dubhe/anaconda2/envs/hrl-re/lib/python3.5/site-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "/Users/dubhe/Project/HRL-RE-master/code/Model.py", line 80, in forward
prehid, prec = self.preLSTML(wvs[x], (prehid, prec))
File "/Users/dubhe/anaconda2/envs/hrl-re/lib/python3.5/site-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "/Users/dubhe/anaconda2/envs/hrl-re/lib/python3.5/site-packages/torch/nn/modules/rnn.py", line 936, in forward
self.check_forward_input(input)
File "/Users/dubhe/anaconda2/envs/hrl-re/lib/python3.5/site-packages/torch/nn/modules/rnn.py", line 759, in check_forward_input
if input.size(1) != self.input_size:
IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)

Hello Did you solve it?

@Gavin4th
Copy link

Gavin4th commented Apr 10, 2020 via email

@rhmm
Copy link

rhmm commented Apr 10, 2020

i use the same version that the author used and the problem has been solved! torch 0.3.1 python 3.5
ok,thanks

@kids-p
Copy link

kids-p commented Oct 17, 2020

i use the same version that the author used and the problem has been solved! torch 0.3.1 python 3.5

------------------ 原始邮件 ------------------ 发件人: "rhmm"<[email protected]>; 发送时间: 2020年4月10日(星期五) 下午3:25 收件人: "truthless11/HRL-RE"<[email protected]>; 抄送: "Jarvan"<[email protected]>; "Comment"<[email protected]>; 主题: Re: [truthless11/HRL-RE] Why do I report errors when using CPU methods for training (#16) Traceback (most recent call last): File "/Users/dubhe/anaconda2/envs/hrl-re/lib/python3.5/multiprocessing/process.py", line 249, in _bootstrap self.run() File "/Users/dubhe/anaconda2/envs/hrl-re/lib/python3.5/multiprocessing/process.py", line 93, in run self._target(*self._args, **self._kwargs) File "/Users/dubhe/Project/HRL-RE-master/code/TrainProcess.py", line 55, in worker acc, cnt, tot, loss = workProcess(model, datas, sample_round, mode) File "/Users/dubhe/Project/HRL-RE-master/code/TrainProcess.py", line 25, in workProcess preoptions, preactions) File "/Users/dubhe/anaconda2/envs/hrl-re/lib/python3.5/site-packages/torch/nn/modules/module.py", line 541, in call result = self.forward(*input, **kwargs) File "/Users/dubhe/Project/HRL-RE-master/code/Model.py", line 80, in forward prehid, prec = self.preLSTML(wvs[x], (prehid, prec)) File "/Users/dubhe/anaconda2/envs/hrl-re/lib/python3.5/site-packages/torch/nn/modules/module.py", line 541, in call result = self.forward(*input, **kwargs) File "/Users/dubhe/anaconda2/envs/hrl-re/lib/python3.5/site-packages/torch/nn/modules/rnn.py", line 936, in forward self.check_forward_input(input) File "/Users/dubhe/anaconda2/envs/hrl-re/lib/python3.5/site-packages/torch/nn/modules/rnn.py", line 759, in check_forward_input if input.size(1) != self.input_size: IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1) Hello Did you solve it? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Hi,I'm about to ask for your cuda's version and your torchvision's version,thanks!

@limeiyang
Copy link

my version is pytorch=0.3.1 and python=3.5
i have solved the problem,but i have a new problem:

Traceback (most recent call last):
RuntimeError: dimension out of range (expected to be in range of [-1, 0], but got 1)
File "D:\Anaconda\envs\pytorch031\lib\multiprocessing\process.py", line 249, in _bootstrap
self.run()
File "D:\Anaconda\envs\pytorch031\lib\multiprocessing\process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "E:\papers\AAAA当前使用\HRL-RE-master\HRL-RE-master\code\TrainProcess.py", line 55, in worker
acc, cnt, tot, loss = workProcess(model, datas, sample_round, mode)
File "E:\papers\AAAA当前使用\HRL-RE-master\HRL-RE-master\code\TrainProcess.py", line 28, in workProcess
model(mode, data['text'])
File "D:\Anaconda\envs\pytorch031\lib\site-packages\torch\nn\modules\module.py", line 357, in call
result = self.forward(*input, **kwargs)
File "E:\papers\AAAA当前使用\HRL-RE-master\HRL-RE-master\code\Model.py", line 81, in forward
prehid, prec = self.preLSTML(wvs[x], (prehid, prec))
File "D:\Anaconda\envs\pytorch031\lib\site-packages\torch\nn\modules\module.py", line 357, in call
result = self.forward(*input, **kwargs)
File "D:\Anaconda\envs\pytorch031\lib\site-packages\torch\nn\modules\rnn.py", line 655, in forward
self.bias_ih, self.bias_hh,
File "D:\Anaconda\envs\pytorch031\lib\site-packages\torch\nn_functions\rnn.py", line 34, in LSTMCell
ingate, forgetgate, cellgate, outgate = gates.chunk(4, 1)
RuntimeError: dimension out of range (expected to be in range of [-1, 0], but got 1)

@threeColorFr
Copy link

can you solved it?

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

No branches or pull requests

8 participants