Hi! I am trying to use smp.utils.losses.DiceLoss() for two classes and I keep encountering this error
The size of tensor a (58) must match the size of tensor b (57) at non-singleton dimension 3.
This is the entire message:
Epoch: 0
train: 100%|██████████| 5/5 [00:03<00:00,  1.61it/s, dice_loss - 0.4144, iou_score - 0.4247]
valid:   0%|          | 0/10 [00:00<?, ?it/s]
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-105-0db0875a4c35> in <module>()
      7     print('\nEpoch: {}'.format(i))
      8     train_logs = train_epoch.run(train_loader)
----> 9     valid_logs = valid_epoch.run(valid_loader)
     10 
     11     # do something (save model, change lr, etc.)

6 frames
/root/.local/lib/python3.7/site-packages/segmentation_models_pytorch/fpn/decoder.py in forward(self, x, skip)
     31         x = F.interpolate(x, scale_factor=2, mode="nearest")
     32         skip = self.skip_conv(skip)
---> 33         x = x + skip
     34         return x
     35 

RuntimeError: The size of tensor a (58) must match the size of tensor b (57) at non-singleton dimension 3

Any help would be appreciated.
Many thanks