HRL-RE icon indicating copy to clipboard operation
HRL-RE copied to clipboard

How can I solve the following problems?IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)

Open XingYu131 opened this issue 3 years ago • 1 comments

Process Process-2: Traceback (most recent call last): File "/home/guoweihu/anaconda3/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/home/guoweihu/anaconda3/lib/python3.6/multiprocessing/process.py", line 93, in run self._target(*self._args, **self._kwargs) File "/home/guoweihu/gwh/untitled/HRL-RE-master/HRL-RE-master/code/TrainProcess.py", line 64, in worker acc, cnt, tot, loss = workProcess(model, datas, sample_round, mode) File "/home/guoweihu/gwh/untitled/HRL-RE-master/HRL-RE-master/code/TrainProcess.py", line 32, in workProcess top_action, top_actprob, bot_action, bot_actprob = model(mode, data['text'],preoptions, preactions) File "/home/guoweihu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, **kwargs) File "/home/guoweihu/gwh/untitled/HRL-RE-master/HRL-RE-master/code/Model.py", line 80, in forward prehid, prec = self.preLSTML(wvs[x], (prehid, prec)) File "/home/guoweihu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, **kwargs) File "/home/guoweihu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/rnn.py", line 1058, in forward self.bias_ih, self.bias_hh, IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)

XingYu131 avatar Sep 10 '21 08:09 XingYu131

have solved?

threeColorFr avatar Jan 17 '23 15:01 threeColorFr