diff options
author | Jordan Gong <jordan.gong@protonmail.com> | 2020-12-29 20:38:18 +0800 |
---|---|---|
committer | Jordan Gong <jordan.gong@protonmail.com> | 2020-12-29 20:38:18 +0800 |
commit | b8653d54efe2a8c94ae408c0c2da9bdd0b43ecdd (patch) | |
tree | 0aca443c5f2b0387fae48aa43611ca92d6015bbe /utils/configuration.py | |
parent | 6e94fdb587656074dc2e65a80e51b8446f834b41 (diff) |
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
Diffstat (limited to 'utils/configuration.py')
-rw-r--r-- | utils/configuration.py | 4 |
1 files changed, 2 insertions, 2 deletions
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 |