Learn R Programming

ML2Pvae (version 1.0.0.1)

build_hidden_encoder: Build the encoder for a VAE

Description

Build the encoder for a VAE

Usage

build_hidden_encoder(
  input_size,
  layers,
  activations = rep("sigmoid", length(layers))
)

Arguments

input_size

an integer representing the number of items

layers

a list of integers giving the size of each hidden layer

activations

a list of strings, the same length as layers

Value

two tensors: the input layer to the VAE and the last hidden layer of the encoder