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

Method __init__

pycontrast/networks/resnet_cmc.py:27–29  ·  view source on GitHub ↗
(self, power=2)

Source from the content-addressed store, hash-verified

25class Normalize(nn.Module):
26
27 def __init__(self, power=2):
28 super(Normalize, self).__init__()
29 self.power = power
30
31 def forward(self, x):
32 norm = x.pow(self.power).sum(1, keepdim=True).pow(1. / self.power)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected