neodroidvision.utilities.torch_utilities.persistence.check_pointer.CheckPointer

class neodroidvision.utilities.torch_utilities.persistence.check_pointer.CheckPointer(model: ~torch.nn.modules.module.Module, optimiser: ~torch.optim.optimizer.Optimizer = None, scheduler: <module 'torch.optim.lr_scheduler' from '/home/heider/miniconda3/envs/py38/lib/python3.8/site-packages/torch/optim/lr_scheduler.py'> = None, save_dir: ~pathlib.Path = PosixPath('/home/heider/SynologyDrive/personal/ProjectsPersonalSynology/Aivclab/vision/docs'), save_to_disk: bool = None, logger: ~logging.Logger = None)[source]

Bases: object

description

__init__(model: ~torch.nn.modules.module.Module, optimiser: ~torch.optim.optimizer.Optimizer = None, scheduler: <module 'torch.optim.lr_scheduler' from '/home/heider/miniconda3/envs/py38/lib/python3.8/site-packages/torch/optim/lr_scheduler.py'> = None, save_dir: ~pathlib.Path = PosixPath('/home/heider/SynologyDrive/personal/ProjectsPersonalSynology/Aivclab/vision/docs'), save_to_disk: bool = None, logger: ~logging.Logger = None)[source]
Parameters
  • model

  • optimiser

  • scheduler

  • save_dir

  • save_to_disk

  • logger

Methods

__init__(model[, optimiser, scheduler, ...])

param model

get_checkpoint_file()

param self

load([f, use_latest])

param self

save(name, **kwargs)

param self

tag_last_checkpoint(last_filename)

param self

get_checkpoint_file() str[source]
Parameters

self

Returns:

load(f: Optional[Path] = None, use_latest=True)[source]
Parameters
  • self

  • f

  • use_latest

Returns:

save(name, **kwargs)[source]
Parameters
  • self

  • name

  • **kwargs

Returns:

tag_last_checkpoint(last_filename) None[source]
Parameters
  • self

  • last_filename