diff options
author | Jordan Gong <jordan.gong@protonmail.com> | 2021-02-19 22:43:17 +0800 |
---|---|---|
committer | Jordan Gong <jordan.gong@protonmail.com> | 2021-02-19 22:43:17 +0800 |
commit | 4049566103a00aa6d5a0b1f73569bdc5435714ca (patch) | |
tree | d84604773f05eab030ff2106c43cb2c091b6e8fc /models/auto_encoder.py | |
parent | d12dd6b04a4e7c2b1ee43ab6f36f25d0c35ca364 (diff) | |
parent | 969030864495e7c2b419400fd81ee0fad83de41e (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/auto_encoder.py')
-rw-r--r-- | models/auto_encoder.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/models/auto_encoder.py b/models/auto_encoder.py index 2d715db..e17caed 100644 --- a/models/auto_encoder.py +++ b/models/auto_encoder.py @@ -1,3 +1,5 @@ +from typing import Tuple + import torch import torch.nn as nn import torch.nn.functional as F @@ -11,9 +13,9 @@ class Encoder(nn.Module): def __init__( self, in_channels: int = 3, - frame_size: tuple[int, int] = (64, 48), + frame_size: Tuple[int, int] = (64, 48), feature_channels: int = 64, - output_dims: tuple[int, int, int] = (128, 128, 64) + output_dims: Tuple[int, int, int] = (128, 128, 64) ): super().__init__() self.feature_channels = feature_channels @@ -74,9 +76,9 @@ class Decoder(nn.Module): def __init__( self, - input_dims: tuple[int, int, int] = (128, 128, 64), + input_dims: Tuple[int, int, int] = (128, 128, 64), feature_channels: int = 64, - feature_size: tuple[int, int] = (4, 3), + feature_size: Tuple[int, int] = (4, 3), out_channels: int = 3, ): super().__init__() @@ -125,9 +127,9 @@ class AutoEncoder(nn.Module): def __init__( self, channels: int = 3, - frame_size: tuple[int, int] = (64, 48), + frame_size: Tuple[int, int] = (64, 48), feature_channels: int = 64, - embedding_dims: tuple[int, int, int] = (128, 128, 64) + embedding_dims: Tuple[int, int, int] = (128, 128, 64) ): super().__init__() self.encoder = Encoder(channels, frame_size, |