synsense / sinabs

A deep learning library for spiking neural networks which is based on PyTorch, focuses on fast training and supports inference on neuromorphic hardware.
https://sinabs.readthedocs.io
GNU Affero General Public License v3.0
77 stars 8 forks source link

Allow conversion to DynapcnnNetwork for modules with Identity #202

Closed bauerfe closed 8 months ago

bauerfe commented 9 months ago

Addresses #201 . When converting a Sequential module to a list, it now automatically skips layers such as Identity or Dropout.

Ignoring these layers in the model building routine, as has been done previously falls short in some cases, when the layer to be ignored sits between two pooling layers or a conv layer and a pooling layer.

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (19f9522) 80.53% compared to head (375b26f) 80.54%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## 198-merge-sinabs-dynapcnn-to-sinabs #202 +/- ## ==================================================================== Coverage 80.53% 80.54% ==================================================================== Files 55 55 Lines 2985 2986 +1 ==================================================================== + Hits 2404 2405 +1 Misses 581 581 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.