sentence1: neural networks are generally trained using the backpropogation algorithm , which uses the chain rule to speed up the computation of the gradient for the gradient descent algorithm .
sentence2: most neural networks are trained using stochastic gradient descent or its variants in which the gradients of the networks are computed by backpropagation algorithm .