Closed arthur-bizzi closed 10 months ago
I’m gonna try to run the code later on. Did you find out why the error?
Yeah, it has to do with the ComponentArrays interface. All should work once i manage to wrestle the parameters into a format CA understands.
Thanks a lot anyway. On a related note: are there any plans to support vector equations and outputs? I.e. have a single network for all outputs instead of a named tuple of single-output ones. Sophon currently accepts nets with n-dimensional outputs for each position, but it's unclear how it interprets them.
Alright, Lux's doc does mention that your weights
should be a named tuple.
As for your suggestion of using a single network's output to represent multiple dependent variables, there are currently no plan to support this as I'm not aware of any clear advantages. However, it is possible (and maybe quite easy) for one to implement it. Please refer to the documentation on shared parameters in Lux. Accordingly, you will also need to change the way PINN
initialize parameters.
What methods should a custom layer implement to be used with the library? Currently, barebones Lux layers don't seem to work.
Take the following (very rough) MWE, based on the ODE tutorial: We attempt to solve a linear ode for multiple initial conditions. The NormalLayer struct is supposed to naively emulate a FullyConnected Layer.
The layer works fine, but putting it to use with the library leads to a very mysterious error message: