hasktorch-0.2.0.0: Functional differentiable programming in Haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Torch.Typed

Synopsis

Documentation

module Torch.Data

class Randomizable spec f | spec -> f where Source #

Methods

sample :: spec -> IO f Source #

Instances

Instances details
Randomizable BatchNormSpec BatchNorm Source # 
Instance details

Defined in Torch.NN

Randomizable Conv1dSpec Conv1d Source # 
Instance details

Defined in Torch.NN

Randomizable Conv2dSpec Conv2d Source # 
Instance details

Defined in Torch.NN

Randomizable Conv3dSpec Conv3d Source # 
Instance details

Defined in Torch.NN

Randomizable ConvTranspose1dSpec ConvTranspose1d Source # 
Instance details

Defined in Torch.NN

Randomizable ConvTranspose2dSpec ConvTranspose2d Source # 
Instance details

Defined in Torch.NN

Randomizable ConvTranspose3dSpec ConvTranspose3d Source # 
Instance details

Defined in Torch.NN

Randomizable InstanceNormSpec InstanceNorm Source # 
Instance details

Defined in Torch.NN

Randomizable LinearSpec Linear Source # 
Instance details

Defined in Torch.NN

Randomizable UpSampleSpec UpSample Source # 
Instance details

Defined in Torch.NN

Randomizable ElmanSpec ElmanCell Source # 
Instance details

Defined in Torch.NN.Recurrent.Cell.Elman

Randomizable GRUSpec GRUCell Source # 
Instance details

Defined in Torch.NN.Recurrent.Cell.GRU

Randomizable LSTMSpec LSTMCell Source # 
Instance details

Defined in Torch.NN.Recurrent.Cell.LSTM

Randomizable DropoutSpec Dropout Source # 
Instance details

Defined in Torch.Typed.NN.Dropout

(Randomizable xSpec x, Randomizable (HList xsSpec) (HList xs)) => Randomizable (HList (xSpec ': xsSpec)) (HList (x ': xs)) Source # 
Instance details

Defined in Torch.Typed.Parameter

Methods

sample :: HList (xSpec ': xsSpec) -> IO (HList (x ': xs)) Source #

Randomizable (HList ('[] :: [Type])) (HList ('[] :: [Type])) Source # 
Instance details

Defined in Torch.Typed.Parameter

Methods

sample :: HList '[] -> IO (HList '[]) Source #

(TensorOptions normalizedShape dtype device, RandDTypeIsValid device dtype) => Randomizable (LayerNormSpec normalizedShape dtype device) (LayerNorm normalizedShape dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Normalization

Methods

sample :: LayerNormSpec normalizedShape dtype device -> IO (LayerNorm normalizedShape dtype device) Source #

(KnownNat inputFeatures, KnownNat outputFeatures, KnownDType dtype, KnownDevice device, RandDTypeIsValid device dtype) => Randomizable (LinearSpec inputFeatures outputFeatures dtype device) (Linear inputFeatures outputFeatures dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Linear

Methods

sample :: LinearSpec inputFeatures outputFeatures dtype device -> IO (Linear inputFeatures outputFeatures dtype device) Source #

(KnownDevice device, KnownDType dtype, KnownNat inputDim, KnownNat hiddenDim, RandDTypeIsValid device dtype) => Randomizable (GRUCellSpec inputDim hiddenDim dtype device) (GRUCell inputDim hiddenDim dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.Cell.GRU

Methods

sample :: GRUCellSpec inputDim hiddenDim dtype device -> IO (GRUCell inputDim hiddenDim dtype device) Source #

(KnownDevice device, KnownDType dtype, KnownNat inputDim, KnownNat hiddenDim, RandDTypeIsValid device dtype) => Randomizable (LSTMCellSpec inputDim hiddenDim dtype device) (LSTMCell inputDim hiddenDim dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.Cell.LSTM

Methods

sample :: LSTMCellSpec inputDim hiddenDim dtype device -> IO (LSTMCell inputDim hiddenDim dtype device) Source #

(All KnownNat '[embedDim, ffnDim], KnownDType dtype, KnownDevice device, RandDTypeIsValid device dtype) => Randomizable (TransformerMLPSpec embedDim ffnDim dtype device) (TransformerMLP embedDim ffnDim dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Transformer

Methods

sample :: TransformerMLPSpec embedDim ffnDim dtype device -> IO (TransformerMLP embedDim ffnDim dtype device) Source #

(KnownNat inputChannelSize, KnownNat outputChannelSize, KnownNat kernelSize, KnownDType dtype, KnownDevice device, RandDTypeIsValid device dtype) => Randomizable (Conv1dSpec inputChannelSize outputChannelSize kernelSize dtype device) (Conv1d inputChannelSize outputChannelSize kernelSize dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Convolution

Methods

sample :: Conv1dSpec inputChannelSize outputChannelSize kernelSize dtype device -> IO (Conv1d inputChannelSize outputChannelSize kernelSize dtype device) Source #

(KnownNat inputChannelSize, KnownNat outputChannelSize, KnownNat kernelSize, KnownDType dtype, KnownDevice device, RandDTypeIsValid device dtype) => Randomizable (ConvTranspose1dSpec inputChannelSize outputChannelSize kernelSize dtype device) (ConvTranspose1d inputChannelSize outputChannelSize kernelSize dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Convolution

Methods

sample :: ConvTranspose1dSpec inputChannelSize outputChannelSize kernelSize dtype device -> IO (ConvTranspose1d inputChannelSize outputChannelSize kernelSize dtype device) Source #

(RandDTypeIsValid device dtype, KnownNat inputSize, KnownNat hiddenSize, KnownDType dtype, KnownDevice device) => Randomizable (GRULayerSpec inputSize hiddenSize 'Bidirectional dtype device) (GRULayer inputSize hiddenSize 'Bidirectional dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.GRU

Methods

sample :: GRULayerSpec inputSize hiddenSize 'Bidirectional dtype device -> IO (GRULayer inputSize hiddenSize 'Bidirectional dtype device) Source #

(RandDTypeIsValid device dtype, KnownNat inputSize, KnownNat hiddenSize, KnownDType dtype, KnownDevice device) => Randomizable (GRULayerSpec inputSize hiddenSize 'Unidirectional dtype device) (GRULayer inputSize hiddenSize 'Unidirectional dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.GRU

Methods

sample :: GRULayerSpec inputSize hiddenSize 'Unidirectional dtype device -> IO (GRULayer inputSize hiddenSize 'Unidirectional dtype device) Source #

(RandDTypeIsValid device dtype, KnownNat inputSize, KnownNat hiddenSize, KnownDType dtype, KnownDevice device) => Randomizable (LSTMLayerSpec inputSize hiddenSize 'Bidirectional dtype device) (LSTMLayer inputSize hiddenSize 'Bidirectional dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.LSTM

Methods

sample :: LSTMLayerSpec inputSize hiddenSize 'Bidirectional dtype device -> IO (LSTMLayer inputSize hiddenSize 'Bidirectional dtype device) Source #

(RandDTypeIsValid device dtype, KnownNat inputSize, KnownNat hiddenSize, KnownDType dtype, KnownDevice device) => Randomizable (LSTMLayerSpec inputSize hiddenSize 'Unidirectional dtype device) (LSTMLayer inputSize hiddenSize 'Unidirectional dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.LSTM

Methods

sample :: LSTMLayerSpec inputSize hiddenSize 'Unidirectional dtype device -> IO (LSTMLayer inputSize hiddenSize 'Unidirectional dtype device) Source #

(KnownNat inputChannelSize, KnownNat outputChannelSize, KnownNat kernelSize0, KnownNat kernelSize1, KnownDType dtype, KnownDevice device, RandDTypeIsValid device dtype) => Randomizable (Conv2dSpec inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device) (Conv2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Convolution

Methods

sample :: Conv2dSpec inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device -> IO (Conv2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device) Source #

(KnownNat inputChannelSize, KnownNat outputChannelSize, KnownNat kernelSize0, KnownNat kernelSize1, KnownDType dtype, KnownDevice device, RandDTypeIsValid device dtype) => Randomizable (ConvTranspose2dSpec inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device) (ConvTranspose2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Convolution

Methods

sample :: ConvTranspose2dSpec inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device -> IO (ConvTranspose2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device) Source #

(1 <= numLayers, (2 <=? numLayers) ~ flag, RandDTypeIsValid device dtype, KnownDType dtype, KnownDevice device, GRULayerStackRandomizable flag inputSize hiddenSize numLayers directionality dtype device) => Randomizable (GRULayerStackSpec inputSize hiddenSize numLayers directionality dtype device) (GRULayerStack inputSize hiddenSize numLayers directionality dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.GRU

Methods

sample :: GRULayerStackSpec inputSize hiddenSize numLayers directionality dtype device -> IO (GRULayerStack inputSize hiddenSize numLayers directionality dtype device) Source #

(KnownDType dtype, KnownDevice device, KnownNat inputSize, KnownNat hiddenSize, KnownNat (NumberOfDirections directionality), RandDTypeIsValid device dtype, Randomizable (GRULayerStackSpec inputSize hiddenSize numLayers directionality dtype device) (GRULayerStack inputSize hiddenSize numLayers directionality dtype device), 1 <= numLayers) => Randomizable (GRUSpec inputSize hiddenSize numLayers directionality dtype device) (GRU inputSize hiddenSize numLayers directionality dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.GRU

Methods

sample :: GRUSpec inputSize hiddenSize numLayers directionality dtype device -> IO (GRU inputSize hiddenSize numLayers directionality dtype device) Source #

(1 <= numLayers, (2 <=? numLayers) ~ flag, RandDTypeIsValid device dtype, KnownDType dtype, KnownDevice device, LSTMLayerStackRandomizable flag inputSize hiddenSize numLayers directionality dtype device) => Randomizable (LSTMLayerStackSpec inputSize hiddenSize numLayers directionality dtype device) (LSTMLayerStack inputSize hiddenSize numLayers directionality dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.LSTM

Methods

sample :: LSTMLayerStackSpec inputSize hiddenSize numLayers directionality dtype device -> IO (LSTMLayerStack inputSize hiddenSize numLayers directionality dtype device) Source #

(KnownDType dtype, KnownDevice device, KnownNat inputSize, KnownNat hiddenSize, KnownNat (NumberOfDirections directionality), RandDTypeIsValid device dtype, Randomizable (LSTMLayerStackSpec inputSize hiddenSize numLayers directionality dtype device) (LSTMLayerStack inputSize hiddenSize numLayers directionality dtype device), 1 <= numLayers) => Randomizable (LSTMSpec inputSize hiddenSize numLayers directionality dtype device) (LSTM inputSize hiddenSize numLayers directionality dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.LSTM

Methods

sample :: LSTMSpec inputSize hiddenSize numLayers directionality dtype device -> IO (LSTM inputSize hiddenSize numLayers directionality dtype device) Source #

(paddingIdx <= numEmbeds, 1 <= (numEmbeds - paddingIdx), (((numEmbeds - paddingIdx) - 1) + (1 + paddingIdx)) ~ numEmbeds, KnownNat paddingIdx, KnownNat numEmbeds, KnownNat embedSize, KnownDType dtype, KnownDevice device, RandDTypeIsValid device dtype) => Randomizable (EmbeddingSpec ('Just paddingIdx) numEmbeds embedSize 'Learned dtype device) (Embedding ('Just paddingIdx) numEmbeds embedSize 'Learned dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Sparse

Methods

sample :: EmbeddingSpec ('Just paddingIdx) numEmbeds embedSize 'Learned dtype device -> IO (Embedding ('Just paddingIdx) numEmbeds embedSize 'Learned dtype device) Source #

(KnownNat numEmbeds, KnownNat embedSize, KnownDType dtype, KnownDevice device, RandDTypeIsValid device dtype) => Randomizable (EmbeddingSpec ('Nothing :: Maybe Nat) numEmbeds embedSize 'Learned dtype device) (Embedding ('Nothing :: Maybe Nat) numEmbeds embedSize 'Learned dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Sparse

Methods

sample :: EmbeddingSpec 'Nothing numEmbeds embedSize 'Learned dtype device -> IO (Embedding 'Nothing numEmbeds embedSize 'Learned dtype device) Source #

Randomizable (EmbeddingSpec paddingIdx numEmbeds embedSize 'Constant dtype device) (Embedding paddingIdx numEmbeds embedSize 'Constant dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Sparse

Methods

sample :: EmbeddingSpec paddingIdx numEmbeds embedSize 'Constant dtype device -> IO (Embedding paddingIdx numEmbeds embedSize 'Constant dtype device) Source #

(All KnownNat '[embedDim, kEmbedDim, vEmbedDim, numHeads], KnownDType dtype, KnownDevice device, RandDTypeIsValid device dtype) => Randomizable (MultiheadAttentionSpec embedDim kEmbedDim vEmbedDim numHeads dtype device) (MultiheadAttention embedDim kEmbedDim vEmbedDim numHeads dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Transformer

Methods

sample :: MultiheadAttentionSpec embedDim kEmbedDim vEmbedDim numHeads dtype device -> IO (MultiheadAttention embedDim kEmbedDim vEmbedDim numHeads dtype device) Source #

(KnownNat inputChannelSize, KnownNat outputChannelSize, KnownNat kernelSize0, KnownNat kernelSize1, KnownNat kernelSize2, KnownDType dtype, KnownDevice device, RandDTypeIsValid device dtype) => Randomizable (Conv3dSpec inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device) (Conv3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Convolution

Methods

sample :: Conv3dSpec inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device -> IO (Conv3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device) Source #

(KnownNat inputChannelSize, KnownNat outputChannelSize, KnownNat kernelSize0, KnownNat kernelSize1, KnownNat kernelSize2, KnownDType dtype, KnownDevice device, RandDTypeIsValid device dtype) => Randomizable (ConvTranspose3dSpec inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device) (ConvTranspose3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Convolution

Methods

sample :: ConvTranspose3dSpec inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device -> IO (ConvTranspose3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device) Source #

(KnownNat hiddenSize, KnownNat numLayers, KnownNat (NumberOfDirections directionality), KnownDType dtype, KnownDevice device, Randomizable (GRUSpec inputSize hiddenSize numLayers directionality dtype device) (GRU inputSize hiddenSize numLayers directionality dtype device)) => Randomizable (GRUWithInitSpec inputSize hiddenSize numLayers directionality 'ConstantInitialization dtype device) (GRUWithInit inputSize hiddenSize numLayers directionality 'ConstantInitialization dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.GRU

Methods

sample :: GRUWithInitSpec inputSize hiddenSize numLayers directionality 'ConstantInitialization dtype device -> IO (GRUWithInit inputSize hiddenSize numLayers directionality 'ConstantInitialization dtype device) Source #

(KnownNat hiddenSize, KnownNat numLayers, KnownNat (NumberOfDirections directionality), KnownDType dtype, KnownDevice device, Randomizable (GRUSpec inputSize hiddenSize numLayers directionality dtype device) (GRU inputSize hiddenSize numLayers directionality dtype device)) => Randomizable (GRUWithInitSpec inputSize hiddenSize numLayers directionality 'LearnedInitialization dtype device) (GRUWithInit inputSize hiddenSize numLayers directionality 'LearnedInitialization dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.GRU

Methods

sample :: GRUWithInitSpec inputSize hiddenSize numLayers directionality 'LearnedInitialization dtype device -> IO (GRUWithInit inputSize hiddenSize numLayers directionality 'LearnedInitialization dtype device) Source #

(KnownNat hiddenSize, KnownNat numLayers, KnownNat (NumberOfDirections directionality), KnownDType dtype, KnownDevice device, Randomizable (LSTMSpec inputSize hiddenSize numLayers directionality dtype device) (LSTM inputSize hiddenSize numLayers directionality dtype device)) => Randomizable (LSTMWithInitSpec inputSize hiddenSize numLayers directionality 'ConstantInitialization dtype device) (LSTMWithInit inputSize hiddenSize numLayers directionality 'ConstantInitialization dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.LSTM

Methods

sample :: LSTMWithInitSpec inputSize hiddenSize numLayers directionality 'ConstantInitialization dtype device -> IO (LSTMWithInit inputSize hiddenSize numLayers directionality 'ConstantInitialization dtype device) Source #

(KnownNat hiddenSize, KnownNat numLayers, KnownNat (NumberOfDirections directionality), KnownDType dtype, KnownDevice device, Randomizable (LSTMSpec inputSize hiddenSize numLayers directionality dtype device) (LSTM inputSize hiddenSize numLayers directionality dtype device)) => Randomizable (LSTMWithInitSpec inputSize hiddenSize numLayers directionality 'LearnedInitialization dtype device) (LSTMWithInit inputSize hiddenSize numLayers directionality 'LearnedInitialization dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.LSTM

Methods

sample :: LSTMWithInitSpec inputSize hiddenSize numLayers directionality 'LearnedInitialization dtype device -> IO (LSTMWithInit inputSize hiddenSize numLayers directionality 'LearnedInitialization dtype device) Source #

(All KnownNat '[embedDim, kEmbedDim, vEmbedDim, numHeads, ffnDim], KnownDType dtype, KnownDevice device, RandDTypeIsValid device dtype) => Randomizable (TransformerLayerSpec embedDim kEmbedDim vEmbedDim numHeads ffnDim dtype device) (TransformerLayer embedDim kEmbedDim vEmbedDim numHeads ffnDim dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Transformer

Methods

sample :: TransformerLayerSpec embedDim kEmbedDim vEmbedDim numHeads ffnDim dtype device -> IO (TransformerLayer embedDim kEmbedDim vEmbedDim numHeads ffnDim dtype device) Source #

(paddingIdx <= numEmbeds, 1 <= (numEmbeds - paddingIdx), 1 <= Div embedDim 2, (((numEmbeds - paddingIdx) - 1) + (1 + paddingIdx)) ~ numEmbeds, (Div embedDim 2 * 2) ~ embedDim, All KnownNat '[ffnDim, paddingIdx, numEmbeds, embedDim], HReplicate numAttnLayers (TransformerLayerSpec embedDim embedDim embedDim numHeads ffnDim dtype device), Randomizable (HList (HReplicateR numAttnLayers (TransformerLayerSpec embedDim embedDim embedDim numHeads ffnDim dtype device))) (HList (HReplicateR numAttnLayers (TransformerLayer embedDim embedDim embedDim numHeads ffnDim dtype device))), KnownDType dtype, RandDTypeIsValid device dtype, StandardFloatingPointDTypeValidation device 'Float, BasicArithmeticDTypeIsValid device 'Float, KnownDevice device) => Randomizable (TransformerLMSpec numAttnLayers numHeads ffnDim paddingIdx numEmbeds embedDim dtype device) (TransformerLM numAttnLayers numHeads ffnDim paddingIdx numEmbeds embedDim dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Transformer

Methods

sample :: TransformerLMSpec numAttnLayers numHeads ffnDim paddingIdx numEmbeds embedDim dtype device -> IO (TransformerLM numAttnLayers numHeads ffnDim paddingIdx numEmbeds embedDim dtype device) Source #

class GParameterized (f :: Type -> Type) where Source #

Associated Types

type GParameters f :: [Type] Source #

Methods

gFlattenParameters :: forall a. f a -> HList (GParameters f) Source #

gReplaceParameters :: forall a. f a -> HList (GParameters f) -> f a Source #

Instances

Instances details
GParameterized (U1 :: Type -> Type) Source # 
Instance details

Defined in Torch.Typed.Parameter

Associated Types

type GParameters U1 :: [Type] Source #

(GParameterized l, GParameterized r, HAppendFD (GParameters l) (GParameters r) (GParameters l ++ GParameters r)) => GParameterized (l :*: r) Source # 
Instance details

Defined in Torch.Typed.Parameter

Associated Types

type GParameters (l :*: r) :: [Type] Source #

Methods

gFlattenParameters :: (l :*: r) a -> HList (GParameters (l :*: r)) Source #

gReplaceParameters :: (l :*: r) a -> HList (GParameters (l :*: r)) -> (l :*: r) a Source #

Parameterized f => GParameterized (K1 i f :: Type -> Type) Source # 
Instance details

Defined in Torch.Typed.Parameter

Associated Types

type GParameters (K1 i f) :: [Type] Source #

Methods

gFlattenParameters :: K1 i f a -> HList (GParameters (K1 i f)) Source #

gReplaceParameters :: K1 i f a -> HList (GParameters (K1 i f)) -> K1 i f a Source #

GParameterized f => GParameterized (M1 i t f) Source # 
Instance details

Defined in Torch.Typed.Parameter

Associated Types

type GParameters (M1 i t f) :: [Type] Source #

Methods

gFlattenParameters :: M1 i t f a -> HList (GParameters (M1 i t f)) Source #

gReplaceParameters :: M1 i t f a -> HList (GParameters (M1 i t f)) -> M1 i t f a Source #

class Parameterized (f :: Type) where Source #

Minimal complete definition

Nothing

Associated Types

type Parameters f :: [Type] Source #

Instances

Instances details
Parameterized Dropout Source # 
Instance details

Defined in Torch.Typed.NN.Dropout

Associated Types

type Parameters Dropout :: [Type] Source #

Parameterized GD Source # 
Instance details

Defined in Torch.Typed.Optim

Associated Types

type Parameters GD :: [Type] Source #

Parameterized Double Source # 
Instance details

Defined in Torch.Typed.Parameter

Associated Types

type Parameters Double :: [Type] Source #

Parameterized Float Source # 
Instance details

Defined in Torch.Typed.Parameter

Associated Types

type Parameters Float :: [Type] Source #

Parameterized Int Source # 
Instance details

Defined in Torch.Typed.Parameter

Associated Types

type Parameters Int :: [Type] Source #

HAppendFD momenta momenta (momenta ++ momenta) => Parameterized (Adam momenta) Source # 
Instance details

Defined in Torch.Typed.Optim

Associated Types

type Parameters (Adam momenta) :: [Type] Source #

Methods

flattenParameters :: Adam momenta -> HList (Parameters (Adam momenta)) Source #

replaceParameters :: Adam momenta -> HList (Parameters (Adam momenta)) -> Adam momenta Source #

Parameterized (GDM momenta) Source # 
Instance details

Defined in Torch.Typed.Optim

Associated Types

type Parameters (GDM momenta) :: [Type] Source #

Methods

flattenParameters :: GDM momenta -> HList (Parameters (GDM momenta)) Source #

replaceParameters :: GDM momenta -> HList (Parameters (GDM momenta)) -> GDM momenta Source #

(Parameterized f, Parameterized (HList fs), HAppendFD (Parameters f) (Parameters (HList fs)) (Parameters f ++ Parameters (HList fs))) => Parameterized (HList (f ': fs)) Source # 
Instance details

Defined in Torch.Typed.Parameter

Associated Types

type Parameters (HList (f ': fs)) :: [Type] Source #

Methods

flattenParameters :: HList (f ': fs) -> HList (Parameters (HList (f ': fs))) Source #

replaceParameters :: HList (f ': fs) -> HList (Parameters (HList (f ': fs))) -> HList (f ': fs) Source #

Parameterized (HList ('[] :: [k])) Source # 
Instance details

Defined in Torch.Typed.Parameter

Associated Types

type Parameters (HList '[]) :: [Type] Source #

Parameterized (LayerNorm normalizedShape dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Normalization

Associated Types

type Parameters (LayerNorm normalizedShape dtype device) :: [Type] Source #

Methods

flattenParameters :: LayerNorm normalizedShape dtype device -> HList (Parameters (LayerNorm normalizedShape dtype device)) Source #

replaceParameters :: LayerNorm normalizedShape dtype device -> HList (Parameters (LayerNorm normalizedShape dtype device)) -> LayerNorm normalizedShape dtype device Source #

Parameterized (Parameter device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Parameter

Associated Types

type Parameters (Parameter device dtype shape) :: [Type] Source #

Methods

flattenParameters :: Parameter device dtype shape -> HList (Parameters (Parameter device dtype shape)) Source #

replaceParameters :: Parameter device dtype shape -> HList (Parameters (Parameter device dtype shape)) -> Parameter device dtype shape Source #

Parameterized (Tensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Parameter

Associated Types

type Parameters (Tensor device dtype shape) :: [Type] Source #

Methods

flattenParameters :: Tensor device dtype shape -> HList (Parameters (Tensor device dtype shape)) Source #

replaceParameters :: Tensor device dtype shape -> HList (Parameters (Tensor device dtype shape)) -> Tensor device dtype shape Source #

Parameterized (Linear inputFeatures outputFeatures dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Linear

Associated Types

type Parameters (Linear inputFeatures outputFeatures dtype device) :: [Type] Source #

Methods

flattenParameters :: Linear inputFeatures outputFeatures dtype device -> HList (Parameters (Linear inputFeatures outputFeatures dtype device)) Source #

replaceParameters :: Linear inputFeatures outputFeatures dtype device -> HList (Parameters (Linear inputFeatures outputFeatures dtype device)) -> Linear inputFeatures outputFeatures dtype device Source #

Parameterized (GRUCell inputDim hiddenDim dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.Cell.GRU

Associated Types

type Parameters (GRUCell inputDim hiddenDim dtype device) :: [Type] Source #

Methods

flattenParameters :: GRUCell inputDim hiddenDim dtype device -> HList (Parameters (GRUCell inputDim hiddenDim dtype device)) Source #

replaceParameters :: GRUCell inputDim hiddenDim dtype device -> HList (Parameters (GRUCell inputDim hiddenDim dtype device)) -> GRUCell inputDim hiddenDim dtype device Source #

Parameterized (LSTMCell inputDim hiddenDim dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.Cell.LSTM

Associated Types

type Parameters (LSTMCell inputDim hiddenDim dtype device) :: [Type] Source #

Methods

flattenParameters :: LSTMCell inputDim hiddenDim dtype device -> HList (Parameters (LSTMCell inputDim hiddenDim dtype device)) Source #

replaceParameters :: LSTMCell inputDim hiddenDim dtype device -> HList (Parameters (LSTMCell inputDim hiddenDim dtype device)) -> LSTMCell inputDim hiddenDim dtype device Source #

Parameterized (TransformerMLP embedDim ffnDim dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Transformer

Associated Types

type Parameters (TransformerMLP embedDim ffnDim dtype device) :: [Type] Source #

Methods

flattenParameters :: TransformerMLP embedDim ffnDim dtype device -> HList (Parameters (TransformerMLP embedDim ffnDim dtype device)) Source #

replaceParameters :: TransformerMLP embedDim ffnDim dtype device -> HList (Parameters (TransformerMLP embedDim ffnDim dtype device)) -> TransformerMLP embedDim ffnDim dtype device Source #

Parameterized (Conv1d inputChannelSize outputChannelSize kernelSize dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Convolution

Associated Types

type Parameters (Conv1d inputChannelSize outputChannelSize kernelSize dtype device) :: [Type] Source #

Methods

flattenParameters :: Conv1d inputChannelSize outputChannelSize kernelSize dtype device -> HList (Parameters (Conv1d inputChannelSize outputChannelSize kernelSize dtype device)) Source #

replaceParameters :: Conv1d inputChannelSize outputChannelSize kernelSize dtype device -> HList (Parameters (Conv1d inputChannelSize outputChannelSize kernelSize dtype device)) -> Conv1d inputChannelSize outputChannelSize kernelSize dtype device Source #

Parameterized (ConvTranspose1d inputChannelSize outputChannelSize kernelSize dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Convolution

Associated Types

type Parameters (ConvTranspose1d inputChannelSize outputChannelSize kernelSize dtype device) :: [Type] Source #

Methods

flattenParameters :: ConvTranspose1d inputChannelSize outputChannelSize kernelSize dtype device -> HList (Parameters (ConvTranspose1d inputChannelSize outputChannelSize kernelSize dtype device)) Source #

replaceParameters :: ConvTranspose1d inputChannelSize outputChannelSize kernelSize dtype device -> HList (Parameters (ConvTranspose1d inputChannelSize outputChannelSize kernelSize dtype device)) -> ConvTranspose1d inputChannelSize outputChannelSize kernelSize dtype device Source #

Parameterized (GRULayer inputSize hiddenSize 'Bidirectional dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.GRU

Associated Types

type Parameters (GRULayer inputSize hiddenSize 'Bidirectional dtype device) :: [Type] Source #

Methods

flattenParameters :: GRULayer inputSize hiddenSize 'Bidirectional dtype device -> HList (Parameters (GRULayer inputSize hiddenSize 'Bidirectional dtype device)) Source #

replaceParameters :: GRULayer inputSize hiddenSize 'Bidirectional dtype device -> HList (Parameters (GRULayer inputSize hiddenSize 'Bidirectional dtype device)) -> GRULayer inputSize hiddenSize 'Bidirectional dtype device Source #

Parameterized (GRULayer inputSize hiddenSize 'Unidirectional dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.GRU

Associated Types

type Parameters (GRULayer inputSize hiddenSize 'Unidirectional dtype device) :: [Type] Source #

Methods

flattenParameters :: GRULayer inputSize hiddenSize 'Unidirectional dtype device -> HList (Parameters (GRULayer inputSize hiddenSize 'Unidirectional dtype device)) Source #

replaceParameters :: GRULayer inputSize hiddenSize 'Unidirectional dtype device -> HList (Parameters (GRULayer inputSize hiddenSize 'Unidirectional dtype device)) -> GRULayer inputSize hiddenSize 'Unidirectional dtype device Source #

Parameterized (LSTMLayer inputSize hiddenSize 'Bidirectional dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.LSTM

Associated Types

type Parameters (LSTMLayer inputSize hiddenSize 'Bidirectional dtype device) :: [Type] Source #

Methods

flattenParameters :: LSTMLayer inputSize hiddenSize 'Bidirectional dtype device -> HList (Parameters (LSTMLayer inputSize hiddenSize 'Bidirectional dtype device)) Source #

replaceParameters :: LSTMLayer inputSize hiddenSize 'Bidirectional dtype device -> HList (Parameters (LSTMLayer inputSize hiddenSize 'Bidirectional dtype device)) -> LSTMLayer inputSize hiddenSize 'Bidirectional dtype device Source #

Parameterized (LSTMLayer inputSize hiddenSize 'Unidirectional dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.LSTM

Associated Types

type Parameters (LSTMLayer inputSize hiddenSize 'Unidirectional dtype device) :: [Type] Source #

Methods

flattenParameters :: LSTMLayer inputSize hiddenSize 'Unidirectional dtype device -> HList (Parameters (LSTMLayer inputSize hiddenSize 'Unidirectional dtype device)) Source #

replaceParameters :: LSTMLayer inputSize hiddenSize 'Unidirectional dtype device -> HList (Parameters (LSTMLayer inputSize hiddenSize 'Unidirectional dtype device)) -> LSTMLayer inputSize hiddenSize 'Unidirectional dtype device Source #

Parameterized (Conv2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Convolution

Associated Types

type Parameters (Conv2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device) :: [Type] Source #

Methods

flattenParameters :: Conv2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device -> HList (Parameters (Conv2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device)) Source #

replaceParameters :: Conv2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device -> HList (Parameters (Conv2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device)) -> Conv2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device Source #

Parameterized (ConvTranspose2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Convolution

Associated Types

type Parameters (ConvTranspose2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device) :: [Type] Source #

Methods

flattenParameters :: ConvTranspose2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device -> HList (Parameters (ConvTranspose2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device)) Source #

replaceParameters :: ConvTranspose2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device -> HList (Parameters (ConvTranspose2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device)) -> ConvTranspose2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device Source #

(1 <= numLayers, Parameterized (GRULayerStack inputSize hiddenSize numLayers directionality dtype device), HAppendFD (Parameters (GRULayerStack inputSize hiddenSize numLayers directionality dtype device)) (Parameters Dropout) (Parameters (GRULayerStack inputSize hiddenSize numLayers directionality dtype device) ++ Parameters Dropout)) => Parameterized (GRU inputSize hiddenSize numLayers directionality dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.GRU

Associated Types

type Parameters (GRU inputSize hiddenSize numLayers directionality dtype device) :: [Type] Source #

Methods

flattenParameters :: GRU inputSize hiddenSize numLayers directionality dtype device -> HList (Parameters (GRU inputSize hiddenSize numLayers directionality dtype device)) Source #

replaceParameters :: GRU inputSize hiddenSize numLayers directionality dtype device -> HList (Parameters (GRU inputSize hiddenSize numLayers directionality dtype device)) -> GRU inputSize hiddenSize numLayers directionality dtype device Source #

(1 <= numLayers, (2 <=? numLayers) ~ flag, GRULayerStackParameterized flag inputSize hiddenSize numLayers directionality dtype device) => Parameterized (GRULayerStack inputSize hiddenSize numLayers directionality dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.GRU

Associated Types

type Parameters (GRULayerStack inputSize hiddenSize numLayers directionality dtype device) :: [Type] Source #

Methods

flattenParameters :: GRULayerStack inputSize hiddenSize numLayers directionality dtype device -> HList (Parameters (GRULayerStack inputSize hiddenSize numLayers directionality dtype device)) Source #

replaceParameters :: GRULayerStack inputSize hiddenSize numLayers directionality dtype device -> HList (Parameters (GRULayerStack inputSize hiddenSize numLayers directionality dtype device)) -> GRULayerStack inputSize hiddenSize numLayers directionality dtype device Source #

(1 <= numLayers, Parameterized (LSTMLayerStack inputSize hiddenSize numLayers directionality dtype device), HAppendFD (Parameters (LSTMLayerStack inputSize hiddenSize numLayers directionality dtype device)) (Parameters Dropout) (Parameters (LSTMLayerStack inputSize hiddenSize numLayers directionality dtype device) ++ Parameters Dropout)) => Parameterized (LSTM inputSize hiddenSize numLayers directionality dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.LSTM

Associated Types

type Parameters (LSTM inputSize hiddenSize numLayers directionality dtype device) :: [Type] Source #

Methods

flattenParameters :: LSTM inputSize hiddenSize numLayers directionality dtype device -> HList (Parameters (LSTM inputSize hiddenSize numLayers directionality dtype device)) Source #

replaceParameters :: LSTM inputSize hiddenSize numLayers directionality dtype device -> HList (Parameters (LSTM inputSize hiddenSize numLayers directionality dtype device)) -> LSTM inputSize hiddenSize numLayers directionality dtype device Source #

(1 <= numLayers, (2 <=? numLayers) ~ flag, LSTMLayerStackParameterized flag inputSize hiddenSize numLayers directionality dtype device) => Parameterized (LSTMLayerStack inputSize hiddenSize numLayers directionality dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.LSTM

Associated Types

type Parameters (LSTMLayerStack inputSize hiddenSize numLayers directionality dtype device) :: [Type] Source #

Methods

flattenParameters :: LSTMLayerStack inputSize hiddenSize numLayers directionality dtype device -> HList (Parameters (LSTMLayerStack inputSize hiddenSize numLayers directionality dtype device)) Source #

replaceParameters :: LSTMLayerStack inputSize hiddenSize numLayers directionality dtype device -> HList (Parameters (LSTMLayerStack inputSize hiddenSize numLayers directionality dtype device)) -> LSTMLayerStack inputSize hiddenSize numLayers directionality dtype device Source #

Parameterized (Embedding paddingIdx numEmbeds embedSize 'Constant dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Sparse

Associated Types

type Parameters (Embedding paddingIdx numEmbeds embedSize 'Constant dtype device) :: [Type] Source #

Methods

flattenParameters :: Embedding paddingIdx numEmbeds embedSize 'Constant dtype device -> HList (Parameters (Embedding paddingIdx numEmbeds embedSize 'Constant dtype device)) Source #

replaceParameters :: Embedding paddingIdx numEmbeds embedSize 'Constant dtype device -> HList (Parameters (Embedding paddingIdx numEmbeds embedSize 'Constant dtype device)) -> Embedding paddingIdx numEmbeds embedSize 'Constant dtype device Source #

Parameterized (Embedding paddingIdx numEmbeds embedSize 'Learned dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Sparse

Associated Types

type Parameters (Embedding paddingIdx numEmbeds embedSize 'Learned dtype device) :: [Type] Source #

Methods

flattenParameters :: Embedding paddingIdx numEmbeds embedSize 'Learned dtype device -> HList (Parameters (Embedding paddingIdx numEmbeds embedSize 'Learned dtype device)) Source #

replaceParameters :: Embedding paddingIdx numEmbeds embedSize 'Learned dtype device -> HList (Parameters (Embedding paddingIdx numEmbeds embedSize 'Learned dtype device)) -> Embedding paddingIdx numEmbeds embedSize 'Learned dtype device Source #

Parameterized (MultiheadAttention embedDim kEmbedDim vEmbedDim numHeads dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Transformer

Associated Types

type Parameters (MultiheadAttention embedDim kEmbedDim vEmbedDim numHeads dtype device) :: [Type] Source #

Methods

flattenParameters :: MultiheadAttention embedDim kEmbedDim vEmbedDim numHeads dtype device -> HList (Parameters (MultiheadAttention embedDim kEmbedDim vEmbedDim numHeads dtype device)) Source #

replaceParameters :: MultiheadAttention embedDim kEmbedDim vEmbedDim numHeads dtype device -> HList (Parameters (MultiheadAttention embedDim kEmbedDim vEmbedDim numHeads dtype device)) -> MultiheadAttention embedDim kEmbedDim vEmbedDim numHeads dtype device Source #

Parameterized (Conv3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Convolution

Associated Types

type Parameters (Conv3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device) :: [Type] Source #

Methods

flattenParameters :: Conv3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device -> HList (Parameters (Conv3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device)) Source #

replaceParameters :: Conv3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device -> HList (Parameters (Conv3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device)) -> Conv3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device Source #

Parameterized (ConvTranspose3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Convolution

Associated Types

type Parameters (ConvTranspose3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device) :: [Type] Source #

Methods

flattenParameters :: ConvTranspose3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device -> HList (Parameters (ConvTranspose3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device)) Source #

replaceParameters :: ConvTranspose3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device -> HList (Parameters (ConvTranspose3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device)) -> ConvTranspose3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device Source #

(Parameterized (GRU inputSize hiddenSize numLayers directionality dtype device), HAppendFD (Parameters (GRU inputSize hiddenSize numLayers directionality dtype device)) ('[] :: [Type]) (Parameters (GRU inputSize hiddenSize numLayers directionality dtype device) ++ ('[] :: [Type]))) => Parameterized (GRUWithInit inputSize hiddenSize numLayers directionality 'ConstantInitialization dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.GRU

Associated Types

type Parameters (GRUWithInit inputSize hiddenSize numLayers directionality 'ConstantInitialization dtype device) :: [Type] Source #

Methods

flattenParameters :: GRUWithInit inputSize hiddenSize numLayers directionality 'ConstantInitialization dtype device -> HList (Parameters (GRUWithInit inputSize hiddenSize numLayers directionality 'ConstantInitialization dtype device)) Source #

replaceParameters :: GRUWithInit inputSize hiddenSize numLayers directionality 'ConstantInitialization dtype device -> HList (Parameters (GRUWithInit inputSize hiddenSize numLayers directionality 'ConstantInitialization dtype device)) -> GRUWithInit inputSize hiddenSize numLayers directionality 'ConstantInitialization dtype device Source #

(Parameterized (GRU inputSize hiddenSize numLayers directionality dtype device), HAppendFD (Parameters (GRU inputSize hiddenSize numLayers directionality dtype device)) '[Parameter device dtype '[numLayers * NumberOfDirections directionality, hiddenSize]] (Parameters (GRU inputSize hiddenSize numLayers directionality dtype device) ++ '[Parameter device dtype '[numLayers * NumberOfDirections directionality, hiddenSize]])) => Parameterized (GRUWithInit inputSize hiddenSize numLayers directionality 'LearnedInitialization dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.GRU

Associated Types

type Parameters (GRUWithInit inputSize hiddenSize numLayers directionality 'LearnedInitialization dtype device) :: [Type] Source #

Methods

flattenParameters :: GRUWithInit inputSize hiddenSize numLayers directionality 'LearnedInitialization dtype device -> HList (Parameters (GRUWithInit inputSize hiddenSize numLayers directionality 'LearnedInitialization dtype device)) Source #

replaceParameters :: GRUWithInit inputSize hiddenSize numLayers directionality 'LearnedInitialization dtype device -> HList (Parameters (GRUWithInit inputSize hiddenSize numLayers directionality 'LearnedInitialization dtype device)) -> GRUWithInit inputSize hiddenSize numLayers directionality 'LearnedInitialization dtype device Source #

(Parameterized (LSTM inputSize hiddenSize numLayers directionality dtype device), HAppendFD (Parameters (LSTM inputSize hiddenSize numLayers directionality dtype device)) ('[] :: [Type]) (Parameters (LSTM inputSize hiddenSize numLayers directionality dtype device) ++ ('[] :: [Type]))) => Parameterized (LSTMWithInit inputSize hiddenSize numLayers directionality 'ConstantInitialization dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.LSTM

Associated Types

type Parameters (LSTMWithInit inputSize hiddenSize numLayers directionality 'ConstantInitialization dtype device) :: [Type] Source #

Methods

flattenParameters :: LSTMWithInit inputSize hiddenSize numLayers directionality 'ConstantInitialization dtype device -> HList (Parameters (LSTMWithInit inputSize hiddenSize numLayers directionality 'ConstantInitialization dtype device)) Source #

replaceParameters :: LSTMWithInit inputSize hiddenSize numLayers directionality 'ConstantInitialization dtype device -> HList (Parameters (LSTMWithInit inputSize hiddenSize numLayers directionality 'ConstantInitialization dtype device)) -> LSTMWithInit inputSize hiddenSize numLayers directionality 'ConstantInitialization dtype device Source #

(Parameterized (LSTM inputSize hiddenSize numLayers directionality dtype device), HAppendFD (Parameters (LSTM inputSize hiddenSize numLayers directionality dtype device)) '[Parameter device dtype '[numLayers * NumberOfDirections directionality, hiddenSize], Parameter device dtype '[numLayers * NumberOfDirections directionality, hiddenSize]] (Parameters (LSTM inputSize hiddenSize numLayers directionality dtype device) ++ '[Parameter device dtype '[numLayers * NumberOfDirections directionality, hiddenSize], Parameter device dtype '[numLayers * NumberOfDirections directionality, hiddenSize]])) => Parameterized (LSTMWithInit inputSize hiddenSize numLayers directionality 'LearnedInitialization dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Recurrent.LSTM

Associated Types

type Parameters (LSTMWithInit inputSize hiddenSize numLayers directionality 'LearnedInitialization dtype device) :: [Type] Source #

Methods

flattenParameters :: LSTMWithInit inputSize hiddenSize numLayers directionality 'LearnedInitialization dtype device -> HList (Parameters (LSTMWithInit inputSize hiddenSize numLayers directionality 'LearnedInitialization dtype device)) Source #

replaceParameters :: LSTMWithInit inputSize hiddenSize numLayers directionality 'LearnedInitialization dtype device -> HList (Parameters (LSTMWithInit inputSize hiddenSize numLayers directionality 'LearnedInitialization dtype device)) -> LSTMWithInit inputSize hiddenSize numLayers directionality 'LearnedInitialization dtype device Source #

Parameterized (TransformerLayer embedDim kEmbedDim vEmbedDim numHeads ffnDim dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Transformer

Associated Types

type Parameters (TransformerLayer embedDim kEmbedDim vEmbedDim numHeads ffnDim dtype device) :: [Type] Source #

Methods

flattenParameters :: TransformerLayer embedDim kEmbedDim vEmbedDim numHeads ffnDim dtype device -> HList (Parameters (TransformerLayer embedDim kEmbedDim vEmbedDim numHeads ffnDim dtype device)) Source #

replaceParameters :: TransformerLayer embedDim kEmbedDim vEmbedDim numHeads ffnDim dtype device -> HList (Parameters (TransformerLayer embedDim kEmbedDim vEmbedDim numHeads ffnDim dtype device)) -> TransformerLayer embedDim kEmbedDim vEmbedDim numHeads ffnDim dtype device Source #

(layers ~ HReplicateR numAttnLayers (TransformerLayer embedDim embedDim embedDim numHeads ffnDim dtype device), Parameterized (HList layers), HAppendFD (Parameters (HList layers)) '[Parameter device dtype '[numEmbeds, embedDim], Parameter device dtype '[numEmbeds]] (Parameters (HList layers) ++ '[Parameter device dtype '[numEmbeds, embedDim], Parameter device dtype '[numEmbeds]])) => Parameterized (TransformerLM numAttnLayers numHeads ffnDim paddingIdx numEmbeds embedDim dtype device) Source # 
Instance details

Defined in Torch.Typed.NN.Transformer

Associated Types

type Parameters (TransformerLM numAttnLayers numHeads ffnDim paddingIdx numEmbeds embedDim dtype device) :: [Type] Source #

Methods

flattenParameters :: TransformerLM numAttnLayers numHeads ffnDim paddingIdx numEmbeds embedDim dtype device -> HList (Parameters (TransformerLM numAttnLayers numHeads ffnDim paddingIdx numEmbeds embedDim dtype device)) Source #

replaceParameters :: TransformerLM numAttnLayers numHeads ffnDim paddingIdx numEmbeds embedDim dtype device -> HList (Parameters (TransformerLM numAttnLayers numHeads ffnDim paddingIdx numEmbeds embedDim dtype device)) -> TransformerLM numAttnLayers numHeads ffnDim paddingIdx numEmbeds embedDim dtype device Source #

data MakeIndependent Source #

Constructors

MakeIndependent 

Instances

Instances details
Apply' MakeIndependent (Tensor device dtype shape) (IO (Parameter device dtype shape)) Source # 
Instance details

Defined in Torch.Typed.Parameter

Methods

apply' :: MakeIndependent -> Tensor device dtype shape -> IO (Parameter device dtype shape) Source #

data ToDependent Source #

Constructors

ToDependent 

Instances

Instances details
Apply' ToDependent (Parameter device dtype shape) (Tensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Parameter

Methods

apply' :: ToDependent -> Parameter device dtype shape -> Tensor device dtype shape Source #

newtype Parameter (device :: (DeviceType, Nat)) (dtype :: DType) (shape :: [Nat]) Source #

Instances

Instances details
KnownDType dtype' => HasToDType (dtype' :: DType) (dtype :: DType) (Parameter device dtype shape) (Parameter device dtype' shape) Source # 
Instance details

Defined in Torch.Typed.DType

Methods

toDType :: Parameter device dtype shape -> Parameter device dtype' shape Source #

KnownDevice device' => HasToDevice device' device (Parameter device dtype shape) (Parameter device' dtype shape) Source # 
Instance details

Defined in Torch.Typed.Device

Methods

toDevice :: Parameter device dtype shape -> Parameter device' dtype shape Source #

Apply' MakeIndependent (Tensor device dtype shape) (IO (Parameter device dtype shape)) Source # 
Instance details

Defined in Torch.Typed.Parameter

Methods

apply' :: MakeIndependent -> Tensor device dtype shape -> IO (Parameter device dtype shape) Source #

Apply' ToParameter (Tensor dev dtype shape) (Parameter dev dtype shape) Source # 
Instance details

Defined in Torch.Typed.Optim.CppOptim

Methods

apply' :: ToParameter -> Tensor dev dtype shape -> Parameter dev dtype shape Source #

Apply' ToDependent (Parameter device dtype shape) (Tensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Parameter

Methods

apply' :: ToDependent -> Parameter device dtype shape -> Tensor device dtype shape Source #

Show (Parameter device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Parameter

Methods

showsPrec :: Int -> Parameter device dtype shape -> ShowS Source #

show :: Parameter device dtype shape -> String Source #

showList :: [Parameter device dtype shape] -> ShowS Source #

Parameterized (Parameter device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Parameter

Associated Types

type Parameters (Parameter device dtype shape) :: [Type] Source #

Methods

flattenParameters :: Parameter device dtype shape -> HList (Parameters (Parameter device dtype shape)) Source #

replaceParameters :: Parameter device dtype shape -> HList (Parameters (Parameter device dtype shape)) -> Parameter device dtype shape Source #

HasGrad (Parameter device dtype shape) (Tensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Autograd

Methods

grad :: forall (dtype0 :: DType) (device0 :: (DeviceType, Nat)). Tensor device0 dtype0 '[] -> Parameter device dtype shape -> Tensor device dtype shape Source #

toDependent :: Parameter device dtype shape -> Tensor device dtype shape

type Parameters (Parameter device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Parameter

type Parameters (Parameter device dtype shape) = '[Parameter device dtype shape]

untypeParam :: Parameter device dtype shape -> Parameter Source #

toDependent :: forall shape dtype device. Parameter device dtype shape -> Tensor device dtype shape Source #

makeIndependent :: forall shape dtype device. Tensor device dtype shape -> IO (Parameter device dtype shape) Source #

type family ReplaceDType'' (tensor :: t) (dtype :: DType) :: t where ... Source #

Equations

ReplaceDType'' (Tensor device dtype0 shape) dtype1 = Tensor device dtype1 shape 
ReplaceDType'' (NamedTensor device dtype0 shape) dtype1 = NamedTensor device dtype1 shape 

type family ReplaceDevice'' (tensor :: t) (device :: (DeviceType, Nat)) :: t where ... Source #

Equations

ReplaceDevice'' (Tensor device0 dtype shape) device1 = Tensor device1 dtype shape 
ReplaceDevice'' (NamedTensor device0 dtype shape) device1 = NamedTensor device1 dtype shape 

data NamedTensor (device :: (DeviceType, Nat)) (dtype :: DType) (shape :: Shape) where Source #

Constructors

FromTensor :: forall device dtype shape' shape. shape ~ ToNats shape' => Tensor device dtype shape -> NamedTensor device dtype shape' 

Instances

Instances details
KnownDevice device => Num (NamedTensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Tensor

Methods

(+) :: NamedTensor device dtype shape -> NamedTensor device dtype shape -> NamedTensor device dtype shape Source #

(-) :: NamedTensor device dtype shape -> NamedTensor device dtype shape -> NamedTensor device dtype shape Source #

(*) :: NamedTensor device dtype shape -> NamedTensor device dtype shape -> NamedTensor device dtype shape Source #

negate :: NamedTensor device dtype shape -> NamedTensor device dtype shape Source #

abs :: NamedTensor device dtype shape -> NamedTensor device dtype shape Source #

signum :: NamedTensor device dtype shape -> NamedTensor device dtype shape Source #

fromInteger :: Integer -> NamedTensor device dtype shape Source #

KnownDevice device => Fractional (NamedTensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Tensor

Methods

(/) :: NamedTensor device dtype shape -> NamedTensor device dtype shape -> NamedTensor device dtype shape Source #

recip :: NamedTensor device dtype shape -> NamedTensor device dtype shape Source #

fromRational :: Rational -> NamedTensor device dtype shape Source #

Show (NamedTensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Tensor

Methods

showsPrec :: Int -> NamedTensor device dtype shape -> ShowS Source #

show :: NamedTensor device dtype shape -> String Source #

showList :: [NamedTensor device dtype shape] -> ShowS Source #

(TensorOptions shape' dtype device, shape' ~ ToNats shape) => Default (NamedTensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Factories

Methods

def :: NamedTensor device dtype shape Source #

Unnamed (NamedTensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Tensor

Associated Types

type UTShape (NamedTensor device dtype shape) :: [Nat] Source #

type UTDevice (NamedTensor device dtype shape) :: (DeviceType, Nat) Source #

type UTDType (NamedTensor device dtype shape) :: DType Source #

Methods

toUnnamed :: forall (device0 :: (DeviceType, Nat)) (dtype0 :: DType) (shape0 :: [Nat]). IsUnnamed (NamedTensor device dtype shape) device0 dtype0 shape0 => NamedTensor device dtype shape -> Tensor device0 dtype0 shape0 Source #

fromUnnamed :: forall (device0 :: (DeviceType, Nat)) (dtype0 :: DType) (shape0 :: [Nat]). IsUnnamed (NamedTensor device dtype shape) device0 dtype0 shape0 => Tensor device0 dtype0 shape0 -> NamedTensor device dtype shape Source #

toDynamic :: NamedTensor device dtype shape -> Tensor Source #

Castable (NamedTensor device dtype shape) ATenTensor Source # 
Instance details

Defined in Torch.Typed.Tensor

Methods

cast :: NamedTensor device dtype shape -> (ATenTensor -> IO r) -> IO r Source #

uncast :: ATenTensor -> (NamedTensor device dtype shape -> IO r) -> IO r Source #

type UTDType (NamedTensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Tensor

type UTDType (NamedTensor device dtype shape) = dtype
type UTDevice (NamedTensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Tensor

type UTDevice (NamedTensor device dtype shape) = device
type UTShape (NamedTensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Tensor

type UTShape (NamedTensor device dtype shape) = ToNats shape

type family FindDim (a :: Size) (shape :: Shape) :: Nat where ... Source #

Equations

FindDim a (a ': _) = 0 
FindDim a (b ': ax) = 1 + FindDim a ax 
FindDim a _ = TypeError ((Text "Not find a type:" :<>: ShowType a) :<>: Text " in the shape.") 

type family ToShape a :: Shape where ... Source #

Equations

ToShape Bool = '[] 
ToShape Int = '[] 
ToShape Float = '[] 
ToShape Double = '[] 
ToShape (f a) = f ': ToShape a 

type family ToDType a :: DType where ... Source #

data TensorListUnfold Source #

Constructors

TensorListUnfold 

Instances

Instances details
Castable x ATenTensor => Apply TensorListUnfold [ATenTensor] (IO (HJust (x, [ATenTensor]))) Source # 
Instance details

Defined in Torch.Typed.Tensor

Apply TensorListUnfold [ATenTensor] (IO HNothing) Source # 
Instance details

Defined in Torch.Typed.Tensor

data TensorListFold Source #

Constructors

TensorListFold 

Instances

Instances details
Castable x ATenTensor => Apply' TensorListFold (x, IO [ATenTensor]) (IO [ATenTensor]) Source # 
Instance details

Defined in Torch.Typed.Tensor

newtype Wrap a Source #

To avoid overlapped instance for (Unnamed t => Castable t D.ATenTensor)

Constructors

Wrap 

Fields

Instances

Instances details
Unnamed t => Castable (Wrap t) ATenTensor Source # 
Instance details

Defined in Torch.Typed.Tensor

Methods

cast :: Wrap t -> (ATenTensor -> IO r) -> IO r Source #

uncast :: ATenTensor -> (Wrap t -> IO r) -> IO r Source #

type family Numel (shape :: [Nat]) :: Nat where ... Source #

Equations

Numel '[] = 1 
Numel (h ': t) = h * Numel t 

type family MatMulDTypeIsValid (device :: (DeviceType, Nat)) (dtype :: DType) :: Constraint where ... Source #

Equations

MatMulDTypeIsValid '('CPU, 0) dtype = (DTypeIsNotBool '('CPU, 0) dtype, DTypeIsNotHalf '('CPU, 0) dtype) 
MatMulDTypeIsValid '('CUDA, deviceIndex) dtype = DTypeIsFloatingPoint '('CUDA, deviceIndex) dtype 
MatMulDTypeIsValid '(deviceType, _) dtype = UnsupportedDTypeForDevice deviceType dtype 

type MatMul shape shape' = CheckMatMul shape shape' (ComputeMatMul (Reverse shape) (Reverse shape')) Source #

type family CheckMatMul (shape :: [Nat]) (shape' :: [Nat]) (result :: Maybe [Nat]) :: [Nat] where ... Source #

Equations

CheckMatMul shape shape' Nothing = TypeError ((((Text "The shapes " :<>: ShowType shape) :<>: Text " and ") :<>: ShowType shape') :<>: Text " are not compatible with matrix multiplication") 
CheckMatMul _ _ (Just result) = Reverse result 

type family ComputeMatMul (reversedShape :: [Nat]) (reversedShape' :: [Nat]) :: Maybe [Nat] where ... Source #

Equations

ComputeMatMul (k ': '[]) (k ': '[]) = Just '[] 
ComputeMatMul (k ': '[]) (m ': (k ': reversedBroadcastShape')) = AppendToMaybe m (ComputeBroadcast '[] reversedBroadcastShape') 
ComputeMatMul (k ': (n ': reversedBroadcastShape)) (k ': '[]) = AppendToMaybe n (ComputeBroadcast '[] reversedBroadcastShape) 
ComputeMatMul (k ': (n ': reversedBroadcastShape)) (m ': (k ': reversedBroadcastShape')) = AppendToMaybe m (AppendToMaybe n (ComputeBroadcast reversedBroadcastShape reversedBroadcastShape')) 

type family ComparisonDTypeIsValid (device :: (DeviceType, Nat)) (dtype :: DType) :: Constraint where ... Source #

Equations

ComparisonDTypeIsValid '('CPU, 0) dtype = (DTypeIsNotBool '('CPU, 0) dtype, DTypeIsNotHalf '('CPU, 0) dtype) 
ComparisonDTypeIsValid '('CUDA, _) dtype = () 
ComparisonDTypeIsValid '(deviceType, _) dtype = UnsupportedDTypeForDevice deviceType dtype 

type family BasicArithmeticDTypeIsValid (device :: (DeviceType, Nat)) (dtype :: DType) :: Constraint where ... Source #

Equations

BasicArithmeticDTypeIsValid '('CPU, 0) dtype = (DTypeIsNotBool '('CPU, 0) dtype, DTypeIsNotHalf '('CPU, 0) dtype) 
BasicArithmeticDTypeIsValid '('CUDA, _) dtype = () 
BasicArithmeticDTypeIsValid '(deviceType, _) dtype = UnsupportedDTypeForDevice deviceType dtype 

type Broadcast shape shape' = CheckBroadcast shape shape' (ComputeBroadcast (Reverse shape) (Reverse shape')) Source #

type family CheckBroadcast (shape :: [Nat]) (shape' :: [Nat]) (result :: Maybe [Nat]) :: [Nat] where ... Source #

Equations

CheckBroadcast shape shape' Nothing = TypeError ((((Text "The shapes " :<>: ShowType shape) :<>: Text " and ") :<>: ShowType shape') :<>: Text " cannot be broadcast") 
CheckBroadcast _ _ (Just result) = Reverse result 

type family ComputeBroadcast (reversedShape :: [Nat]) (reversedShape' :: [Nat]) :: Maybe [Nat] where ... Source #

Equations

ComputeBroadcast '[] reversedShape = Just reversedShape 
ComputeBroadcast reversedShape '[] = Just reversedShape 
ComputeBroadcast (h ': t) (h ': t2) = AppendToMaybe h (ComputeBroadcast t t2) 
ComputeBroadcast (h ': t) (1 ': t2) = AppendToMaybe h (ComputeBroadcast t t2) 
ComputeBroadcast (1 ': t) (h ': t2) = AppendToMaybe h (ComputeBroadcast t t2) 
ComputeBroadcast _ _ = Nothing 

data SomeDevice where Source #

Constructors

SomeDevice :: forall (device :: (DeviceType, Nat)). KnownDevice device => Proxy device -> SomeDevice 

data SomeDType where Source #

Constructors

SomeDType :: forall (dtype :: DType). KnownDType dtype => Proxy dtype -> SomeDType 

data SomeShape where Source #

Constructors

SomeShape :: forall (shape :: [Nat]). KnownShape shape => Proxy shape -> SomeShape 

type family All (pred :: a -> Constraint) (l :: [a]) :: Constraint where ... Source #

Equations

All _ '[] = () 
All pred (h ': t) = (pred h, All pred t) 

class TensorOptions (shape :: [Nat]) (dtype :: DType) (device :: (DeviceType, Nat)) where Source #

Instances

Instances details
(KnownDType dtype, KnownDevice device) => TensorOptions ('[] :: [Nat]) dtype device Source # 
Instance details

Defined in Torch.Typed.Tensor

(KnownNat h, TensorOptions t dtype device) => TensorOptions (h ': t) dtype device Source # 
Instance details

Defined in Torch.Typed.Tensor

type family ComputeItemType (ty :: Type) (shape :: [Nat]) :: Type where ... Source #

Equations

ComputeItemType _ '[] = TypeError (Text "Scalars are not supported") 
ComputeItemType ty (_ ': '[]) = ty 
ComputeItemType ty (_ ': (h ': t)) = [ComputeItemType ty (h ': t)] 

data UnknownShapeTensor device dtype Source #

Constructors

forall shape. UnknownShapeTensor (Tensor device dtype shape) 

type CUDATensor deviceIndex = Tensor '('CUDA, deviceIndex) Source #

type CPUTensor = Tensor '('CPU, 0) Source #

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

Constructors

UnsafeMkTensor :: forall device dtype shape. Tensor -> Tensor device dtype shape 

Instances

Instances details
KnownDType dtype' => HasToDType (dtype' :: DType) (dtype :: DType) (Tensor device dtype shape) (Tensor device dtype' shape) Source # 
Instance details

Defined in Torch.Typed.DType

Methods

toDType :: Tensor device dtype shape -> Tensor device dtype' shape Source #

(KnownNat batchSize, KnownDevice device, Applicative m) => Dataset (m :: Type -> Type) (MNIST m device batchSize) Int ((Tensor device 'Float '[batchSize, 784], Tensor device 'Int64 '[batchSize]) :: Type) Source # 
Instance details

Defined in Torch.Typed.Vision

Methods

getItem :: MNIST m device batchSize -> Int -> m (Tensor device 'Float '[batchSize, 784], Tensor device 'Int64 '[batchSize]) Source #

keys :: MNIST m device batchSize -> Set Int Source #

KnownDevice device' => HasToDevice device' device (Tensor device dtype shape) (Tensor device' dtype shape) Source # 
Instance details

Defined in Torch.Typed.Device

Methods

toDevice :: Tensor device dtype shape -> Tensor device' dtype shape Source #

(HasGrad (HList parameters) (HList gradients), Castable (HList gradients) [ATenTensor]) => Apply' GradConcurrentlyF (HList parameters, Loss device dtype) (Concurrently (HList gradients)) Source # 
Instance details

Defined in Torch.Typed.NN.DataParallel

Methods

apply' :: GradConcurrentlyF -> (HList parameters, Loss device dtype) -> Concurrently (HList gradients) Source #

Apply' MakeIndependent (Tensor device dtype shape) (IO (Parameter device dtype shape)) Source # 
Instance details

Defined in Torch.Typed.Parameter

Methods

apply' :: MakeIndependent -> Tensor device dtype shape -> IO (Parameter device dtype shape) Source #

Apply' ToParameter (Tensor dev dtype shape) (Parameter dev dtype shape) Source # 
Instance details

Defined in Torch.Typed.Optim.CppOptim

Methods

apply' :: ToParameter -> Tensor dev dtype shape -> Parameter dev dtype shape Source #

Apply' ToDependent (Parameter device dtype shape) (Tensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Parameter

Methods

apply' :: ToDependent -> Parameter device dtype shape -> Tensor device dtype shape Source #

HasForward Dropout (Tensor device dtype shape) (Tensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.NN.Dropout

Methods

forward :: Dropout -> Tensor device dtype shape -> Tensor device dtype shape Source #

forwardStoch :: Dropout -> Tensor device dtype shape -> IO (Tensor device dtype shape) Source #

(TensorLike [ComputeItemType (ComputeHaskellType dtype) shape], KnownDevice device, KnownShape shape) => IsList (Maybe (Tensor device dtype shape)) Source # 
Instance details

Defined in Torch.Typed.Tensor

Associated Types

type Item (Maybe (Tensor device dtype shape)) Source #

Methods

fromList :: [Item (Maybe (Tensor device dtype shape))] -> Maybe (Tensor device dtype shape) Source #

fromListN :: Int -> [Item (Maybe (Tensor device dtype shape))] -> Maybe (Tensor device dtype shape) Source #

toList :: Maybe (Tensor device dtype shape) -> [Item (Maybe (Tensor device dtype shape))] Source #

Castable [Tensor device dtype shape] (ForeignPtr TensorList) Source # 
Instance details

Defined in Torch.Typed.Tensor

Methods

cast :: [Tensor device dtype shape] -> (ForeignPtr TensorList -> IO r) -> IO r Source #

uncast :: ForeignPtr TensorList -> ([Tensor device dtype shape] -> IO r) -> IO r Source #

(chunks ~ ListLength devices', tensorChunks ~ (Chunk chunks 0 shape dtype device :: [Type]), Castable (HList tensorChunks) [ATenTensor], devices ~ HReplicateR chunks device, HasToDevices devices' devices tensorChunks gs, KnownNat chunks) => HasScatter (devices' :: [(DeviceType, Nat)]) (device :: (DeviceType, Nat)) (Tensor device dtype shape) (gs :: [Type]) Source # 
Instance details

Defined in Torch.Typed.Device

Methods

scatter :: Tensor device dtype shape -> HList gs Source #

KnownNat n => Castable (Vector n (Tensor device dtype shape)) (ForeignPtr TensorList) Source # 
Instance details

Defined in Torch.Typed.Tensor

Methods

cast :: Vector n (Tensor device dtype shape) -> (ForeignPtr TensorList -> IO r) -> IO r Source #

uncast :: ForeignPtr TensorList -> (Vector n (Tensor device dtype shape) -> IO r) -> IO r Source #

(chunks ~ ListLength fs, devices ~ GetDevices fs, devices' ~ HReplicateR chunks device', HasToDevices devices' devices fs tensorChunks, '(shape, dtype, device') ~ Cat 0 tensorChunks, Castable (HList tensorChunks) [ATenTensor]) => HasGather (device' :: (DeviceType, Nat)) (devices :: [(DeviceType, Nat)]) (fs :: [Type]) (Tensor device' dtype shape) Source # 
Instance details

Defined in Torch.Typed.Device

Methods

gather :: HList fs -> Tensor device' dtype shape Source #

KnownDevice device => Num (Tensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Tensor

Methods

(+) :: Tensor device dtype shape -> Tensor device dtype shape -> Tensor device dtype shape Source #

(-) :: Tensor device dtype shape -> Tensor device dtype shape -> Tensor device dtype shape Source #

(*) :: Tensor device dtype shape -> Tensor device dtype shape -> Tensor device dtype shape Source #

negate :: Tensor device dtype shape -> Tensor device dtype shape Source #

abs :: Tensor device dtype shape -> Tensor device dtype shape Source #

signum :: Tensor device dtype shape -> Tensor device dtype shape Source #

fromInteger :: Integer -> Tensor device dtype shape Source #

KnownDevice device => Fractional (Tensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Tensor

Methods

(/) :: Tensor device dtype shape -> Tensor device dtype shape -> Tensor device dtype shape Source #

recip :: Tensor device dtype shape -> Tensor device dtype shape Source #

fromRational :: Rational -> Tensor device dtype shape Source #

Show (Tensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Tensor

Methods

showsPrec :: Int -> Tensor device dtype shape -> ShowS Source #

show :: Tensor device dtype shape -> String Source #

showList :: [Tensor device dtype shape] -> ShowS Source #

TensorOptions shape dtype device => Default (Tensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Factories

Methods

def :: Tensor device dtype shape Source #

Parameterized (Tensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Parameter

Associated Types

type Parameters (Tensor device dtype shape) :: [Type] Source #

Methods

flattenParameters :: Tensor device dtype shape -> HList (Parameters (Tensor device dtype shape)) Source #

replaceParameters :: Tensor device dtype shape -> HList (Parameters (Tensor device dtype shape)) -> Tensor device dtype shape Source #

Unnamed (Tensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Tensor

Associated Types

type UTShape (Tensor device dtype shape) :: [Nat] Source #

type UTDevice (Tensor device dtype shape) :: (DeviceType, Nat) Source #

type UTDType (Tensor device dtype shape) :: DType Source #

Methods

toUnnamed :: forall (device0 :: (DeviceType, Nat)) (dtype0 :: DType) (shape0 :: [Nat]). IsUnnamed (Tensor device dtype shape) device0 dtype0 shape0 => Tensor device dtype shape -> Tensor device0 dtype0 shape0 Source #

fromUnnamed :: forall (device0 :: (DeviceType, Nat)) (dtype0 :: DType) (shape0 :: [Nat]). IsUnnamed (Tensor device dtype shape) device0 dtype0 shape0 => Tensor device0 dtype0 shape0 -> Tensor device dtype shape Source #

toDynamic :: Tensor device dtype shape -> Tensor0 Source #

Castable (Tensor device dtype shape) ATenTensor Source # 
Instance details

Defined in Torch.Typed.Tensor

Methods

cast :: Tensor device dtype shape -> (ATenTensor -> IO r) -> IO r Source #

uncast :: ATenTensor -> (Tensor device dtype shape -> IO r) -> IO r Source #

HasGrad (Parameter device dtype shape) (Tensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Autograd

Methods

grad :: forall (dtype0 :: DType) (device0 :: (DeviceType, Nat)). Tensor device0 dtype0 '[] -> Parameter device dtype shape -> Tensor device dtype shape Source #

toDependent :: Parameter device dtype shape -> Tensor device dtype shape

(IsSuffixOf normalizedShape shape, KnownShape normalizedShape) => HasForward (LayerNorm normalizedShape dtype device) (Tensor device dtype shape) (Tensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.NN.Normalization

Methods

forward :: LayerNorm normalizedShape dtype device -> Tensor device dtype shape -> Tensor device dtype shape Source #

forwardStoch :: LayerNorm normalizedShape dtype device -> Tensor device dtype shape -> IO (Tensor device dtype shape) Source #

(1 <= numHeads, embedDim ~ (headDim * numHeads), All KnownNat '[embedDim, numHeads, seqLen, batchSize, headDim], IsSuffixOf '[embedDim] '[batchSize, seqLen, embedDim], KnownDType dtype, StandardFloatingPointDTypeValidation device dtype, MatMulDTypeIsValid device dtype, BasicArithmeticDTypeIsValid device dtype, dtype ~ SumDType dtype, SumDTypeIsValid device dtype, KnownDevice device) => Apply' (FoldLayers batchSize seqLen dtype device) (TransformerLayer embedDim embedDim embedDim numHeads ffnDim dtype device, IO (Tensor device dtype '[batchSize, seqLen, embedDim])) (IO (Tensor device dtype '[batchSize, seqLen, embedDim])) Source # 
Instance details

Defined in Torch.Typed.NN.Transformer

Methods

apply' :: FoldLayers batchSize seqLen dtype device -> (TransformerLayer embedDim embedDim embedDim numHeads ffnDim dtype device, IO (Tensor device dtype '[batchSize, seqLen, embedDim])) -> IO (Tensor device dtype '[batchSize, seqLen, embedDim]) Source #

(shape'' ~ MatMul shape '[inputFeatures, outputFeatures], shape' ~ Broadcast shape'' shape'') => HasForward (Linear inputFeatures outputFeatures dtype device) (Tensor device dtype shape) (Tensor device dtype shape') Source # 
Instance details

Defined in Torch.Typed.NN.Linear

Methods

forward :: Linear inputFeatures outputFeatures dtype device -> Tensor device dtype shape -> Tensor device dtype shape' Source #

forwardStoch :: Linear inputFeatures outputFeatures dtype device -> Tensor device dtype shape -> IO (Tensor device dtype shape') Source #

(All KnownNat '[stride, padding, inputChannelSize, outputChannelSize, kernelSize, inputSize, batchSize, outputSize], ConvSideCheck inputSize kernelSize stride padding outputSize) => HasForward (Conv1d inputChannelSize outputChannelSize kernelSize dtype device) (Tensor device dtype '[batchSize, inputChannelSize, inputSize], Proxy stride, Proxy padding) (Tensor device dtype '[batchSize, outputChannelSize, outputSize]) Source # 
Instance details

Defined in Torch.Typed.NN.Convolution

Methods

forward :: Conv1d inputChannelSize outputChannelSize kernelSize dtype device -> (Tensor device dtype '[batchSize, inputChannelSize, inputSize], Proxy stride, Proxy padding) -> Tensor device dtype '[batchSize, outputChannelSize, outputSize] Source #

forwardStoch :: Conv1d inputChannelSize outputChannelSize kernelSize dtype device -> (Tensor device dtype '[batchSize, inputChannelSize, inputSize], Proxy stride, Proxy padding) -> IO (Tensor device dtype '[batchSize, outputChannelSize, outputSize]) Source #

(All KnownNat '[stride, padding, inputChannelSize, outputChannelSize, kernelSize, inputSize, batchSize, outputSize], ConvSideCheck inputSize kernelSize stride padding outputSize) => HasForward (ConvTranspose1d inputChannelSize outputChannelSize kernelSize dtype device) (Tensor device dtype '[batchSize, inputChannelSize, inputSize], Proxy stride, Proxy padding) (Tensor device dtype '[batchSize, outputChannelSize, outputSize]) Source # 
Instance details

Defined in Torch.Typed.NN.Convolution

Methods

forward :: ConvTranspose1d inputChannelSize outputChannelSize kernelSize dtype device -> (Tensor device dtype '[batchSize, inputChannelSize, inputSize], Proxy stride, Proxy padding) -> Tensor device dtype '[batchSize, outputChannelSize, outputSize] Source #

forwardStoch :: ConvTranspose1d inputChannelSize outputChannelSize kernelSize dtype device -> (Tensor device dtype '[batchSize, inputChannelSize, inputSize], Proxy stride, Proxy padding) -> IO (Tensor device dtype '[batchSize, outputChannelSize, outputSize]) Source #

(All KnownNat '[Fst stride, Snd stride, Fst padding, Snd padding, inputChannelSize, outputChannelSize, kernelSize0, kernelSize1, inputSize0, inputSize1, batchSize, outputSize0, outputSize1], ConvSideCheck inputSize0 kernelSize0 (Fst stride) (Fst padding) outputSize0, ConvSideCheck inputSize1 kernelSize1 (Snd stride) (Snd padding) outputSize1) => HasForward (Conv2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device) (Tensor device dtype '[batchSize, inputChannelSize, inputSize0, inputSize1], Proxy stride, Proxy padding) (Tensor device dtype '[batchSize, outputChannelSize, outputSize0, outputSize1]) Source # 
Instance details

Defined in Torch.Typed.NN.Convolution

Methods

forward :: Conv2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device -> (Tensor device dtype '[batchSize, inputChannelSize, inputSize0, inputSize1], Proxy stride, Proxy padding) -> Tensor device dtype '[batchSize, outputChannelSize, outputSize0, outputSize1] Source #

forwardStoch :: Conv2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device -> (Tensor device dtype '[batchSize, inputChannelSize, inputSize0, inputSize1], Proxy stride, Proxy padding) -> IO (Tensor device dtype '[batchSize, outputChannelSize, outputSize0, outputSize1]) Source #

(All KnownNat '[Fst stride, Snd stride, Fst padding, Snd padding, inputChannelSize, outputChannelSize, kernelSize0, kernelSize1, inputSize0, inputSize1, batchSize, outputSize0, outputSize1], ConvSideCheck inputSize0 kernelSize0 (Fst stride) (Fst padding) outputSize0, ConvSideCheck inputSize1 kernelSize1 (Snd stride) (Snd padding) outputSize1) => HasForward (ConvTranspose2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device) (Tensor device dtype '[batchSize, inputChannelSize, inputSize0, inputSize1], Proxy stride, Proxy padding) (Tensor device dtype '[batchSize, outputChannelSize, outputSize0, outputSize1]) Source # 
Instance details

Defined in Torch.Typed.NN.Convolution

Methods

forward :: ConvTranspose2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device -> (Tensor device dtype '[batchSize, inputChannelSize, inputSize0, inputSize1], Proxy stride, Proxy padding) -> Tensor device dtype '[batchSize, outputChannelSize, outputSize0, outputSize1] Source #

forwardStoch :: ConvTranspose2d inputChannelSize outputChannelSize kernelSize0 kernelSize1 dtype device -> (Tensor device dtype '[batchSize, inputChannelSize, inputSize0, inputSize1], Proxy stride, Proxy padding) -> IO (Tensor device dtype '[batchSize, outputChannelSize, outputSize0, outputSize1]) Source #

(KnownMaybeNat paddingIdx, PaddingIdxCheck paddingIdx numEmbeds, shape' ~ Reverse (embedSize ': Reverse shape)) => HasForward (Embedding paddingIdx numEmbeds embedSize embeddingType dtype device) (Tensor device 'Int64 shape) (Tensor device dtype shape') Source # 
Instance details

Defined in Torch.Typed.NN.Sparse

Methods

forward :: Embedding paddingIdx numEmbeds embedSize embeddingType dtype device -> Tensor device 'Int64 shape -> Tensor device dtype shape' Source #

forwardStoch :: Embedding paddingIdx numEmbeds embedSize embeddingType dtype device -> Tensor device 'Int64 shape -> IO (Tensor device dtype shape') Source #

(All KnownNat '[Fst3 stride, Snd3 stride, Trd3 stride, Fst3 padding, Snd3 padding, Trd3 padding, inputChannelSize, outputChannelSize, kernelSize0, kernelSize1, kernelSize2, inputSize0, inputSize1, inputSize2, batchSize], ConvSideCheck inputSize0 kernelSize0 (Fst3 stride) (Fst3 padding) outputSize0, ConvSideCheck inputSize1 kernelSize1 (Snd3 stride) (Snd3 padding) outputSize1, ConvSideCheck inputSize2 kernelSize2 (Trd3 stride) (Trd3 padding) outputSize2) => HasForward (Conv3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device) (Tensor device dtype '[batchSize, inputChannelSize, inputSize0, inputSize1, inputSize2], Proxy stride, Proxy padding) (Tensor device dtype '[batchSize, outputChannelSize, outputSize0, outputSize1, outputSize2]) Source # 
Instance details

Defined in Torch.Typed.NN.Convolution

Methods

forward :: Conv3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device -> (Tensor device dtype '[batchSize, inputChannelSize, inputSize0, inputSize1, inputSize2], Proxy stride, Proxy padding) -> Tensor device dtype '[batchSize, outputChannelSize, outputSize0, outputSize1, outputSize2] Source #

forwardStoch :: Conv3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device -> (Tensor device dtype '[batchSize, inputChannelSize, inputSize0, inputSize1, inputSize2], Proxy stride, Proxy padding) -> IO (Tensor device dtype '[batchSize, outputChannelSize, outputSize0, outputSize1, outputSize2]) Source #

(All KnownNat '[Fst3 stride, Snd3 stride, Trd3 stride, Fst3 padding, Snd3 padding, Trd3 padding, inputChannelSize, outputChannelSize, kernelSize0, kernelSize1, kernelSize2, inputSize0, inputSize1, inputSize2, batchSize], ConvSideCheck inputSize0 kernelSize0 (Fst3 stride) (Fst3 padding) outputSize0, ConvSideCheck inputSize1 kernelSize1 (Snd3 stride) (Snd3 padding) outputSize1, ConvSideCheck inputSize2 kernelSize2 (Trd3 stride) (Trd3 padding) outputSize2) => HasForward (ConvTranspose3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device) (Tensor device dtype '[batchSize, inputChannelSize, inputSize0, inputSize1, inputSize2], Proxy stride, Proxy padding) (Tensor device dtype '[batchSize, outputChannelSize, outputSize0, outputSize1, outputSize2]) Source # 
Instance details

Defined in Torch.Typed.NN.Convolution

Methods

forward :: ConvTranspose3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device -> (Tensor device dtype '[batchSize, inputChannelSize, inputSize0, inputSize1, inputSize2], Proxy stride, Proxy padding) -> Tensor device dtype '[batchSize, outputChannelSize, outputSize0, outputSize1, outputSize2] Source #

forwardStoch :: ConvTranspose3d inputChannelSize outputChannelSize kernelSize0 kernelSize1 kernelSize2 dtype device -> (Tensor device dtype '[batchSize, inputChannelSize, inputSize0, inputSize1, inputSize2], Proxy stride, Proxy padding) -> IO (Tensor device dtype '[batchSize, outputChannelSize, outputSize0, outputSize1, outputSize2]) Source #

(All KnownNat '[paddingIdx, embedDim, seqLen, batchSize], (paddingIdx + 1) <= numEmbeds, 1 <= seqLen, HFoldrM IO (FoldLayers batchSize seqLen dtype device) (Tensor device dtype '[batchSize, seqLen, embedDim]) (HReplicateR numAttnLayers (TransformerLayer embedDim embedDim embedDim numHeads ffnDim dtype device)) (Tensor device dtype '[batchSize, seqLen, embedDim]), BasicArithmeticDTypeIsValid device dtype, ComparisonDTypeIsValid device dtype, ComparisonDTypeIsValid device 'Int64, KnownDType dtype, KnownDevice device) => HasForward (TransformerLM numAttnLayers numHeads ffnDim paddingIdx numEmbeds embedDim dtype device) (Tensor device 'Int64 '[batchSize, seqLen]) (Tensor device dtype '[batchSize, seqLen, numEmbeds]) Source # 
Instance details

Defined in Torch.Typed.NN.Transformer

Methods

forward :: TransformerLM numAttnLayers numHeads ffnDim paddingIdx numEmbeds embedDim dtype device -> Tensor device 'Int64 '[batchSize, seqLen] -> Tensor device dtype '[batchSize, seqLen, numEmbeds] Source #

forwardStoch :: TransformerLM numAttnLayers numHeads ffnDim paddingIdx numEmbeds embedDim dtype device -> Tensor device 'Int64 '[batchSize, seqLen] -> IO (Tensor device dtype '[batchSize, seqLen, numEmbeds]) Source #

type Item (Maybe (Tensor device dtype shape)) Source # 
Instance details

Defined in Torch.Typed.Tensor

type Item (Maybe (Tensor device dtype shape)) = ComputeItemType (ComputeHaskellType dtype) shape
type Parameters (Tensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Parameter

type Parameters (Tensor device dtype shape) = '[] :: [Type]
type UTDType (Tensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Tensor

type UTDType (Tensor device dtype shape) = dtype
type UTDevice (Tensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Tensor

type UTDevice (Tensor device dtype shape) = device
type UTShape (Tensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Tensor

type UTShape (Tensor device dtype shape) = shape

type family IsUnnamed t (device :: (DeviceType, Nat)) (dtype :: DType) (shape :: [Nat]) :: Constraint where ... Source #

Equations

IsUnnamed t device dtype shape = (Unnamed t, device ~ UTDevice t, dtype ~ UTDType t, shape ~ UTShape t) 

class Unnamed t where Source #

Associated Types

type UTShape t :: [Nat] Source #

type UTDevice t :: (DeviceType, Nat) Source #

type UTDType t :: DType Source #

Methods

toUnnamed :: forall device dtype shape. IsUnnamed t device dtype shape => t -> Tensor device dtype shape Source #

fromUnnamed :: forall device dtype shape. IsUnnamed t device dtype shape => Tensor device dtype shape -> t Source #

toDynamic :: t -> Tensor Source #

Instances

Instances details
Unnamed (NamedTensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Tensor

Associated Types

type UTShape (NamedTensor device dtype shape) :: [Nat] Source #

type UTDevice (NamedTensor device dtype shape) :: (DeviceType, Nat) Source #

type UTDType (NamedTensor device dtype shape) :: DType Source #

Methods

toUnnamed :: forall (device0 :: (DeviceType, Nat)) (dtype0 :: DType) (shape0 :: [Nat]). IsUnnamed (NamedTensor device dtype shape) device0 dtype0 shape0 => NamedTensor device dtype shape -> Tensor device0 dtype0 shape0 Source #

fromUnnamed :: forall (device0 :: (DeviceType, Nat)) (dtype0 :: DType) (shape0 :: [Nat]). IsUnnamed (NamedTensor device dtype shape) device0 dtype0 shape0 => Tensor device0 dtype0 shape0 -> NamedTensor device dtype shape Source #

toDynamic :: NamedTensor device dtype shape -> Tensor Source #

Unnamed (Tensor device dtype shape) Source # 
Instance details

Defined in Torch.Typed.Tensor

Associated Types

type UTShape (Tensor device dtype shape) :: [Nat] Source #

type UTDevice (Tensor device dtype shape) :: (DeviceType, Nat) Source #

type UTDType (Tensor device dtype shape) :: DType Source #

Methods

toUnnamed :: forall (device0 :: (DeviceType, Nat)) (dtype0 :: DType) (shape0 :: [Nat]). IsUnnamed (Tensor device dtype shape) device0 dtype0 shape0 => Tensor device dtype shape -> Tensor device0 dtype0 shape0 Source #

fromUnnamed :: forall (device0 :: (DeviceType, Nat)) (dtype0 :: DType) (shape0 :: [Nat]). IsUnnamed (Tensor device dtype shape) device0 dtype0 shape0 => Tensor device0 dtype0 shape0 -> Tensor device dtype shape Source #

toDynamic :: Tensor device dtype shape -> Tensor0 Source #

type family FromNats (shape :: [Nat]) :: Shape where ... Source #

Equations

FromNats '[] = '[] 
FromNats (x ': xs) = FromNat x ': FromNats xs 

type family FromNat (shape :: Nat) :: Size where ... Source #

Equations

FromNat n = Vector n 

type family ToNats (shape :: Shape) :: [Nat] where ... Source #

Equations

ToNats '[] = '[] 
ToNats (x ': xs) = ToNat x ': ToNats xs 

type family ToNat (shape :: Size) :: Nat where ... Source #

Equations

ToNat (S1 ('MetaSel _ _ _ _) f) = ToNat f 
ToNat (D1 _ f) = ToNat f 
ToNat (C1 _ f) = ToNat f 
ToNat (l :*: r) = ToNat l + ToNat r 
ToNat (l :+: r) = If (ToNat l <=? ToNat r) (ToNat r) (ToNat l) 
ToNat (K1 R (Vector n _)) = n 
ToNat (K1 _ _) = 1 
ToNat U1 = 1 
ToNat (Vector n) = n 
ToNat a = ToNat (Rep (a ())) 

type Shape = [Type -> Type] Source #

type Size = Type -> Type Source #

class KnownDevice (device :: (DeviceType, Nat)) where Source #

Instances

Instances details
KnownNat n => KnownDevice '('CPU, n) Source # 
Instance details

Defined in Torch.Typed.Tensor

KnownNat n => KnownDevice '('CUDA, n) Source # 
Instance details

Defined in Torch.Typed.Tensor

class KnownDType (dtype :: DType) where Source #

Instances

Instances details
KnownDType 'Bool Source # 
Instance details

Defined in Torch.Typed.Tensor

KnownDType 'Double Source # 
Instance details

Defined in Torch.Typed.Tensor

KnownDType 'Float Source # 
Instance details

Defined in Torch.Typed.Tensor

KnownDType 'Half Source # 
Instance details

Defined in Torch.Typed.Tensor

KnownDType 'Int16 Source # 
Instance details

Defined in Torch.Typed.Tensor

KnownDType 'Int32 Source # 
Instance details

Defined in Torch.Typed.Tensor

KnownDType 'Int64 Source # 
Instance details

Defined in Torch.Typed.Tensor

KnownDType 'Int8 Source # 
Instance details

Defined in Torch.Typed.Tensor

KnownDType 'UInt8 Source # 
Instance details

Defined in Torch.Typed.Tensor

class KnownShape (shape :: [Nat]) where Source #

Methods

shapeVal :: [Int] Source #

Instances

Instances details
KnownShape ('[] :: [Nat]) Source # 
Instance details

Defined in Torch.Typed.Tensor

Methods

shapeVal :: [Int] Source #

(KnownNat h, KnownShape t) => KnownShape (h ': t) Source # 
Instance details

Defined in Torch.Typed.Tensor

Methods

shapeVal :: [Int] Source #

withTensor :: Tensor -> (forall shape dtype device. (KnownDevice device, KnownDType dtype, KnownShape shape) => Tensor device dtype shape -> r) -> r Source #

withTensorShape :: forall device dtype r. (KnownDevice device, KnownDType dtype) => Tensor -> (forall shape. KnownShape shape => Tensor device dtype shape -> r) -> r Source #

add :: forall shape'' shape shape' dtype dtype' dtype'' device. (dtype'' ~ DTypePromotion dtype dtype', shape'' ~ Broadcast shape shape', BasicArithmeticDTypeIsValid device dtype, BasicArithmeticDTypeIsValid device dtype', BasicArithmeticDTypeIsValid device dtype'') => Tensor device dtype shape -> Tensor device dtype' shape' -> Tensor device dtype'' shape'' Source #

sub :: forall shape'' shape shape' dtype dtype' dtype'' device. (dtype'' ~ DTypePromotion dtype dtype', shape'' ~ Broadcast shape shape', BasicArithmeticDTypeIsValid device dtype, BasicArithmeticDTypeIsValid device dtype', BasicArithmeticDTypeIsValid device dtype'') => Tensor device dtype shape -> Tensor device dtype' shape' -> Tensor device dtype'' shape'' Source #

mul :: forall shape'' shape shape' dtype dtype' dtype'' device. (dtype'' ~ DTypePromotion dtype dtype', shape'' ~ Broadcast shape shape', BasicArithmeticDTypeIsValid device dtype, BasicArithmeticDTypeIsValid device dtype', BasicArithmeticDTypeIsValid device dtype'') => Tensor device dtype shape -> Tensor device dtype' shape' -> Tensor device dtype'' shape'' Source #

div :: forall shape'' shape shape' dtype dtype' dtype'' device. (dtype'' ~ DTypePromotion dtype dtype', shape'' ~ Broadcast shape shape', BasicArithmeticDTypeIsValid device dtype, BasicArithmeticDTypeIsValid device dtype', BasicArithmeticDTypeIsValid device dtype'') => Tensor device dtype shape -> Tensor device dtype' shape' -> Tensor device dtype'' shape'' Source #

gt :: forall shape'' shape shape' dtype dtype' device. (shape'' ~ Broadcast shape shape', ComparisonDTypeIsValid device dtype, ComparisonDTypeIsValid device dtype') => Tensor device dtype shape -> Tensor device dtype' shape' -> Tensor device 'Bool shape'' Source #

lt :: forall shape'' shape shape' dtype dtype' device. (shape'' ~ Broadcast shape shape', ComparisonDTypeIsValid device dtype, ComparisonDTypeIsValid device dtype') => Tensor device dtype shape -> Tensor device dtype' shape' -> Tensor device 'Bool shape'' Source #

ge :: forall shape'' shape shape' dtype dtype' device. (shape'' ~ Broadcast shape shape', ComparisonDTypeIsValid device dtype, ComparisonDTypeIsValid device dtype') => Tensor device dtype shape -> Tensor device dtype' shape' -> Tensor device 'Bool shape'' Source #

le :: forall shape'' shape shape' dtype dtype' device. (shape'' ~ Broadcast shape shape', ComparisonDTypeIsValid device dtype, ComparisonDTypeIsValid device dtype') => Tensor device dtype shape -> Tensor device dtype' shape' -> Tensor device 'Bool shape'' Source #

eq :: forall shape'' shape shape' dtype dtype' device. (shape'' ~ Broadcast shape shape', ComparisonDTypeIsValid device dtype, ComparisonDTypeIsValid device dtype') => Tensor device dtype shape -> Tensor device dtype' shape' -> Tensor device 'Bool shape'' Source #

ne :: forall shape'' shape shape' dtype dtype' device. (shape'' ~ Broadcast shape shape', ComparisonDTypeIsValid device dtype, ComparisonDTypeIsValid device dtype') => Tensor device dtype shape -> Tensor device dtype' shape' -> Tensor device 'Bool shape'' Source #

(>.) :: forall shape'' shape shape' dtype dtype' device. (shape'' ~ Broadcast shape shape', ComparisonDTypeIsValid device dtype, ComparisonDTypeIsValid device dtype') => Tensor device dtype shape -> Tensor device dtype' shape' -> Tensor device 'Bool shape'' Source #

(<.) :: forall shape'' shape shape' dtype dtype' device. (shape'' ~ Broadcast shape shape', ComparisonDTypeIsValid device dtype, ComparisonDTypeIsValid device dtype') => Tensor device dtype shape -> Tensor device dtype' shape' -> Tensor device 'Bool shape'' Source #

(>=.) :: forall shape'' shape shape' dtype dtype' device. (shape'' ~ Broadcast shape shape', ComparisonDTypeIsValid device dtype, ComparisonDTypeIsValid device dtype') => Tensor device dtype shape -> Tensor device dtype' shape' -> Tensor device 'Bool shape'' Source #

(<=.) :: forall shape'' shape shape' dtype dtype' device. (shape'' ~ Broadcast shape shape', ComparisonDTypeIsValid device dtype, ComparisonDTypeIsValid device dtype') => Tensor device dtype shape -> Tensor device dtype' shape' -> Tensor device 'Bool shape'' Source #

(==.) :: forall shape'' shape shape' dtype dtype' device. (shape'' ~ Broadcast shape shape', ComparisonDTypeIsValid device dtype, ComparisonDTypeIsValid device dtype') => Tensor device dtype shape -> Tensor device dtype' shape' -> Tensor device 'Bool shape'' Source #

(/=.) :: forall shape'' shape shape' dtype dtype' device. (shape'' ~ Broadcast shape shape', ComparisonDTypeIsValid device dtype, ComparisonDTypeIsValid device dtype') => Tensor device dtype shape -> Tensor device dtype' shape' -> Tensor device 'Bool shape'' Source #

matmul :: forall shape'' shape shape' dtype device. (shape'' ~ MatMul shape shape', MatMulDTypeIsValid device dtype) => Tensor device dtype shape -> Tensor device dtype shape' -> Tensor device dtype shape'' Source #

select :: forall dim idx shape' shape dtype device. (KnownNat dim, KnownNat idx, InRange shape dim idx, shape' ~ Remove shape dim) => Tensor device dtype shape -> Tensor device dtype shape' Source #

selectIdx :: forall dim n shape' shape dtype device. (KnownNat dim, n ~ Index shape dim, shape' ~ Remove shape dim) => Tensor device dtype shape -> Finite n -> Tensor device dtype shape' Source #

reshape :: forall shape' shape dtype device. (KnownShape shape', Numel shape ~ Numel shape') => Tensor device dtype shape -> Tensor device dtype shape' Source #

reshape >>> t :: CPUTensor 'D.Int64 '[2,3,4] = fromJust [[[111,112,113,114],[121,122,123,124],[131,132,133,134]],[[211,212,213,214],[221,222,223,224],[231,232,233,234]]] >>> t' = reshape '[24] t >>> toList . Just $ t' [111,112,113,114,121,122,123,124,131,132,133,134,211,212,213,214,221,222,223,224,231,232,233,234] >>> toList . Just $ reshape '[2,3,4] t' [[[111,112,113,114],[121,122,123,124],[131,132,133,134]],[[211,212,213,214],[221,222,223,224],[231,232,233,234]]]

toSparse :: Tensor device dtype shape -> Tensor device dtype shape Source #

toDense :: Tensor device dtype shape -> Tensor device dtype shape Source #

toCPU :: forall device shape dtype. Tensor device dtype shape -> CPUTensor dtype shape Source #

move tensor to CPU TODO: can this fail?

toCUDA :: forall device' device shape dtype. Tensor device dtype shape -> CUDATensor 0 dtype shape Source #

move tensor to the first CUDA device TODO: what if this fails?

dim :: forall device dtype shape t. (TensorOptions shape dtype device, IsUnnamed t device dtype shape) => t -> Int Source #

returns tensor dimension uses compile-time information only

shape :: forall device dtype shape t. (TensorOptions shape dtype device, IsUnnamed t device dtype shape) => t -> [Int] Source #

returns tensor shape as list uses compile-time information only

dtype :: forall device dtype shape t. (TensorOptions shape dtype device, IsUnnamed t device dtype shape) => t -> DType Source #

returns tensor data type uses compile-time information only

device :: forall device dtype shape t. (TensorOptions shape dtype device, IsUnnamed t device dtype shape) => t -> Device Source #

returns tensor device uses compile-time information only

toInt :: Tensor device dtype shape -> Int Source #

toFloat :: forall device. Tensor device 'Float '[] -> Float Source #

toDouble :: forall device. Tensor device 'Double '[] -> Double Source #

toBool :: forall device. Tensor device 'Bool '[] -> Bool Source #

data DeviceType Source #

Constructors

CPU 
CUDA 

Instances

Instances details
Show DeviceType Source # 
Instance details

Defined in Torch.Device

Eq DeviceType Source # 
Instance details

Defined in Torch.Device

Ord DeviceType Source # 
Instance details

Defined in Torch.Device

Castable DeviceType DeviceType Source # 
Instance details

Defined in Torch.Device

Methods

cast :: DeviceType -> (DeviceType0 -> IO r) -> IO r Source #

uncast :: DeviceType0 -> (DeviceType -> IO r) -> IO r Source #

HasToDevice device' device (HList xs) (HList ys) => ReduceGradients device' '[device] ('[HList xs] :: [Type]) (ys :: [k]) Source # 
Instance details

Defined in Torch.Typed.NN.DataParallel

Methods

reduceGradients :: HList '[HList xs] -> HList ys Source #

(HasToDevice device' device (HList xs) (HList ys), ReduceGradients device' devices xxs ys, HZipWith SumF ys ys ys, 1 <= ListLength xxs) => ReduceGradients device' (device ': devices) (HList xs ': xxs :: [Type]) (ys :: [k]) Source # 
Instance details

Defined in Torch.Typed.NN.DataParallel

Methods

reduceGradients :: HList (HList xs ': xxs) -> HList ys Source #

HasReplicate ('[] :: [(DeviceType, Nat)]) device f ('[] :: [Type]) Source # 
Instance details

Defined in Torch.Typed.Device

Methods

replicate :: f -> HList '[] Source #

HasToDevices ('[] :: [(DeviceType, Nat)]) ('[] :: [(DeviceType, Nat)]) ('[] :: [Type]) ('[] :: [Type]) Source # 
Instance details

Defined in Torch.Typed.Device

Methods

toDevices :: HList '[] -> HList '[] Source #

(chunks ~ ListLength devices', tensorChunks ~ (Chunk chunks 0 shape dtype device :: [Type]), Castable (HList tensorChunks) [ATenTensor], devices ~ HReplicateR chunks device, HasToDevices devices' devices tensorChunks gs, KnownNat chunks) => HasScatter (devices' :: [(DeviceType, Nat)]) (device :: (DeviceType, Nat)) (Tensor device dtype shape) (gs :: [Type]) Source # 
Instance details

Defined in Torch.Typed.Device

Methods

scatter :: Tensor device dtype shape -> HList gs Source #

(HZipWithM Concurrently GradConcurrentlyF parameters losses gradients', ReduceGradients device' devices gradients' gradients) => HasGradConcurrently (device' :: (DeviceType, Nat)) (devices :: [(DeviceType, Nat)]) (parameters :: [k1]) (losses :: [k1]) (gradients :: [k2]) Source # 
Instance details

Defined in Torch.Typed.NN.DataParallel

Methods

gradConcurrently :: HList parameters -> HList losses -> Concurrently (HList gradients) Source #

(chunks ~ ListLength fs, devices ~ GetDevices fs, devices' ~ HReplicateR chunks device', HasToDevices devices' devices fs tensorChunks, '(shape, dtype, device') ~ Cat 0 tensorChunks, Castable (HList tensorChunks) [ATenTensor]) => HasGather (device' :: (DeviceType, Nat)) (devices :: [(DeviceType, Nat)]) (fs :: [Type]) (Tensor device' dtype shape) Source # 
Instance details

Defined in Torch.Typed.Device

Methods

gather :: HList fs -> Tensor device' dtype shape Source #

(HasReplicate devices' device f gs, HasToDevice device' device f g) => HasReplicate (device' ': devices') device f (g ': gs) Source # 
Instance details

Defined in Torch.Typed.Device

Methods

replicate :: f -> HList (g ': gs) Source #

(HasToDevices devices' devices fs gs, HasToDevice device' device f g) => HasToDevices (device' ': devices') (device ': devices) (f ': fs) (g ': gs) Source # 
Instance details

Defined in Torch.Typed.Device

Methods

toDevices :: HList (f ': fs) -> HList (g ': gs) Source #

KnownNat n => KnownDevice '('CPU, n) Source # 
Instance details

Defined in Torch.Typed.Tensor

KnownNat n => KnownDevice '('CUDA, n) Source # 
Instance details

Defined in Torch.Typed.Tensor

data DType Source #

Constructors

Bool

Bool

UInt8

Byte

Int8

Char

Int16

Short

Int32

Int

Int64

Long

Half

Half

Float

Float

Double

Double

ComplexHalf

ComplexHalf

ComplexFloat

ComplexFloat

ComplexDouble

ComplexDouble

QInt8

QInt8

QUInt8

QUInt8

QInt32

QInt32

BFloat16

BFloat16

Instances

Instances details
Read DType Source # 
Instance details

Defined in Torch.DType

Show DType Source # 
Instance details

Defined in Torch.DType

Eq DType Source # 
Instance details

Defined in Torch.DType

Methods

(==) :: DType -> DType -> Bool Source #

(/=) :: DType -> DType -> Bool Source #

Castable DType ScalarType Source # 
Instance details

Defined in Torch.DType

Methods

cast :: DType -> (ScalarType -> IO r) -> IO r Source #

uncast :: ScalarType -> (DType -> IO r) -> IO r Source #

Reifies 'Bool DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy 'Bool -> DType Source #

Reifies 'ComplexDouble DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy 'ComplexDouble -> DType Source #

Reifies 'ComplexFloat DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy 'ComplexFloat -> DType Source #

Reifies 'ComplexHalf DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy 'ComplexHalf -> DType Source #

Reifies 'Double DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy 'Double -> DType Source #

Reifies 'Float DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy 'Float -> DType Source #

Reifies 'Half DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy 'Half -> DType Source #

Reifies 'Int16 DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy 'Int16 -> DType Source #

Reifies 'Int32 DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy 'Int32 -> DType Source #

Reifies 'Int64 DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy 'Int64 -> DType Source #

Reifies 'Int8 DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy 'Int8 -> DType Source #

Reifies Int16 DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy Int16 -> DType Source #

Reifies Int32 DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy Int32 -> DType Source #

Reifies Int64 DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy Int64 -> DType Source #

Reifies Int8 DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy Int8 -> DType Source #

Reifies Word8 DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy Word8 -> DType Source #

Reifies Bool DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy Bool -> DType Source #

Reifies Double DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy Double -> DType Source #

Reifies Float DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy Float -> DType Source #

Reifies Int DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy Int -> DType Source #

(g ~ ReplaceDType f dtype' dtype, f ~ ReplaceDType g dtype dtype', Generic f, Generic g, GHasToDType dtype' dtype (Rep f) (Rep g)) => HasToDType (dtype' :: DType) (dtype :: DType) f g Source # 
Instance details

Defined in Torch.Typed.DType

Methods

toDType :: f -> g Source #

KnownDType dtype' => HasToDType (dtype' :: DType) (dtype :: DType) (Parameter device dtype shape) (Parameter device dtype' shape) Source # 
Instance details

Defined in Torch.Typed.DType

Methods

toDType :: Parameter device dtype shape -> Parameter device dtype' shape Source #

KnownDType dtype' => HasToDType (dtype' :: DType) (dtype :: DType) (Tensor device dtype shape) (Tensor device dtype' shape) Source # 
Instance details

Defined in Torch.Typed.DType

Methods

toDType :: Tensor device dtype shape -> Tensor device dtype' shape Source #

Reifies (Complex Half) DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy (Complex Half) -> DType Source #

Reifies (Complex Double) DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy (Complex Double) -> DType Source #

Reifies (Complex Float) DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy (Complex Float) -> DType Source #

Reifies Half DType Source # 
Instance details

Defined in Torch.DType

Methods

reflect :: proxy Half -> DType Source #

class Castable a (ForeignPtr Scalar) => Scalar a Source #

Instances

Instances details
Scalar Bool Source # 
Instance details

Defined in Torch.Scalar

Scalar Double Source # 
Instance details

Defined in Torch.Scalar

Scalar Float Source # 
Instance details

Defined in Torch.Scalar

Scalar Int Source # 
Instance details

Defined in Torch.Scalar

data Reduction Source #

Instances

Instances details
Show Reduction Source # 
Instance details

Defined in Torch.Functional

Eq Reduction Source # 
Instance details

Defined in Torch.Functional

KnownReduction 'ReduceMean Source # 
Instance details

Defined in Torch.Typed.Functional

KnownReduction 'ReduceNone Source # 
Instance details

Defined in Torch.Typed.Functional

KnownReduction 'ReduceSum Source # 
Instance details

Defined in Torch.Typed.Functional

Castable Reduction Int64 Source # 
Instance details

Defined in Torch.Functional

Methods

cast :: Reduction -> (Int64 -> IO r) -> IO r Source #

uncast :: Int64 -> (Reduction -> IO r) -> IO r Source #

data Tri Source #

Constructors

Upper 
Lower 

Instances

Instances details
Show Tri Source # 
Instance details

Defined in Torch.Functional

Eq Tri Source # 
Instance details

Defined in Torch.Functional

Methods

(==) :: Tri -> Tri -> Bool Source #

(/=) :: Tri -> Tri -> Bool Source #