-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Traceback (most recent call last):
File "train.py", line 100, in
main(parse_args())
File "train.py", line 57, in main
loss, miou = net(img, label)
File "/home/wdk/.conda/envs/farseg/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/wdk/FarSeg/FarSeg/models/farnet.py", line 68, in forward
return self._get_loss(logit, label), self._get_miou(logit, label)
File "/home/wdk/FarSeg/FarSeg/models/farnet.py", line 90, in _get_loss
logit, label = logit[mask], label[mask]
IndexError: The shape of the mask [4816896] at index 0 does not match the shape of the indexed tensor [1605632, 7] at index 0
Hi, I meet the Error when I run the code on ISAID dataset, the batch is set as default.
And I couldn't start training because of this.
So, is there something wrong with the shape of the label or the logit, or the number of the class, or something else?
Please Give me some help, thanks!