pugh_torch.callbacks package¶
Submodules¶
pugh_torch.callbacks.histogram module¶
-
class
pugh_torch.callbacks.histogram.Histogram(*, slash_names=True, names=[], **kwargs)[source]¶ Bases:
pugh_torch.callbacks.tensorboard_base.TensorBoardCallbackRelies on model being stored at
pl_module.modeland it being sequential- Parameters
slash_names (bool) – For each named parameter, replace “.” with “/” so that they appear under sublabels in TensorBoard.
names (list of str) – The “dot” named parameters to log. Defaults to all model named parameters.
pugh_torch.callbacks.model_checkpoint module¶
-
class
pugh_torch.callbacks.model_checkpoint.ModelCheckpoint(filepath: Optional[str] = None, monitor: Optional[str] = None, verbose: bool = False, save_last: Optional[bool] = None, save_top_k: Optional[int] = None, save_weights_only: bool = False, mode: str = 'auto', period: int = 1, prefix: str = '', dirpath: Union[str, pathlib.Path, None] = None, filename: Optional[str] = None)[source]¶ Bases:
pytorch_lightning.callbacks.model_checkpoint.ModelCheckpoint
pugh_torch.callbacks.tensorboard_add_classification module¶
-
class
pugh_torch.callbacks.tensorboard_add_classification.TensorBoardAddClassification(*, classes=None, **kwargs)[source]¶ Bases:
pugh_torch.callbacks.tensorboard_base.TensorBoardCallbackAdds the rgb, ground truth label, and the network prediction to tensorboard.
Relies on the attribute
last_logits.- Parameters
classes (list) – If provided, the predictions will contain the appropriate annotation. len(classes)` should equal the number of networ output channels. If this is available under
trainer.
pugh_torch.callbacks.tensorboard_add_depth module¶
-
class
pugh_torch.callbacks.tensorboard_add_depth.TensorBoardAddDepth(*, logging_batch_interval=20, **kwargs)[source]¶ Bases:
pugh_torch.callbacks.tensorboard_base.TensorBoardCallbackAdds the rgb, ground truth depth, and the network prediction to tensorboard.
Assumes the network’s prediction is in attribute
last_logitswith shape (b, h, w).- Parameters
logging_batch_interval (int) – Log image(s) every this many batches.
kwargs (dict) – Passed along to
SummaryWritermethod on hook
pugh_torch.callbacks.tensorboard_add_ss module¶
-
class
pugh_torch.callbacks.tensorboard_add_ss.TensorBoardAddSS(*, logging_batch_interval=20, **kwargs)[source]¶ Bases:
pugh_torch.callbacks.tensorboard_base.TensorBoardCallbackAdds the rgb, ground truth segmentation, and the network prediction to tensorboard.
- Parameters
logging_batch_interval (int) – Log image(s) every this many batches.
kwargs (dict) – Passed along to
SummaryWritermethod on hook
pugh_torch.callbacks.tensorboard_base module¶
-
class
pugh_torch.callbacks.tensorboard_base.TensorBoardCallback(*, logging_batch_interval=20, **kwargs)[source]¶ Bases:
pytorch_lightning.callbacks.base.CallbackBase class for pytorch-lightning callbacks.
Can only be used with
pugh_torch.utils.TensorBoardLogger- Parameters
logging_batch_interval (int) – Log image(s) every this many batches.
kwargs (dict) – Passed along to
SummaryWritermethod on hook