-
-
Notifications
You must be signed in to change notification settings - Fork 41
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Description
With rcjl 0.11 the minimal inits can also use arrays as input for their weight kwargs. However, in some functions the type Number is still forced (is here)
Expected behavior
weight keywords should also accept arrays as inputs
Minimal Reproducible Example
esn = ESN(input_data, input_size, res_size;
reservoir=cycle_jumps(;cycle_weight=randn(res_size)),
input_layer=weighted_init,
nla_type=NLAT2(),
rng=rng)ERROR: TypeError: in keyword argument cycle_weight, expected Number, got a value of type Vector{Float64}
Stacktrace:
[1] (::WeightInitializers.PartialFunction.Partial{…})(::MersenneTwister, ::Type, ::Vararg{…}; kwargs::@Kwargs{})
@ WeightInitializers.PartialFunction ~/.julia/packages/WeightInitializers/TEYjX/src/partial.jl:40
[2] (::WeightInitializers.PartialFunction.Partial{…})(::MersenneTwister, ::Type, ::Vararg{…})
@ WeightInitializers.PartialFunction ~/.julia/packages/WeightInitializers/TEYjX/src/partial.jl:38
[3] ESN(train_data::Matrix{…}, in_size::Int64, res_size::Int64; input_layer::typeof(weighted_init), reservoir::WeightInitializers.PartialFunction.Partial{…}, bias::typeof(zeros32), reservoir_driver::RNN{…}, nla_type::NLAT2, states_type::StandardStates, washout::Int64, rng::MersenneTwister, matrix_type::Type)
@ ReservoirComputing ~/.julia/packages/ReservoirComputing/yPGlg/src/esn/esn.jl:71
[4] top-level scope
@ ~/Documents/mcesn/mcesn.jl:32
Some type information was truncated. Use `show(err)` to see complete types.Potential fixes
Just relax kwargs types and this is solved.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers