-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to deal with matrix input #47
Conversation
Could you explain mathematically what you are trying to do here? We might have more general solution to this... |
@tansongchen Is there a reason for the types in derivative for |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #47 +/- ##
==========================================
+ Coverage 85.18% 85.48% +0.29%
==========================================
Files 6 6
Lines 243 248 +5
==========================================
+ Hits 207 212 +5
Misses 36 36
☔ View full report in Codecov by Sentry. |
@tansongchen , tests pass now. |
Thanks for contributing that, but I'm still preparing for an exam these days 😂 I will get back to you and take a closer look on Friday or this weekend! |
Let me try to understand the point of these additional differentiation APIs. Currently, there are two methods, and And now, you add two additional methods, which say that,
Is this correct? If is, I'm happy with this kind of shorthand notations, as long as they proved handful in PINN applications. But I would prefer to not use |
Hi, First of all, you are totally correct with what I aim to do. Let me justify it. You define the Flux/Lux model and you apply it to the input, and then you associate it with the targets and build your loss function. If you agree, then I would definitely support such an idea :) (and even write a small tutorial to show how easy it gets to write complex pinn using taylordiff). |
Just did some cleaning up work and added some comments! Once CI passes I will merge. Thanks again for contribution |
@tansongchen, can I ask why you write |
They are equivalent when there is only one type parameter and the parameter is not used in function body. However, when there are two or more, explicit variable name would help to tell whether two types can be different or not. Also, in So to keep consistency with more complicated cases, I would personally prefer to write all type parameter as a variable :) |
This PR aims at adding the possibility to deal with matrix input since this can be helpful in the context of PINN. Consequently, here are the main modifications:
derivative
with a matrix inputderivative