CCPD icon indicating copy to clipboard operation
CCPD copied to clipboard

train error

Open zhijieL387 opened this issue 6 years ago • 1 comments

in forward(self, x) 191 # input = Variable(torch.rand(2, 1, 10, 10), requires_grad=True) 192 # rois = Variable(torch.LongTensor([[0, 1, 2, 7, 8], [0, 3, 3, 8, 8], [1, 3, 3, 8, 8]]), requires_grad=False) --> 193 roi1 = roi_pooling_ims(_x1, boxNew.mm(p1), size=(16, 8)) 194 roi2 = roi_pooling_ims(_x3, boxNew.mm(p2), size=(16, 8)) 195 roi3 = roi_pooling_ims(_x5, boxNew.mm(p3), size=(16, 8))

in roi_pooling_ims(input, rois, size, spatial_scale) 18 roi = rois[i] 19 im_idx = roi[0] ---> 20 im = input.narrow(0, i, 1)[..., roi[1]:(roi[3] + 1), roi[0]:(roi[2] + 1)] 21 output.append(m(im)) 22 return torch.cat(output, 0)

~/anaconda3/lib/python3.6/site-packages/torch/autograd/variable.py in getitem(self, key) 76 return IndexSelect.apply(self, 0, key) 77 # else fall through and raise an error in Index ---> 78 return Index.apply(self, key) 79 80 def setitem(self, key, value):

~/anaconda3/lib/python3.6/site-packages/torch/autograd/_functions/tensor.py in forward(ctx, i, index) 87 result = i.index(ctx.index) 88 else: ---> 89 result = i.index(ctx.index) 90 ctx.mark_shared_storage((i, result)) 91 return result

ValueError: result of slicing is an empty tensor

zhijieL387 avatar May 09 '19 10:05 zhijieL387

@detectRecog

zhijieL387 avatar May 09 '19 10:05 zhijieL387