Learn R Programming

ruta (version 1.2.0)

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)

Value

A construct with class "ruta_layer"

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

See Also

\link{autoencoder_variational}

Other neural layers: conv(), dense(), dropout(), input(), layer_keras(), output()

Examples

Run this code
variational_block(3)

Run the code above in your browser using DataLab