diff options
author | Jordan Gong <jordan.gong@protonmail.com> | 2021-03-12 20:12:33 +0800 |
---|---|---|
committer | Jordan Gong <jordan.gong@protonmail.com> | 2021-03-12 20:12:33 +0800 |
commit | e83ae0bcb5c763636fd522c2712a3c8aef558f3c (patch) | |
tree | b80da057e4c4574ea95fa9f3d3b2fe8c999e3440 /models/layers.py | |
parent | f2f7713efa03a877bc96ced37314b4c4a6dc1963 (diff) | |
parent | 2ea916b2a963eae7d47151b41c8c78a578c402e2 (diff) |
Merge branch 'master' into data_parallel
# Conflicts:
# models/auto_encoder.py
# models/model.py
# models/rgb_part_net.py
Diffstat (limited to 'models/layers.py')
-rw-r--r-- | models/layers.py | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/models/layers.py b/models/layers.py index f1d72b6..c609698 100644 --- a/models/layers.py +++ b/models/layers.py @@ -167,17 +167,10 @@ class BasicConv1d(nn.Module): class HorizontalPyramidPooling(nn.Module): def __init__( self, - in_channels: int, - out_channels: int, - use_1x1conv: bool = False, use_avg_pool: bool = True, use_max_pool: bool = False, - **kwargs ): super().__init__() - self.use_1x1conv = use_1x1conv - if use_1x1conv: - self.conv = BasicConv2d(in_channels, out_channels, 1, **kwargs) self.use_avg_pool = use_avg_pool self.use_max_pool = use_max_pool assert use_avg_pool or use_max_pool, 'Pooling layer(s) required.' @@ -191,6 +184,4 @@ class HorizontalPyramidPooling(nn.Module): x = self.avg_pool(x) elif not self.use_avg_pool and self.use_max_pool: x = self.max_pool(x) - if self.use_1x1conv: - x = self.conv(x) return x |