Thank you @KFrank for the detailed answer.
My assumptions are also similar for 1 and 2.
I will try approach 3 and it might work as you suggested.
I don’t require gradients for the simulation layer as I just want to update params prediction network.
Does it make sense if I give precalculated dummy gradients in backward function of the custom layer?
Thank you in advance.!