Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added min_voltage parameter to nengo.LIF #666

Merged
merged 1 commit into from
Mar 9, 2015
Merged

Conversation

tcstewar
Copy link
Contributor

This is needed for one version of the adaptive LIF neuron. As mentioned #644 (comment) it was felt that having a parameter like this might also be useful for hyperpolarizing neurons too.

@mundya
Copy link
Contributor

mundya commented Feb 26, 2015

This adds to the "Nengo should have a spec document for backends" call. Noted that I need to implement this.

@tcstewar
Copy link
Contributor Author

This adds to the "Nengo should have a spec document for backends" call. Noted that I need to implement this.

Yup, we're definitely needing that sort of document. I'm in the midst of doing that to a certain degree with this https://github.com/ctn-waterloo/nengo_reference backend by identifying a set of nengo tests that all backends should pass. But there's also going to be optional features that a backend may or may not support (in which case there should also be ways of the backend indicating what it supports and doesn't support). And it means we have to be much more careful about adding features that affect backends.

For this particular feature, I'd say it's completely optional for a backend to support it. :)

@tbekolay tbekolay added this to the 2.1.0 release milestone Mar 3, 2015
@@ -225,12 +225,16 @@ class LIF(LIFRate):

probeable = ['spikes', 'voltage', 'refractory_time']

def __init__(self, min_voltage=0, **kwargs):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes the order of parameters for LIF. Are we sure that no-one is doing LIF(0.03, 0.003) without the keywords? If they are, is it their own damn fault if this breaks their code?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't change the order of parameters. And in general, I don't think we should use **kwargs if we can avoid it (and we can in this case)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I'll make a fix.

@hunse
Copy link
Collaborator

hunse commented Mar 9, 2015

Okay, changed the parameter order. LGTM now.

@tbekolay
Copy link
Member

tbekolay commented Mar 9, 2015

Cool, I'll take a quick look and merge. I will probably add some labels to the plots in test_neurons...

@hunse
Copy link
Collaborator

hunse commented Mar 9, 2015

I just added a maximum to min_voltage, making sure it doesn't go over 0. I think this makes sense since we reset the voltage to 0 after a spike, so it's kind of weird to have a min_voltage larger than zero. Does everyone agree?

@tbekolay
Copy link
Member

tbekolay commented Mar 9, 2015

I think that makes sense assuming that the reset voltage is fixed. We could make that configurable too, though I'm not sure of any reason why anyone would particularly want to do that.

@tbekolay
Copy link
Member

tbekolay commented Mar 9, 2015

Rebased to master, refactored the test and added a changelog entry. Will merge if @hunse and @tcstewar approve!

@hunse
Copy link
Collaborator

hunse commented Mar 9, 2015

I approve.

@tcstewar
Copy link
Contributor Author

tcstewar commented Mar 9, 2015

Looks great to me. Thanks for polishing this up! :)

@tbekolay tbekolay merged commit 5e8bc88 into master Mar 9, 2015
@tbekolay tbekolay deleted the lif_min_voltage branch March 9, 2015 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants