MCPcopy Create free account
hub / github.com/Sin3DM/Sin3DM / normalize

Function normalize

evaluation/lpips.py:19–20  ·  view source on GitHub ↗
(x, eps=1e-10)

Source from the content-addressed store, hash-verified

17
18
19def normalize(x, eps=1e-10):
20 return x * torch.rsqrt(torch.sum(x**2, dim=1, keepdim=True) + eps)
21
22
23class AlexNet(nn.Module):

Callers 1

forwardMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected