cyto_dl.callbacks.latent_walk_diffae module#

class cyto_dl.callbacks.latent_walk_diffae.DiffAELatentWalk(num_pcs: int = 8, n_steps: int = 10, sigma_range: int | None = None, every_n_epoch: int = 1, n_noise_samples: int = 1, average: bool = True, batch_size: int = 3)[source]#

Bases: Callback

Parameters:
  • num_pcs (int=8) – Number of principal components to use for latent walk

  • n_steps (int=10) – Number of steps to traverse each PC in the latent walk

  • sigma_range (Optional[int]=None) – Range to traverse each PC in the latent walk. If None, the min and max of the PC are used.

  • every_n_epoch (int=1) – Frequency to perform latent walk

  • n_noise_samples (int=1) – Number of noise samples to generate for each latent walk step

  • average (bool=True) – Whether to average the generated images

  • batch_size (int=3) – Batch size for generating images to prevent GPU OOM

on_predict_epoch_end(trainer, pl_module)[source]#
on_validation_batch_end(trainer, pl_module, outputs, batch, batch_idx, dataloader_idx=0)[source]#
on_validation_epoch_end(trainer, pl_module)[source]#