Variational Callbacks¶
Useful callbacks for GANs, variational-autoencoders or anything with latent spaces.
Latent Dim Interpolator¶
Interpolates latent dims.
Example output:
- class pl_bolts.callbacks.variational.LatentDimInterpolator(interpolate_epoch_interval=20, range_start=- 5, range_end=5, steps=11, num_samples=2, normalize=True)[source]
Bases:
pytorch_lightning.callbacks.
Interpolates the latent space for a model by setting all dims to zero and stepping through the first two dims increasing one unit at a time.
Default interpolates between [-5, 5] (-5, -4, -3, …, 3, 4, 5)
Example:
from pl_bolts.callbacks import LatentDimInterpolator Trainer(callbacks=[LatentDimInterpolator()])