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/auto_encoder.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/auto_encoder.py')
-rw-r--r-- | models/auto_encoder.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/models/auto_encoder.py b/models/auto_encoder.py index a9312dd..7b9b29f 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 @@ -12,7 +14,7 @@ class Encoder(nn.Module): self, in_channels: int = 3, 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 @@ -67,7 +69,7 @@ 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, out_channels: int = 3, ): @@ -114,7 +116,7 @@ class AutoEncoder(nn.Module): self, channels: int = 3, 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, feature_channels, embedding_dims) |