# Exercise - Neural Network - Pen & Paper

## Table of Contents

## Introduction

**TODO**

## Requirements

### Knowledge

**TODO**

## Exercises

Given are the following Informations for a neural network:

\begin{equation*}
W_{HIDDEN} =
\begin{pmatrix}
10 & -20 & 20 & -40 \
20 & -40 & 0 & 0
\end{pmatrix}
\end{equation*}

\begin{equation*}
W_{OUTPUT} =
\begin{pmatrix}
20 & 40 & -40
\end{pmatrix}
\end{equation*}

Each row of $W_{HIDDEN}$ and $W_{OUTPUT}$ represents the weights of one neuron in layer *HIDDEN*, resp. the *OUTPUT* layer. The first column equals the bias(es).

Further, activation function $g(z)$, which applies to all neurons in the network:

\begin{equation*}
g(z)=\left{\begin{array}{cc} 0 & z\le-10\ 1 & z\ge10 \ 0.5 & else\end{array} \right.
\end{equation*}

### Draw the Network

**Task:**

Draw a graph of the network $N_{SIMPLE}$ including all neurons and their connections. Note all weight and bias values on the corresponding nodes and edges of the graph.

### Calculate the Forwardpass

Use the given vectors $x_1, x_2, x_3$ to create a mini-batch matrix as input for the network and calculate its output. Only use matrix operations for the calculation and note all intermediate results.

\begin{equation*}
\vec{x} {(1)} = [0,1,1]
,\;
\vec{x}{(2)} =[1,1,0]
,\;
\vec{x}_{(3)} = [1,0,1]
\end{equation*}

## Licenses

### Notebook License (CC-BY-SA 4.0)

*The following license applies to the complete notebook, including code cells. It does however not apply to any referenced external media (e.g., images).*

*Exercise - Neural Network - Pen & Paper*

by *Benjamin Voigt*

is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Based on a work at https://gitlab.com/deep.TEACHING.

### Code License (MIT)

*The following license only applies to code cells of the notebook.*

Copyright 2018 *Benjamin Voigt*

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.