- [[neural network notation]], [[training a neural network with TensorFlow]]
# Idea
The output of a layer of neurons/units in a [[neural networks|neural network]] is given by
$\mathbf{Z}=g(\mathbf{A}^T \mathbf{W}+\mathbf{B})$
- $\mathbf{A}^T$ is the input values (output from previous layer)
- $\mathbf{W}$ is a $m$ by $n$ weight matrix, where $m$ (no. of rows) is the no. of input features (or no. of values from the output of the previous layer), and $n$ is the no. of units in the current layer
- If network has $s_{in}$ units in a layer and $s_{out}$ units in the next layer, then $W$ will be of dimension $s_{in} \times s_{out}$
- $\mathbf{B}$ is the bias, $n$ by $1$ matrix
- $b$ is often a vector with $s_{out}$ elements
- $g$ is the [[activation function]]
## Example
![[20231227112820.png]]
![[20231227113522.png]]
![[20231227113720.png]]
# References
- [Matrix multiplication code - Neural Networks | Coursera](https://www.coursera.org/learn/advanced-learning-algorithms/lecture/ysRAb/matrix-multiplication-code)