mirror of
https://github.com/huggingface/candle.git
synced 2025-06-18 19:47:12 +00:00
convert pytorch's tensor in Python API (#1172)
* convert pytorch's tensor * separate tests for convert pytorch tensor
This commit is contained in:
@ -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.
|
||||
|
Reference in New Issue
Block a user