|
|
|
@@ -2367,8 +2367,7 @@ void GradExecutor::DoGradForCustomBprop(const py::object &cell, const py::object |
|
|
|
MS_LOG(DEBUG) << "Do grad for custom bprop"; |
|
|
|
size_t par_number = py::tuple(parse::python_adapter::CallPyObjMethod(cell, "get_parameters")).size(); |
|
|
|
if (par_number > 0) { |
|
|
|
MS_LOG(EXCEPTION) << "When user defines the net bprop, there are " << par_number |
|
|
|
<< " parameters that is not supported in the net."; |
|
|
|
MS_LOG(EXCEPTION) << "When user defines the net bprop, the 'Parameter' data type is not supported in the net."; |
|
|
|
} |
|
|
|
py::function bprop_func = py::getattr(cell, parse::CUSTOM_BPROP_NAME); |
|
|
|
auto bprop_func_cellid = GetId(bprop_func); |
|
|
|
|