Skip to content

LSM Utilities

Utilities specific to Liquid State Machines

Types

Name Description
SelectionMode Defines the selection mode for the random sampling.
networkBuilder Generates reservoir connectivity, weights, and metadata for the LSM.

Functions

Name Description
loadLSM Loads six Thrust device vectors from a binary configuration file.
mapInputToLSM Maps input channels to reservoir neurons using random selection.
saveLSM Saves six Thrust device vectors to a binary configuration file.

Function Details

loadLSM

bool loadLSM( string fileName, thrust::device_vector<float>& ILSM_Xpre, thrust::device_vector<float>& ILSM_Xpost, thrust::device_vector<float>& ILSM_W, thrust::device_vector<float>& LSM_Xpre, thrust::device_vector<float>& LSM_Xpost, thrust::device_vector<float>& LSM_W )

Loads six Thrust device vectors from a binary configuration file.

fileName
The path to the file.
ILSM_Xpre
Output vector 1 (modified by reference).
ILSM_Xpost
Output vector 2 (modified by reference).
ILSM_W
Output vector 3 (modified by reference).
LSM_Xpre
Output vector 4 (modified by reference).
LSM_Xpost
Output vector 5 (modified by reference).
LSM_W
Output vector 6 (modified by reference).
Return
true if successful, false otherwise.

mapInputToLSM

bool mapInputToLSM( int iN, const std::vector<int>& indices_h, SelectionMode mode, thrust::device_vector<int>& X_d, thrust::device_vector<int>& Xn_d)

Maps input channels to reservoir neurons using random selection.

iN
Number of input connections to generate.
indices_h
Host vector of candidate neuron indices.
mode
SelectionMode specifying replacement behavior.
X_d
Output presynaptic indices (0..iN-1).
Xn_d
Output postsynaptic indices sampled from indices_h.
Return
true on success, false when constraints are violated.

saveLSM

bool saveLSM( string fileName, thrust::device_vector<float> ILSM_Xpre, thrust::device_vector<float> ILSM_Xpost, thrust::device_vector<float> ILSM_W, thrust::device_vector<float> LSM_Xpre, thrust::device_vector<float> LSM_Xpost, thrust::device_vector<float> LSM_W )

Saves six Thrust device vectors to a binary configuration file.

fileName
The path to the file.
ILSM_Xpre
Input vector 1.
ILSM_Xpost
Input vector 2.
ILSM_W
Input vector 3.
LSM_Xpre
Input vector 4.
LSM_Xpost
Input vector 5.
LSM_W
Input vector 6.
Return
true if successful, false otherwise.