variational_block: Create a variational block of layers

variational_blockR Documentation

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

\link{autoencoder_variational}

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

Examples

variational_block(3)

ruta documentation built on Jan. 9, 2023, 1:20 a.m.