I am trying to build train a network by training both the predicted values as well as their derivatives with respect to the input, but I am having trouble assembling the gradien