aidos-lab / pytorch-topological

A topological machine learning framework based on PyTorch
https://pytorch-topological.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
147 stars 21 forks source link

too much time-consuming after adding topology loss term(Cubical complex) #24

Closed jbHu67 closed 1 year ago

jbHu67 commented 1 year ago

I found that my code very slow after adding topology loss( using cubical complex). The GPU usage down to 10%, but around 90% without adding topology loss. Is it normal?

Pseudomanifold commented 1 year ago

I cannot answer this question without knowing more details about your code. Notice that there is currently no GPU implementation for cubical complexes, but maybe the culprit is more in the way data are being transferred?

jbHu67 commented 1 year ago

Dear, Thanks for your answer. My code of computing topological loss is almost same as the work "https://github.com/marrlab/SHAPR_torch" but is a 2D problem. I will continue check the reason.

Pseudomanifold commented 1 year ago

One thing you could try is downsample your data via one of the interpolate functions. I'm closing this issue for now, please reopen if you have more details about your specific problem.