未验证 提交 3844a5a5 编写于 作者: J Jason 提交者: GitHub

Merge pull request #963 from PaddlePaddle/fixed_models

[Bug]Fixed from x2paddle import models error
......@@ -13,7 +13,7 @@
# limitations under the License.
import paddle
from paddle.fluid.core import VarBase
from paddle.framework import core
from x2paddle.utils import paddle_dtypes
......@@ -24,7 +24,7 @@ def is_condition_one(idx):
a[mask, :]
a[mask, ...]
"""
if not (isinstance(idx[0], paddle.Tensor) and \
if not (isinstance(idx[0], paddle.Tensor) and
idx[0].dtype == paddle_dtypes.t_bool):
return False
if len(idx) == 1:
......@@ -53,6 +53,8 @@ def is_condition_two(idx):
return False
VarBase = core.eager.Tensor
VarBase.tmp = VarBase.__getitem__
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册