Kiu-net-pytorch: bug: The size of tensor a (3) must match the size of tensor b (6) at non-singleton dimension 2

Created on 26 Oct 2020  ·  8Comments  ·  Source: jeya-maria-jose/KiU-Net-pytorch

Most helpful comment

yes,i have the same problem. the output size (1024) is not the same size as label(512)

All 8 comments

Can you please add more description for this error ? For which dataset and which model are you getting this bug ?

i used the LIST data to train the model. got the .pth. then i run the val.py.( i did not change any parameters in parameter.py ,except those paths). Then i got the bug of models.py in line 602. "The size of tensor a (3) must match the size of tensor b (6) at non-singleton dimension 2". i tried to change the "size" of parameter.py to 8, there is no bug, but the results(pred.nii) seems bad. other size will result to similar bug. i also change the "size" of paramter.py to 24 when i run the train.py, cause i got similar bugs too.

yes,i have the same problem. the output size (1024) is not the same size as label(512)

Trying to run train.py in LiTS folder after successfully run get_training_set.py in data_prepare, but got the following error when using kiunet_org as net in model.py:
Traceback (most recent call last):
File "train.py", line 71, in
outputs = net(ct)
File "/home/viplab/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(input, *kwargs)
File "/home/viplab/anaconda3/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 159, in forward
return self.module(inputs[0], *kwargs[0])
File "/home/viplab/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(input, *kwargs)
File "/home/viplab/nas/KiU-Net-pytorch/LiTS/net/models.py", line 591, in forward
out = torch.add(out,F.interpolate(F.relu(self.inte3_1bn(self.intere3_1(out1))),scale_factor=(0.5,0.0625,0.0625),mode ='trilinear'))
RuntimeError: The size of tensor a (3) must match the size of tensor b (6) at non-singleton dimension 2

I have the same problem with running (almost) any of the models on my own data:
out1 = torch.add(out1,F.interpolate(F.relu(self.inte1_2bn(self.intere1_2(tmp))),scale_factor=(4,4),mode ='bilinear')) RuntimeError: The size of tensor a (386) must match the size of tensor b (384) at non-singleton dimension 3

I have the same problem,So how to solve it?

Have same problem kiunet_org.

I have the same issue has anybody solved it

Was this page helpful?
0 / 5 - 0 ratings

Related issues

blite picture blite  ·  3Comments

mitsuhiko picture mitsuhiko  ·  3Comments

dwt picture dwt  ·  3Comments

jakoch picture jakoch  ·  3Comments

nvie picture nvie  ·  3Comments