ML assignment 4 compute neural net gradient with backpropagation