StructuralSimilarityIndexMeasure returns NaN for ([1, 1, 8, 8]) tensor #1269
Unanswered
anatolicvs
asked this question in
CompVision
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
`
import torch
from torchmetrics import StructuralSimilarityIndexMeasure
preds = torch.rand([1, 1, 8, 8],dtype=torch.float32)
target = preds * 0.75
ssim = StructuralSimilarityIndexMeasure(kernel_size=11, data_range=1.0, reduction='none', sigma=1.5)
ssim = ssim(preds, target)
`
Why the ssim returns NaN for ([1, 1, 8, 8]) tensor ?
Beta Was this translation helpful? Give feedback.
All reactions