MCPcopy
hub / github.com/HobbitLong/SupContrast / __init__

Method __init__

networks/resnet_big.py:203–206  ·  view source on GitHub ↗
(self, name='resnet50', num_classes=10)

Source from the content-addressed store, hash-verified

201class LinearClassifier(nn.Module):
202 """Linear classifier"""
203 def __init__(self, name='resnet50', num_classes=10):
204 super(LinearClassifier, self).__init__()
205 _, feat_dim = model_dict[name]
206 self.fc = nn.Linear(feat_dim, num_classes)
207
208 def forward(self, features):
209 return self.fc(features)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected