Hi，I change the map to

Blockquote
self.id_to_trainid = {
0: 0,
1: 1
}
self.trainid2name = {
0:“back”,
1:“file”,
}

but it seems the same problem…

Blockquote
File “train_src.py”, line 314, in 
main()
File “train_src.py”, line 307, in main
model = train(cfg, args.local_rank, args.distributed)
File “train_src.py”, line 139, in train
loss = criterion(pred, src_label)
File “/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py”, line 889, in _call_impl
result = self.forward(*input, **kwargs)
File “/usr/local/lib/python3.7/dist-packages/torch/nn/modules/loss.py”, line 1048, in forward
ignore_index=self.ignore_index, reduction=self.reduction)
File “/usr/local/lib/python3.7/dist-packages/torch/nn/functional.py”, line 2693, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File “/usr/local/lib/python3.7/dist-packages/torch/nn/functional.py”, line 2390, in nll_loss
ret = torch._C._nn.nll_loss2d(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
RuntimeError: 1only batches of spatial targets supported (3D tensors) but got targets of size: : [2, 3, 720, 1280]