Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Adapt = "4.1.1"
Aqua = "0.8"
CellularAutomata = "0.0.2"
Compat = "4.16.0"
DifferentialEquations = "7.15.0"
DifferentialEquations = "7.16.1"
LIBSVM = "0.8"
LinearAlgebra = "1.10"
MLJLinearModels = "0.9.2, 0.10"
Expand Down
8 changes: 8 additions & 0 deletions src/esn/esn_inits.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ function weighted_init(rng::AbstractRNG, ::Type{T}, dims::Integer...;
throw_sparse_error(return_sparse)
approx_res_size, in_size = dims
res_size = Int(floor(approx_res_size / in_size) * in_size)
if res_size != approx_res_size
@warn """Reservoir size has changed!\n
Computed reservoir size ($res_size) does not equal the \
provided reservoir size ($approx_res_size). \n
Using computed value ($res_size). Make sure to modify the \
reservoir initializer accordingly. \n
"""
end
layer_matrix = DeviceAgnostic.zeros(rng, T, res_size, in_size)
q = floor(Int, res_size / in_size)

Expand Down
Loading