You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This effectively removes the last state from the trajectory. If there is a cost associated with it, however, doesn't that make the gradient computation incorrect? We won't have dx (or the final x) in the backward function of the same class.
Note that further down the same function, the cost is in fact updated:
Hmm, I don't remember why I implemented it like this and at a first glance it indeed sounds wrong to ignore the last state, especially if there is a terminal cost
In (
LQRStep.lqr_forward
) https://github.com/locuslab/mpc.pytorch/blob/master/mpc/lqr_step.py, we have the following:(line 218 onwards)
This effectively removes the last state from the trajectory. If there is a cost associated with it, however, doesn't that make the gradient computation incorrect? We won't have dx (or the final x) in the backward function of the same class.
Note that further down the same function, the cost is in fact updated:
which means the terminal state contributes to the cost, but is dropped from the list of states used elsewhere.
The text was updated successfully, but these errors were encountered: