summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/configuration.py48
1 files changed, 48 insertions, 0 deletions
diff --git a/utils/configuration.py b/utils/configuration.py
new file mode 100644
index 0000000..32b9bec
--- /dev/null
+++ b/utils/configuration.py
@@ -0,0 +1,48 @@
+from typing import TypedDict, Tuple
+
+import torch
+
+
+class SystemConfiguration(TypedDict):
+ device: torch.device
+ CUDA_VISIBLE_DEVICES: str
+ save_path: str
+
+
+class DatasetConfiguration(TypedDict):
+ name: str
+ path: str
+ train_size: int
+ num_sampled_frames: int
+ discard_threshold: int
+ num_input_channels: int
+ frame_size: Tuple[int, int]
+ cache_on: bool
+
+
+class DataloaderConfiguration(TypedDict):
+ batch_size: Tuple[int, int]
+ num_workers: int
+ pin_memory: bool
+
+
+class HyperparameterConfiguration(TypedDict):
+ hidden_dim: int
+ lr: int
+ betas: Tuple[float, float]
+ hard_or_all: str
+ margin: float
+
+
+class ModelConfiguration(TypedDict):
+ name: str
+ restore_iter: int
+ total_iter: int
+
+
+class Configuration(TypedDict):
+ system: SystemConfiguration
+ dataset: DatasetConfiguration
+ dataloader: DataloaderConfiguration
+ hyperparameter: HyperparameterConfiguration
+ model: ModelConfiguration