diff options
author | Jordan Gong <jordan.gong@protonmail.com> | 2021-02-15 12:06:45 +0800 |
---|---|---|
committer | Jordan Gong <jordan.gong@protonmail.com> | 2021-02-15 12:09:14 +0800 |
commit | 6a4f1cdb88d1853beb410b9da29e43069688dba7 (patch) | |
tree | 6ff66d9cfa290b3f8831580f46a526dc8325a691 /models/part_net.py | |
parent | cf59a1f8339e937e31281907a61f484af99ce955 (diff) | |
parent | 24b5968bfc5799e44c9bbbc00e3a9be00f4509ac (diff) |
Merge branch 'python3.8' into data_parallel_py3.8
# Conflicts:
# models/model.py
# models/rgb_part_net.py
Diffstat (limited to 'models/part_net.py')
-rw-r--r-- | models/part_net.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/models/part_net.py b/models/part_net.py index 62a2bac..f34f993 100644 --- a/models/part_net.py +++ b/models/part_net.py @@ -1,4 +1,5 @@ import copy +from typing import Tuple import torch import torch.nn as nn @@ -12,9 +13,9 @@ class FrameLevelPartFeatureExtractor(nn.Module): self, in_channels: int = 3, feature_channels: int = 32, - kernel_sizes: tuple[tuple, ...] = ((5, 3), (3, 3), (3, 3)), - paddings: tuple[tuple, ...] = ((2, 1), (1, 1), (1, 1)), - halving: tuple[int, ...] = (0, 2, 3) + kernel_sizes: Tuple[Tuple, ...] = ((5, 3), (3, 3), (3, 3)), + paddings: Tuple[Tuple, ...] = ((2, 1), (1, 1), (1, 1)), + halving: Tuple[int, ...] = (0, 2, 3) ): super().__init__() num_blocks = len(kernel_sizes) @@ -112,9 +113,9 @@ class PartNet(nn.Module): self, in_channels: int = 3, feature_channels: int = 32, - kernel_sizes: tuple[tuple, ...] = ((5, 3), (3, 3), (3, 3)), - paddings: tuple[tuple, ...] = ((2, 1), (1, 1), (1, 1)), - halving: tuple[int, ...] = (0, 2, 3), + kernel_sizes: Tuple[Tuple, ...] = ((5, 3), (3, 3), (3, 3)), + paddings: Tuple[Tuple, ...] = ((2, 1), (1, 1), (1, 1)), + halving: Tuple[int, ...] = (0, 2, 3), squeeze_ratio: int = 4, num_part: int = 16 ): |