The way we do it internally is with PyObject * THPVariable_Wrap(at::Tensor t)` from torch/autograd/python_variable.h
Not sure if it is the cpp API way to do it though.
The way we do it internally is with PyObject * THPVariable_Wrap(at::Tensor t)` from torch/autograd/python_variable.h
Not sure if it is the cpp API way to do it though.