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

Method __init__

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

Source from the content-addressed store, hash-verified

189class SupCEResNet(nn.Module):
190 """encoder + classifier"""
191 def __init__(self, name='resnet50', num_classes=10):
192 super(SupCEResNet, self).__init__()
193 model_fun, dim_in = model_dict[name]
194 self.encoder = model_fun()
195 self.fc = nn.Linear(dim_in, num_classes)
196
197 def forward(self, x):
198 return self.fc(self.encoder(x))

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected