set_n_neurons_in_latent_layer: Set the number of neurons in the latent layer

View source: R/set_n_neurons_in_latent_layer.R

set_n_neurons_in_latent_layerR Documentation

Set the number of neurons in the latent layer

Description

Set the number of neurons in the latent layer

Usage

set_n_neurons_in_latent_layer(model, n_neurons)

Arguments

model

the GCAE architecture, as checked by check_model. Use read_model_file to read a GCAE architecture from file. Use save_model to save the model to a JSON file. Use plot_model to plot the model. Use save_model_plot to save a plot of the model to file.

n_neurons

the number of neurons, as checked by check_n_neurons

Value

the model with the desired number of neurons in the latent layer

Author(s)

Richèl J.C. Bilderbeek

Examples

if (is_gcae_repo_cloned()) {
  # A real GCAE file
  model_filename <- get_gcae_model_filename("M1")
} else {
  # An example file
  model_filename <- get_gcaer_filename("M0.json")
}
model <- read_model_file(model_filename)
new_model <- set_n_neurons_in_latent_layer(
  model = model,
  n_neurons = 1
)
get_n_neurons_in_latent_layer(new_model)

richelbilderbeek/gcaer documentation built on March 25, 2024, 3:08 p.m.