提交 b154c0e5 编写于 作者: F fengjiayi

Update

上级 a6b2197d
......@@ -344,8 +344,12 @@ All parameter, weight, gradient are variables in Paddle.
py::class_<BlockDesc>(m, "BlockDesc", "")
.def("id", [](BlockDesc &self) { return self.idx(); })
.def("parent", [](BlockDesc &self) { return self.parent_idx(); })
.def("append_op", [](BlockDesc &self) { return self.add_ops(); })
.def("new_var", [](BlockDesc &self) { return self.add_vars(); });
.def("append_op",
[](BlockDesc &self) { return self.add_ops(); },
py::return_value_policy::reference)
.def("new_var",
[](BlockDesc &self) { return self.add_vars(); },
py::return_value_policy::reference);
py::class_<VarDesc>(m, "VarDesc", "")
.def(py::init<>())
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册