Learn R Programming

ruta (version 1.0.2)

variational_block: Create a variational block of layers

Description

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.

Usage

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

autoencoder_variational

Other neural layers: dense, dropout, input, layer_keras, output

Examples

Run this code
# NOT RUN {
variational_block(3)
# }

Run the code above in your browser using DataLab