From 2ab7b8f25f70620957b1b63f13abde1624d83021 Mon Sep 17 00:00:00 2001 From: MartinuzziFrancesco Date: Sun, 23 Mar 2025 16:04:09 +0100 Subject: [PATCH 1/2] feat: add warning in weighted_init for change of res_size --- src/esn/esn_inits.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/esn/esn_inits.jl b/src/esn/esn_inits.jl index 10935bdd..c0dae55f 100644 --- a/src/esn/esn_inits.jl +++ b/src/esn/esn_inits.jl @@ -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) From 3d7220887b477dd231a5e0602760228d25281542 Mon Sep 17 00:00:00 2001 From: MartinuzziFrancesco Date: Wed, 26 Mar 2025 20:15:42 +0100 Subject: [PATCH 2/2] chore: up DifferentialEquations version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 260684c1..fce98579 100644 --- a/Project.toml +++ b/Project.toml @@ -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"