-
Notifications
You must be signed in to change notification settings - Fork 5
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
Using Sophon with custom Layers #229
Comments
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 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 |
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:
The text was updated successfully, but these errors were encountered: