Re: Ask for help! POT ot.gpu can't find gpu module.
Hello Lu, Thank you for your interest in POT. By default the gpu module is not imported because it depends on cupy that might not be available (its not a hard dependency for POT). So in order to use it you need to import like this: import ot import ot.gpu To be frank the gpu module is not particularly optimized but in order to get the most out of it you should send all your data on the GPU as cupy arrays before using the functions or else there will be some important overhead. Depending on what you want to do reimplementing the very simple Sinkhorn in pytorch might lead to better performances. For large scale computation of Wassertsein distance and gradients I recommend the geomloss toolbox https://www.kernel-operations.io/geomloss/ Is nicely recompute the cost matrix online which makes it very memory efficient and can handle a large number of samples. Sincerly, Rémi Le 04/04/2019 à 20:53, Chen, Lu a écrit :
Dear developers of POT,
When I use ot.gpu there is a mistake 'module' object has no attribute 'gpu' and I found that the ot dist has no gpu module. I have tried both in python 2 and python3 but I haven't solved this problem. Can you help me? Thank you very much!
Best regards
-- Lu Chen Department of Informatics Ying Wu School of Computing New Jersey Institute of Technology Newark, NJ 07102-1982
-- Rémi Flamary Web: https://remi.flamary.com Tel: +33 (0)4 92 07 63 80 Laboratoire Lagrange, UMR CNRS 7293 Observatoire de la Côte d'Azur Université Côte d'Azur
participants (1)
-
Rémi Flamary