Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Progressive Layer-based Compression for Convolutional Spiking Neural Network
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hammouda Elbez
Progressive Layer-based Compression for Convolutional Spiking Neural Network
Commits
11c03e78
Commit
11c03e78
authored
2 years ago
by
Hammouda Elbez
Browse files
Options
Downloads
Patches
Plain Diff
Updated parameters
parent
acb7e5fc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CSNN-Simulator/apps/FMnist.cpp
+8
-8
8 additions, 8 deletions
CSNN-Simulator/apps/FMnist.cpp
CSNN-Simulator/apps/Mnist.cpp
+4
-4
4 additions, 4 deletions
CSNN-Simulator/apps/Mnist.cpp
CSNN-Simulator/src/Experiment.cpp
+1
-1
1 addition, 1 deletion
CSNN-Simulator/src/Experiment.cpp
with
13 additions
and
13 deletions
CSNN-Simulator/apps/FMnist.cpp
+
8
−
8
View file @
11c03e78
...
...
@@ -41,8 +41,8 @@ int main(int argc, char** argv) {
std
::
string
input_path
(
input_path_ptr
);
experiment
.
template
add_train
<
dataset
::
FMnist
>(
input_path
+
"train-images-idx3-ubyte"
,
input_path
+
"train-labels-idx1-ubyte"
,
1000
);
experiment
.
template
add_test
<
dataset
::
FMnist
>(
input_path
+
"t10k-images-idx3-ubyte"
,
input_path
+
"t10k-labels-idx1-ubyte"
,
1000
);
experiment
.
template
add_train
<
dataset
::
FMnist
>(
input_path
+
"train-images-idx3-ubyte"
,
input_path
+
"train-labels-idx1-ubyte"
);
experiment
.
template
add_test
<
dataset
::
FMnist
>(
input_path
+
"t10k-images-idx3-ubyte"
,
input_path
+
"t10k-labels-idx1-ubyte"
);
float
th_lr
=
0.0
f
;
float
t_obj
=
0.75
;
...
...
@@ -51,14 +51,14 @@ int main(int argc, char** argv) {
auto
&
conv1
=
experiment
.
template
push_layer
<
layer
::
Convolution
>(
"conv1"
,
5
,
5
,
32
);
conv1
.
template
parameter
<
float
>(
"annealing"
).
set
(
0.95
f
);
conv1
.
template
parameter
<
float
>(
"min_th"
).
set
(
4
.0
f
);
conv1
.
template
parameter
<
float
>(
"min_th"
).
set
(
1
.0
f
);
conv1
.
template
parameter
<
float
>(
"t_obj"
).
set
(
t_obj
);
conv1
.
template
parameter
<
float
>(
"lr_th"
).
set
(
th_lr
);
conv1
.
template
parameter
<
float
>(
"alpha"
).
set
(
alpha
);
conv1
.
template
parameter
<
float
>(
"doPrune"
).
set
(
do_prune
);
conv1
.
template
parameter
<
float
>(
"doReinforcement"
).
set
(
do_reinforcement
);
conv1
.
template
parameter
<
Tensor
<
float
>
>
(
"w"
).
template
distribution
<
distribution
::
Uniform
>(
0.0
,
1.0
);
conv1
.
template
parameter
<
Tensor
<
float
>
>
(
"th"
).
template
distribution
<
distribution
::
Gaussian
>(
5
.0
,
0.1
);
conv1
.
template
parameter
<
Tensor
<
float
>
>
(
"th"
).
template
distribution
<
distribution
::
Gaussian
>(
8
.0
,
0.1
);
conv1
.
template
parameter
<
STDP
>(
"stdp"
).
template
set
<
stdp
::
Biological
>(
w_lr
,
0.1
f
);
experiment
.
template
push_layer
<
layer
::
Pooling
>(
"pool1"
,
2
,
2
,
2
,
2
);
...
...
@@ -69,7 +69,7 @@ int main(int argc, char** argv) {
auto
&
conv2
=
experiment
.
template
push_layer
<
layer
::
Convolution
>(
"conv2"
,
5
,
5
,
128
);
conv2
.
template
parameter
<
float
>(
"annealing"
).
set
(
0.95
f
);
conv2
.
template
parameter
<
float
>(
"min_th"
).
set
(
1.0
f
);
conv2
.
template
parameter
<
float
>(
"t_obj"
).
set
(
0.60
f
);
conv2
.
template
parameter
<
float
>(
"t_obj"
).
set
(
t_obj
);
conv2
.
template
parameter
<
float
>(
"lr_th"
).
set
(
th_lr
);
conv2
.
template
parameter
<
float
>(
"alpha"
).
set
(
alpha
);
conv2
.
template
parameter
<
float
>(
"doPrune"
).
set
(
do_prune
);
...
...
@@ -95,9 +95,9 @@ int main(int argc, char** argv) {
fc1
.
template
parameter
<
Tensor
<
float
>
>
(
"th"
).
template
distribution
<
distribution
::
Gaussian
>(
10.0
,
0.1
);
fc1
.
template
parameter
<
STDP
>(
"stdp"
).
template
set
<
stdp
::
Biological
>(
w_lr
,
0.1
f
);
experiment
.
add_train_step
(
conv1
,
100
);
experiment
.
add_train_step
(
conv2
,
100
);
experiment
.
add_train_step
(
fc1
,
100
);
experiment
.
add_train_step
(
conv1
,
5
);
experiment
.
add_train_step
(
conv2
,
5
);
experiment
.
add_train_step
(
fc1
,
5
);
auto
&
conv1_out
=
experiment
.
template
output
<
TimeObjectiveOutput
>(
conv1
,
t_obj
);
conv1_out
.
template
add_postprocessing
<
process
::
SumPooling
>(
2
,
2
);
...
...
This diff is collapsed.
Click to expand it.
CSNN-Simulator/apps/Mnist.cpp
+
4
−
4
View file @
11c03e78
...
...
@@ -45,7 +45,7 @@ int main(int argc, char** argv) {
experiment
.
template
add_test
<
dataset
::
Mnist
>(
input_path
+
"t10k-images.idx3-ubyte"
,
input_path
+
"t10k-labels.idx1-ubyte"
);
float
th_lr
=
1.0
f
;
float
t_obj
=
0.5
0
f
;
float
t_obj
=
0.
7
5
f
;
float
w_lr
=
0.1
f
;
float
alpha
=
0.05
f
;
...
...
@@ -95,9 +95,9 @@ int main(int argc, char** argv) {
fc1
.
template
parameter
<
Tensor
<
float
>
>
(
"th"
).
template
distribution
<
distribution
::
Gaussian
>(
10.0
,
0.1
);
fc1
.
template
parameter
<
STDP
>(
"stdp"
).
template
set
<
stdp
::
Biological
>(
w_lr
,
0.1
f
);
experiment
.
add_train_step
(
conv1
,
100
);
experiment
.
add_train_step
(
conv2
,
100
);
experiment
.
add_train_step
(
fc1
,
100
);
experiment
.
add_train_step
(
conv1
,
5
);
experiment
.
add_train_step
(
conv2
,
5
);
experiment
.
add_train_step
(
fc1
,
5
);
auto
&
conv1_out
=
experiment
.
template
output
<
TimeObjectiveOutput
>(
conv1
,
t_obj
);
conv1_out
.
template
add_postprocessing
<
process
::
SumPooling
>(
2
,
2
);
...
...
This diff is collapsed.
Click to expand it.
CSNN-Simulator/src/Experiment.cpp
+
1
−
1
View file @
11c03e78
...
...
@@ -36,7 +36,7 @@ AbstractExperiment::AbstractExperiment(const std::string& name) :
std
::
cout
<<
"Experiment renamed in "
<<
_name
<<
std
::
endl
;
}
_isRandom
=
""
;
_isRandom
=
"
MY_5IM
"
;
std
::
seed_seq
seed
(
std
::
begin
(
_name
),
std
::
end
(
_name
));
_random_generator
.
seed
(
seed
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment