SpiNNakerManchester / sPyNNaker

The SpiNNaker implementation of the PyNN neural networking language
Apache License 2.0
105 stars 43 forks source link

Issues getting plastic weights in vogels_2011.py example #58

Closed neworderofjamie closed 9 years ago

neworderofjamie commented 9 years ago

I just ported the vogels 2011 inhibitory plasticity rule across to the re-factored tools and I'm having problems getting the examples to work. I get one or other of the following errors when I try and get plastic weights:


File "vogels_2011.py", line 96, in plastic_weights = plastic_ie_projection.getWeights(format="array") File "/home/jamie/manchester/spinnaker_git/sPyNNaker/spynnaker/pyNN/models/pynn_projection.py", line 363, in getWeights self._retrieve_synaptic_data_from_machine() File "/home/jamie/manchester/spinnaker_git/sPyNNaker/spynnaker/pyNN/models/pynn_projection.py", line 439, in _retrieve_synaptic_data_from_machine routing_infos=self._spinnaker.routing_infos) File "/home/jamie/manchester/spinnaker_git/sPyNNaker/spynnaker/pyNN/models/neural_projections/projection_partitionable_edge.py", line 117, in get_synaptic_list_from_machine routing_infos, subedge.weight_scales).get_rows() File "/home/jamie/manchester/spinnaker_git/sPyNNaker/spynnaker/pyNN/models/abstract_models/abstract_synaptic_manager.py", line 664, in get_synaptic_list_from_machine weight_scales) File "/home/jamie/manchester/spinnaker_git/sPyNNaker/spynnaker/pyNN/models/abstract_models/abstract_synaptic_manager.py", line 692, in _translate_synaptic_block_from_memory weight_scales) File "/home/jamie/manchester/spinnaker_git/sPyNNaker/spynnaker/pyNN/models/neural_properties/synapse_dynamics/plastic_weight_synapse_row_io.py", line 133, in create_row_info_from_elements "plastic synapses cannot create row ios from fixed entries.")

spynnaker.pyNN.exceptions.SynapticBlockGenerationException: plastic synapses cannot create row ios from fixed entries.

File "vogels_2011.py", line 96, in plastic_weights = plastic_ie_projection.getWeights(format="array") File "/home/jamie/manchester/spinnaker_git/sPyNNaker/spynnaker/pyNN/models/pynn_projection.py", line 363, in getWeights self._retrieve_synaptic_data_from_machine() File "/home/jamie/manchester/spinnaker_git/sPyNNaker/spynnaker/pyNN/models/pynn_projection.py", line 439, in _retrieve_synaptic_data_from_machine routing_infos=self._spinnaker.routing_infos) File "/home/jamie/manchester/spinnaker_git/sPyNNaker/spynnaker/pyNN/models/neural_projections/projection_partitionable_edge.py", line 117, in get_synaptic_list_from_machine routing_infos, subedge.weight_scales).get_rows() File "/home/jamie/manchester/spinnaker_git/sPyNNaker/spynnaker/pyNN/models/abstract_models/abstract_synaptic_manager.py", line 664, in get_synaptic_list_from_machine weight_scales) File "/home/jamie/manchester/spinnaker_git/sPyNNaker/spynnaker/pyNN/models/abstract_models/abstract_synaptic_manager.py", line 682, in _translate_synaptic_block_from_memory position_in_block) File "/home/jamie/manchester/spinnaker_git/sPyNNaker/spynnaker/pyNN/models/abstract_models/abstract_synaptic_manager.py", line 717, in _extract_row_data_from_memory_block no_fixed_fixed = synaptic_block[position_in_block]

IndexError: index out of bounds

It's quite possible I have done something wrong as loads of stuff has changed, but it did used to work great on the branch from the last SpiNNaker workshop...

alan-stokes commented 9 years ago

issue is due to master pop table impl. If you recompile your code with 2darray master pop, it works perfectly.

To do so you ened to go to spynnaker.cfg and change [MasterPopTable]

algorithm: {2dArray, BinarySearch, HashTable}

generator = BinarySearch

generator = 2dArray

to

[MasterPopTable]

algorithm: {2dArray, BinarySearch, HashTable}

generator = BinarySearch

generator = 2dArray

and then go to spynnaker/neural_models/src/neuron/builds/makefile.common and change

POPULATION_TABLE_IMPL ?= fixed

POPULATION_TABLE_IMPL ?= binary_search

to POPULATION_TABLE_IMPL ?= fixed

POPULATION_TABLE_IMPL ?= binary_search

and recompile binaires and wal la.

this means the master pop binary search is a bit more buggered than we thought. Anna has some issues with get spikes becuase of it as well. So some core issue with that version of master pop

Alan

alan-stokes commented 9 years ago

closing as solavbe for capo, pushing to issue #68 as a ture fix is required