I would like to test the loss proposed in the Sobolev training paper 22. For example consider: 
loss.png824×110 8.72 KB

where m(x_i,\theta) is the network evaluated at x_i.
The first part is the usual MSE but I have no idea how to go for the second piece.