gwexpy.interop.torch_
Interoperability with PyTorch tensors.
Functions
|
Create a TimeSeries from a PyTorch tensor. |
|
Convert a series to a PyTorch tensor. |
- gwexpy.interop.torch_.to_torch(series: TimeSeries | Any, device: str | torch.device | None = None, dtype: torch.dtype | None = None, requires_grad: bool = False, copy: bool = False) torch.Tensor[source]
Convert a series to a PyTorch tensor.
- Parameters:
- Returns:
The converted tensor.
- Return type:
torch.Tensor