Safe Haskell | None |
---|---|
Language | Haskell2010 |
Torch.Typed.VLTensor
Synopsis
- data VLTensor (device :: (DeviceType, Nat)) (dtype :: DType) (shape :: [Nat]) = KnownNat n => VLTensor (Tensor device dtype (n ': shape))
- fromVLTensor :: forall (n :: Nat) (device :: (DeviceType, Nat)) (dtype :: DType) (shape :: [Nat]). (KnownNat n, TensorOptions shape dtype device, KnownShape shape) => VLTensor device dtype shape -> Maybe (Tensor device dtype (n ': shape))
- selectIndexes :: forall (n :: Nat) (device :: (DeviceType, Nat)) (dtype :: DType) (shape :: [Nat]). Tensor device dtype (n ': shape) -> Tensor device 'Bool '[n] -> VLTensor device dtype shape
- pack :: forall (device :: (DeviceType, Nat)) (dtype :: DType) (shape :: [Nat]). [Tensor device dtype shape] -> VLTensor device dtype shape
- unpack :: forall (device :: (DeviceType, Nat)) (dtype :: DType) (shape :: [Nat]). 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 :: Nat) (device :: (DeviceType, Nat)) (dtype :: DType) (shape :: [Nat]). (KnownNat n, TensorOptions shape dtype device, KnownShape shape) => VLTensor device dtype shape -> Maybe (Tensor device dtype (n ': shape)) Source #
selectIndexes :: forall (n :: Nat) (device :: (DeviceType, Nat)) (dtype :: DType) (shape :: [Nat]). Tensor device dtype (n ': shape) -> Tensor device 'Bool '[n] -> VLTensor device dtype shape Source #