rusty1s / deep-graph-matching-consensus

Implementation of "Deep Graph Matching Consensus" in PyTorch
https://openreview.net/forum?id=HyeJf1HKvS
MIT License
256 stars 47 forks source link

CUDA out of memory for DBP15K example #4

Closed xh3204 closed 4 years ago

xh3204 commented 4 years ago

There is a "CUDA out of memory" error arising when we run the DBP15K example. The system hint that the error happens in the "__topk_\" function of the dgmc.py file. We find that this function needs to establish a matrix space with the shape of (1,n_s,n_t,d), where n and d are the node number and dimension respectively. This is too huge to create. When we modify the function to standard matrix multiplication, this error is repaired. Although I think this modification is equivalent to the original function, I don't know whether this violates your original code design. image

rusty1s commented 4 years ago

That is indeed more memory-friendly. I changed it according to your suggestions. For DBP15K, it is advised to make use of keops though for even less memory consumption.