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

trainer error #80

Open
Margrate opened this issue Oct 6, 2021 · 2 comments
Open

trainer error #80

Margrate opened this issue Oct 6, 2021 · 2 comments

Comments

@Margrate
Copy link

Margrate commented Oct 6, 2021

Thank you for your sharing. I use 2 3090GPUS and meet the following error:

Traceback (most recent call last):
File "/openseg.pytorch-pytorch-1.7/main.py", line 524, in
model.train()
File "openseg.pytorch-pytorch-1.7/segmentor/trainer.py", line 416, in train
self.__val()
File "openseg.pytorch-pytorch-1.7/segmentor/trainer.py", line 361, in __val
loss = self.pixel_loss(outputs[i], targets[i].unsqueeze(0))
File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/data1/Segmentation/2021Q1/openseg.pytorch-pytorch-1.7/lib/loss/loss_helper.py", line 273, in forward
aux_loss = self.ce_loss(aux_out, targets)
File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/data1/Segmentation/2021Q1/openseg.pytorch-pytorch-1.7/lib/loss/loss_helper.py", line 135, in forward
target = self._scale_target(targets[0], (inputs.size(2), inputs.size(3)))
File "/data1/Segmentation/2021Q1/openseg.pytorch-pytorch-1.7/lib/loss/loss_helper.py", line 145, in _scale_target
targets = F.interpolate(targets, size=scaled_size, mode="nearest")
File "/opt/conda/lib/python3.6/site-packages/torch/nn/functional.py", line 3052, in interpolate
'Input is {}D, size is {}'.format(dim, len(size)))
ValueError: size shape must match input shape. Input is 3D, size is 2

@xiamibudayang
Copy link

Have you solved this problem?

1 similar comment
@sym330
Copy link

sym330 commented Sep 19, 2024

Have you solved this problem?

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

3 participants