Tramac / Fast-SCNN-pytorch

A PyTorch Implementation of Fast-SCNN: Fast Semantic Segmentation Network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

COCO dataset : weight tensor should be defined either for all or no classes at

sunnysd opened this issue · comments

Training for COCO dataset using mscoco.py,

File "train.py", line 201, in
trainer.train()
File "train.py", line 137, in train
loss = self.criterion(outputs, targets)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/Documents/Fast-SCNN-pytorch/utils/loss.py", line 114, in forward
return super(MixSoftmaxCrossEntropyOHEMLoss, self).forward(*inputs)
File "/home/Documents/Fast-SCNN-pytorch/utils/loss.py", line 90, in forward
return self.criterion(predict, target)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/loss.py", line 862, in forward
ignore_index=self.ignore_index, reduction=self.reduction)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/functional.py", line 1550, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/functional.py", line 1409, in nll_loss
return torch._C._nn.nll_loss2d(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
RuntimeError: weight tensor should be defined either for all or no classes at /pytorch/aten/src/THCUNN/generic/SpatialClassNLLCriterion.cu:27

Hi, please use cross-entropy loss.

Thanks it worked.

Do you know where i can get the coco dataset palletes (color) for segmentation ?