comp {nnR} | R Documentation |
comp
Description
The function that takes the composition of two neural
networks assuming they are compatible, i.e., given
\nu_1, \nu_2 \in \mathsf{NN}
, it must be the case that
\mathsf{I}(\nu)_1 = \mathsf{O}(\nu_2)
.
Usage
comp(phi_1, phi_2)
phi_1 %comp% phi_2
Arguments
phi_1 |
first neural network to be composed, goes on the left |
phi_2 |
second neural network to be composed, goes on right |
Value
The composed neural network. See also dep
.
Our definition derive specifically from:
References
Definition 2.1.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
Remark: We have two versions of this function, an infix version for close resemblance to mathematical notation and prefix version.
Examples
create_nn(c(5, 4, 6, 7)) |> comp(create_nn(c(4, 1, 5)))
[Package nnR version 0.1.0 Index]