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 (3)
Showing
with 48 additions and 437 deletions
CeCILL-B FREE SOFTWARE LICENSE AGREEMENT
CeCILL FREE SOFTWARE LICENSE AGREEMENT
Notice
......@@ -16,8 +15,8 @@ the two main principles guiding its drafting:
intellectual property law, and the protection that it offers to
both authors and holders of the economic rights over software.
The authors of the CeCILL-B (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre])
license are:
The authors of the CeCILL (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre])
license are:
Commissariat à l'Energie Atomique - CEA, a public scientific, technical
and industrial research establishment, having its principal place of
......@@ -35,14 +34,12 @@ principal place of business at Domaine de Voluceau, Rocquencourt, BP
Preamble
This Agreement is an open source software license intended to give users
significant freedom to modify and redistribute the software licensed
hereunder.
The purpose of this Free Software license agreement is to grant users
the right to modify and redistribute the software governed by this
license within the framework of an open source distribution model.
The exercising of this freedom is conditional upon a strong obligation
of giving credits for everybody that distributes a software
incorporating a software ruled by the current license so as all
contributions to be properly identified and acknowledged.
The exercising of these rights is conditional upon certain obligations
for users so as to preserve this status for all subsequent redistributions.
In consideration of access to the source code and the rights to copy,
modify and redistribute granted by the license, users are provided only
......@@ -116,6 +113,9 @@ spaces, with one calling the other when they are run.
Internal Module: means any or all Module, connected to the Software so
that they both execute in the same address space.
GNU GPL: means the GNU General Public License version 2 or any
subsequent version, as published by the Free Software Foundation Inc.
Parties: mean both the Licensee and the Licensor.
These expressions may be used both in singular and plural form.
......@@ -126,7 +126,7 @@ These expressions may be used both in singular and plural form.
The purpose of the Agreement is the grant by the Licensor to the
Licensee of a non-exclusive, transferable and worldwide license for the
Software as set forth in Article 5 hereinafter for the whole term of the
protection granted by the rights over said Software.
protection granted by the rights over said Software.
Article 3 - ACCEPTANCE
......@@ -235,63 +235,53 @@ complies with all the provisions of the Agreement and is accompanied by:
warranty and liability as set forth in Articles 8 and 9,
and that, in the event that only the Object Code of the Software is
redistributed, the Licensee allows effective access to the full Source
Code of the Software at a minimum during the entire period of its
distribution of the Software, it being understood that the additional
cost of acquiring the Source Code shall not exceed the cost of
transferring the data.
redistributed, the Licensee allows future Licensees unhindered access to
the full Source Code of the Software by indicating how to access it, it
being understood that the additional cost of acquiring the Source Code
shall not exceed the cost of transferring the data.
5.3.2 DISTRIBUTION OF MODIFIED SOFTWARE
If the Licensee makes any Contribution to the Software, the resulting
Modified Software may be distributed under a license agreement other
than this Agreement subject to compliance with the provisions of Article
5.3.4.
5.3.3 DISTRIBUTION OF EXTERNAL MODULES
When the Licensee has developed an External Module, the terms and
conditions of this Agreement do not apply to said External Module, that
may be distributed under a separate license agreement.
When the Licensee makes a Contribution to the Software, the terms and
conditions for the distribution of the resulting Modified Software
become subject to all the provisions of this Agreement.
5.3.4 CREDITS
The Licensee is authorized to distribute the Modified Software, in
source code or object code form, provided that said distribution
complies with all the provisions of the Agreement and is accompanied by:
Any Licensee who may distribute a Modified Software hereby expressly
agrees to:
1. a copy of the Agreement,
1. indicate in the related documentation that it is based on the
Software licensed hereunder, and reproduce the intellectual
property notice for the Software,
2. a notice relating to the limitation of both the Licensor's
warranty and liability as set forth in Articles 8 and 9,
2. ensure that written indications of the Software intended use,
intellectual property notice and license hereunder are included in
easily accessible format from the Modified Software interface,
and that, in the event that only the object code of the Modified
Software is redistributed, the Licensee allows future Licensees
unhindered access to the full source code of the Modified Software by
indicating how to access it, it being understood that the additional
cost of acquiring the source code shall not exceed the cost of
transferring the data.
3. mention, on a freely accessible website describing the Modified
Software, at least throughout the distribution term thereof, that
it is based on the Software licensed hereunder, and reproduce the
Software intellectual property notice,
4. where it is distributed to a third party that may distribute a
Modified Software without having to make its source code
available, make its best efforts to ensure that said third party
agrees to comply with the obligations set forth in this Article .
5.3.3 DISTRIBUTION OF EXTERNAL MODULES
If the Software, whether or not modified, is distributed with an
External Module designed for use in connection with the Software, the
Licensee shall submit said External Module to the foregoing obligations.
When the Licensee has developed an External Module, the terms and
conditions of this Agreement do not apply to said External Module, that
may be distributed under a separate license agreement.
5.3.5 COMPATIBILITY WITH THE CeCILL AND CeCILL-C LICENSES
5.3.4 COMPATIBILITY WITH THE GNU GPL
Where a Modified Software contains a Contribution subject to the CeCILL
license, the provisions set forth in Article 5.3.4 shall be optional.
The Licensee can include a code that is subject to the provisions of one
of the versions of the GNU GPL in the Modified or unmodified Software,
and distribute that entire code under the terms of the same version of
the GNU GPL.
A Modified Software may be distributed under the CeCILL-C license. In
such a case the provisions set forth in Article 5.3.4 shall be optional.
The Licensee can include the Modified or unmodified Software in a code
that is subject to the provisions of one of the versions of the GNU GPL,
and distribute that entire code under the terms of the same version of
the GNU GPL.
Article 6 - INTELLECTUAL PROPERTY
......@@ -404,7 +394,7 @@ rights set forth in Article 5).
9.3 The Licensee acknowledges that the Software is supplied "as is" by
the Licensor without any other express or tacit warranty, other than
that provided for in Article 9.2 and, in particular, without any warranty
as to its commercial value, its secured, safe, innovative or relevant
as to its commercial value, its secured, safe, innovative or relevant
nature.
Specifically, the Licensor does not warrant that the Software is free
......@@ -497,7 +487,7 @@ address new issues encountered by Free Software.
12.3 Any Software distributed under a given version of the Agreement may
only be subsequently distributed under the same version of the Agreement
or a subsequent version.
or a subsequent version, subject to the provisions of Article 5.3.4.
Article 13 - GOVERNING LAW AND JURISDICTION
......@@ -512,4 +502,4 @@ disagreements or disputes shall be referred to the Paris Courts having
jurisdiction, by the more diligent Party.
Version 1.0 dated 2006-09-05.
\ No newline at end of file
Version 2.0 dated 2006-09-05.
\ No newline at end of file
......@@ -69,7 +69,7 @@ For example, to get MNIST:
cd datasets
python3 get_mnist.py
python3 ../scripts/utils/generate_train_val.py mnist/ mnist/with-val/
cp mnist/*test.bin mnist/with-val/
cp mnist/*_test.bin mnist/with-val/
```
### Train and test the SNN
......
10:46:1 20/7/2023
Random seed: 0
Run start at 10:46:1 20/7/2023
Input data [28, 28, 1]
Train:
#1: MNIST(/home/ggoupy/phd/SNN-PCN/datasets/mnist//X_train.bin, /home/ggoupy/phd/SNN-PCN/datasets/mnist//y_train.bin)
Test:
DefaultOnOffFilter 1: [28, 28, 2]
Process.DefaultOnOffFilter {
center_dev: 1.000000
filter_size: 7
surround_dev: 2.000000
}
FeatureScaling 2: [28, 28, 2]
Process.FeatureScaling {
}
LatencyCoding 3: [28, 28, 2]
InputConverter.LatencyCoding {
}
Convolution 4: conv1 [24, 24, 16]
Layer.Convolution (conv1) {
annealing: 0.950000
epoch: 25
filter_height: 5
filter_number: 16
filter_width: 5
lr_th: 1.000000
min_th: 2.000000
padding_x: 0
padding_y: 0
stdp: STDP.Multiplicative {
am: 0.100000
ap: 0.100000
beta: 1.000000
}
stride_x: 1
stride_y: 1
t_obj: 0.750000
th: 5.000000 [16]
w: Gaussian(mean: 0.500000, dev: 0.010000) [5, 5, 2, 16]
wta_infer: 0
}
Pooling 5: pool1 [6, 6, 16]
Layer.Pooling (pool1) {
filter_height: 4
filter_number: 16
filter_width: 4
padding_x: 0
padding_y: 0
stride_x: 4
stride_y: 4
}
Output 1 of conv1 [24, 24, 16]: train-conv1
OutputConverter.DefaultOutput {
max: 1.000000
min: 0.000000
}
Output 1, Analysis: 1
Analysis.Coherence {
}
Output 2 of pool1 [6, 6, 16]: train-pool1
OutputConverter.DefaultOutput {
max: 1.000000
min: 0.000000
}
Output 2, Analysis: 1
Analysis.Activity {
}
Output 3 of pool1 [6, 6, 16]: train-pool1
OutputConverter.SpikeTiming {
}
Output 3, Analysis: 1
Analysis.SaveFeatureNumpy {
}
Load 60000 train samples from MNIST(/home/ggoupy/phd/SNN-PCN/datasets/mnist//X_train.bin, /home/ggoupy/phd/SNN-PCN/datasets/mnist//y_train.bin)
Save trained parameters at /home/ggoupy/phd/SNN-PCN/scripts/tmp//csnn//model//Process.FeatureScaling/
train-conv1, analysis Coherence:
===Coherence===
Mean weights: 0.245774
------
N: 120
Min: 0.00311696
Q1: 0.0992967
Q2: 0.276067
Q3: 0.465661
Max: 0.870946
Save trained parameters at /home/ggoupy/phd/SNN-PCN/scripts/tmp//csnn//model//Layer.Convolution.conv1/
train-pool1, analysis Activity:
===Activity===
* train set:
Sparsity: 0.439407
Active unit: 53.5977%
Quiet: 0%
train-pool1, analysis SaveFeatureNumpy:
Run end at 10:46:35 20/7/2023
Duration: 0h 0m 34s
File deleted
File deleted
File deleted
File deleted
{
"dataset": "MNIST",
"to_grayscale": false,
"feature_scaling": true,
"dog": [
7,
1,
2
],
"conv1_epochs": 25,
"conv1_c": 16,
"conv1_k": 5,
"conv1_w_init_mean": 0.5,
"conv1_w_init_std": 0.01,
"conv1_t_obj": 0.75,
"conv1_th": 5,
"conv1_min_th": 2,
"conv1_lr_th": 1,
"conv1_stdp": "multiplicative",
"conv1_stdp_t": 0.1,
"conv1_stdp_b": 1,
"conv1_stdp_lr": 0.1,
"conv1_annealing": 0.95,
"conv1_wta_infer": false,
"pool1_size": 4,
"use_sparse": true,
"seed": 0
}
\ No newline at end of file
File deleted
10:48:52 20/7/2023
Random seed: 0
Run start at 10:48:52 20/7/2023
Input data [28, 28, 1]
Train:
#1: MNIST(/home/ggoupy/phd/SNN-PCN/datasets/mnist/with-val//X_train.bin, /home/ggoupy/phd/SNN-PCN/datasets/mnist/with-val//y_train.bin)
Test:
DefaultOnOffFilter 1: [28, 28, 2]
Process.DefaultOnOffFilter {
center_dev: 1.000000
filter_size: 7
surround_dev: 2.000000
}
FeatureScaling 2: [28, 28, 2]
Process.FeatureScaling {
}
LatencyCoding 3: [28, 28, 2]
InputConverter.LatencyCoding {
}
Convolution 4: conv1 [24, 24, 16]
Layer.Convolution (conv1) {
annealing: 0.950000
epoch: 25
filter_height: 5
filter_number: 16
filter_width: 5
lr_th: 1.000000
min_th: 2.000000
padding_x: 0
padding_y: 0
stdp: STDP.Multiplicative {
am: 0.100000
ap: 0.100000
beta: 1.000000
}
stride_x: 1
stride_y: 1
t_obj: 0.750000
th: 5.000000 [16]
w: Gaussian(mean: 0.500000, dev: 0.010000) [5, 5, 2, 16]
wta_infer: 0
}
Pooling 5: pool1 [6, 6, 16]
Layer.Pooling (pool1) {
filter_height: 4
filter_number: 16
filter_width: 4
padding_x: 0
padding_y: 0
stride_x: 4
stride_y: 4
}
Output 1 of conv1 [24, 24, 16]: train-conv1
OutputConverter.DefaultOutput {
max: 1.000000
min: 0.000000
}
Output 1, Analysis: 1
Analysis.Coherence {
}
Output 2 of pool1 [6, 6, 16]: train-pool1
OutputConverter.DefaultOutput {
max: 1.000000
min: 0.000000
}
Output 2, Analysis: 1
Analysis.Activity {
}
Output 3 of pool1 [6, 6, 16]: train-pool1
OutputConverter.SpikeTiming {
}
Output 3, Analysis: 1
Analysis.SaveFeatureNumpy {
}
Load 54000 train samples from MNIST(/home/ggoupy/phd/SNN-PCN/datasets/mnist/with-val//X_train.bin, /home/ggoupy/phd/SNN-PCN/datasets/mnist/with-val//y_train.bin)
Save trained parameters at /home/ggoupy/phd/SNN-PCN/scripts/tmp2//csnn//model//Process.FeatureScaling/
train-conv1, analysis Coherence:
===Coherence===
Mean weights: 0.248656
------
N: 120
Min: 0.000932025
Q1: 0.0853569
Q2: 0.307391
Q3: 0.466387
Max: 0.822632
Save trained parameters at /home/ggoupy/phd/SNN-PCN/scripts/tmp2//csnn//model//Layer.Convolution.conv1/
train-pool1, analysis Activity:
===Activity===
* train set:
Sparsity: 0.47984
Active unit: 48.2265%
Quiet: 0%
train-pool1, analysis SaveFeatureNumpy:
Run end at 10:49:21 20/7/2023
Duration: 0h 0m 29s
File deleted
File deleted
File deleted
File deleted
{
"dataset": "MNIST",
"to_grayscale": false,
"feature_scaling": true,
"dog": [
7,
1,
2
],
"conv1_epochs": 25,
"conv1_c": 16,
"conv1_k": 5,
"conv1_w_init_mean": 0.5,
"conv1_w_init_std": 0.01,
"conv1_t_obj": 0.75,
"conv1_th": 5,
"conv1_min_th": 2,
"conv1_lr_th": 1,
"conv1_stdp": "multiplicative",
"conv1_stdp_t": 0.1,
"conv1_stdp_b": 1,
"conv1_stdp_lr": 0.1,
"conv1_annealing": 0.95,
"conv1_wta_infer": false,
"pool1_size": 4,
"use_sparse": true,
"seed": 0
}
\ No newline at end of file
File deleted
File deleted
File deleted
Training start : 2023-07-20 10:49:32.446457
Parameters :
{'n_neurons': 20, 'firing_threshold': 60, 'leak_tau': None, 'decision_making': 'single', 'w_min': 0, 'w_max': 1, 'w_normal_init': True, 'w_init_mean': 0.5, 'w_init_std': 0.01, 'normalize_weights': True, 'w_mean_norm': 0.3, 'seed': 0, 'max_time': 1, 'n_epochs': 100, 'training_method': 'sstdp', 'loss_type': 'mean', 't_gap': 0.02, 'adjust_t_gap': True, 'loss_bounds': False, 'class_wta': True, 'early_stopping': True, 'early_stop_patience': 10, 'early_stop_tuning_acc': None, 'stdp_type': 'multiplicative', 'stdp_soft_bound': False, 'stdp_ignore_silent': False, 'stdp_ap': 0.001, 'stdp_am': -0.1, 'stdp_anti_ap': -0.001, 'stdp_anti_am': 0.1, 'stdp_ltp_win': 1, 'stdp_ltd_win': 1, 'stdp_ltp_offset': 0, 'stdp_b': 1, 'modulate_lr_perf': False, 'lr_annealing': 0.98, 'dropout_in': 0, 'dropout_out': 0, 'full_logs': True}
Mean weights : 0.29980000853538513+-0.0723000019788742 (min:0.0 ; max:0.9980000257492065)
First spk:0.8901518909732501 ; Mean spks:0.9090196490287781+-0.05492551624774933 ; Unique spks:7.133055555555556
Abs error: 0.0032511032047349547
Accuracy on training set after epoch 0: 0.9326
Accuracy on validation set after epoch 0: 0.9518
Accuracy on test set after epoch 0: 0.9553
Mean weights : 0.29980000853538513+-0.09099999815225601 (min:0.0 ; max:0.9929999709129333)
First spk:0.876227005738903 ; Mean spks:0.899161159992218+-0.0530686192214489 ; Unique spks:8.319333333333333
Abs error: 0.0025223157532861234
Accuracy on training set after epoch 1: 0.9578
Accuracy on validation set after epoch 1: 0.9618
Accuracy on test set after epoch 1: 0.9652
Mean weights : 0.29980000853538513+-0.10140000283718109 (min:0.0 ; max:0.9879999756813049)
First spk:0.8714953058306818 ; Mean spks:0.8944270610809326+-0.052035242319107056 ; Unique spks:8.431666666666667
Abs error: 0.002029718874710484
Accuracy on training set after epoch 2: 0.9645
Accuracy on validation set after epoch 2: 0.9658
Accuracy on test set after epoch 2: 0.9672
Mean weights : 0.29980000853538513+-0.10840000212192535 (min:0.0010000000474974513 ; max:0.9940000176429749)
First spk:0.8688277496695519 ; Mean spks:0.8917882442474365+-0.05144016817212105 ; Unique spks:8.470740740740741
Abs error: 0.0018557841141468624
Accuracy on training set after epoch 3: 0.9675
Accuracy on validation set after epoch 3: 0.9667
Accuracy on test set after epoch 3: 0.9687
Mean weights : 0.29980000853538513+-0.1136000007390976 (min:0.0 ; max:0.9959999918937683)
First spk:0.8670560026102596 ; Mean spks:0.8900707960128784+-0.051097769290208817 ; Unique spks:8.486037037037036
Abs error: 0.0017691601411003398
Accuracy on training set after epoch 4: 0.9689
Accuracy on validation set after epoch 4: 0.9667
Accuracy on test set after epoch 4: 0.9688
Mean weights : 0.29980000853538513+-0.11749999970197678 (min:0.0010000000474974513 ; max:0.9909999966621399)
First spk:0.86569960979731 ; Mean spks:0.888793408870697+-0.050875529646873474 ; Unique spks:8.46587037037037
Abs error: 0.0017145750640284927
Accuracy on training set after epoch 5: 0.9696
Accuracy on validation set after epoch 5: 0.9673
Accuracy on test set after epoch 5: 0.9697
Mean weights : 0.29980000853538513+-0.12049999833106995 (min:0.0 ; max:0.9909999966621399)
First spk:0.8647167684104707 ; Mean spks:0.8878604173660278+-0.05077669024467468 ; Unique spks:8.465703703703703
Abs error: 0.0016816720181074332
Accuracy on training set after epoch 6: 0.9704
Accuracy on validation set after epoch 6: 0.9678
Accuracy on test set after epoch 6: 0.9704
Mean weights : 0.29980000853538513+-0.12300000339746475 (min:0.0 ; max:0.9909999966621399)
First spk:0.8639137146605386 ; Mean spks:0.8871123194694519+-0.050733532756567 ; Unique spks:8.458462962962964
Abs error: 0.0016646266230790968
Accuracy on training set after epoch 7: 0.9706
Accuracy on validation set after epoch 7: 0.9673
Accuracy on test set after epoch 7: 0.9705
Mean weights : 0.29980000853538513+-0.12520000338554382 (min:0.0 ; max:0.9950000047683716)
First spk:0.8632216123298363 ; Mean spks:0.8864855170249939+-0.050713956356048584 ; Unique spks:8.464314814814815
Abs error: 0.001651047839176684
Accuracy on training set after epoch 8: 0.9714
Accuracy on validation set after epoch 8: 0.9683
Accuracy on test set after epoch 8: 0.9705
Mean weights : 0.29980000853538513+-0.12720000743865967 (min:0.0 ; max:0.9940000176429749)
First spk:0.8626228035555945 ; Mean spks:0.8859443664550781+-0.05071594938635826 ; Unique spks:8.466203703703703
Abs error: 0.0016459656954708498
Accuracy on training set after epoch 9: 0.9716
Accuracy on validation set after epoch 9: 0.9672
Accuracy on test set after epoch 9: 0.9706
Mean weights : 0.29980000853538513+-0.1290999948978424 (min:0.0010000000474974513 ; max:0.9909999966621399)
First spk:0.8620755980202446 ; Mean spks:0.8854557871818542+-0.050730105489492416 ; Unique spks:8.473944444444445
Abs error: 0.0016363852087103307
Accuracy on training set after epoch 10: 0.9718
Accuracy on validation set after epoch 10: 0.9667
Accuracy on test set after epoch 10: 0.9708
Mean weights : 0.29980000853538513+-0.1307000070810318 (min:0.0 ; max:0.9929999709129333)
First spk:0.8615775177633321 ; Mean spks:0.8850138783454895+-0.05075480788946152 ; Unique spks:8.46787037037037
Abs error: 0.0016258562030193903
Accuracy on training set after epoch 11: 0.972
Accuracy on validation set after epoch 11: 0.9673
Accuracy on test set after epoch 11: 0.9714
Mean weights : 0.29980000853538513+-0.13220000267028809 (min:0.0 ; max:0.9909999966621399)
First spk:0.8611204042832057 ; Mean spks:0.884613037109375+-0.050783831626176834 ; Unique spks:8.480037037037038
Abs error: 0.0016202781597563394
Accuracy on training set after epoch 12: 0.9723
Accuracy on validation set after epoch 12: 0.9672
Accuracy on test set after epoch 12: 0.9719
Mean weights : 0.29980000853538513+-0.13369999825954437 (min:0.0 ; max:0.9909999966621399)
First spk:0.860683818048901 ; Mean spks:0.8842380046844482+-0.05081281065940857 ; Unique spks:8.479962962962963
Abs error: 0.0016112652775561425
Accuracy on training set after epoch 13: 0.9724
Accuracy on validation set after epoch 13: 0.9672
Accuracy on test set after epoch 13: 0.9718
Mean weights : 0.29980000853538513+-0.13500000536441803 (min:0.0 ; max:0.9919999837875366)
First spk:0.860268470119547 ; Mean spks:0.8838828802108765+-0.05084911361336708 ; Unique spks:8.487351851851852
Abs error: 0.0016054101923336397
Accuracy on training set after epoch 14: 0.9728
Accuracy on validation set after epoch 14: 0.9677
Accuracy on test set after epoch 14: 0.9713
Mean weights : 0.29980000853538513+-0.13619999587535858 (min:0.0 ; max:0.9919999837875366)
First spk:0.8598991990497818 ; Mean spks:0.8835610747337341+-0.05088621750473976 ; Unique spks:8.483185185185185
Abs error: 0.001595237087203618
Accuracy on training set after epoch 15: 0.973
Accuracy on validation set after epoch 15: 0.9675
Accuracy on test set after epoch 15: 0.9709