How to build custom loss function including restrictions about the derivatives of a model with respect to input features

Hi SimpleChains.jl people!

I am trying to build a custom loss function including restrictions about the derivatives of a model with respect to input features in addition to the values of the model. In other words, I would like to target both the values and the derivatives of a model with respect to input features.

If you have an idea about the way to target the derivative of a model using SimpleChains, please let me know. Thanks for your help.