convert pytorch's tensor in Python API (#1172)

* convert pytorch's tensor

* separate tests for convert pytorch tensor
This commit is contained in:
andrew
2023-10-26 01:39:14 +07:00
committed by GitHub
parent 0acd16751d
commit 6a446d9d73
3 changed files with 43 additions and 0 deletions

View File

@ -396,6 +396,11 @@ class Tensor:
Convert the tensor to a new dtype.
"""
pass
def to_torch(self) -> torch.Tensor:
"""
Converts candle's tensor to pytorch's tensor
"""
pass
def transpose(self, dim1: int, dim2: int) -> Tensor:
"""
Returns a tensor that is a transposed version of the input, the given dimensions are swapped.