Shortcuts

Variational Callbacks

Useful callbacks for GANs, variational-autoencoders or anything with latent spaces.


Latent Dim Interpolator

Interpolates latent dims.

Example output:

Example latent space interpolation
class pl_bolts.callbacks.variational.LatentDimInterpolator(interpolate_epoch_interval=20, range_start=-5, range_end=5, num_samples=2)[source]

Bases: pytorch_lightning.callbacks.Callback

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()])
Parameters
  • interpolate_epoch_interval

  • range_start – default -5

  • range_end – default 5

  • num_samples – default 2

Read the Docs v: 0.1.1
Versions
latest
stable
0.1.1
0.1.0
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.