FenTechSolutions / CausalDiscoveryToolbox

Package for causal inference in graphs and in the pairwise settings. Tools for graph structure recovery and dependencies are included.
https://fentechsolutions.github.io/CausalDiscoveryToolbox/html/index.html
MIT License
1.08k stars 198 forks source link

RuntimeError: Expected object of backend CUDA but got backend CPU for argument #3 'index' #36

Closed siddsuresh97 closed 4 years ago

siddsuresh97 commented 4 years ago

I get the following error while trying to fit the NCC model using a GPU

obj.fit(data, labels, epochs=1000, batch_size=32, learning_rate=0.01, device = cdt.SETTINGS.default_device)

diviyank commented 4 years ago

Can I have a working code snippet and the full traceback of the error ?

siddsuresh97 commented 4 years ago

https://drive.google.com/open?id=1Pb4wQS6af7fTn2DGU12jdulELoCAjlDw

https://drive.google.com/open?id=1A_dwC7892rTfd90qgQUuWiIXF9r_GSZw

diviyank commented 4 years ago

Great thanks, there seems to be a issue on the GPU data transfer ; i'll look into it Best, Diviyan

diviyank commented 4 years ago

I think the bug is fixed, could you check on your side ?

siddsuresh97 commented 4 years ago

Sure, I will check it and get back to you!

diviyank commented 4 years ago

Hi, I will be closing this issue for inactivity, don't hesitate to reopen it if the issue is not fixed.\

Best, Diviyan