TernausNetV2
TernausNetV2 copied to clipboard
Hi, can you make it runnable on cpu-only?
Hi,
I have a simple request to make the code runnable in cpu-only machine. It is more testing the Python notebook.
Thank you.
Not sure if it's possible - might need to find equivalents for the in place abn functions that currently rely on CUDA...I'm interested in finding out the answer to this question too.
Hey did you get any solution to this problem?
I run it on GPU :-)
I have a working CPU version - you need to change all the ifs in module/src/inplace_abn.cpp that seem to only enable the cuda versions. The CPU versions are already implemented but not used - you just need to activate them.
@billcai what do you mean by the ifs and is it just in the module/src/inplace_abn.cpp file that this is the case?
Removed this if else statement and just leave the cpu version for all the functions in inplace_abn.cpp
For example, from:
if (x.is_cuda()) { return mean_var_cuda(x); } else { return mean_var_cpu(x); }
To:
return mean_var_cpu(x):
Thanks a lot @billcai . Your input helped me after days of struggle on the same. One more important thing I had to do was comment out or delete the "inplace_abn_cuda.cu" in the functions .py script in the modules. Ultimately, then the TernausNetV2 was imported.