sinabs 3.0.4.dev25__py3-none-any.whl → 3.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. sinabs/activation/reset_mechanism.py +3 -3
  2. sinabs/activation/surrogate_gradient_fn.py +4 -4
  3. sinabs/backend/dynapcnn/__init__.py +5 -4
  4. sinabs/backend/dynapcnn/chip_factory.py +33 -61
  5. sinabs/backend/dynapcnn/chips/dynapcnn.py +182 -86
  6. sinabs/backend/dynapcnn/chips/speck2e.py +6 -5
  7. sinabs/backend/dynapcnn/chips/speck2f.py +6 -5
  8. sinabs/backend/dynapcnn/config_builder.py +39 -59
  9. sinabs/backend/dynapcnn/connectivity_specs.py +48 -0
  10. sinabs/backend/dynapcnn/discretize.py +91 -155
  11. sinabs/backend/dynapcnn/dvs_layer.py +59 -101
  12. sinabs/backend/dynapcnn/dynapcnn_layer.py +185 -119
  13. sinabs/backend/dynapcnn/dynapcnn_layer_utils.py +335 -0
  14. sinabs/backend/dynapcnn/dynapcnn_network.py +602 -325
  15. sinabs/backend/dynapcnn/dynapcnnnetwork_module.py +370 -0
  16. sinabs/backend/dynapcnn/exceptions.py +122 -3
  17. sinabs/backend/dynapcnn/io.py +55 -92
  18. sinabs/backend/dynapcnn/mapping.py +111 -75
  19. sinabs/backend/dynapcnn/nir_graph_extractor.py +877 -0
  20. sinabs/backend/dynapcnn/sinabs_edges_handler.py +1024 -0
  21. sinabs/backend/dynapcnn/utils.py +214 -459
  22. sinabs/backend/dynapcnn/weight_rescaling_methods.py +53 -0
  23. sinabs/conversion.py +2 -2
  24. sinabs/from_torch.py +23 -1
  25. sinabs/hooks.py +38 -41
  26. sinabs/layers/alif.py +16 -16
  27. sinabs/layers/crop2d.py +2 -2
  28. sinabs/layers/exp_leak.py +1 -1
  29. sinabs/layers/iaf.py +11 -11
  30. sinabs/layers/lif.py +9 -9
  31. sinabs/layers/neuromorphic_relu.py +9 -8
  32. sinabs/layers/pool2d.py +5 -5
  33. sinabs/layers/quantize.py +1 -1
  34. sinabs/layers/stateful_layer.py +10 -7
  35. sinabs/layers/to_spike.py +9 -9
  36. sinabs/network.py +14 -12
  37. sinabs/nir.py +4 -3
  38. sinabs/synopcounter.py +10 -7
  39. sinabs/utils.py +155 -7
  40. sinabs/validate_memory_speck.py +0 -5
  41. {sinabs-3.0.4.dev25.dist-info → sinabs-3.1.1.dist-info}/METADATA +3 -2
  42. sinabs-3.1.1.dist-info/RECORD +65 -0
  43. {sinabs-3.0.4.dev25.dist-info → sinabs-3.1.1.dist-info}/licenses/AUTHORS +1 -0
  44. sinabs-3.1.1.dist-info/pbr.json +1 -0
  45. sinabs-3.0.4.dev25.dist-info/RECORD +0 -59
  46. sinabs-3.0.4.dev25.dist-info/pbr.json +0 -1
  47. {sinabs-3.0.4.dev25.dist-info → sinabs-3.1.1.dist-info}/WHEEL +0 -0
  48. {sinabs-3.0.4.dev25.dist-info → sinabs-3.1.1.dist-info}/licenses/LICENSE +0 -0
  49. {sinabs-3.0.4.dev25.dist-info → sinabs-3.1.1.dist-info}/top_level.txt +0 -0
sinabs/network.py CHANGED
@@ -4,6 +4,8 @@ from typing import Dict, List, Optional, Tuple, Union
4
4
  import numpy as np
5
5
  import torch
6
6
  import torch.nn as nn
7
+ import pylab
8
+
7
9
 
8
10
  from .layers import StatefulLayer
9
11
  from .synopcounter import SNNAnalyzer
@@ -136,8 +138,6 @@ class Network(torch.nn.Module):
136
138
  - ann_activity: output activity of the ann layers
137
139
  - snn_activity: output activity of the snn layers
138
140
  """
139
- import pylab
140
-
141
141
  analog_activations, spike_rates, name_list = self.compare_activations(
142
142
  data, name_list=name_list, compute_rate=compute_rate
143
143
  )
@@ -162,16 +162,18 @@ class Network(torch.nn.Module):
162
162
  ):
163
163
  """Reset all neuron states in the submodules.
164
164
 
165
- Parameters
166
- ----------
167
- randomize: Bool
168
- If true, reset the states between a range provided. Else, the states are reset to zero.
169
- value_ranges: Optional[List[Dict[str, Tuple[float, float]]]]
170
- A list of value_range dictionaries with the same length as the total stateful layers in the module.
171
- Each dictionary is a key value pair: buffer_name -> (min, max) for each state that needs to be reset.
172
- The states are reset with a uniform distribution between the min and max values specified.
173
- Any state with an undefined key in this dictionary will be reset between 0 and 1
174
- This parameter is only used if randomize is set to true.
165
+ Args:
166
+ randomize (bool): If true, reset the states between a range
167
+ provided. Else, the states are reset to zero.
168
+ value_ranges (Optional[List[Dict[str, Tuple[float, float]]]]): A
169
+ list of value_range dictionaries with the same length as the
170
+ total stateful layers in the module. Each dictionary is a key
171
+ value pair: buffer_name -> (min, max) for each state that needs
172
+ to be reset.
173
+ The states are reset with a uniform distribution between the min
174
+ and max values specified. Any state with an undefined key in
175
+ this dictionary will be reset between 0 and 1.
176
+ This parameter is only used if randomize is set to true.
175
177
  """
176
178
 
177
179
  if value_ranges:
sinabs/nir.py CHANGED
@@ -46,8 +46,8 @@ def _import_sinabs_module(
46
46
  groups=node.groups,
47
47
  bias=True,
48
48
  )
49
- conv.weight.data = torch.tensor(node.weight).float()
50
- conv.bias.data = torch.tensor(node.bias).float()
49
+ conv.weight.data = node.weight.detach().clone().to(float)
50
+ conv.bias.data = node.bias.detach().clone().to(float)
51
51
  return conv
52
52
 
53
53
  elif isinstance(node, nir.Conv2d):
@@ -184,6 +184,7 @@ def _extract_sinabs_module(module: torch.nn.Module) -> Optional[nir.NIRNode]:
184
184
  return nir.Affine(module.weight.detach(), module.bias.detach())
185
185
  elif isinstance(module, torch.nn.Conv1d):
186
186
  return nir.Conv1d(
187
+ input_shape=None,
187
188
  weight=module.weight.detach(),
188
189
  stride=module.stride,
189
190
  padding=module.padding,
@@ -191,7 +192,7 @@ def _extract_sinabs_module(module: torch.nn.Module) -> Optional[nir.NIRNode]:
191
192
  groups=module.groups,
192
193
  bias=(
193
194
  module.bias.detach()
194
- if module.bias
195
+ if isinstance(module.bias, torch.Tensor)
195
196
  else torch.zeros((module.weight.shape[0]))
196
197
  ),
197
198
  )
sinabs/synopcounter.py CHANGED
@@ -90,7 +90,7 @@ class SNNAnalyzer:
90
90
  can therefore calculate the number of synaptic operations accurately for each layer by
91
91
  multiplying the respective connection map with the output.
92
92
 
93
- Parameters:
93
+ Args:
94
94
  model: Your PyTorch model.
95
95
  dt: the number of milliseconds corresponding to a time step in the simulation (default 1.0).
96
96
 
@@ -151,8 +151,9 @@ class SNNAnalyzer:
151
151
  def get_layer_statistics(self, average: bool = False) -> dict:
152
152
  """Outputs a dictionary with statistics for each individual layer.
153
153
 
154
- Parameters:
155
- average (bool): The statistics such as firing rate per neuron, the number of neurons or synops are averaged across batches.
154
+ Args:
155
+ average (bool): The statistics such as firing rate per neuron, the number of neurons
156
+ or synops are averaged across batches.
156
157
  """
157
158
  spike_dict = {}
158
159
  spike_dict["spiking"] = {}
@@ -221,8 +222,9 @@ class SNNAnalyzer:
221
222
  def get_model_statistics(self, average: bool = False) -> dict:
222
223
  """Outputs a dictionary with statistics that are summarised across all layers.
223
224
 
224
- Parameters:
225
- average (bool): The statistics such as firing rate per neuron or synops are averaged across batches.
225
+ Args:
226
+ average (bool): The statistics such as firing rate per neuron or
227
+ synops are averaged across batches.
226
228
  """
227
229
  stats_dict = {}
228
230
  firing_rates = []
@@ -262,9 +264,10 @@ class SynOpCounter:
262
264
  """Counter for the synaptic operations emitted by all Neuromorphic ReLUs in an analog CNN
263
265
  model.
264
266
 
265
- Parameters:
267
+ Args:
266
268
  modules: list of modules, e.g. MyTorchModel.modules()
267
- sum_activations: If True (default), returns a single number of synops, otherwise a list of layer synops.
269
+ sum_activations: If True (default), returns a single number of synops,
270
+ otherwise a list of layer synops.
268
271
 
269
272
  Example:
270
273
  >>> counter = SynOpCounter(MyTorchModel.modules(), sum_activations=True)
sinabs/utils.py CHANGED
@@ -1,4 +1,4 @@
1
- from typing import List, Tuple
1
+ from typing import Iterable, List, Sequence, Tuple, TypeVar, Union
2
2
 
3
3
  import numpy as np
4
4
  import torch
@@ -8,10 +8,33 @@ import sinabs
8
8
  from .validate_memory_speck import ValidateMapping
9
9
 
10
10
 
11
+ def get_new_index(existing_indices: Sequence) -> int:
12
+ """Get a new index that is not yet part of a Sequence of existing indices
13
+
14
+ Example:
15
+ `get_new_index([0,1,2,3])`: `4`
16
+ `get_new_index([0,1,3])`: `2`
17
+
18
+ Args:
19
+ existing_indices: Sequence of indices
20
+
21
+ Returns:
22
+ Smallest positive integer number (starting from 0) that is not yet in
23
+ `existing_indices`.
24
+ """
25
+ existing_indices = set(existing_indices)
26
+ # Largest possible index is the length of `existing_indices`, if they are
27
+ # consecutively numbered. Otherwise, if there is a "gap", this would be
28
+ # filled by a smaller number.
29
+ possible_indices = range(len(existing_indices) + 1)
30
+ unused_indices = existing_indices.symmetric_difference(possible_indices)
31
+ return min(unused_indices)
32
+
33
+
11
34
  def reset_states(model: nn.Module) -> None:
12
35
  """Helper function to recursively reset all states of spiking layers within the model.
13
36
 
14
- Parameters:
37
+ Args:
15
38
  model: The torch module
16
39
  """
17
40
  for layer in model.children():
@@ -24,7 +47,7 @@ def reset_states(model: nn.Module) -> None:
24
47
  def zero_grad(model: nn.Module) -> None:
25
48
  """Helper function to recursively zero the gradients of all spiking layers within the model.
26
49
 
27
- Parameters:
50
+ Args:
28
51
  model: The torch module
29
52
  """
30
53
  for layer in model.children():
@@ -80,7 +103,7 @@ def get_network_activations(
80
103
  ) -> List[np.ndarray]:
81
104
  """Returns the activity of neurons in each layer of the network.
82
105
 
83
- Parameters:
106
+ Args:
84
107
  model: Model for which the activations are to be read out
85
108
  inp: Input to the model
86
109
  bRate: If true returns the rate, else returns spike count
@@ -130,13 +153,14 @@ def normalize_weights(
130
153
  `Conversion of Continuous-Valued Deep Networks to Efficient Event-Driven Networks for Image Classification` by Rueckauer et al.
131
154
  https://www.frontiersin.org/article/10.3389/fnins.2017.00682
132
155
 
133
- Parameters:
156
+ Args:
134
157
  ann: Torch module
135
158
  sample_data: Input data to normalize the network with
136
- output_layers: List of layers to verify activity of normalization. Typically this is a relu layer
159
+ output_layers: List of layers to verify activity of normalization.
160
+ Typically this is a relu layer.
137
161
  param_layers: List of layers whose parameters preceed `output_layers`
138
162
  percentile: A number between 0 and 100 to determine activity to be normalized by
139
- where a 100 corresponds to the max activity of the network. Defaults to 99.
163
+ where a 100 corresponds to the max activity of the network. Defaults to 99.
140
164
  """
141
165
  # Network activity storage
142
166
  output_data = []
@@ -182,6 +206,130 @@ def set_batch_size(model: nn.Module, batch_size: int):
182
206
  # reset_states(mod)
183
207
 
184
208
 
209
+ def get_batch_size(model: nn.Module) -> int:
210
+ """Get batch size from any model with sinabs squeeze layers
211
+
212
+ Will raise a ValueError if different squeeze layers within the model
213
+ have different batch sizes. Ignores layers with batch size `-1`, if
214
+ others provide it.
215
+
216
+ Args:
217
+ model (nn.Module): pytorch model with sinabs Squeeze layers
218
+
219
+ Returns:
220
+ batch_size (int): The batch size, `-1` if none is found.
221
+ """
222
+
223
+ batch_sizes = {
224
+ mod.batch_size
225
+ for mod in model.modules()
226
+ if isinstance(mod, sinabs.layers.SqueezeMixin)
227
+ }
228
+ # Ignore values `-1` and `None`
229
+ batch_sizes.discard(-1)
230
+ batch_sizes.discard(None)
231
+
232
+ if len(batch_sizes) == 0:
233
+ return -1
234
+ elif len(batch_sizes) == 1:
235
+ return batch_sizes.pop()
236
+ else:
237
+ raise ValueError(
238
+ "The model contains layers with different batch sizes: "
239
+ ", ".join((str(s) for s in batch_sizes))
240
+ )
241
+
242
+
243
+ def get_num_timesteps(model: nn.Module) -> int:
244
+ """Get number of timesteps from any model with sinabs squeeze layers
245
+
246
+ Will raise a ValueError if different squeeze layers within the model
247
+ have different `num_timesteps` attributes. Ignores layers with value
248
+ `-1`, if others provide it.
249
+
250
+ Args:
251
+ model (nn.Module): pytorch model with sinabs Squeeze layers
252
+
253
+ Returns:
254
+ num_timesteps (int): The number of time steps, `-1` if none is found.
255
+ """
256
+
257
+ numbers = {
258
+ mod.num_timesteps
259
+ for mod in model.modules()
260
+ if isinstance(mod, sinabs.layers.SqueezeMixin)
261
+ }
262
+ # Ignore values `-1` and `None`
263
+ numbers.discard(-1)
264
+ numbers.discard(None)
265
+
266
+ if len(numbers) == 0:
267
+ return -1
268
+ elif len(numbers) == 1:
269
+ return numbers.pop()
270
+ else:
271
+ raise ValueError(
272
+ "The model contains layers with different numbers of time steps: "
273
+ ", ".join((str(s) for s in numbers))
274
+ )
275
+
276
+
277
+ def get_smallest_compatible_time_dimension(model: nn.Module) -> int:
278
+ """Find the smallest size for input to a model with sinabs squeeze layers
279
+ along the batch/time (first) dimension.
280
+
281
+ Will raise a ValueError if different squeeze layers within the model
282
+ have different `num_timesteps` or `batch_size` attributes (except for
283
+ `-1`)
284
+
285
+ Args:
286
+ model (nn.Module): pytorch model with sinabs Squeeze layers
287
+
288
+ Returns:
289
+ int: The smallest compatible size for the first dimension of
290
+ an input to the `model`.
291
+ """
292
+ batch_size = abs(get_batch_size(model)) # Use `abs` to turn -1 to 1
293
+ num_timesteps = abs(get_num_timesteps(model))
294
+ # Use `abs` to turn `-1` to `1`
295
+ return abs(batch_size * num_timesteps)
296
+
297
+
298
+ def expand_to_pair(value) -> Tuple[int, int]:
299
+ """Expand a given value to a pair (tuple) if an int is passed.
300
+
301
+ Args:
302
+ value (int):
303
+ Returns:
304
+ pair: (int, int)
305
+ """
306
+ return (value, value) if isinstance(value, int) else value
307
+
308
+
309
+ T = TypeVar("T")
310
+
311
+
312
+ def collapse_pair(pair: Union[Iterable[T], T]) -> T:
313
+ """Collapse an iterable of equal elements by returning only the first
314
+
315
+ Args:
316
+ pair: Iterable. All elements should be the same.
317
+
318
+ Returns:
319
+ First item of `pair`. If `pair` is not iterable it will return `pair` itself.
320
+
321
+ Raises:
322
+ ValueError if not all elements in `pair` are equal.
323
+ """
324
+ if isinstance(pair, Iterable):
325
+ items = [x for x in pair]
326
+ if any(x != items[0] for x in items):
327
+ raise ValueError("All elements of `pair` must be the same")
328
+ return items[0]
329
+ else:
330
+ return pair
331
+
332
+
185
333
  def validate_memory_mapping_speck(
186
334
  input_feature_size: int,
187
335
  output_feature_size: int,
@@ -1,7 +1,4 @@
1
1
  from typing import Tuple
2
- from matplotlib import pyplot as plt
3
- from matplotlib import colors
4
-
5
2
  import numpy as np
6
3
 
7
4
 
@@ -66,8 +63,6 @@ class ValidateMapping:
66
63
  "neuron", neuron_memory, "kernel", kernel_memory
67
64
  )
68
65
 
69
- print(kernel_error_msg)
70
- print(neuron_error_msg)
71
66
  return (
72
67
  kernel_memory / 1024,
73
68
  neuron_memory / 1024,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sinabs
3
- Version: 3.0.4.dev25
3
+ Version: 3.1.1
4
4
  Summary: SynSense Spiking Neural Network simulator for deep neural networks (DNNs).
5
5
  Author: SynSense (formerly AiCTX)
6
6
  Author-email: support@synsense.ai
@@ -23,6 +23,7 @@ Requires-Dist: torch>=1.8
23
23
  Requires-Dist: nir<=1.0.4
24
24
  Requires-Dist: nirtorch
25
25
  Requires-Dist: samna>=0.33
26
+ Requires-Dist: matplotlib
26
27
  Dynamic: author
27
28
  Dynamic: author-email
28
29
  Dynamic: classifier
@@ -86,7 +87,7 @@ Sinabs is published under Apache v2.0. See the LICENSE file for details.
86
87
 
87
88
  Contributing to Sinabs
88
89
  ------------------------
89
- Checkout the [contributing](https://sinabs.readthedocs.io/en/develop/about/contributing.html) page for more info.
90
+ Checkout the [contributing](https://sinabs.readthedocs.io/develop/about/contributing.html) page for more info.
90
91
 
91
92
 
92
93
  Citation
@@ -0,0 +1,65 @@
1
+ sinabs/__init__.py,sha256=vvWzU_lrsSob2JpOdG7ok8Rm0FjR-v7ogYgK6zruAGk,458
2
+ sinabs/cnnutils.py,sha256=MTVTmTnLYMiDQZozfgH7UhMCYQPpOto0vDa0kMjADiA,2406
3
+ sinabs/conversion.py,sha256=wEACb-IMrsNcjoNvGjoaQSINHYs66j0XOeQSmk7nhTM,2011
4
+ sinabs/from_torch.py,sha256=_jVoGP3aQcdCUIc39ujxhCQmbIDlDtzLHz6VY3zmX-k,5777
5
+ sinabs/hooks.py,sha256=u6bzKXodhUHDLi_ZaUNbD8hogRX7RD4QoRouSUaKEzY,15962
6
+ sinabs/network.py,sha256=Zn7fQ0WTU_7vgBwfVloGINrXivZTNIBsmUGLWAbX81A,9542
7
+ sinabs/nir.py,sha256=LUUlWbV2jXJPWby5SoHFl0_c5tMVaQlsw-U_s-WjecY,8761
8
+ sinabs/synopcounter.py,sha256=VFefA5ix0JqCr2DPf8hNB19Y0Pe8tTvSrCuspFKa4Ic,12779
9
+ sinabs/utils.py,sha256=1ctTxNT2ONYVK5d99VhZvXwxaOG4pD2lZ_PGRPPO6bQ,12114
10
+ sinabs/validate_memory_speck.py,sha256=WKzB3o76sddUx9griloLQ6-ijDBPqFFXshdp9AjEiAM,5002
11
+ sinabs/activation/__init__.py,sha256=cHXmIvV9fYZhqKVVTzD2F1a6KQklJPgTgDFjNzIEII8,311
12
+ sinabs/activation/quantize.py,sha256=AzrIQbIlSPoiPgueC4XkRGNSeNoU5V9B7mtXbq0Kzk8,1166
13
+ sinabs/activation/reset_mechanism.py,sha256=bGL3gMcG9xqD93HyGgKD6UlcOQ7MNGHllwxQfWVCb1k,1395
14
+ sinabs/activation/spike_generation.py,sha256=vuU4f1H0TcTLspt_nAuUPLJQHuFt5em6ZNd9yXeja8M,3841
15
+ sinabs/activation/surrogate_gradient_fn.py,sha256=iJE8IXmtYXYE6zCIFxx-MspfgtyUK-xJtiWBhLMq3q8,3814
16
+ sinabs/backend/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
+ sinabs/backend/dynapcnn/__init__.py,sha256=dx7N04c9_ibS4iLZIY6mLHv20EsOWEp5vZKvjAkxtwQ,305
18
+ sinabs/backend/dynapcnn/chip_factory.py,sha256=XWwr0DoI3vB2GJy6iQd8sDPZlx6RvorT6OXGmWAAzNY,6805
19
+ sinabs/backend/dynapcnn/config_builder.py,sha256=YacXNvCrr1m4zgexkyHq8Oe4cyOCaRSV6UQA-zNOSyk,4362
20
+ sinabs/backend/dynapcnn/connectivity_specs.py,sha256=2Q_b0Gt_JaQCrfmzfebJy9EJWF6PLToLh_R1Y6ChRIM,1532
21
+ sinabs/backend/dynapcnn/crop2d.py,sha256=-FKOQHdx8GjEXK64OlWZyc1GId4FFRptVnt80jLBlcs,1439
22
+ sinabs/backend/dynapcnn/discretize.py,sha256=GyPfWjRg6I-kM2jo3ZXsBAk-3lCbPGZZamyD6Pz27yk,13319
23
+ sinabs/backend/dynapcnn/dvs_layer.py,sha256=b9OryaOv5X5ZOxGOEZhabHZf3jZoykDuB295a2me3pw,8647
24
+ sinabs/backend/dynapcnn/dynapcnn_layer.py,sha256=Pf-Qhl24LwKyu-7sJXDRYQ_3DN_7Z3MQyj3lNsGKTaE,8917
25
+ sinabs/backend/dynapcnn/dynapcnn_layer_utils.py,sha256=9aPk9YuAgbfI_Xworfy-SbJDQSRVFksqaLU3ZaCmS74,13153
26
+ sinabs/backend/dynapcnn/dynapcnn_network.py,sha256=klYI82qV1IqhDyD_OkOs5G3F-FysTtJJRgQbFEpDrfg,34721
27
+ sinabs/backend/dynapcnn/dynapcnn_visualizer.py,sha256=MRewU6519dAtAMxf-JlFBrlynJTZeLiDfB0d85-mMFQ,24262
28
+ sinabs/backend/dynapcnn/dynapcnnnetwork_module.py,sha256=aHLTAe59h_r0rZ0bHeSuIDG811MFP6_tOtyxiZIVVfA,14487
29
+ sinabs/backend/dynapcnn/exceptions.py,sha256=MHvsM8a5c5ukHkH59OVYU0AeivVeNgdn9Tgqb07WOtU,3523
30
+ sinabs/backend/dynapcnn/flipdims.py,sha256=I0I1nakrF0ngWBh-2SHHg7OkCOxotqukwHOQ45GWyCs,860
31
+ sinabs/backend/dynapcnn/io.py,sha256=-XtP801uVragUlBf-6PjR5UHY6B0fcy1pUg0M6QlQKo,9999
32
+ sinabs/backend/dynapcnn/mapping.py,sha256=sI0GKh2FkyciYFJuuCLCcitOzlEjfEEEbSG_OiJXICw,8683
33
+ sinabs/backend/dynapcnn/nir_graph_extractor.py,sha256=1PbQzDokxW_0mzG_tdMSS1toHczW-2lnKGMUkdmCug8,37724
34
+ sinabs/backend/dynapcnn/sinabs_edges_handler.py,sha256=pEfGUXwhQy7cnmofK5MCulSVFqMBDPRRoQVM5MTf3Qk,41085
35
+ sinabs/backend/dynapcnn/specksim.py,sha256=UKh_lH_yHIZaYEONWsAOChrD-vBdSawBxRBeDHlSv84,17138
36
+ sinabs/backend/dynapcnn/utils.py,sha256=QD5dKTgQmGLjP8fIz_vlXFpSem8Z-q-9zTebqd9xJzc,10036
37
+ sinabs/backend/dynapcnn/weight_rescaling_methods.py,sha256=iftnMHZtAsPZ3wHDPPCR3VgTKjCsjNlZAIQwezWwyns,2051
38
+ sinabs/backend/dynapcnn/chips/__init__.py,sha256=zJQ7f7bp_cF0US1pZ8ga4-3Bo32T0GB9gD2RN3uKlsM,130
39
+ sinabs/backend/dynapcnn/chips/dynapcnn.py,sha256=oTfrBJ7ZxIaG2pNd59j3dk03QQvJWKjws6GImOX5W_0,15240
40
+ sinabs/backend/dynapcnn/chips/speck2e.py,sha256=rq6RvS-FGE5aOtTXmvkKTmIJlwGxZz4vBFQ-nV3HLCo,879
41
+ sinabs/backend/dynapcnn/chips/speck2f.py,sha256=bWGTFtUZzeZ7peZcgO1VQG_8YGyhiTQUKUE_X9jnC5E,877
42
+ sinabs/layers/__init__.py,sha256=lRQtECdsYJzSWKppGcg_9oCHNRwjYprgmIDbJ21Kec0,584
43
+ sinabs/layers/alif.py,sha256=20Tf0d9_dZaVNZl6n7qOUbL7EyICqYjmgv3UytVtf4Y,16196
44
+ sinabs/layers/channel_shift.py,sha256=miS5BG4zbU0HtaWXaN_xBS7X3oX2ItBOjG_82fx7AYw,936
45
+ sinabs/layers/crop2d.py,sha256=CV3kqsCsHi39aYvj4pz9cWT79JJ051HeAWrCTOet46M,1371
46
+ sinabs/layers/exp_leak.py,sha256=HnKXZgDMZlRZfSHude8Nd1qLX2P_xV1C7KZlBmxviZo,3394
47
+ sinabs/layers/iaf.py,sha256=S58p29fBE0wQdFEelZq2Qmb1m7rkLnYMyCpDVql2ASY,8001
48
+ sinabs/layers/lif.py,sha256=V41sarXbFjGcd8RhX8NZIFHPr57-8zXssW7_kKJuicU,15293
49
+ sinabs/layers/merge.py,sha256=oVtQXdtcXRivTlwDXTEbW1Ii-GTMkg3detp0-uCTcK0,985
50
+ sinabs/layers/neuromorphic_relu.py,sha256=z8opQf38EJAWLpR2_k8d3MT8gxYA-s8aE8Jl9J7n4Lk,1545
51
+ sinabs/layers/pool2d.py,sha256=NaV3KmjwV1lRTFLxo8BKt6hhRxAGwSFmSxmOPt6Ng_k,3553
52
+ sinabs/layers/quantize.py,sha256=X9wKlA4nk8-_DS7WBiPHubHZQMb4OsSE0OkeFemxNCM,499
53
+ sinabs/layers/reshape.py,sha256=mIbRoYsx3qAFK5MJtWL6wvof4KR8fKIpyIdbLv3ozPM,3347
54
+ sinabs/layers/stateful_layer.py,sha256=5p5C6hySXor58lbUdQtmT9WfA5hrNcxzdriOH9Ct5f0,6685
55
+ sinabs/layers/to_spike.py,sha256=ORkEGuHucWCqB3P1Ia8XJsPtpDAugCTSo7Bwr3xVpzE,3295
56
+ sinabs/layers/functional/__init__.py,sha256=v0c7DHizKg8jfelmFYeMMg9vDafKvzoenakc4SPpj84,91
57
+ sinabs/layers/functional/alif.py,sha256=ycJ7rlcBAd-lq5GCDZrcNPeV-7fztt3uy43XhBtTKHI,4599
58
+ sinabs/layers/functional/lif.py,sha256=QRjiWDCBaJFk4J7RRMgktMaLCyN6xEXAKvC9Bu_PICU,4259
59
+ sinabs-3.1.1.dist-info/licenses/AUTHORS,sha256=rSozYAiy4aFshSqHdw7bV-CyqtIyWhcPo26R5JR6-MY,1847
60
+ sinabs-3.1.1.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
61
+ sinabs-3.1.1.dist-info/METADATA,sha256=N9GAqWDhMyzvI8UFqXW9IS1q5aKktZhm6rJleHlxDvg,3910
62
+ sinabs-3.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
63
+ sinabs-3.1.1.dist-info/pbr.json,sha256=Pzslm554HrYvSZWJBrXHy8I-yJ0JXOBa7BO2xjmMwAI,47
64
+ sinabs-3.1.1.dist-info/top_level.txt,sha256=QOXGzf0ZeDjRnJ9OgAjkk6h5jrh66cwrwvtPJTyfDk8,7
65
+ sinabs-3.1.1.dist-info/RECORD,,
@@ -22,6 +22,7 @@ Vanessa Leite <vanessa.leite@synsense.ai>
22
22
  Vanessa Leite <vanessa@ini.uzh.ch>
23
23
  Vanessa Leite <vanessinhaleite.cp.ufma@gmail.com>
24
24
  Vanessa Leite <vrcleite@gmail.com>
25
+ Willian Girao <williansoaresgirao@gmail.com>
25
26
  Willian-Girao <williansoaresgirao@gmail.com>
26
27
  Yalun Hu <yalun.hu@synsense.ai>
27
28
  Yalun_Hu <yalun.hu@synsense.ai>
@@ -0,0 +1 @@
1
+ {"git_version": "cf8590b", "is_release": false}
@@ -1,59 +0,0 @@
1
- sinabs/__init__.py,sha256=vvWzU_lrsSob2JpOdG7ok8Rm0FjR-v7ogYgK6zruAGk,458
2
- sinabs/cnnutils.py,sha256=MTVTmTnLYMiDQZozfgH7UhMCYQPpOto0vDa0kMjADiA,2406
3
- sinabs/conversion.py,sha256=k9pNqOtmA4JhKXIyGoFY6Fl8jyZp7DtlmpS4ym8pN0w,2023
4
- sinabs/from_torch.py,sha256=L_n7BRj7llKI-4Er1cPOZo6VVoInxehMk1PVlDiFIt8,4957
5
- sinabs/hooks.py,sha256=7jK44SxPcnQhWScvML9QIXyX5sfA_1E-lHpYjz2_4qc,16197
6
- sinabs/network.py,sha256=If6Qz2MDEpHPHD0bEStDyCif1EUw4ef3CXUQr4og9rA,9489
7
- sinabs/nir.py,sha256=r72RZ2WNuhnHvQ2MaSJ04J-Bes1mAdzoU9LKbJupZzE,8695
8
- sinabs/synopcounter.py,sha256=ZF7f9Au-j5wC3gPixWxj4yq8v8KdjDUMJWExyKi6Y5s,12759
9
- sinabs/utils.py,sha256=wNFwlf03SOYAEgdZiA1cxAf1XEnRXlycutEu2uhDBSQ,7696
10
- sinabs/validate_memory_speck.py,sha256=8uByUV9VNHncbYX4Wxq3qaepwfp-tH3c2MZeHRZSUeU,5134
11
- sinabs/activation/__init__.py,sha256=cHXmIvV9fYZhqKVVTzD2F1a6KQklJPgTgDFjNzIEII8,311
12
- sinabs/activation/quantize.py,sha256=AzrIQbIlSPoiPgueC4XkRGNSeNoU5V9B7mtXbq0Kzk8,1166
13
- sinabs/activation/reset_mechanism.py,sha256=aKtQFxB8WqzuSir0NocdkqTF_YD7E365QBj66g3wQvE,1419
14
- sinabs/activation/spike_generation.py,sha256=vuU4f1H0TcTLspt_nAuUPLJQHuFt5em6ZNd9yXeja8M,3841
15
- sinabs/activation/surrogate_gradient_fn.py,sha256=c07dIob-afODyBDcw_TtZ-n79lo-OL9NhwtA1aHJGL0,3834
16
- sinabs/backend/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
- sinabs/backend/dynapcnn/__init__.py,sha256=m0Zr7WkmTHyGth0iQ7vsojnXd2Tb0yHE0hW6wfHkP_Y,179
18
- sinabs/backend/dynapcnn/chip_factory.py,sha256=Avy-CVu4-wxEMNcJmj0XVTfUEX7IGDbvVckMg5enVIo,6910
19
- sinabs/backend/dynapcnn/config_builder.py,sha256=oGbSwPxRd-qCT4cI6CBupbTl5Jh_B_3RhT3w-jaP8gQ,4795
20
- sinabs/backend/dynapcnn/crop2d.py,sha256=-FKOQHdx8GjEXK64OlWZyc1GId4FFRptVnt80jLBlcs,1439
21
- sinabs/backend/dynapcnn/discretize.py,sha256=5ZG4KHrIKB79ifGvt1gu6j8OlH0xc51cWQtyQHelJvg,13474
22
- sinabs/backend/dynapcnn/dvs_layer.py,sha256=Aauw7u7IJvtUkjOpYo1snqzVyFns6DZ5bmZGaj0Y7pA,9468
23
- sinabs/backend/dynapcnn/dynapcnn_layer.py,sha256=53u_7NqlNqJxTjrOeEOz4WABrYLtmclaN8sAwaSfr9Y,6702
24
- sinabs/backend/dynapcnn/dynapcnn_network.py,sha256=ZHNrf-KVwEf1gpUnH9CpHSUCVSAqxLAb6Ks3zbdZ6N0,20556
25
- sinabs/backend/dynapcnn/dynapcnn_visualizer.py,sha256=MRewU6519dAtAMxf-JlFBrlynJTZeLiDfB0d85-mMFQ,24262
26
- sinabs/backend/dynapcnn/exceptions.py,sha256=hEei4gOniq3ByYXkJovlAeaUfZ8Q9BWTHTb0DJ9pHeQ,485
27
- sinabs/backend/dynapcnn/flipdims.py,sha256=I0I1nakrF0ngWBh-2SHHg7OkCOxotqukwHOQ45GWyCs,860
28
- sinabs/backend/dynapcnn/io.py,sha256=1AN4CcixXM1PFZ6U3LeNGQ71ajSXaV3lTyq__j4sxns,9952
29
- sinabs/backend/dynapcnn/mapping.py,sha256=h63M9hhI6enZtQyq-may9hU7YcnGNCumiHalh8ohMno,6108
30
- sinabs/backend/dynapcnn/specksim.py,sha256=UKh_lH_yHIZaYEONWsAOChrD-vBdSawBxRBeDHlSv84,17138
31
- sinabs/backend/dynapcnn/utils.py,sha256=LYihrBIiPTDLUwsUikVOzWva4RwPc27LoHRCUDlDm-4,17934
32
- sinabs/backend/dynapcnn/chips/__init__.py,sha256=zJQ7f7bp_cF0US1pZ8ga4-3Bo32T0GB9gD2RN3uKlsM,130
33
- sinabs/backend/dynapcnn/chips/dynapcnn.py,sha256=hlAHijx7jdWkC_pS-3ju0QP3s0uKV4zC-19YdQJefPI,11473
34
- sinabs/backend/dynapcnn/chips/speck2e.py,sha256=NRk6MyUCTZh9Ohq1R7Bg1cYuwar1fAHqlya5mYJ6UGQ,936
35
- sinabs/backend/dynapcnn/chips/speck2f.py,sha256=YIjzkR74nyyK0Vcd9FmGqtSLDlIxxRBz5QwA_2F5hRI,928
36
- sinabs/layers/__init__.py,sha256=lRQtECdsYJzSWKppGcg_9oCHNRwjYprgmIDbJ21Kec0,584
37
- sinabs/layers/alif.py,sha256=gPHTH7hWsZ3CvbcLkcGBIuiDzft5jkPJsTOfj_lNClg,16294
38
- sinabs/layers/channel_shift.py,sha256=miS5BG4zbU0HtaWXaN_xBS7X3oX2ItBOjG_82fx7AYw,936
39
- sinabs/layers/crop2d.py,sha256=D8ClbqfwP12YNLoh7fhdpSHVH_vijxnsou1bEp8kgGY,1383
40
- sinabs/layers/exp_leak.py,sha256=eZVQQwnNkJ5TPuPEeXTfS0dKE8D4uK3cNCc-FDVexz0,3400
41
- sinabs/layers/iaf.py,sha256=6OKbyaCXy2_6SxujQ0YS2QNcTaKlS-mdNW5ghIx0TIQ,8065
42
- sinabs/layers/lif.py,sha256=TgbnMG6XLPKmM6zvX-3pciAlnbdjFfO5JFsLYOgQgU8,15324
43
- sinabs/layers/merge.py,sha256=oVtQXdtcXRivTlwDXTEbW1Ii-GTMkg3detp0-uCTcK0,985
44
- sinabs/layers/neuromorphic_relu.py,sha256=XKgq-WodkFt2Eizx2JMUwAaihS8gtoebsQ_IkK63mI8,1528
45
- sinabs/layers/pool2d.py,sha256=4JK71yge6IqMkbKuF425zP3GEfsvzE9XOsBCR_Js8bU,3562
46
- sinabs/layers/quantize.py,sha256=Qq1XOKwIKXGBxrMWYEC42NEZuDvhH1Rrz3d6l6ESQHs,505
47
- sinabs/layers/reshape.py,sha256=mIbRoYsx3qAFK5MJtWL6wvof4KR8fKIpyIdbLv3ozPM,3347
48
- sinabs/layers/stateful_layer.py,sha256=9aNLXuNfEqOTazNJRJ_-SMXxsTOs6-ZPEJNGkLJNMPw,6678
49
- sinabs/layers/to_spike.py,sha256=97ar-tiDZCgckBLdnKoHzm8PjTFwDXra0weOFgAf6_4,3313
50
- sinabs/layers/functional/__init__.py,sha256=v0c7DHizKg8jfelmFYeMMg9vDafKvzoenakc4SPpj84,91
51
- sinabs/layers/functional/alif.py,sha256=ycJ7rlcBAd-lq5GCDZrcNPeV-7fztt3uy43XhBtTKHI,4599
52
- sinabs/layers/functional/lif.py,sha256=QRjiWDCBaJFk4J7RRMgktMaLCyN6xEXAKvC9Bu_PICU,4259
53
- sinabs-3.0.4.dev25.dist-info/licenses/AUTHORS,sha256=jdt0oxfM_OW0_e5-ptxORAJ8U0uTzZjaB-F5iF2i50E,1802
54
- sinabs-3.0.4.dev25.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
55
- sinabs-3.0.4.dev25.dist-info/METADATA,sha256=lMBJ3gh6cNCYfTvWmV3LMMq72mw7pOM8nDo89vU3_gE,3893
56
- sinabs-3.0.4.dev25.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
57
- sinabs-3.0.4.dev25.dist-info/pbr.json,sha256=zYdy8PXt9BBw1ow-q9S5eIaTUBP1ICuh2q7SrAbkG40,47
58
- sinabs-3.0.4.dev25.dist-info/top_level.txt,sha256=QOXGzf0ZeDjRnJ9OgAjkk6h5jrh66cwrwvtPJTyfDk8,7
59
- sinabs-3.0.4.dev25.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- {"git_version": "b38b049", "is_release": false}