tapnet icon indicating copy to clipboard operation
tapnet copied to clipboard

Training TAPIR PyTorch version script?

Open riponazad opened this issue 1 year ago • 7 comments

Is there any script for training TAPIR pytorch version?

riponazad avatar Apr 17 '24 15:04 riponazad

Internally we train using JAX. Maintaining a second training codebase would be non-trivial work for us and is beyond the capacity of our team. Sorry about that.

cdoersch avatar Apr 18 '24 13:04 cdoersch

Thanks for your response. Yes, I got that. I tried to train with the existing PyTorch TAPIR code but failed to optimize due to the non-integration structure. Seems need to spend more time now. Anyway thanks for the nice work.

riponazad avatar Apr 18 '24 14:04 riponazad

Hi @riponazad could you please explain what you mean by the non-integration structure? Thanks!

justachetan avatar Apr 25 '24 00:04 justachetan

Hi @justachetan, the provided pytorch script doesn't track the computation during the forward pass. Hence, autograd can't compute gradients and the optimizer doesn't update the parameters of the model. That is my understanding and I didn't dig anymore. I may be wrong or describing wrongly. Please let me know if you are abale to train it.

riponazad avatar Apr 25 '24 06:04 riponazad

Thanks! Yeah I realized that too. But I guess if you remove the calls to .detach() in the code that should be fixed, right @cdoersch?

justachetan avatar Apr 25 '24 11:04 justachetan

@justachetan Thanks a lot :). That's it. Saved a lot of time from digging. Now it's being optimized.

riponazad avatar Apr 25 '24 13:04 riponazad

Hi @justachetan @riponazad in case you have written out a training script in torch, I wanted to see if it is possible to make it available? (I wanted to compare with what I have) thank you!

shivanimall avatar Jun 08 '24 21:06 shivanimall