diff options
Diffstat (limited to 'posrecon')
-rw-r--r-- | posrecon/main.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/posrecon/main.py b/posrecon/main.py new file mode 100644 index 0000000..0660ea0 --- /dev/null +++ b/posrecon/main.py @@ -0,0 +1,31 @@ +from typing import Callable, Iterable + +import torch +from torch.utils.data import Dataset + +from libs.logging import Loggers +from libs.utils import Trainer, BaseConfig + + +class PosReconTrainer(Trainer): + def __init__(self, *args, **kwargs): + super(PosReconTrainer, self).__init__(*args, **kwargs) + + @staticmethod + def _prepare_dataset(dataset_config: BaseConfig.DatasetConfig) -> tuple[Dataset, Dataset]: + pass + + @staticmethod + def _init_models(dataset: str) -> Iterable[tuple[str, torch.nn.Module]]: + pass + + @staticmethod + def _configure_optimizers(models: Iterable[tuple[str, torch.nn.Module]], optim_config: BaseConfig.OptimConfig) -> \ + Iterable[tuple[str, torch.optim.Optimizer]]: + pass + + def train(self, num_iters: int, loss_fn: Callable, logger: Loggers, device: torch.device): + pass + + def eval(self, loss_fn: Callable, device: torch.device): + pass |