Closed
Description
Describe the bug
I have a 2D image of batch size =128 and channel 3. What is the correct way to use the SSIMLOss
To Reproduce
from monai.losses.ssim_loss import SSIMLoss
criterion = SSIMLoss(spatial_dims=2)
loss = criterion(images, pred, data_range=images.max().unsqueeze(0))
# images.shape == pred.shape == torch.Size([128, 3, 64, 64])
In the above code, I get a RuntimeError
.
RuntimeError: shape '[1]' is invalid for the input of size 3
Metadata
Metadata
Assignees
Labels
No labels