From 81b12f9357ca737599fbc11c732020666ad0873f Mon Sep 17 00:00:00 2001 From: Jordan Gong Date: Sun, 27 Dec 2020 11:15:51 +0800 Subject: Adopt type hinting generics in standard collections (PEP 585) --- models/hpm.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'models/hpm.py') 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 -- cgit v1.2.3