myria3d.callbacks

Submodules

myria3d.callbacks.comet_callbacks

class myria3d.callbacks.comet_callbacks.LogCode(code_dir: str)[source]

Bases: pytorch_lightning.callbacks.callback.Callback

Upload all code files to comet, at the beginning of the run.

on_train_start(trainer, pl_module)[source]

Called when the train begins.

class myria3d.callbacks.comet_callbacks.LogLogsPath[source]

Bases: pytorch_lightning.callbacks.callback.Callback

Logs run working directory to comet.ml

setup(trainer, pl_module, stage)[source]

Called when fit, validate, test, predict, or tune begins.

myria3d.callbacks.comet_callbacks.get_comet_logger(trainer: pytorch_lightning.trainer.trainer.Trainer) Optional[pytorch_lightning.loggers.comet.CometLogger][source]

Safely get logger from Trainer. If there is no comet logger, simply returns None to deactivate comet-based callbacks.

myria3d.callbacks.comet_callbacks.log_comet_cm(pl_module, confmat, phase, class_names)[source]

Method used in the metric logging callback.

myria3d.callbacks.finetuning_callbacks

class myria3d.callbacks.finetuning_callbacks.FinetuningFreezeUnfreeze(d_in: int = 9, num_classes: int = 6, unfreeze_fc_end_epoch: int = 3, unfreeze_decoder_train_epoch: int = 6)[source]

Bases: pytorch_lightning.callbacks.finetuning.BaseFinetuning

finetune_function(pl_module, current_epoch, optimizer, optimizer_idx)[source]

Unfreeze layers sequentially, starting from the end of the architecture.

freeze_before_training(pl_module)[source]

Update in and out dimensions, and freeze everything at start.

myria3d.callbacks.logging_callbacks

Module contents