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

Range of output values from ensemble on chip unexpectedly limited #294

Open
studywolf opened this issue Jun 18, 2020 · 0 comments
Open

Range of output values from ensemble on chip unexpectedly limited #294

studywolf opened this issue Jun 18, 2020 · 0 comments

Comments

@studywolf
Copy link
Collaborator

is there any documentation on limits of the output value range from ensembles running on loihi?

import matplotlib.pyplot as plt
import numpy as np
import nengo
import nengo_loihi
with nengo.Network() as net:
    nengo_loihi.add_params(net)
    ens = nengo.Ensemble(1000, 1)
    node = nengo.Node(size_in=2)
    input = nengo.Node(np.cos)
    nengo.Connection(input, ens)
    nengo.Connection(ens, node[0], function=lambda x: x**2, transform=20)
    nengo.Connection(ens, node[1], function=lambda x: 20 * x**2)
    probe = nengo.Probe(node, synapse=0.005)
plt.subplot(2, 1, 1)
with nengo.Simulator(net) as sim:
    sim.run(2*np.pi)
plt.plot(sim.trange(), sim.data[probe][:, 0])
plt.plot(sim.trange(), sim.data[probe][:, 1], '--')
plt.subplot(2, 1, 2)
with nengo_loihi.Simulator(net) as sim:
    sim.run(2*np.pi)
plt.plot(sim.trange(), sim.data[probe][:, 0])
plt.plot(sim.trange(), sim.data[probe][:, 1], '--')
plt.show()

maybe a warning for the user? or something like sampling the function and setting the DecodeNeurons radius off of that?

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

1 participant