Hi @originofamonia!
That’s a very good question! Nengo models typically have a Nengo.node
that serves at the input to the model. This is the case with the example you linked, which the input node being:
inp = nengo.Node(
nengo.processes.PresentInput(test_images, presentation_time),
size_out=28 * 28)
This means that when the model is run on the Loihi board, it will use the test_images
as the input to the model.
You might wonder, then, how the model is configured to be trained on the train_images
. This is accomplished by using NengoDL, which by default, overrides the output of any input node with the data provided to the sim.fit
function. In the example you linked, the relevant line of code is:
sim.fit(train_images, train_labels, epochs=5)
and as the code demonstrates, the model is being trained on train_images
. You can read more about NengoDL’s fit
function here!
This example steps you through the process of converting a NengoDL model to a NengoLoihi model. I’ll briefly summarize the steps below.
The first step to converting a NengoDL model to a NengoLoihi model would be to ensure that your model can achieve desirable results using spiking neurons. You can work through this example to get an idea of what parameters you can play with (e.g., using synaptic smoothing, or changing the scale_firing_rates
parameter) to improve the performance of your model.
After you have ensured that your model can perform adequately using spiking neurons, you’ll want to retrain (and possibly retweak some of the parameters) using the spiking neurons specific to the Loihi board.
Once the training with Loihi spiking neurons is complete, you should be able to run the model on the Loihi board and achieve more desirable results. 