snntoolbox.bin
¶
snntoolbox.bin.run
¶
The purpose of this module is to provide an executable for running the SNN conversion toolbox, either from terminal or using a GUI.
During installation of the toolbox, python creates an entry point to the main
function of this module. See Getting started for how call this executable.
@author: rbodo
-
snntoolbox.bin.run.
main
(filepath=None)[source]¶ Entry point for running the toolbox.
Note
There is no need to call this function directly, because python sets up an executable during Installation that can be called from terminal.
snntoolbox.bin.utils
¶
This module bundles all the tools of the SNN conversion toolbox.
Important functions:
run_pipeline |
Convert an analog network to a spiking network and simulate it. |
update_setup |
Update default settings with user settings and check they are valid. |
@author: rbodo
-
snntoolbox.bin.utils.
run_pipeline
(config, queue=None)[source]¶ Convert an analog network to a spiking network and simulate it.
- Complete pipeline of
- loading and testing a pretrained ANN,
- normalizing parameters
- converting it to SNN,
- running it on a simulator,
- given a specified hyperparameter range
params
, repeat simulations with modified parameters.
Parameters: - config (configparser.ConfigParser) – ConfigParser containing the user settings.
- queue (Optional[Queue.Queue]) – Results are added to the queue to be displayed in the GUI.
Returns: results – List of the accuracies obtained after simulating with each parameter value in config.get(‘parameter_sweep’, ‘param_values’).
Return type:
-
snntoolbox.bin.utils.
is_stop
(queue)[source]¶ Determine if the user pressed ‘stop’ in the GUI.
Parameters: queue (Queue.Queue) – Event queue. Returns: True
if user pressed ‘stop’ in GUI,False
otherwise.Return type: bool
-
snntoolbox.bin.utils.
run_parameter_sweep
(config, queue)[source]¶ Decorator to perform a parameter sweep using the
run_single
function. Need an aditional wrapping layer to be able to pass decorator arguments.
-
snntoolbox.bin.utils.
update_setup
(config_filepath)[source]¶ Update default settings with user settings and check they are valid.
Load settings from configuration file at
config_filepath
, and check that parameter choices are valid. Non-specified settings are filled in with defaults.
snntoolbox.bin.gui
¶
snntoolbox.bin.gui.gui
¶
Graphical User interface for the SNN conversion toolbox.
Features¶
- Allows setting parameters and what tools to use during an experiment.
- Performs basic checks that specified parameters are valid.
- Preferences can be saved and reloaded.
- Tooltips explain the functionality.
- Automatically recognizes result plots and allows displaying them in a separate window.
Note
Due to rapid extensions in the main toolbox, we have not always been able to update the GUI to cover all functionality of the toolbox. We are currently not maintaining the GUI and recommend using the terminal to run experiments.
@author: rbodo