Fix SSIM memory leak

This commit is contained in:
Matt Tancik authored and Matthew Tancik committed 2022-07-05 12:04:23 -07:00
1 parent fefbad2592
commit ced02a00be
5 files changed
+15 -10

No files matched your search

+3 -2
View File
@@ -21,8 +21,9 @@ from typing import Dict, List
import torch
from torch.nn import Parameter
from torchmetrics import PeakSignalNoiseRatio, StructuralSimilarityIndexMeasure
from torchmetrics import PeakSignalNoiseRatio
from torchmetrics.image.lpip import LearnedPerceptualImagePatchSimilarity
from torchmetrics.functional import structural_similarity_index_measure
from pyrad.fields.modules.encoding import NeRFEncoding
from pyrad.fields.modules.field_heads import FieldHeadNames
@@ -85,7 +86,7 @@ class MipNerfGraph(Graph):
# metrics
self.psnr = PeakSignalNoiseRatio(data_range=1.0)
self.ssim = StructuralSimilarityIndexMeasure()
self.ssim = structural_similarity_index_measure
self.lpips = LearnedPerceptualImagePatchSimilarity()
def get_param_groups(self) -> Dict[str, List[Parameter]]: