hasktorch-0.2.1.2: Haskell bindings to libtorch, supporting both typed and untyped tensors.
Safe HaskellNone
LanguageHaskell2010

Torch.Typed.VLTensor

Synopsis

Documentation

data VLTensor (device :: (DeviceType, Nat)) (dtype :: DType) (shape :: [Nat]) Source #

A variable length tensor. The length cannot be determined in advance.

Constructors

KnownNat n => VLTensor (Tensor device dtype (n ': shape)) 

Instances

Instances details
Show (VLTensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.VLTensor

Methods

showsPrec :: Int -> VLTensor device dtype shape -> ShowS #

show :: VLTensor device dtype shape -> String #

showList :: [VLTensor device dtype shape] -> ShowS #

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 #

pack :: forall (device :: (DeviceType, Nat)) (dtype :: DType) (shape :: [Nat]). [Tensor device dtype shape] -> VLTensor device dtype shape Source #

unpack :: forall (device :: (DeviceType, Nat)) (dtype :: DType) (shape :: [Nat]). VLTensor device dtype shape -> [Tensor device dtype shape] Source #