feat: 导出拷出张量值方法

Signed-off-by: YdrMaster <ydrml@hotmail.com>
This commit is contained in:
YdrMaster 2023-03-21 14:40:13 +08:00
parent 9db97eb212
commit 73e895b8ce
1 changed files with 2 additions and 0 deletions

View File

@ -178,6 +178,8 @@ void init_graph_builder(py::module &m) {
.def("fuid", &TensorObj::getFuid, policy::automatic) .def("fuid", &TensorObj::getFuid, policy::automatic)
.def("shape", &TensorObj::getDims, policy::move) .def("shape", &TensorObj::getDims, policy::move)
.def("copyoutFloat", &TensorObj::copyoutFloat, policy::move) .def("copyoutFloat", &TensorObj::copyoutFloat, policy::move)
.def("copyoutInt32", &TensorObj::copyoutInt32, policy::move)
.def("copyoutInt64", &TensorObj::copyoutInt64, policy::move)
.def("has_target", &TensorObj::hasTarget, policy::automatic) .def("has_target", &TensorObj::hasTarget, policy::automatic)
.def("src", &TensorObj::getOutputOf, policy::move); .def("src", &TensorObj::getOutputOf, policy::move);
py::class_<OperatorObj, std::shared_ptr<OperatorObj>>(m, "Operator") py::class_<OperatorObj, std::shared_ptr<OperatorObj>>(m, "Operator")