taichi-dev / difftaichi

10 differentiable physical simulators built with Taichi differentiable programming (DiffTaichi, ICLR 2020)
2.47k stars 260 forks source link

Unexpectedly bad results for billiards.py variant #14

Open DomNomNom opened 4 years ago

DomNomNom commented 4 years ago

In billiards.py, I've done some changes to the starting condition of the cue ball and the target position. These changes are available here.

What I observed was that in almost every iteration, the result got worse than before not better. i.e. Loss seems to be increasing: Loss is increasing

The ending stable state is not that surprising (no gradient) but the initial trend is concerning me.

yuanming-hu commented 4 years ago

The billiards example is not implemented with the time-of-impact fix (see our paper) so I'm not surprised that it's making inverse progress. I'll fix this in a few days.

DomNomNom commented 4 years ago

Thanks! Looking forward to it.

On Tue, 11 Feb 2020 at 08:53, Yuanming Hu notifications@github.com wrote:

The billiards example is not implemented with the time-of-impact fix (see our paper) so I'm not surprised that it's making inverse progress. I'll fix this in a few days.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/yuanming-hu/difftaichi/issues/14?email_source=notifications&email_token=AAGY2BDJASA7A7DEJVTQNATRCHEFJA5CNFSM4KRWZHJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELKN5JA#issuecomment-584375972, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGY2BATTZ2NLDHYTLTAEMLRCHEFJANCNFSM4KRWZHJA .

yuanming-hu commented 4 years ago

Hi @DomNomNom ,

I added the TOI fix to billiards.py. Gradient quality is significantly improved. Could you have a try? (PS: please also upgrade taichi to 0.4.6+). Thanks.

DomNomNom commented 4 years ago

Hi @yuanming-hu

I've updated taichi and merged your changes, however I'm still seeing similar symptoms: BadLoss2

Here's what I'm running: https://github.com/DomNomNom/difftaichi/blob/5326ebfc1c8bd5bfe56b3ba5b68ad891b158aa20/examples/billiards.py Note: after updating, pip3 list | grep taichi gave me taichi-nightly-cuda-10-1 0.5.0.

DomNomNom commented 4 years ago

Any thoughts on this?