Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/HobbitLong/PyContrast
/ Normalize
Class
Normalize
pycontrast/networks/util.py:6–12 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
4
5
6
class
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)
13
14
15
class
JigsawHead(nn.Module):
Callers
3
__init__
Method · 0.70
__init__
Method · 0.70
__init__
Method · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected