for each batch: pass input through the network compute prediction measure loss backpropagate gradients update parameters