mlp_architecture: Create an MLP Architecture

View source: R/layers.R

mlp_architectureR Documentation

Create an MLP Architecture

Description

Creates a multilayer perceptron architecture object from a list of dense layers.

Usage

mlp_architecture(layers, input_dim = NULL, name = "mlp")

Arguments

layers

A list of dense layer objects created by dense_layer().

input_dim

Optional positive integer specifying the number of input features. This can be left as NULL and inferred later from data.

name

Optional character string specifying the architecture name.

Value

An object of class "met_mlp_architecture".

Examples

architecture <- mlp_architecture(
  layers = list(
    dense_layer(10, activation = "relu"),
    dense_layer(1, activation = "linear")
  )
)
architecture

metANN documentation built on May 16, 2026, 1:06 a.m.