Giter VIP home page Giter VIP logo

Comments (5)

bauerfe avatar bauerfe commented on May 30, 2024

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.

biphasic avatar biphasic commented on May 30, 2024

I think that is what @sheiksadique meant.

from sinabs.

biphasic avatar biphasic commented on May 30, 2024

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.

sheiksadique avatar sheiksadique commented on May 30, 2024

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.

bauerfe avatar bauerfe commented on May 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.