@@ -37,7 +37,7 @@ temporal features.
3737 - `input_layer`: A function or an array of functions to initialize the input
3838 matrices for each layer. Default is `scaled_rand` for each layer.
3939 - `bias`: A function or an array of functions to initialize the bias vectors
40- for each layer. Default is `zeros64 ` for each layer.
40+ for each layer. Default is `zeros32 ` for each layer.
4141 - `reservoir`: A function or an array of functions to initialize the reservoir
4242 matrices for each layer. Default is `rand_sparse` for each layer.
4343 - `reservoir_driver`: The driving system for the reservoir.
@@ -50,8 +50,6 @@ temporal features.
5050 Default is 0.
5151 - `rng`: Random number generator used for initializing weights. Default is the package's
5252 default random number generator.
53- - `T`: The data type for the matrices (e.g., `Float64`). Influences computational
54- efficiency and precision.
5553 - `matrix_type`: The type of matrix used for storing the training data.
5654 Default is inferred from `train_data`.
5755
@@ -74,21 +72,21 @@ function DeepESN(train_data,
7472 res_size:: Int ;
7573 depth:: Int = 2 ,
7674 input_layer= fill (scaled_rand, depth),
77- bias= fill (zeros64 , depth),
75+ bias= fill (zeros32 , depth),
7876 reservoir= fill (rand_sparse, depth),
7977 reservoir_driver= RNN (),
8078 nla_type= NLADefault (),
8179 states_type= StandardStates (),
8280 washout:: Int = 0 ,
8381 rng= Utils. default_rng (),
84- T= Float64,
8582 matrix_type= typeof (train_data))
8683 if states_type isa AbstractPaddedStates
8784 in_size = size (train_data, 1 ) + 1
8885 train_data = vcat (Adapt. adapt (matrix_type, ones (1 , size (train_data, 2 ))),
8986 train_data)
9087 end
9188
89+ T = eltype (train_data)
9290 reservoir_matrix = [reservoir[i](rng, T, res_size, res_size) for i in 1 : depth]
9391 input_matrix = [i == 1 ? input_layer[i](rng, T, res_size, in_size) :
9492 input_layer[i](rng, T, res_size, res_size) for i in 1 : depth]
0 commit comments