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]