update singlePhotonNet_251022
This commit is contained in:
@@ -81,17 +81,17 @@ class singlePhotonNet_251022(nn.Module):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(singlePhotonNet_251022, self).__init__()
|
super(singlePhotonNet_251022, self).__init__()
|
||||||
self.conv1 = nn.Conv2d(1, 5, kernel_size=3, padding=1)
|
self.conv1 = nn.Conv2d(3, 5, kernel_size=3, padding=1)
|
||||||
self.conv2 = nn.Conv2d(5, 10, kernel_size=3, padding=1)
|
self.conv2 = nn.Conv2d(5, 10, kernel_size=3, padding=1)
|
||||||
self.conv3 = nn.Conv2d(10, 20, kernel_size=3, padding=1)
|
self.conv3 = nn.Conv2d(10, 20, kernel_size=3)
|
||||||
self.gap = nn.AdaptiveAvgPool2d(1)
|
self.fc = nn.Linear(20, 3)
|
||||||
self.fc = nn.Linear(20, 2)
|
self.weight_init()
|
||||||
|
|
||||||
def forward(self, x):
|
def forward(self, x):
|
||||||
x = F.relu(self.conv1(x))
|
x = F.relu(self.conv1(x))
|
||||||
x = F.relu(self.conv2(x))
|
x = F.relu(self.conv2(x))
|
||||||
x = F.relu(self.conv3(x))
|
x = F.relu(self.conv3(x))
|
||||||
x = self.gap(x).view(x.size(0), -1)
|
x = x.view(x.size(0), -1)
|
||||||
x = self.fc(x)
|
x = self.fc(x)
|
||||||
return x
|
return x
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user