flexs.utils.VAE_utils¶
Utility functions for A VAE generative model.
-
class
flexs.utils.VAE_utils.
Sampling
(trainable=True, name=None, dtype=None, dynamic=False, **kwargs)[source]¶ Bases:
tensorflow.python.keras.engine.base_layer.Layer
Uses (z_mean, z_log_var) to sample z, the vector encoding a sequence.
-
class
flexs.utils.VAE_utils.
VAE
(seq_length, alphabet, batch_size=10, latent_dim=2, intermediate_dim=250, epochs=10, epsilon_std=1.0, beta=1, validation_split=0.2, verbose=True)[source]¶ Bases:
object
VAE class wrapping VAEModel, exposing an interface friendly to CbAS/DbAS.
-
calculate_log_probability
(sequences, vae=None)[source]¶ Calculate log probability of reconstructing a sequence.
-