You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
I found that maybe there is something wrong when I preprocess data.
Would please tell me How you Preprocess the json in the dataset? Do you convert it to the graylabel Image? what do you put into the label_folder?
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!
The text was updated successfully, but these errors were encountered: