diff --git a/paddle/pybind/pybind.cc b/paddle/pybind/pybind.cc index e0f4c02459b3b526b58f620f9b7d9379538f0c83..7e84550f770e8dba998ce7ff91b9d774acbffc3e 100644 --- a/paddle/pybind/pybind.cc +++ b/paddle/pybind/pybind.cc @@ -110,7 +110,7 @@ All parameter, weight, gradient are variables in Paddle. py::class_(m, "Operator") .def("__str__", &pd::OperatorBase::DebugString) .def_static("create", - [](const std::string& protobin) { + [](py::bytes protobin) { pd::OpDesc desc; PADDLE_ENFORCE(desc.ParsePartialFromString(protobin), "Cannot parse user input to OpDesc");