From e4aea7fde4559dcb8453741c7681e8f54b0a56df Mon Sep 17 00:00:00 2001 From: Yi Wang Date: Thu, 3 Aug 2017 17:33:21 -0700 Subject: [PATCH] Fix pybind and const type mismatch --- paddle/framework/pybind.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/framework/pybind.cc b/paddle/framework/pybind.cc index 70f0e5157..1f30cb10f 100644 --- a/paddle/framework/pybind.cc +++ b/paddle/framework/pybind.cc @@ -154,8 +154,8 @@ All parameter, weight, gradient are variables in Paddle. m.def_submodule( "var_names", "The module will return special predefined variable name in Paddle") - .def("empty", kEmptyVarName) - .def("temp", kTempVarName); + .def("empty", []() { return kEmptyVarName; }) + .def("temp", []() { return kTempVarName; }); // clang-format off py::class_(m, "DeviceContext") .def_static("create", -- GitLab