Neural network could not learn on this type of data, why?

Hello,
Thanks for the useful information and suggestion.
I have defined a custom loss function that depends on the first and second derivatives of the output of the NN with respect to the input.
(like PDE in https://discuss.pytorch.org/t/first-and-second-derivates-of-the-output-with-respect-to-the-input-inside-a-loss-function/99757)

If I normalize the target and train the model, how can I unnormalize the predictions?
Because of the first and second derivatives of the output of the NN w. r. t. the input used in loss function, I think

pred = model(input) 
pred = pred * target_std 
pred = pred + target_mean

does not work correctly.
Could you please inform me about this question?