Comments (5)
Do you mean it is semantically inconsistent because ExpLeak is not a form of LIF?
Would it make more sense to invert this oder, i.e. LIF inheriting from ExpLeak?
from sinabs.
I think that is what @sheiksadique meant.
from sinabs.
The problem with making ExpLeak the parent class is that IAF inheriting from ExpLeak is also not consistent. We should come up with a way to favour composition rather than inheritance
from sinabs.
I think the important aspect to retain is code retention.
So if we move towards a more functional approach, we could move all of the logic to functions and leave the classes to just call the appropriate function with the necessary activation functions. This way, we won't have to do too much re-writing of classes but design the class inheritance to be as logical as necessary.
This would also make it easier to use the exodus framework and classes/functions.
from sinabs.
To be honest, I am still not sure why this issue is relevant. Could someone please explain this to me? Does this affect usability, confuse users or developers, make the code less readable, ...?
I think we shouldn't rack our brains about what would be a semantically meaningful order of inheritance. There will always be different ways to interpret things.
I agree with @sheiksadique that we should focus on clean, concise and readable code. However, with respect to the more functional, modular approach, I believe we are already there. Forward pass, spike generation, surrogate gradients are already functions that get called by the different layers. The layer classes mostly take care of handling states and parameters.
In that regard, if we really need to change things, I suggest a flat hierarchy. I imagine this is congruent with @biphasic 's suggestion about composition rather than inheritance:
Let ExpLeak
, IAF
, LIF
,... all inherit from StatefulLayer
and configure their spike functions, time constants, etc. such that they yield the correct behavior. Also, the does_spike
property could simply check whether the spike function of that object is 'None', so we don't have to re-define it for every class.
from sinabs.
Related Issues (20)
- Transition from SNNAnalyzer to hooks HOT 5
- DynapcnnNetwork conversion cannot handle Identity module
- Failing dynapcnn tests HOT 5
- address failing tests HOT 2
- Split tutorial on LeNet into two languages
- Question: Where does the weight transfer happen? HOT 3
- Github actions node16 deprecation warnings
- Add black linting to CI/CD HOT 1
- Codecov action in the pipeline silently fails to upload coverage HOT 2
- hooks.py missing variables in namespace.
- New release v2.0 HOT 9
- More sensible change log HOT 3
- Installation instructions to mention risks of development install.
- Missing link in speck/overview.md to leak_neuron tutorial
- Set up the CI with the chips plugged in for tests with hardware
- Add unit tests for errors and warnings that should be raised. (Check coverage report)
- Conversion error mitigation HOT 1
- Update tutorial on reading outputs from hardware
- Deploy version 2.0 of the documentation to read-the-docs HOT 2
- Improve in-code documentation of `backend.dynapcnn.mapping`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sinabs.