Skip to content

Commit

Permalink
fix type in PHETensor
Browse files Browse the repository at this point in the history
Signed-off-by: sagewe <wbwmat@gmail.com>
  • Loading branch information
sagewe committed Aug 22, 2023
1 parent 45afe68 commit df770b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/fate/arch/tensor/phe/_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"<PHETensor shape={self.shape}, dtype={self.dtype}>"
Expand Down

0 comments on commit df770b9

Please sign in to comment.