nengo / nengo-loihi

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

Make initial voltage = 0 not apply to any ensembles with `on_chip=False` #329

Open studywolf opened 2 years ago

studywolf commented 2 years ago

Ran into the situation where calling set_defaults() seriously degraded network performance for a DNN running in NengoLoihi Emulator. Turns out the first layer in the network, which we'd designated to run off-chip, was having all the initial voltages set to 0.0 as part of the set_defaults() call. Since it's running off-chip there's no need for this, so it would be nice to have a check to see if an ensemble is designated to run off-chip or not before setting its neurons initial voltages to 0.0.

hunse commented 2 years ago

Yeah, that makes sense. Unfortunately, it's not trivial to do, since a) we do set_defaults on the nengo.Network, and b) it just modifies the defaults for any ensemble created after. Right when an ensemble is being created, we don't know if it'll be on-chip or off-chip. So it'd take considerable work to do this automatically.

Of course, it's not hard to do yourself when you're creating ensembles. Just have a separate neuron type with non-zero initial voltages that you use for all your off-chip Ensembles.