Ticket #213 (closed defect: fixed)

Opened 6 months ago

Last modified 6 months ago

Problem setting weights in nest when target='inhibitory'

Reported by: mschmucker Owned by: apdavison
Priority: major Milestone: 0.8.0
Component: nest Version: trunk
Keywords: Cc:

Description

Setting a weight on an inhibitory synapse produces an AttributeError?.

Try the following:

import pyNN.nest as p
p.setup()
a = p.Population(1, cellclass=p.IF_cond_exp)
b = p.Population(1, cellclass=p.IF_cond_exp)
pr = p.Projection(a,b,method=p.AllToAllConnector(), target='inhibitory')
pr.setWeights(0.001)

produces

AttributeError: 'Projection' object has no attribute 'parent'

(see full traceback in attachment).

The same code worked for me in 0.7 - is it maybe just an API change I missed? In that case, a clearer error message or warning would be helpful.

Cheers,

Michael

Attachments

pynnbug.txt Download (1.8 KB) - added by mschmucker 6 months ago.
Traceback (Ipython)

Change History

Changed 6 months ago by mschmucker

Traceback (Ipython)

Changed 6 months ago by pierre

  • status changed from new to closed
  • resolution set to fixed

This has been fixed by r1021. It was not a feature, but a bug du to the changes in the common files :-). Note, however, that even if the setWeights() method is working, I would recommand to pass the weights in the Connector object, because this is much faster.

prj = Projection(x, y, AllToAllConnector?(weights=0.001)).

Then, weights are set when synapses are created, and there is no need to loop again over all the synapses to changes the weights values (what setWeights is doing). Especially for large connectivity matrix.

Cheers,

Note: See TracTickets for help on using tickets.