PyTorch tensors from C++ to Python


(Daniele Molinari) #1

Hi everybody,
I need to embed a Python interpreter in my C++ application and I want to pass Tensor s back and forth from C++ and Python.
I know that Boost.Python should fit this purpose, but I’m puzzled on how should I handle the Tensors exchange. My guess is that it should be relatively easy, considering that the C++ and Python frontend probably use the same underlying types. Can somebody point me in the right direction?
Thanks