-
Notifications
You must be signed in to change notification settings - Fork 83
Description
Say that I have a Lux model
using Lux
model = Lux.Chain(
Lux.Dense(1 => 4, Lux.softplus),
Lux.Dense(4 => 4, Lux.softplus),
Lux.Dense(4 => 1, Lux.softplus)
)Two questions:
- is there a way to learn how many parameters this model have? All function I apply returns various structured things which I cannot really understand what they contain.
- Lets say my model has 5 parameters and 1 input, how do I, given that I have these in normal vectors:
input = [1.0]
p_vals = [1.0, -2.0, 0.5, 5.0, -1.5]get the output of my neural network for these parameter values and output?
I have spent the last couple of days trying to get something like this to work, but I really have not been able to. i have been trying to make a basic example where I can train a model using optimization (where I have a neural network and some other things I want to optimize), and then build from there. Unfortunatley I cannot get this to work. Doc pages I have been reading include
https://lux.csail.mit.edu/stable/introduction/
https://lux.csail.mit.edu/stable/tutorials/beginner/1_Basics
https://docs.sciml.ai/Optimization/stable/optimization_packages/optimization/#Train-NN-with-Sophia
https://lux.csail.mit.edu/stable/tutorials/beginner/5_OptimizationIntegration
https://lux.csail.mit.edu/stable/tutorials/beginner/2_PolynomialFitting