diff options
author | Jordan Gong <jordan.gong@protonmail.com> | 2020-12-30 16:58:17 +0800 |
---|---|---|
committer | Jordan Gong <jordan.gong@protonmail.com> | 2020-12-30 16:58:17 +0800 |
commit | 5ba9390a7e4e8dbf366cfd280403cf37a6b22bab (patch) | |
tree | 7aa7db759ccd1cb410b5d9c738a0b7d071493a95 /models/fpfe.py | |
parent | 0178b7722c63820d701b0442b5946d9a042074d7 (diff) |
Combine FPFE and TFA to GaitPart
Diffstat (limited to 'models/fpfe.py')
-rw-r--r-- | models/fpfe.py | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/models/fpfe.py b/models/fpfe.py deleted file mode 100644 index 28a0440..0000000 --- a/models/fpfe.py +++ /dev/null @@ -1,38 +0,0 @@ -import torch.nn as nn - -from models.layers import FocalConv2d - - -class FrameLevelPartFeatureExtractor(nn.Module): - - def __init__(self, in_channels: int): - super(FrameLevelPartFeatureExtractor, self).__init__() - nf = 32 - - self.focal_conv1 = FocalConv2d(in_channels, nf, kernel_size=5, - padding=2, halving=1) - self.focal_conv2 = FocalConv2d(nf, nf, kernel_size=3, - padding=1, halving=1) - self.focal_conv3 = FocalConv2d(nf, nf * 2, kernel_size=3, - padding=1, halving=4) - self.focal_conv4 = FocalConv2d(nf * 2, nf * 2, kernel_size=3, - padding=1, halving=4) - self.focal_conv5 = FocalConv2d(nf * 2, nf * 4, kernel_size=3, - padding=1, halving=8) - self.focal_conv6 = FocalConv2d(nf * 4, nf * 4, kernel_size=3, - padding=1, halving=8) - self.max_pool = nn.MaxPool2d(kernel_size=2, stride=2) - - def forward(self, x): - x = self.focal_conv1(x) - x = self.focal_conv2(x) - x = self.max_pool(x) - - x = self.focal_conv3(x) - x = self.focal_conv4(x) - x = self.max_pool(x) - - x = self.focal_conv5(x) - x = self.focal_conv6(x) - - return x |