What is the primary objective of the "backpropagation" algorithm in training neural networks?

  • A) To optimize the activation functions of the neurons
  • B) To adjust the weights of the network by calculating the gradient of the loss function with respect to each weight
  • C) To generate synthetic data for model training
  • D) To encode input data into a lower-dimensional space