cyto_dl.models.im2im.utils.noise_annealer module#

class cyto_dl.models.im2im.utils.noise_annealer.NoiseAnnealer(annealing_steps: int = 5000, init_variance: float = 0.3)[source]#

Bases: object

Anneals variance of gaussian noise of real and fake examples passed to discriminator, called instance noise.

This makes the generator’s task harder and increases support of the real and fake distributions so they overlap, which has nice theoretical implications for the quality of the discriminator. Also can be used as a curriculum learning technique by iteratively unblurring the target to make segmentation harder over time.

Parameters:
  • annealing_steps (int=5000) – Number of steps to linearly anneal variance from init_variance to 0

  • init_variance (float=0.3) – Initial variance of noise

update_noise()[source]#