From b8653d54efe2a8c94ae408c0c2da9bdd0b43ecdd Mon Sep 17 00:00:00 2001 From: Jordan Gong Date: Tue, 29 Dec 2020 20:38:18 +0800 Subject: Encode class names to label and some access improvement 1. Encode class names using LabelEncoder from sklearn 2. Remove unneeded class variables 3. Protect some variables from being accessed in userspace --- utils/configuration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils/configuration.py') diff --git a/utils/configuration.py b/utils/configuration.py index e6bfaf2..965af94 100644 --- a/utils/configuration.py +++ b/utils/configuration.py @@ -2,7 +2,7 @@ from typing import TypedDict, Optional, Union import torch -from utils.dataset import ClipLabels, ClipConditions, ClipViews +from utils.dataset import ClipClasses, ClipConditions, ClipViews class SystemConfiguration(TypedDict): @@ -17,7 +17,7 @@ class DatasetConfiguration(TypedDict): train_size: int num_sampled_frames: int discard_threshold: int - selector: Optional[dict[str, Union[ClipLabels, ClipConditions, ClipViews]]] + selector: Optional[dict[str, Union[ClipClasses, ClipConditions, ClipViews]]] num_input_channels: int frame_size: tuple[int, int] cache_on: bool -- cgit v1.2.3