nengo / nengo-loihi

Run Nengo models on Intel's Loihi chip
https://www.nengo.ai/nengo-loihi/
Other
35 stars 12 forks source link

Improve error message for chip -> chip error signal #209

Closed arvoelke closed 5 years ago

arvoelke commented 5 years ago

Related to #208.

import nengo
import nengo_loihi

with nengo.Network() as model:
    nengo_loihi.add_params(model)

    a = nengo.Ensemble(100, 1)
    b = nengo.Ensemble(100, 1)
    error = nengo.Ensemble(100, 1)
    model.config[error].on_chip = True

    conn = nengo.Connection(a, b, learning_rule_type=nengo.PES())
    nengo.Connection(error, conn.learning_rule)

with nengo_loihi.Simulator(model) as sim:
    pass
~/CTN/nengo-loihi/nengo_loihi/splitter.py in split(net, precompute, node_neurons, node_tau, remove_passthrough)
    147 
    148     # Commit to the moves marked in the previous steps
--> 149     networks.finalize()
    150     if precompute:
    151         if len(networks.host_pre.all_objects) == 0:

~/CTN/nengo-loihi/nengo_loihi/splitter.py in finalize(self)
     83             if not isinstance(obj, Network):
     84                 assert obj in self, (
---> 85                     "%s not moved or explicitly removed" % (obj,))
     86 
     87         # Process moves and adds

AssertionError: <Connection from <Ensemble (unlabeled) at 0x7f820ef50278> to <LearningRule modifying <Connection from <Ensemble (unlabeled) at 0x7f820ef50400> to <Ensemble (unlabeled) at 0x7f820ef502b0>> with type PES()>> not moved or explicitly removed
tbekolay commented 5 years ago

Done in #202.