This variational block consists in two dense layers which take as input the previous layer and a sampling layer. More specifically, these layers aim to represent the mean and the log variance of the learned distribution in a variational autoencoder.

variational_block(units, epsilon_std = 1, seed = NULL)

Arguments

units

Number of units

epsilon_std

Standard deviation for the normal distribution used for sampling

seed

A seed for the random number generator. Setting a seed is required if you want to save the model and be able to load it correctly

Value

A construct with class "ruta_layer"

See also

Examples

variational_block(3)
#> Network structure: #> variational(3 units)