summaryrefslogtreecommitdiff
path: root/models/layers.py
diff options
context:
space:
mode:
authorJordan Gong <jordan.gong@protonmail.com>2021-02-19 22:43:17 +0800
committerJordan Gong <jordan.gong@protonmail.com>2021-02-19 22:43:17 +0800
commit4049566103a00aa6d5a0b1f73569bdc5435714ca (patch)
treed84604773f05eab030ff2106c43cb2c091b6e8fc /models/layers.py
parentd12dd6b04a4e7c2b1ee43ab6f36f25d0c35ca364 (diff)
parent969030864495e7c2b419400fd81ee0fad83de41e (diff)
Merge branch 'python3.8' into disentangling_only_py3.8
# Conflicts: # models/hpm.py # models/layers.py # models/model.py # models/part_net.py # models/rgb_part_net.py # utils/configuration.py
Diffstat (limited to 'models/layers.py')
-rw-r--r--models/layers.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/models/layers.py b/models/layers.py
index 1b4640f..8228f49 100644
--- a/models/layers.py
+++ b/models/layers.py
@@ -1,4 +1,4 @@
-from typing import Union
+from typing import Union, Tuple
import torch.nn as nn
import torch.nn.functional as F
@@ -9,7 +9,7 @@ class BasicConv2d(nn.Module):
self,
in_channels: int,
out_channels: int,
- kernel_size: Union[int, tuple[int, int]],
+ kernel_size: Union[int, Tuple[int, int]],
**kwargs
):
super().__init__()
@@ -28,7 +28,7 @@ class VGGConv2d(BasicConv2d):
self,
in_channels: int,
out_channels: int,
- kernel_size: Union[int, tuple[int, int]] = 3,
+ kernel_size: Union[int, Tuple[int, int]] = 3,
padding: int = 1,
**kwargs
):
@@ -46,7 +46,7 @@ class BasicConvTranspose2d(nn.Module):
self,
in_channels: int,
out_channels: int,
- kernel_size: Union[int, tuple[int, int]],
+ kernel_size: Union[int, Tuple[int, int]],
**kwargs
):
super().__init__()
@@ -65,7 +65,7 @@ class DCGANConvTranspose2d(BasicConvTranspose2d):
self,
in_channels: int,
out_channels: int,
- kernel_size: Union[int, tuple[int, int]] = 4,
+ kernel_size: Union[int, Tuple[int, int]] = 4,
stride: int = 2,
padding: int = 1,
is_last_layer: bool = False,