LNN function is structured as a collection of individual units.

Training a Layered Neural Network
=================================

An LNN can be trained to approximate the input-output relationship of an arbitrary data set $(x, y)$ that consists of input data $x\in \mathbb{R}^M$ and output data $y\in \mathbb{R}^N$, by using a function $f(x,w)$ from $x\in \mathbb{R}^M$ and a parameter $w\in \mathbb{R}^L$ to $\mathbb{R}^N$. An LNN parameter is defined by $w=\{\omega^d_{ij}, \theta^d_i\}$, where $\omega^d_{ij}$ is the connection weight between the $i$-th unit in a depth $d$ layer and the $j$-th unit in a depth $d+1$ layer, and $\theta^d_i$ is the bias of the $i$-th unit in the depth $d$ layer. Here, $d=1$ and $d=d_0$, respectively, correspond to the input and output layers. The LNN function $f(x,w)$ is a set of functions $\{f_j(x,w)\}$ for all output dimensions $j$, each of which is defined by $f_j(x,w) = \sigma(\sum_i \omega^{d_0-1}_{ij} o^{d_0-1}_i+\theta^{d_0-1}_j)$. Here, $\sigma (x)=1/(1+\exp (-x))$, and $o^d_i$ is the output value of the $i$-th unit in the depth $d$ layer and $o^1_i=x_i $ holds in the input layer. Such output values in each layer are given by $o^{d}_j= \sigma(\sum_i \omega^{d-1}_{ij} o^{d-1}_i+\theta^{d-1}_j)$.

The purpose of training an LNN is to find an optimal parameter $w$ to approximate the 