-
-
Notifications
You must be signed in to change notification settings - Fork 7
Description
When using SymbolicNeuralNetwork to create a neural network to insert into a UDE, it feels natural to want the output to have the same symbolic names as the variables in which you store them (as basically is the case ofr all symbolic variables across the MTK system)
nn, theta = SymbolicNeuralNetwork(; chain, nn_name = :nn, nn_p_name = theta)Right now this have to be done manually. However, something similar to @named used in MTk would allow
@named nn, theta = SymbolicNeuralNetwork(; chain)with nn_name = :nn and nn_p_name = theta infered automatically. Right now, @named is used for declaring Systems, and while a check checking if it is applied to a SymbolicNeuralNetwork could be possible, it might also not make sense to overload it with other functionality.
Not sure what the best solution is. One could do a @SymbolicNeuralNetwork macro. But in this case it probably makes sense to drop the function call and directly do
@SymbolicNeuralNetwork nn, theta = chainwhich works well for base, however, it might make designating additional arguments more awkward.