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

Method __init__

pycontrast/networks/build_backbone.py:143–151  ·  view source on GitHub ↗
(self, name='resnet50', head='linear', feat_dim=128)

Source from the content-addressed store, hash-verified

141class CMCMultiHeads(CMCSingleHead):
142 """CMC model with Multiple linear/mlp projection heads"""
143 def __init__(self, name='resnet50', head='linear', feat_dim=128):
144 super(CMCMultiHeads, self).__init__(name, head, feat_dim)
145
146 self.head1_jig = JigsawHead(dim_in=int(2048*self.width),
147 dim_out=feat_dim,
148 head=head)
149 self.head2_jig = JigsawHead(dim_in=int(2048*self.width),
150 dim_out=feat_dim,
151 head=head)
152
153 def forward(self, x, x_jig=None, mode=0):
154 # mode --

Callers

nothing calls this directly

Calls 2

JigsawHeadClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected