-
Notifications
You must be signed in to change notification settings - Fork 78
Description
G_pred shape: torch.Size([8, 2, 256, 256])
G_pred[-1] shape: torch.Size([2, 256, 256])
gt shape: torch.Size([8, 1, 256, 256])
0%| | 0/890 [00:01<?, ?it/s]
Traceback (most recent call last):
File "F:\ChangeDetection\ChangeFormer\main_cd.py", line 84, in
train(args)
File "F:\ChangeDetection\ChangeFormer\main_cd.py", line 15, in train
model.train_models()
File "F:\ChangeDetection\ChangeFormer\models\trainer.py", line 341, in train_models
self._backward_G()
File "F:\ChangeDetection\ChangeFormer\models\trainer.py", line 317, in _backward_G
self.G_loss = self._pxl_loss(self.G_pred[-1], gt)
File "F:\ChangeDetection\ChangeFormer\models\losses.py", line 20, in cross_entropy
return F.cross_entropy(input=input, target=target, weight=weight,
File "D:\Major app\anaconda3\envs\pytorch\lib\site-packages\torch\nn\functional.py", line 3059, in cross_entropy
return torch._C._nn.cross_entropy_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index, label_smoothing)
ValueError: Expected input batch_size (2) to match target batch_size (8).