Each layer contains a set of nodes . The input to a node in layer is and its corresponding output is . The network’s learnable parameters are its weights (and biases), collectively denoted as , which represent the connection strength between node in layer and node in layer .
The objective of training is to the find optimal set of weights that minimize the loss function over a given training set.
We use Gradient Descent to update the weights. Backpropagation is used to compute the exact gradients required for the SGD update step.
Other details that are important to note:
- Input Normalization. Before you train your model, you want your input data components to have zero mean and unit variance.
- Data augmentation
- Weight initialization: proper weight initialization is very important to avoid issues such as vanishing/exploding gradients.
- Initializing weights with small random numbers can work for shallow networks, but often leads to vanishing gradients in deeper architectures.
- Xavier Initialization
nn.init- Weights are drawn from a normal distribution with variance scaled by the number of inputs to the node.
- For a weight , the initialization is where is the # of edges incident on the node.
- Initialization with ReLU:
- Regularization with Dropout
- During the forward pass of training, randomly set the output of any given node to zero with a specified probability .
- Reduces overfitting