在计算过程中需要累计ssim和psnr的值。可以用类保存: class AverageMeter(object): def __init__(self): self.reset() def reset(self): self.val = 0 self.avg = 0 self.sum = 0 self.count = 0 def update(self, val, n=1): self.val = val self.sum += val * n self.count += n self...
This is great - the ssim is a huge component in the GS loss. I tested it out and there's a small difference between fused-ssim and StructuralSimilarityIndexMeasure from torchmetrics.image, I can't figure out why - however when training with torchmetrics SSIM I get about ~ 1ish PSNR ...