• learning process where the network gets feedback on its performance, figures out how to improve, and adjusts itself accordingly.
  1. Forward Pass: feed input data into the network, and it goes through each layer, making predictions.
  2. Compare with Reality: Compare the network's prediction with the actual correct answer. Calculate how far off the network is.
  3. Backward Pass (Backpropagation): This is where the network learns from its mistakes. It works backward through the layers to figure out how much each weight contributed to the error.
  4. Adjust Weights: Update the weights in the network to reduce the error. If a weight contributed a lot to the error, the network adjusts it more. If a weight didn't contribute much, it's adjusted less.
  5. Repeat: Repeat this process—forward pass, compare, backward pass, adjust weights—multiple times until the network gets really good at making accurate predictions.

18870backprop2.png Pasted image 20231107162027.png Pasted image 20231107162107.png

  1. Initialization (Lines 1-2):    - The algorithm assumes a dataset DD is available.    - Requires hyper-parameters: learning rate α\alpha, batch size BB.    - A convergence criterion is specified to decide when to stop training.
  2. Mini-Batch Splitting (Line 1):    - The data is split into mini-batches, where XpiqX_{piq} is a matrix of descriptive features, and YpiqY_{piq} is a matrix (or vector) containing labels for each example in mini-batch ii.
  3. Weight Initialization (Line 2):    - Weight matrices WpiqW_{piq} for each layer are initialized.
  4. Epochs and Mini-Batch Processing (Lines 3-33):    - Each iteration of the repeat loop represents an epoch (a full traversal of the training data).    - The for loop processes each mini-batch, including a forward pass, backward pass, and weight updates.
  5. Forward Pass (Lines 5-11):    - Descriptive features are presented to the input layer.    - The forward pass involves propagating activations through the network.    - Matrix operations are used to calculate activations at each layer using weight matrices and activation functions.
  6. Backward Pass (Lines 12-30):    - The algorithm performs backpropagation to calculate error gradients.    - Separate for loops handle output layer neurons (Lines 16-18) and hidden layer neurons (Lines 19-23).    - Error gradients are accumulated for each weight across all examples in the mini-batch.
  7. Weight Updates (Lines 28-30):    - The weights of the network are updated based on the accumulated error gradients.
  8. Shuffling Mini-Batch Sequence (Line 32):    - Between epochs, the mini-batch sequence is shuffled.
  • training through multiple epochs, where each epoch involves processing mini-batches of data.
  • The forward pass computes activations
  • the backward pass calculates error gradients
  • Weight updates are then applied,
  • and the process is repeated until the convergence criterion is met.
  • The mini-batch sequence is shuffled between epochs to introduce randomness in the training process.

see also: webpage explanation

© 2024 All rights reserved

Built with DataHub LogoDataHub Cloud