-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is any method implemented in ott to help reduce memory overhead? (Update: I found batch-size
option)
#422
Comments
Hi @feiyang-k !! Indeed, scalability will be an important issue for OT tasks. There are two possible workarounds at the moment:
|
Thanks @! These methods are marvelous! It works like magic. I had been having some vague ideas on improving the efficiency of the OT solution. The moment I saw the idea of these methods, I finally understood what ideas are about :) The I read through the reference paper as well as the documentation. Different from regular 'Sinkhorn' algorithm that approaches the dual problem, which is the same as other OT solvers, Interestingly, I'm interested in the dual solutions more than the primal. I need the derivatives to perform some exploration into the corresponding practical problem. Directly recovering the dual solution from the primal can be tricky due to numerical issues. In this case, do you have any idea what will be a good way to obtain the dual solutions? I also tried using the auto-differentiation in JAX for that, where the dual solutions will be the derivative of the marginals a and b, but I ran into memory issues immediately. I saw similar issues in another post. But the difference here is it seems I cannot use danskin for More interesting, I saw it in the source code and some part of the document that there is the attribute for |
Thanks @! These methods are marvelous! It works like magic. I had been having some vague ideas on improving the efficiency of the OT solution. The moment I saw the idea of these methods, I finally understood what ideas are about :) The I read through the reference paper as well as the documentation. Different from regular 'Sinkhorn' algorithm that approaches the dual problem, which is the same as other OT solvers,
Thanks a lot! |
Hi,
In our ML tasks, the problem of scale is often defined by num_of_training_samples by num_of_validation_samples. Our GPUs currently has 40~80 GB memory per card, which could handle problem of sizes around 350k by 10k. This is fine for classic datasets such as CIFAR-10, but is still away from million scales for modern datasets (or billion scales for language corpus). Is there any standard approach to reduce memory overhead? Is there any approximation method or batch-wise methods provided in the package that help with memory usage?
Thanks!
Update: I found
batch-size
option for theonline cost computation
, which looks highly relevant!The text was updated successfully, but these errors were encountered: