-
Notifications
You must be signed in to change notification settings - Fork 482
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
I try to train DANet,but i got these errot ,i have try 1.--aux --se-loss; 2,--aux; 3.--se-loss all error #124
Comments
From the ReadMe, the code author provides testing code. If you train it, you should check the "loss part" of the code. you could refer to the "loss part" of tag v0.5.0 |
thank you for your rely . I have found this problem, so i changed the loss function like this :
and i wonder you method "loss part", whether means this class "DANet/encoding/nn/customize.py /SegmentationMultiLosses" |
yes |
thank you ~ |
my env is ubuntu 16, 4xTITAN RTX,
from my temminal:
CUDA_VISIBLE_DEVICES=0,1,2,3 python train.py --dataset citys --model danet --backbone resnet101 --checkname danet101 --base-size 1024 --crop-size 768 --epochs 240 --batch-size 8 --lr 0.003 --workers 2 --multi-grid --multi-dilation 4 8 16 --aux
Traceback (most recent call last):
File "train.py", line 281, in
trainer.training(epoch)
File "train.py", line 213, in training
loss = self.criterion(outputs, target)
File "/home/amax/.conda/envs/th/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(input, **kwargs)
File "/home/amax/.conda/envs/th/lib/python3.7/site-packages/torch_encoding-1.2.2b20201205-py3.7.egg/encoding/parallel.py", line 132, in forward
outputs = _criterion_parallel_apply(replicas, inputs, targets, kwargs)
File "/home/amax/.conda/envs/th/lib/python3.7/site-packages/torch_encoding-1.2.2b20201205-py3.7.egg/encoding/parallel.py", line 185, in _criterion_parallel_apply
raise output
File "/home/amax/.conda/envs/th/lib/python3.7/site-packages/torch_encoding-1.2.2b20201205-py3.7.egg/encoding/parallel.py", line 160, in _worker
output = module((input + target), **kwargs)
File "/home/amax/.conda/envs/th/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/home/amax/.conda/envs/th/lib/python3.7/site-packages/torch_encoding-1.2.2b20201205-py3.7.egg/encoding/nn/loss.py", line 75, in forward
pred, se_pred, target = tuple(inputs)
ValueError: too many values to unpack (expected 3)
The text was updated successfully, but these errors were encountered: