提交 38a5c1c9 编写于 作者: M Megvii Engine Team

fix(mge): fix refcnt in TensorShape caster

GitOrigin-RevId: 24f6c7a6d0401c24496fc68e6d05147d1a50ca2a
上级 2cc85487
......@@ -279,7 +279,7 @@ namespace detail {
PYBIND11_TYPE_CASTER(mgb::TensorShape, _("TensorShape"));
public:
bool load(handle src, bool convert) {
auto obj = reinterpret_steal<object>(src);
auto obj = reinterpret_borrow<object>(src);
if (!convert && !isinstance<tuple>(obj)) {
return false;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册