locuslab / mpc.pytorch

A fast and differentiable model predictive control (MPC) solver for PyTorch.
https://locuslab.github.io/mpc.pytorch/
MIT License
872 stars 146 forks source link

Clean up `detach_maybe` and `data_maybe` uses throughout the library #3

Open bamos opened 6 years ago

bamos commented 6 years ago

I also don't like having the x.requires_grad conditional in detach_maybe since it hides if that tensor is detached or not.

\cc @ivandariojr