Learn R Programming

nnR (version 0.1.0)

Sqr: Sqr

Description

A function that returns the \(\mathsf{Sqr}\) neural networks.

Usage

Sqr(q, eps)

Value

A neural network that approximates the square of a real number.when provided appropriate \(q,\varepsilon\) and upon instantiation with ReLU, and a real number \(x\)

Arguments

q

a real number in \((2,\infty)\). Accuracy as well as computation time increases as \(q\) gets closer to \(2\) increases

eps

a real number in \((0,\infty)\). ccuracy as well as computation time increases as \(\varepsilon\) gets closer to \(0\) increases

References

Proposition 3.4. 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

#' @references Definition 2.24. 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

Examples

Run this code
Sqr(2.5, 0.1)
Sqr(2.5, 0.1) |> inst(ReLU, 4)

Run the code above in your browser using DataLab