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) --- utils/configuration.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'utils/configuration.py') diff --git a/utils/configuration.py b/utils/configuration.py index 32b9bec..84bd064 100644 --- a/utils/configuration.py +++ b/utils/configuration.py @@ -1,4 +1,4 @@ -from typing import TypedDict, Tuple +from typing import TypedDict import torch @@ -16,12 +16,12 @@ class DatasetConfiguration(TypedDict): num_sampled_frames: int discard_threshold: int num_input_channels: int - frame_size: Tuple[int, int] + frame_size: tuple[int, int] cache_on: bool class DataloaderConfiguration(TypedDict): - batch_size: Tuple[int, int] + batch_size: tuple[int, int] num_workers: int pin_memory: bool @@ -29,7 +29,7 @@ class DataloaderConfiguration(TypedDict): class HyperparameterConfiguration(TypedDict): hidden_dim: int lr: int - betas: Tuple[float, float] + betas: tuple[float, float] hard_or_all: str margin: float -- cgit v1.2.3