未验证 提交 e81f28f0 编写于 作者: W wanghuancoder 提交者: GitHub

[Eager] fix pylayer forward output code (#43331)

* fix pylayer forward output code

* refine
上级 cab0f2f5
......@@ -240,6 +240,8 @@ PyObject* pylayer_method_apply(PyObject* cls, PyObject* args,
PyObject* outputs_tuple = nullptr;
if (PyTuple_Check(outputs)) {
outputs_tuple = outputs;
} else if (PyList_Check(outputs)) {
outputs_tuple = PyList_AsTuple(outputs);
} else {
outputs_tuple = PyTuple_New(1);
Py_INCREF(outputs);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册