summaryrefslogtreecommitdiff
path: root/models/hpm.py
diff options
context:
space:
mode:
authorJordan Gong <jordan.gong@protonmail.com>2021-01-07 19:55:00 +0800
committerJordan Gong <jordan.gong@protonmail.com>2021-01-07 19:55:00 +0800
commit98b6e6dc3be6f88abb72e351c8f2da2b23b8ab85 (patch)
tree05f690b2411acae88ae81bb716703dcab4557842 /models/hpm.py
parent4a284084c253b9114fc02e1782962556ff113761 (diff)
Type hint for python version lower than 3.9
Diffstat (limited to 'models/hpm.py')
-rw-r--r--models/hpm.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/models/hpm.py b/models/hpm.py
index 66503e3..7505ed7 100644
--- a/models/hpm.py
+++ b/models/hpm.py
@@ -1,3 +1,5 @@
+from typing import Tuple
+
import torch
import torch.nn as nn
@@ -9,7 +11,7 @@ class HorizontalPyramidMatching(nn.Module):
self,
in_channels: int,
out_channels: int = 128,
- scales: tuple[int, ...] = (1, 2, 4),
+ scales: Tuple[int, ...] = (1, 2, 4),
use_avg_pool: bool = True,
use_max_pool: bool = True,
**kwargs