I'm trying to project a mesh onto a depth map and minimize the difference, and the library that I use to rasterize the vertices uses C++ cuda for the purpose. In the cost function, I use that library to find out which mesh faces are visible. But when running the code, I get this runtime error Unrecognized tensor type ID: FuncTorchGradWrapper when the cuda code is called. I tried adding torch.no_grad() but the error is still there. Any ideas on how I can use cuda with the cost function?
❓ Questions and Help
Hi,
I'm trying to project a mesh onto a depth map and minimize the difference, and the library that I use to rasterize the vertices uses C++ cuda for the purpose. In the cost function, I use that library to find out which mesh faces are visible. But when running the code, I get this runtime error
Unrecognized tensor type ID: FuncTorchGradWrapper
when the cuda code is called. I tried addingtorch.no_grad()
but the error is still there. Any ideas on how I can use cuda with the cost function?Thanks a lot, Phil