tsgm.models.monitors¶
Module Contents¶
- class GANMonitor(num_samples: int, latent_dim: int, labels: tsgm.types.Tensor, save: bool = True, save_path: str | None = None, mode: str = 'clf')[source]¶
Bases:
tensorflow.keras.callbacks.CallbackGANMonitor is a Keras callback for monitoring and visualizing generated samples during training.
- Parameters:
num_samples (int) – The number of samples to generate and visualize.
latent_dim (int) – The dimensionality of the latent space. Defaults to 128.
output_dim (int) – The dimensionality of the output space. Defaults to 2.
save (bool) – Whether to save the generated samples. Defaults to True.
save_path (str) – The path to save the generated samples. Defaults to None.
- Raises:
ValueError – If the mode is not one of [‘clf’, ‘reg’]
- Note:
If
saveis True andsave_pathis not specified, the default save path is “/tmp/”.- Warning:
If
save_pathis specified butsaveis False, a warning is issued.
- class VAEMonitor(num_samples: int = 6, latent_dim: int = 128, output_dim: int = 2, save: bool = True, save_path: str | None = None)[source]¶
Bases:
tensorflow.keras.callbacks.CallbackVAEMonitor is a Keras callback for monitoring and visualizing generated samples from a Variational Autoencoder (VAE) during training.
- Parameters:
num_samples (int) – The number of samples to generate and visualize. Defaults to 6.
latent_dim (int) – The dimensionality of the latent space. Defaults to 128.
output_dim (int) – The dimensionality of the output space. Defaults to 2.
save (bool) – Whether to save the generated samples. Defaults to True.
save_path (str) – The path to save the generated samples. Defaults to None.
- Raises:
ValueError – If
output_dimis less than or equal to 0.- Note:
If
saveis True andsave_pathis not specified, the default save path is “/tmp/”.- Warning:
If
save_pathis specified butsaveis False, a warning is issued.