HybrIK icon indicating copy to clipboard operation
HybrIK copied to clipboard

Backward gradients through HybrIK

Open karShetty opened this issue 2 years ago • 3 comments

I had assumed that by making use of an analytical solver there would be gradients flowing back through HybrIK. However, when I set pred_xyz_jts_24.register_hook(lambda grad: print(grad)) I do not see any gradients flowing back. Also, by visualizing the grad flow, I could find only two MseLossBackward corresponding to loss_beta and loss_twist, while there is no flow through loss_theta. image

Am I missing out on some config settings?

karShetty avatar Jul 08 '21 02:07 karShetty

Hi @karShetty ,

You can refer to the config file to check the loss weight of each term. Actually, we do not apply loss to the pred_xyz_jts_24. Therefore, there is no gradient flowing back from it. Maybe you can check pred_xyz_jts_29. This term is used to estimate the part rotations.

Jeff-sjtu avatar Jul 08 '21 02:07 Jeff-sjtu

Hi,

I think I figured out the issue....https://github.com/Jeff-sjtu/HybrIK/blob/929d90692f4a0b0ccbfc82fa3436736439580c85/hybrik/models/layers/smpl/lbs.py#L959 It was from the old commit.

karShetty avatar Jul 08 '21 02:07 karShetty

Due to our negligence, there were still some bugs in the last pull request. We are working on it and will provide a stable version as soon as possible. Sorry about that.

Jeff-sjtu avatar Jul 09 '21 07:07 Jeff-sjtu