nengo / nengo-loihi

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

remove_passthrough doesn't work with Distributions #160

Open drasmuss opened 5 years ago

drasmuss commented 5 years ago

Here's a minimal example:

import nengo
import nengo_loihi

with nengo.Network() as net:
    a = nengo.Ensemble(1, 1)
    b = nengo.Node(size_in=1)
    c = nengo.Ensemble(1, 1)
    nengo.Connection(a, b)
    nengo.Connection(b, c, transform=nengo.dists.Uniform(-1, 1))

with nengo_loihi.Simulator(net, remove_passthrough=True) as sim:
    pass

gives

"...\nengo_loihi\passthrough.py", line 71, in merge_transforms
    if trans2.ndim == 0:  # scalar
AttributeError: 'Uniform' object has no attribute 'ndim'
drasmuss commented 5 years ago

In #142 we updated this to give a more informative error message, but merging Distributions is still not supported.