PES learning rule for Image

  • I’ve found example for PES learning rule in Nengo Loihi. ( PES learning — NengoLoihi 1.1.0.dev0 docs )

  • But this example implemented with WhiteSignal on Input. I want to implement with one image on Input. How can i do that? please, Show me code syntax or something else…

  • And one more question. How can i configure the model to compare input and output. For Example, I Have image number 7 input and then what is output, how is it represented?.

In our models, we typically present image inputs as flattened vectors. That is to say, you take the 2D image, and flatten it to the equivalent WxH vector. There are multiple examples of this being done:

This is a very hard question to answer. What the model should output (i.e., what you want the “reference” output to be) is up to the model designer. If you are asking about how to represent a 2D image output, it would be the same as for a 2D image input (i.e, as discussed above, a flattened 2D image). You can then write code to convert the flattened vector back into a 2D image (basically, you call the resize function again) to get the 2D image output back.

If you are asking how to display an image output in NengoGUI, look at the NengoFPGA example linked above. There is a helper function (image_display_function from the nengo_extras.gui module) that will help you with that.