Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • master
1 result

Target

Select target project
  • fox/snn-pcn
1 result
Select Git revision
  • master
1 result
Show changes
Commits on Source (2)
......@@ -87,9 +87,9 @@ python3 run.py <INPUT_DIR> <OUTPUT_DIR> <CONFIG_CSNN> <CONFIG_READOUT> [--seed=0
```
The configuration files are in JSON format. Examples are provided in `scripts/config/`.
For example, to train and test the SNN on MNIST:
For example, to train the SNN on MNIST with `S2-STDP+PCN`:
```
python3 run.py ../datasets/mnist/with-val/ logs/mnist/example/ config/MNIST/csnn-3/csnn.json config/MNIST/csnn-3/sstdp.json
python3 run.py ../datasets/mnist/with-val/ logs/mnist/example/ config/MNIST/csnn-128/csnn.json config/MNIST/csnn-128/pcn-s2stdp.json
```
### Run the Readout only
......
......@@ -69,4 +69,7 @@ if __name__ == "__main__":
if os.path.isdir(output_dir): raise RuntimeError("Output directory already exists. Aborting...")
# Start run: vroum vroum
run(input_dir, config_path_csnn, config_path_readout, output_dir, args.seed)
\ No newline at end of file
try:
run(input_dir, config_path_csnn, config_path_readout, output_dir, args.seed)
except Exception as e:
print("RUNNING ERROR:\n", e.output)
\ No newline at end of file