Learn R Programming

nnR (version 0.1.0)

Nrm: Nrm

Description

A function that creates the \(\mathsf{Nrm}\) neural networks.that take the 1- norm of a \(d\)-dimensional vector when instantiated with ReLU activation.

Usage

Nrm(d)

Value

a neural network that takes the 1-norm of a vector of size d.under ReLU activation.

Note: This function is split into two cases much like the definition itself.

Note: If you choose to specify a \(d\) other that \(0\) you must instantiate with a vector or list of that length.

For a specific definition, see:

Arguments

d

the dimensions of the vector or list being normed.

References

Lemma 4.2.1. Jentzen, A., Kuckuck, B., and von Wurstemberger, P. (2023). Mathematical introduction to deep learning: Methods, implementations, and theory. https://arxiv.org/abs/2310.20360

Examples

Run this code
Nrm(2) |> inst(ReLU, c(5,6))
Nrm(5) |> inst(ReLU,c(0,-9,3,4,-11))


Run the code above in your browser using DataLab