(self)
| 29 | |
| 30 | class psm_wrapper: |
| 31 | def __init__(self): |
| 32 | self.device = "cuda" if torch.cuda.is_available() else "cpu" |
| 33 | self.lpips = LearnedPerceptualImagePatchSimilarity(net_type='alex').to(self.device) |
| 34 | |
| 35 | @torch.no_grad() |
| 36 | def __call__(self, img1, img2): |
nothing calls this directly
no outgoing calls
no test coverage detected