MCPcopy Create free account
hub / github.com/HobbitLong/PyContrast / __init__

Method __init__

pycontrast/networks/util.py:7–9  ·  view source on GitHub ↗
(self, p=2)

Source from the content-addressed store, hash-verified

5
6class Normalize(nn.Module):
7 def __init__(self, p=2):
8 super(Normalize, self).__init__()
9 self.p = p
10
11 def forward(self, x):
12 return F.normalize(x, p=self.p, dim=1)

Callers 1

__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected