new_layer: Layer wrapper constructor

View source: R/layers.R

new_layerR Documentation

Layer wrapper constructor

Description

Constructor function for layers. You shouldn't generally need to use this. Instead, consider using individual functions such as dense.

Usage

new_layer(cl, ...)

Arguments

cl

Character string specifying class of layer (e.g. "ruta_layer_dense"), which will be used to call the corresponding methods

...

Other parameters (usually units, activation)

Value

A construct with class "ruta_layer"

Examples

my_layer <- new_layer("dense", 30, "tanh")

# Equivalent:
my_layer <- dense(30, "tanh")[[1]]

fdavidcl/ruta documentation built on July 5, 2023, 6:32 p.m.