Learn R Programming

nnR (version 0.1.0)

create_nn: create_nn

Description

Function to create a list of lists for neural network layers

Usage

create_nn(layer_architecture)

Value

An ordered list of ordered pairs of \((W,b)\). Where \(W\) is the matrix representing the weight matrix at that layer and \(b\) the bias vector. Entries on the matrix come from a standard normal distribution.

Arguments

layer_architecture

a list specifying the width of each layer

References

Definition 2.1 in Rafi S., Padgett, J.L., Nakarmi, U. (2024) Towards an Algebraic Framework For Approximating Functions Using Neural Network Polynomials https://arxiv.org/abs/2402.01058

Which in turn is a modified version of the one found in:

Definition 2.3. Grohs, P., Hornung, F., Jentzen, A. et al. Space-time error estimates for deep neural network approximations for differential equations. (2019). https://arxiv.org/abs/1908.03833.

Examples

Run this code
create_nn(c(8, 7, 8))
create_nn(c(4,4))

Run the code above in your browser using DataLab