Get the derivatives after training #767
Unanswered
phdstudentjw
asked this question in
Q&A
Replies: 1 comment
-
|
Suppose your solution is called 'y' and its derivative wrt the first coordinate is 'u'. Then you can define a function that computes u. Finally you only have to assign this function to the 'operator' parameter inside model.predict() |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Suppose I already finished training a neural network to approximate a PDE called
u. Usually, I would usemodel.predict(X)to obtain values ofuover domainX. However, how can I get the derivatives ofuwith respect tox? I know how to usegradients.jacobianto define a loss function before training, but I don't know how I can get the jacobian after training. Thank you. I looked intostate_dict()but I don't think it has what I want.Could you please help? Thank you.
Beta Was this translation helpful? Give feedback.
All reactions