Skip to content

Commit

Permalink
fixing ssim metric
Browse files Browse the repository at this point in the history
  • Loading branch information
DomaradzkiMaciej committed Feb 15, 2023
1 parent f4c3486 commit e659839
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nerf/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,12 @@ def report(self):


class SSIMMeter:
def __init__(self):
def __init__(self, device=None):
self.V = 0
self.N = 0

self.device = device if device is not None else torch.device('cuda' if torch.cuda.is_available() else 'cpu')

def clear(self):
self.V = 0
self.N = 0
Expand Down

0 comments on commit e659839

Please sign in to comment.