提交 37fd8fa1 编写于 作者: F fengjiayi

Fix typo

上级 e2900366
...@@ -17,7 +17,7 @@ limitations under the License. */ ...@@ -17,7 +17,7 @@ limitations under the License. */
namespace paddle { namespace paddle {
namespace framework { namespace framework {
void bind_program_desc(py::module &m) { void BindProgramDesc(py::module &m) {
py::class_<ProgramDesc>(m, "ProgramDesc", "") py::class_<ProgramDesc>(m, "ProgramDesc", "")
.def_static("instance", .def_static("instance",
[] { return &GetProgramDesc(); }, [] { return &GetProgramDesc(); },
...@@ -45,7 +45,7 @@ void bind_program_desc(py::module &m) { ...@@ -45,7 +45,7 @@ void bind_program_desc(py::module &m) {
.def("__str__", [](ProgramDesc &self) { return self.DebugString(); }); .def("__str__", [](ProgramDesc &self) { return self.DebugString(); });
} }
void bind_block_desc(py::module &m) { void BindBlockDesc(py::module &m) {
py::class_<BlockDesc>(m, "BlockDesc", "") py::class_<BlockDesc>(m, "BlockDesc", "")
.def("id", [](BlockDesc &self) { return self.idx(); }) .def("id", [](BlockDesc &self) { return self.idx(); })
.def("parent", [](BlockDesc &self) { return self.parent_idx(); }) .def("parent", [](BlockDesc &self) { return self.parent_idx(); })
...@@ -57,7 +57,7 @@ void bind_block_desc(py::module &m) { ...@@ -57,7 +57,7 @@ void bind_block_desc(py::module &m) {
py::return_value_policy::reference); py::return_value_policy::reference);
} }
void bind_var_dses(py::module &m) { void BindVarDsec(py::module &m) {
py::class_<VarDesc>(m, "VarDesc", "") py::class_<VarDesc>(m, "VarDesc", "")
.def(py::init<>()) .def(py::init<>())
.def("set_name", .def("set_name",
...@@ -85,7 +85,7 @@ void bind_var_dses(py::module &m) { ...@@ -85,7 +85,7 @@ void bind_var_dses(py::module &m) {
}); });
} }
void bind_op_desc(py::module &m) { void BindOpDesc(py::module &m) {
auto op_desc_set_var = [](OpDesc::Var *var, auto op_desc_set_var = [](OpDesc::Var *var,
const std::string &parameter, const std::string &parameter,
const std::vector<std::string> &arguments) { const std::vector<std::string> &arguments) {
......
...@@ -46,9 +46,9 @@ inline void VectorToRepeated(const std::vector<T>& vec, ...@@ -46,9 +46,9 @@ inline void VectorToRepeated(const std::vector<T>& vec,
} }
} }
void bind_program_desc(py::module& m); void BindProgramDesc(py::module& m);
void bind_block_desc(py::module& m); void BindBlockDesc(py::module& m);
void bind_var_dses(py::module& m); void BindVarDsec(py::module& m);
void bind_op_desc(py::module& m); void BindOpDesc(py::module& m);
} // namespace framework } // namespace framework
} // namespace paddle } // namespace paddle
...@@ -307,10 +307,10 @@ All parameter, weight, gradient are variables in Paddle. ...@@ -307,10 +307,10 @@ All parameter, weight, gradient are variables in Paddle.
m.def("is_compile_gpu", IsCompileGPU); m.def("is_compile_gpu", IsCompileGPU);
bind_program_desc(m); BindProgramDesc(m);
bind_block_desc(m); BindBlockDesc(m);
bind_var_dses(m); BindVarDsec(m);
bind_op_desc(m); BindOpDesc(m);
return m.ptr(); return m.ptr();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册