CCPD icon indicating copy to clipboard operation
CCPD copied to clipboard

train error

Open zhuliqian opened this issue 7 years ago • 13 comments

Traceback (most recent call last): File "rpnet.py", line 405, in model_conv = train_model(model_conv, criterion, optimizer_conv, num_epochs=epochs) File "rpnet.py", line 365, in train_model fps_pred, y_pred = model(x) File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 224, in call result = self.forward(*input, **kwargs) File "/usr/local/lib/python3.5/dist-packages/torch/nn/parallel/data_parallel.py", line 58, in forward return self.module(*inputs[0], **kwargs[0]) File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 224, in call result = self.forward(*input, **kwargs) File "rpnet.py", line 264, in forward roi1 = roi_pooling_ims(_x1, boxNew.mm(p1), size=(16, 8)) File "/home/chase/CCPD-master/rpnet/roi_pooling.py", line 72, in roi_pooling_ims im = input.narrow(0, i, 1)[..., roi[1]:(roi[3] + 1), roi[0]:(roi[2] + 1)] File "/usr/local/lib/python3.5/dist-packages/torch/autograd/variable.py", line 76, in getitem return Index.apply(self, key) File "/usr/local/lib/python3.5/dist-packages/torch/autograd/_functions/tensor.py", line 16, in forward result = i.index(ctx.index) ValueError: result of slicing is an empty tensor

zhuliqian avatar Sep 14 '18 03:09 zhuliqian

我也遇到了同样的问题,想问一下应该怎么解决

xieqk avatar Sep 18 '18 14:09 xieqk

不知道,如果你解决了还望告知

zhuliqian avatar Sep 19 '18 01:09 zhuliqian

我也遇到了同样的问题

shz1314 avatar Sep 19 '18 01:09 shz1314

我也遇到了同样的问题,想问一下应该怎么解决

都减一试一下 就是roi兴趣区域

shz1314 avatar Sep 19 '18 07:09 shz1314

I attended the ECCV conference several days ago, so I missed emails from you. I feel so sorry for that. There are problems training the model and I have verified that. The core problem lies on the dataloader. I will work on it today. All items on github page including dataset url will be updated these two days. In addition, a well trained rpnet model will also be available for test convenience.

Thank you for your concern.

detectRecog avatar Sep 20 '18 00:09 detectRecog

Thank you very much for your open source and look forward to your update.

zhuliqian avatar Sep 20 '18 01:09 zhuliqian

@zhuliqian Errors have been repaired. Please tell me the progress if you train the model successfully.

detectRecog avatar Sep 20 '18 11:09 detectRecog

@xieqk Errors have been repaired. Please tell me the progress if you train the model successfully.

detectRecog avatar Sep 20 '18 11:09 detectRecog

@shz1314 Errors have been repaired. Please tell me the progress if you train the model successfully.

detectRecog avatar Sep 20 '18 11:09 detectRecog

I clone this repo, dowload .pth file and run flowing command but get error python3 demo.py -i ./demo -m ../fh02.pth

Traceback (most recent call last): File "demo.py", line 275, in fps_pred, y_pred = model_conv(x) File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 489, in call result = self.forward(*input, **kwargs) File "/usr/local/lib/python3.5/dist-packages/torch/nn/parallel/data_parallel.py", line 141, in forward return self.module(*inputs[0], **kwargs[0]) File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 489, in call result = self.forward(*input, **kwargs) File "demo.py", line 229, in forward roi1 = roi_pooling_ims(_x1, boxNew.mm(p1), size=(16, 8)) File "/home/linh/AI/anpr_ocr/trynew/CCPD/rpnet/roi_pooling.py", line 73, in roi_pooling_ims output.append(adaptive_max_pool(im, size)) File "/home/linh/AI/anpr_ocr/trynew/CCPD/rpnet/roi_pooling.py", line 35, in adaptive_max_pool return AdaptiveMaxPool2d(size[0], size[1])(input) File "/home/linh/AI/anpr_ocr/trynew/CCPD/rpnet/roi_pooling.py", line 18, in forward self._backend = type2backend[type(input)] File "/usr/local/lib/python3.5/dist-packages/torch/_thnn/init.py", line 15, in getitem return self.backends[name].load() KeyError: <class 'torch.Tensor'>

Can you give me any suggestion?

linhqhta avatar Dec 20 '18 07:12 linhqhta

@detectRecog

linhqhta avatar Dec 20 '18 07:12 linhqhta

I meet the same problem as linhqhta's.How can I do?@detectRecog

zy486at189cn avatar Feb 03 '19 12:02 zy486at189cn

I clone this repo, dowload .pth file and run flowing command but get error python3 demo.py -i ./demo -m ../fh02.pth

Traceback (most recent call last): File "demo.py", line 275, in fps_pred, y_pred = model_conv(x) File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 489, in call result = self.forward(*input, **kwargs) File "/usr/local/lib/python3.5/dist-packages/torch/nn/parallel/data_parallel.py", line 141, in forward return self.module(*inputs[0], **kwargs[0]) File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 489, in call result = self.forward(*input, **kwargs) File "demo.py", line 229, in forward roi1 = roi_pooling_ims(_x1, boxNew.mm(p1), size=(16, 8)) File "/home/linh/AI/anpr_ocr/trynew/CCPD/rpnet/roi_pooling.py", line 73, in roi_pooling_ims output.append(adaptive_max_pool(im, size)) File "/home/linh/AI/anpr_ocr/trynew/CCPD/rpnet/roi_pooling.py", line 35, in adaptive_max_pool return AdaptiveMaxPool2d(size[0], size[1])(input) File "/home/linh/AI/anpr_ocr/trynew/CCPD/rpnet/roi_pooling.py", line 18, in forward self._backend = type2backend[type(input)] File "/usr/local/lib/python3.5/dist-packages/torch/_thnn/init.py", line 15, in getitem return self.backends[name].load() KeyError: <class 'torch.Tensor'>

Can you give me any suggestion?

There is a problem with the Torch version, try replacing the File "/home/linh/AI/anpr_ocr/trynew/CCPD/rpnet/roi_pooling.py", line 18,

with

"self._backend = type2backend[input.type()]"

SpaceHan avatar Jul 27 '19 03:07 SpaceHan