MCPcopy Create free account
hub / github.com/KerenLab/CellSighter / __init__

Method __init__

model.py:7–15  ·  view source on GitHub ↗
(self, input_len, num_classes)

Source from the content-addressed store, hash-verified

5
6class Model(nn.Module):
7 def __init__(self, input_len, num_classes):
8 super(Model, self).__init__()
9 self.model = models.resnet50(num_classes=num_classes)
10 self.model.conv1 = torch.nn.Conv2d(input_len, 64, kernel_size=(7, 7), stride=(2, 2), padding=(3, 3), bias=False)
11
12 ##Weights init
13 nn.init.kaiming_normal_(self.model.conv1.weight, mode='fan_out', nonlinearity='relu')
14
15 self.softmax = nn.Softmax(dim=1)
16
17 def forward(self, x):
18 x = self.model(x)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected