Personal website Rudolf Adamkovič

Home / Deep learning


Weight tensor

A rank-3 tensor with all neuron weights in a neural network:

\begin{equation*} W^{[i]} = \begin{pmatrix} w^{[i](1)}_{1} & \cdots & w^{[i](n)}_{1} \\ \vdots & \ddots & \vdots \\ w^{[i](1)}_{p} & \cdots & w^{[i](n)}_{p} \end{pmatrix} \in \mathbb{R}^{p \times n} \end{equation*}

where

  • \(w^{[i]}\) are all weights in the \(i\)-th layer
  • \(w^{[i]}_j\) are all weights in the \(j\)-th neuron in the \(i\)-th layer
  • \(w^{[i](k)}_j\) is the \(k\)-th weight in the \(j\)-th neuron in the \(i\)-th layer

so

  • \(w^{[i](k)}_j\) is the weight of the path from
    • the \(k\)-th neuron in the \((i - 1)\)-th layer to
    • the \(j\)-th neuron in the \(i\)-th layer

and

  • \(i\) is the layer number
  • \(p\) is the number of neurons in \(i\)-th layer
  • \(n\) is the number of neurons in the \((i - 1)\)-th layer 1

Footnotes:

1

For the input layer \(i = 1\), \(n\) is the number of features in the training data set.


© 2025 Rudolf Adamkovič under GNU General Public License version 3.
Made with Emacs and secret alien technologies of yesteryear.