dense_layer: Create a Dense Layer

View source: R/layers.R

dense_layerR Documentation

Create a Dense Layer

Description

Creates a fully connected dense layer object for use in metANN architectures.

Usage

dense_layer(
  units,
  activation = "relu",
  use_bias = TRUE,
  trainable = TRUE,
  name = NULL
)

Arguments

units

A positive integer specifying the number of neurons in the layer.

activation

A character string or a "met_activation" object.

use_bias

Logical. Whether to include a bias term in the layer.

trainable

Logical. Whether the layer parameters should be trainable.

name

An optional character string specifying the layer name.

Value

An object of class "met_dense_layer".

Examples

dense_layer(10, activation = "relu")
dense_layer(1, activation = activation_linear())

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