Neural Network
Neural Network

Fully-connected layers
- A general function approximator
- We can approximate any function (relation) if we have enough nodes and layers
Feature extraction
- Extract new features by linear or non-linear combination of the original features
- New features may not have physical interpretation/meaning (usually for non-linear)
Activate Function
Hidden layers
ReLU function is widely used for hidden layers by defaultOutput layers
It depends on the task- Regression: Sigmoid function
- Binary classification: Sigmoid function
- Multi-class classificaton: Softmax function
Sigmoid
Sigmoid function, widely used in regression or binary classification,

ReLU
Rectified Linear Unit (ReLU) function, the most commonly used function,

Softmax
Sigmoid function, widely used in multi-class classification,
Cross-entropy loss for softmax function
Deep neural networks
The function is much more complicated when the number of parameters is very large, we may use it resolve complex problems with a huge amount of data. The model capacity can be increased by,- increase the number of nodes
- increase the number of layers
- add non-linear activate function
Computations
Forward Pass

Backpropagation
- Chain rule

Computing derivatives

The forward pass (node i in layer N-1, node j in layer N),
Cross-entropy loss (node j in layer N),
For layer N (node i in layer N-1, node j in layer N),
- Compute the parameters for layer N,
- Compute the loss against weights in layer N,
- Note that,
For layer N-1,
- Compute the parameters for layer N-1 (node i in layer N-1, node j in layer N),
- Compute the loss against weights in layer N-1 (node i in layer N-2, node j in layer N-1),
For layer K (from 0 to N-1) (node i in layer K, node j in layer K+1),
Fully-connected Neural Networks
- Problems
Suppose use fully-connected network. we have an image (256 x 256 x 3) and three layers (1 input layer, 1 hidden layer, 1 regression layer) for binary classification. The internal layer has 1000 nodes. The number of parameter in this neural network, which is a super complex model- The model is too complicated that it may fit the noise in the data (Overfitting)


