From 5b95ab55e00764b79593f5ab6c64494e226c1c70 Mon Sep 17 00:00:00 2001 From: channingss Date: Sun, 25 Apr 2021 10:41:50 +0800 Subject: [PATCH] for new version --- x2paddle/__init__.py | 2 +- x2paddle/op_mapper/dygraph/pytorch2paddle/pytorch_op_mapper.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x2paddle/__init__.py b/x2paddle/__init__.py index b6a4e42f7..b1d07005b 100644 --- a/x2paddle/__init__.py +++ b/x2paddle/__init__.py @@ -1,4 +1,4 @@ -__version__ = "1.0.1" +__version__ = "1.0.2" from .core.program import PaddleGraph diff --git a/x2paddle/op_mapper/dygraph/pytorch2paddle/pytorch_op_mapper.py b/x2paddle/op_mapper/dygraph/pytorch2paddle/pytorch_op_mapper.py index d33e84a82..931ace6ef 100644 --- a/x2paddle/op_mapper/dygraph/pytorch2paddle/pytorch_op_mapper.py +++ b/x2paddle/op_mapper/dygraph/pytorch2paddle/pytorch_op_mapper.py @@ -281,7 +281,7 @@ def data(self, graph, node, uid, input_ct): scope_name=scope_name, data=output_name) if self.input_examples is not None: - input_np = self.input_examples[input_ct].detach().numpy() + input_np = self.input_examples[input_ct].cpu().detach().numpy() self.inputs_info[ output_name] = [list(input_np.shape), str(input_np.dtype)] return [], [output_name]