From c784fac094c43a89f63931bb550d9073175fe92f Mon Sep 17 00:00:00 2001 From: Joaquin Anton Guirao Date: Wed, 18 Dec 2024 14:07:58 +0100 Subject: [PATCH] Fix Signed-off-by: Joaquin Anton Guirao --- dali/python/backend_impl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dali/python/backend_impl.cc b/dali/python/backend_impl.cc index 3906cd93bf..84d3f330d6 100644 --- a/dali/python/backend_impl.cc +++ b/dali/python/backend_impl.cc @@ -1179,7 +1179,7 @@ void ExposeTensorList(py::module &m) { Returns a `TensorListGPU` object being a copy of this `TensorListCPU`. )code", py::return_value_policy::take_ownership) - .def("as_cpu", [](TensorList &t) { + .def("as_cpu", [](TensorList &t) -> TensorList & { return t; }, R"code(Passthrough, as it is already an instance of `TensorListCPU`.)code", py::return_value_policy::reference_internal)