Skip to content

Is there any actual need for array input in SymbolicNeuralNetwork-created neural networks? #83

@TorkelE

Description

@TorkelE

When you create a symbolic neural network, e.g.

sym_nn, θ = SymbolicNeuralNetwork(; nn_p_name = , chain = nn_arch, n_input = 1, n_output = 1)

in a model you have to give inputs as:

eqs_ude = [
    D(X) ~ sym_nn([Y], θ)[1] - d*X,
    D(Y) ~ X - d*Y
]

i.e. sym_nn([Y], θ)[1] . For two inputs it would be sym_nn([X,Y], θ)[1] .

While Lux uses array, there does not seem to be any reason for the array form here? I.e. a more natural syntax would have for this to be already considered in the symbolic neural network, i.e. be sym_nn(Y, θ)[1] ? Potentially, even the θ could be baked into the function as well, so just be sym_nn(Y), but there might be more to consider here. For the array, however, it seems like a straight-up syntax improvement?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions