| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Torch.Typed.VLTensor
Synopsis
- data VLTensor (device :: (DeviceType, Nat)) (dtype :: DType) (shape :: [Nat]) = forall n.KnownNat n => VLTensor (Tensor device dtype (n : shape))
- fromVLTensor :: forall n device dtype shape. (KnownNat n, TensorOptions shape dtype device, KnownShape shape) => VLTensor device dtype shape -> Maybe (Tensor device dtype (n : shape))
- selectIndexes :: forall n device dtype shape. Tensor device dtype (n : shape) -> Tensor device 'Bool '[n] -> VLTensor device dtype shape
- pack :: forall device dtype shape. [Tensor device dtype shape] -> VLTensor device dtype shape
- unpack :: forall device dtype shape. VLTensor device dtype shape -> [Tensor device dtype shape]
Documentation
data VLTensor (device :: (DeviceType, Nat)) (dtype :: DType) (shape :: [Nat]) Source #
A variable length tensor. The length cannot be determined in advance.
fromVLTensor :: forall n device dtype shape. (KnownNat n, TensorOptions shape dtype device, KnownShape shape) => VLTensor device dtype shape -> Maybe (Tensor device dtype (n : shape)) Source #
selectIndexes :: forall n device dtype shape. Tensor device dtype (n : shape) -> Tensor device 'Bool '[n] -> VLTensor device dtype shape Source #