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

Method forward

pycontrast/networks/resnet_cmc.py:31–34  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

29 self.power = power
30
31 def forward(self, x):
32 norm = x.pow(self.power).sum(1, keepdim=True).pow(1. / self.power)
33 out = x.div(norm)
34 return out
35
36
37class BasicBlock(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected