summaryrefslogtreecommitdiff
path: root/models/fpfe.py
diff options
context:
space:
mode:
authorJordan Gong <jordan.gong@protonmail.com>2020-12-24 15:42:42 +0800
committerJordan Gong <jordan.gong@protonmail.com>2020-12-24 15:42:42 +0800
commit4ad6d0af2f4e6868576582e4b86b096a2e95e6fa (patch)
treef518144b8e08da82513600bc5e956602a288426b /models/fpfe.py
parentdedf51f4fcbfb954558e157a0e449fc2ea48e7e1 (diff)
Change the usage of layers and reorganize relations of layers
1. Add batch normalization and activation to layers 2. VGGConv2d and FocalConv2d inherits to BasicConv2d; DCGANConvTranspose2d inherits to BasicConvTranspose2d
Diffstat (limited to 'models/fpfe.py')
-rw-r--r--models/fpfe.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/models/fpfe.py b/models/fpfe.py
index 7d04655..29f7a5f 100644
--- a/models/fpfe.py
+++ b/models/fpfe.py
@@ -25,13 +25,15 @@ class FrameLevelPartFeatureExtractor(nn.Module):
self.max_pool = nn.MaxPool2d(kernel_size=2, stride=2)
def forward(self, x):
- x = F.leaky_relu(self.focal_conv1(x), inplace=True)
- x = F.leaky_relu(self.focal_conv2(x), inplace=True)
+ x = self.focal_conv1(x)
+ x = self.focal_conv2(x)
x = self.max_pool(x)
- x = F.leaky_relu(self.focal_conv3(x), inplace=True)
- x = F.leaky_relu(self.focal_conv4(x), inplace=True)
+
+ x = self.focal_conv3(x)
+ x = self.focal_conv4(x)
x = self.max_pool(x)
- x = F.leaky_relu(self.focal_conv5(x), inplace=True)
- x = F.leaky_relu(self.focal_conv6(x), inplace=True)
+
+ x = self.focal_conv5(x)
+ x = self.focal_conv6(x)
return x