Browse Source

fix(mge): fix refcnt in TensorShape caster

GitOrigin-RevId: 24f6c7a6d0
tags/v1.0.0-rc1
Megvii Engine Team 4 years ago
parent
commit
38a5c1c970
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      imperative/python/src/helper.h

+ 1
- 1
imperative/python/src/helper.h View File

@@ -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;
}


Loading…
Cancel
Save