From df770b9ab7413439467e06fb384ad2ec87b8b5f0 Mon Sep 17 00:00:00 2001 From: sagewe Date: Tue, 22 Aug 2023 16:43:30 +0800 Subject: [PATCH] fix type in PHETensor Signed-off-by: sagewe --- python/fate/arch/tensor/phe/_tensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/fate/arch/tensor/phe/_tensor.py b/python/fate/arch/tensor/phe/_tensor.py index 24e160257d..4558cbf2a7 100644 --- a/python/fate/arch/tensor/phe/_tensor.py +++ b/python/fate/arch/tensor/phe/_tensor.py @@ -35,8 +35,8 @@ def __init__(self, pk, evaluator, coder, shape: torch.Size, data, dtype, device) self._dtype = dtype self._device = device - def type(self): - return f"phe.{self.dtype}" + def type(self, dtype): + return self.with_template(self._data, dtype) def __repr__(self) -> str: return f""