Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SNN-NCG
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
FOX_PUB
SNN-NCG
Commits
294f9dd5
Commit
294f9dd5
authored
2 weeks ago
by
Gaspard Goupy
Browse files
Options
Downloads
Patches
Plain Diff
Edit dataset.py
parent
5d9a06d2
Branches
master
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
spikenn/dataset.py
+2
-2
2 additions, 2 deletions
spikenn/dataset.py
with
2 additions
and
2 deletions
spikenn/dataset.py
+
2
−
2
View file @
294f9dd5
...
...
@@ -2,7 +2,7 @@ import numpy as np
# To represent a list of spikes (sparse representation)
DATA_TYPE
=
[(
'
indices
'
,
np
.
int
16
),
(
'
timestamps
'
,
np
.
float32
)]
DATA_TYPE
=
[(
'
indices
'
,
np
.
int
32
),
(
'
timestamps
'
,
np
.
float32
)]
# Iterator for SpikingDataset class
...
...
@@ -70,7 +70,7 @@ class SpikingDataset:
dataset
.
data
.
append
(
sample
)
# Map numpy labels to numpy array of integers ranging from 0 to N
numpy_labels
=
np
.
searchsorted
(
np
.
unique
(
numpy_labels
),
numpy_labels
).
astype
(
np
.
int
16
)
numpy_labels
=
np
.
searchsorted
(
np
.
unique
(
numpy_labels
),
numpy_labels
).
astype
(
np
.
int
32
)
dataset
.
labels
=
numpy_labels
dataset
.
max_time
=
max_time
...
...
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