numenta / nupic.embodied

GNU Affero General Public License v3.0
6 stars 6 forks source link

Makes auxiliary task independent of dynamic models #32

Closed lucasosouza closed 3 years ago

lucasosouza commented 3 years ago

I made a recent change to try to reduce how many times update_auxiliary_task is called, based on the comments you left on the code.

Now there are 4 places in the code where update_auxiliary_task is being called :

If the last statement is incorrect, and update_auxiliary_task needs to be called only once per step/epoch/batch, then we can move out of the loss functions back into the learn function and both the ppo loss and backprop loss would share that procedure.

At some point we can look into the update_auxiliary_task as well to see if it can be further simplified.

Edit: I changed the name of the function ppo.update to ppo.learn to make it clear that is where the gradient steps are happening. There are lots of update functions around the code, and I wanted to differentiate that is the only one that actually has a gradient update. Let me know if that is not ok.