What is default learning rule in nengo_dl? How to add learning rule into nengo_dl?

  1. What is default learning rule in nengo_dl? is it PES?

  2. I tried to find some way to add learning rule PES into model using nengo_dl. I had found “nengo_dl.learning_rule_builders.build_pes(model, pes, rule)”. But i dont understand and i dont know to configure about 3 parameters model, pes, rule.

  3. I need an example for this problem with nengo_dl. Tks for watch.

  4. I’ve added learning rule into my model. Is it true?

NengoDL itself doesn’t have a “default” learning rule. It really depends on what you are trying to achieve. NengoDL supports two types of learning: online learning (learning while the simulation is running), and offline learning (learning before the simulation is run).

Offline learning is done using the TensorFlow interface (basically, the sim.fit function, which is itself a wrapper over TensorFlow’s model.fit function). As for online learning, NengoDL supports all of the built-in learning rules in Nengo. These rules aren’t executed (i.e., they have no effect) during the sim.compile and sim.fit functions, and only modify the model during the sim.run function. If you don’t need the rest of NengoDL’s functionality (i.e., you don’t need to use TensorFlow with your Nengo models), I recommend using just Nengo to build and run your models.

To add the PES learning rule to your NengoDL model, it is the same syntax as a regular Nengo model (see here for examples). The build_pes function is used by the internals of NengoDL to convert the Nengo PES learning rule into something that can be executed in the TensorFlow backend.

Yes, your code does seem to have the PES learning rule applied to conn12, conn23, and conn3. However, as I mentioned above, these rules don’t actually do anything until you run the sim.run() function.