MCPcopy Create free account
hub / github.com/MiniMax-AI/VTP / __init__

Method __init__

tools/test_reconstruction_hf.py:68–70  ·  view source on GitHub ↗
(self, device='cuda')

Source from the content-addressed store, hash-verified

66 """LPIPS metric wrapper."""
67
68 def __init__(self, device='cuda'):
69 self.device = device
70 self.model = LPIPS_VTP().to(device).eval()
71
72 def __call__(self, img1: torch.Tensor, img2: torch.Tensor) -> torch.Tensor:
73 """Calculate LPIPS between two images.

Callers 1

__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected