Hi @ptrblck! Great thanks for your suggestions! Sorry I couldn’t provide the complete code here because it is rather large. I followed your suggestions, and I found out that the gradient is not correct, and of course, the value is very small as you mentioned. I’m not sure how accurate is the autograd in approximating the gradient of complicated loss w.r.t PDE parameters. I need to check this out. Thanks a lot!