summaryrefslogtreecommitdiff
path: root/models/hpm.py
diff options
context:
space:
mode:
authorJordan Gong <jordan.gong@protonmail.com>2020-12-27 11:15:51 +0800
committerJordan Gong <jordan.gong@protonmail.com>2020-12-27 11:15:51 +0800
commit81b12f9357ca737599fbc11c732020666ad0873f (patch)
tree21beabf4ad44a0098478e143d8032bb42e5e92c0 /models/hpm.py
parent31b20fbff0786c998c54b8585de759d02f41eda7 (diff)
Adopt type hinting generics in standard collections (PEP 585)
Diffstat (limited to 'models/hpm.py')
-rw-r--r--models/hpm.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/models/hpm.py b/models/hpm.py
index f387154..1773f56 100644
--- a/models/hpm.py
+++ b/models/hpm.py
@@ -1,5 +1,3 @@
-from typing import Tuple
-
import torch
import torch.nn as nn
from torchvision.models import resnet50
@@ -10,7 +8,7 @@ from models.layers import HorizontalPyramidPooling
class HorizontalPyramidMatching(nn.Module):
def __init__(
self,
- scales: Tuple[int] = (1, 2, 4, 8),
+ scales: tuple[int, ...] = (1, 2, 4, 8),
out_channels: int = 256,
use_avg_pool: bool = False,
**kwargs