fix bug of print error log in thor optimization training log

This commit is contained in:
wangmin 2020-10-29 15:17:43 +08:00
parent 18a2e1d52b
commit 83c0101a20
1 changed files with 3 additions and 0 deletions

View File

@ -146,6 +146,9 @@ py::object ValuePtrToPyData(const ValuePtr &value) {
ret = py::none();
} else if (value->isa<None>()) {
ret = py::none();
} else if (value->isa<FuncGraph>()) {
// FuncGraph is not used in the backend, return None
ret = py::none();
} else {
MS_LOG(EXCEPTION) << "Unsupported convert value: " << value->ToString() << " to a PyData.";
}