I need do something on libtorch, then return Tensor to pytorch, implement by pybind11
code snip：
#include <torch/torch.h>
#include <pybind11/pybind11.h>
#include <iostream>

torch::Tensor create()
{
    return torch::rand({2, 3});
}


PYBIND11_MODULE(example, m)
{
    m.doc() = "libtorch tensor test";
    m.def("create", &create, "create tensor");
}

when I execute “example.create()” in Python, error occur:

TypeError: Unable to convert function return value to a Python type! The signature was
() → at::Tensor

How can I do that correctly? Hope for your help!