MCPcopy Create free account
hub / github.com/IgaoGuru/Sequoia / __init__

Method __init__

light_classifier.py:21–34  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

19
20class Light_Classifier(torch.nn.Module):
21 def __init__(self):
22 super(Light_Classifier, self).__init__()
23 self.conv1 = self.conv_block(c_in = 3, c_out = 15, kernel_size = 3, stride = 1, padding = 1)
24 self.conv2 = self.conv_block(c_in = 15, c_out = 12, kernel_size = 3, stride = 1, padding = 1)
25 self.conv3 = self.conv_block(c_in = 12, c_out = 3, kernel_size = 3, stride = 1, padding = 1)
26 # 32px --> 48
27 # 100px --> 432
28 # self.bigN = 432
29 self.bigN = 48
30 self.fc1 = nn.Linear(self.bigN, 32)
31 self.fc2 = nn.Linear(32, 16)
32 self.fc3 = nn.Linear(16, 1)
33 self.maxpool = nn.MaxPool2d(kernel_size=2, stride=2)
34 # self.prefc1 = nn.Linear(self.bigN, )
35
36 def conv_block(self, c_in, c_out, dropout=0.1, kernel_size=3, stride=1, **kwargs):
37 seq_block = nn.Sequential(

Callers

nothing calls this directly

Calls 2

conv_blockMethod · 0.95
__init__Method · 0.45

Tested by

no test coverage detected