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

Get the total number of neurons #435

Closed
xchoo opened this issue Jun 27, 2014 · 5 comments
Closed

Get the total number of neurons #435

xchoo opened this issue Jun 27, 2014 · 5 comments

Comments

@xchoo
Copy link
Member

xchoo commented Jun 27, 2014

There was a feature in 1.4 where you could get the total count of the number of neurons in a network (or subnetwork). It would be helpful if you could do the same for 2.0 models.

@hunse
Copy link
Collaborator

hunse commented Jun 27, 2014

Networks now have an all_ensembles property, so it should be very easy to iterate over that and count the number of neurons.

@xchoo
Copy link
Member Author

xchoo commented Jun 27, 2014

Question is: do we want to build the "count neurons" functionality into the code base, or do we want users to do it themselves?

@tbekolay
Copy link
Member

Could add an n_neurons property to Network... Is it obvious that that property should recurse into subnetworks? It'd only be two or three lines of code, I don't see any harm in it.

@xchoo
Copy link
Member Author

xchoo commented Jun 27, 2014

That's a good question. If we are consistent with the how the rest of the properties are computed, then no, sometimes n_neurons won't mean the total number of neurons in the network. Case in point is the EnsembleArray network. There, you give it n_neurons which is the number of neurons per ensemble.

@tbekolay tbekolay added this to the Wish list milestone Oct 29, 2014
@tbekolay tbekolay removed this from the Wish list milestone Jun 11, 2016
tbekolay added a commit that referenced this issue Nov 3, 2016
This required some changes to EnsembleArray, since it already has
a n_neurons attribute. Fortunately, this doesn't seem to be used
anywhere in tests or examples, so I renamed it to
n_neurons_per_ensemble.

Addresses #435.
tbekolay added a commit that referenced this issue Apr 26, 2017
This required some changes to EnsembleArray, since it already has
an n_neurons attribute. This doesn't seem to be used anywhere in
tests or examples, so I renamed it to `n_neurons_per_ensemble`.
It can also be accessed through the `n_neurons` attribute of
any ensemble within the ensemble array.

Addresses #435.
@tbekolay
Copy link
Member

A n_neurons property now exists on Network (see #1186).

adityagilra pushed a commit to adityagilra/nengo that referenced this issue Jun 21, 2017
This required some changes to EnsembleArray, since it already has
an n_neurons attribute. This doesn't seem to be used anywhere in
tests or examples, so I renamed it to `n_neurons_per_ensemble`.
It can also be accessed through the `n_neurons` attribute of
any ensemble within the ensemble array.

Addresses nengo#435.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants