This file contains instructions for evaluation of LSM kernel quality presented in the paper for models:
Model liquid kernel quality was calculated from metrics:
- SP: linear separation of liquid
- AP: generalization of liquid
which was done for both MNIST and N-MNIST datasets. To compute SP and AP metrics, first noisy spike counts must be generated for the AP metric, as follows.
To generate noisy spike counts for NALSM model on MNIST, enter the following command:
python NALSM_RUN_MAIN_SIM_MNIST_NOISE.py
The run file requires a W_INI.wdata
file (the initialized weights), which should have been generated during model training.
The run file will prompt for the following inputs:
GPU?
: enter an integer to select the gpu for the training simulation.VERSION? [int]
: enter the version number of the trained model.NET_NUM_VAR? [int]
: enter the network number of the trained model.BATCH_SIZE? [int]
: use the same value used for training the model.BATCHS_PER_BLOCK? [int]
: use the same value used for training the model.
The run file will generate all output in sub-directory <Dir>/<Project Name>/train_data/ver_XX/
where XX
is VERSION number.
To generate noisy spike counts for NALSM model on N-MNIST, enter the following command:
python NALSM_RUN_MAIN_SIM_N_MNIST_NOISE.py
As above, the run file requires 'W_INI.wdata' file. All input prompts and output are the same as in Section 1.1.
To generate noisy spike counts for LSM+STDP model on MNIST, enter the following command:
python LSM_STDP_RUN_MAIN_SIM_MNIST_NOISE.py
The run file requires a W_INI.wdata
file. All input prompts and output are the same as in Section 1.1.
To generate noisy spike counts for LSM+STDP model on N-MNIST, enter the following command:
python LSM_STDP_RUN_MAIN_SIM_N_MNIST_NOISE.py
As above, the run file requires W_INI.wdata
file. All input prompts and output are the same as in Section 1.1.
To generate noisy spike counts for LSM model on MNIST, enter the following command:
python LSM_RUN_MAIN_SIM_MNIST_NOISE.py
The run file requires a W_INI.wdata
file. All input prompts and output are the same as in Section 1.1, except for input prompts:
INTIAL_ABS_W_SCLR? [float]
: use the same value used for training the model.
To generate noisy spike counts for LSM model on N-MNIST, enter the following command:
python LSM_RUN_MAIN_SIM_N_MNIST_NOISE.py
All input prompts and output are the same as in Section 1.1.
To generate noisy spike counts for LSM+AP_STDP model on MNIST, enter the following command:
python LSM_APSTDP_STDP_RUN_MAIN_SIM_MNIST_NOISE.py
All input prompts and output are the same as in Section 1.1.
To generate noisy spike counts for LSM+AP-STDP model on N-MNIST, enter the following command:
python LSM_APSTDP_RUN_MAIN_SIM_N_MNIST_NOISE.py
All input prompts and output are the same as in Section 1.1.
After generating the noisy spike counts, to compute the SP and AP metrics for each trained model enter the following command:
python compute_SP_AP_kernel_quality_measures.py
The run file will prompt for inputs:
VERSION? [int]
: enter the version number of the trained model.DATASET_MODEL_WAS_TRAINED_ON? [TYPE M FOR MNIST/ N FOR NMNIST]
: enter the dataset the model was trained on. The run file will print out the SP and AP metrics.