Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
type Parameter = IndependentTensor Source #
type ParamStream a = State [Parameter] a Source #
class HasForward f a b | f a -> b where Source #
Nothing
forward :: f -> a -> b Source #
default forward :: (Generic f, Generic a, Generic b, GHasForward (Rep f) (Rep a) (Rep b)) => f -> a -> b Source #
forwardStoch :: f -> a -> IO b Source #
Instances
HasForward Linear Tensor Tensor Source # | |
HasForward UpSample Tensor Tensor Source # | |
HasForward ScriptModule [IValue] IValue Source # | |
Defined in Torch.Script forward :: ScriptModule -> [IValue] -> IValue Source # forwardStoch :: ScriptModule -> [IValue] -> IO IValue Source # | |
HasForward Dropout (Tensor device dtype shape) (Tensor device dtype shape) Source # | |
(IsSuffixOf normalizedShape shape, KnownShape normalizedShape) => HasForward (LayerNorm normalizedShape dtype device) (Tensor device dtype shape) (Tensor device dtype shape) 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 # | |
(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 # | |
Defined in Torch.Typed.NN.Convolution 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 # | |
Defined in Torch.Typed.NN.Convolution 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 # | |
Defined in Torch.Typed.NN.Convolution 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 # | |
Defined in Torch.Typed.NN.Convolution 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 # | |
Defined in Torch.Typed.NN.Sparse 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 # | |
Defined in Torch.Typed.NN.Convolution 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 # | |
Defined in Torch.Typed.NN.Convolution 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 # | |
Defined in Torch.Typed.NN.Transformer 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 # |
class GHasForward (f :: Type -> Type) (a :: Type -> Type) (b :: Type -> Type) | f a -> b where Source #
gForward :: forall c c' c''. f c -> a c' -> b c'' Source #
gForwardStoch :: forall c c' c''. f c -> a c' -> IO (b c) Source #
Instances
GHasForward (U1 :: Type -> Type) (U1 :: Type -> Type) (U1 :: Type -> Type) Source # | |
(GHasForward f a b, GHasForward g a' b', b'' ~ (b :*: b')) => GHasForward (f :*: g) (a :*: a') b'' Source # | |
(GHasForward f a b, GHasForward g a' b', b'' ~ (b :+: b')) => GHasForward (f :+: g) (a :+: a') b'' Source # | |
HasForward f a b => GHasForward (K1 i f :: Type -> Type) (K1 i a :: Type -> Type) (K1 i b :: Type -> Type) Source # | |
GHasForward f a b => GHasForward (M1 i t f) (M1 i t' a) (M1 i t' b) Source # | |
class Parameterized f where Source #
Nothing
flattenParameters :: f -> [Parameter] Source #
default flattenParameters :: (Generic f, GParameterized (Rep f)) => f -> [Parameter] Source #
_replaceParameters :: f -> ParamStream f Source #
default _replaceParameters :: (Generic f, GParameterized (Rep f)) => f -> ParamStream f Source #
Instances
replaceParameters :: Parameterized f => f -> [Parameter] -> f Source #
class GParameterized f where Source #
gFlattenParameters :: forall a. f a -> [Parameter] Source #
_gReplaceParameters :: forall a. f a -> ParamStream (f a) Source #
Instances
class Randomizable spec f | spec -> f where Source #
Instances
Randomizable BatchNormSpec BatchNorm Source # | |
Randomizable Conv1dSpec Conv1d Source # | |
Randomizable Conv2dSpec Conv2d Source # | |
Randomizable Conv3dSpec Conv3d Source # | |
Randomizable ConvTranspose1dSpec ConvTranspose1d Source # | |
Defined in Torch.NN | |
Randomizable ConvTranspose2dSpec ConvTranspose2d Source # | |
Defined in Torch.NN | |
Randomizable ConvTranspose3dSpec ConvTranspose3d Source # | |
Defined in Torch.NN | |
Randomizable InstanceNormSpec InstanceNorm Source # | |
Defined in Torch.NN sample :: InstanceNormSpec -> IO InstanceNorm Source # | |
Randomizable LinearSpec Linear Source # | |
Randomizable UpSampleSpec UpSample Source # | |
Randomizable ElmanSpec ElmanCell Source # | |
Randomizable GRUSpec GRUCell Source # | |
Randomizable LSTMSpec LSTMCell Source # | |
Randomizable DropoutSpec Dropout Source # | |
Defined in Torch.Typed.NN.Dropout | |
(Randomizable xSpec x, Randomizable (HList xsSpec) (HList xs)) => Randomizable (HList (xSpec ': xsSpec)) (HList (x ': xs)) Source # | |
Randomizable (HList ('[] :: [Type])) (HList ('[] :: [Type])) Source # | |
(TensorOptions normalizedShape dtype device, RandDTypeIsValid device dtype) => Randomizable (LayerNormSpec normalizedShape dtype device) (LayerNorm normalizedShape dtype device) Source # | |
Defined in Torch.Typed.NN.Normalization | |
(KnownNat inputFeatures, KnownNat outputFeatures, KnownDType dtype, KnownDevice device, RandDTypeIsValid device dtype) => Randomizable (LinearSpec inputFeatures outputFeatures dtype device) (Linear inputFeatures outputFeatures dtype device) Source # | |
Defined in Torch.Typed.NN.Linear | |
(KnownDevice device, KnownDType dtype, KnownNat inputDim, KnownNat hiddenDim, RandDTypeIsValid device dtype) => Randomizable (GRUCellSpec inputDim hiddenDim dtype device) (GRUCell inputDim hiddenDim dtype device) Source # | |
Defined in Torch.Typed.NN.Recurrent.Cell.GRU | |
(KnownDevice device, KnownDType dtype, KnownNat inputDim, KnownNat hiddenDim, RandDTypeIsValid device dtype) => Randomizable (LSTMCellSpec inputDim hiddenDim dtype device) (LSTMCell inputDim hiddenDim dtype device) Source # | |
Defined in Torch.Typed.NN.Recurrent.Cell.LSTM | |
(All KnownNat '[embedDim, ffnDim], KnownDType dtype, KnownDevice device, RandDTypeIsValid device dtype) => Randomizable (TransformerMLPSpec embedDim ffnDim dtype device) (TransformerMLP embedDim ffnDim dtype device) Source # | |
Defined in Torch.Typed.NN.Transformer 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 # | |
Defined in Torch.Typed.NN.Convolution | |
(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 # | |
Defined in Torch.Typed.NN.Convolution 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 # | |
Defined in Torch.Typed.NN.Recurrent.GRU 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 # | |
Defined in Torch.Typed.NN.Recurrent.GRU 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 # | |
Defined in Torch.Typed.NN.Recurrent.LSTM 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 # | |
Defined in Torch.Typed.NN.Recurrent.LSTM 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 # | |
Defined in Torch.Typed.NN.Convolution | |
(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 # | |
Defined in Torch.Typed.NN.Convolution 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 # | |
Defined in Torch.Typed.NN.Recurrent.GRU 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 # | |
(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 # | |
Defined in Torch.Typed.NN.Recurrent.LSTM 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 # | |
(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 # | |
(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 # | |
Randomizable (EmbeddingSpec paddingIdx numEmbeds embedSize 'Constant dtype device) (Embedding paddingIdx numEmbeds embedSize 'Constant dtype device) Source # | |
Defined in Torch.Typed.NN.Sparse | |
(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 # | |
Defined in Torch.Typed.NN.Transformer 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 # | |
Defined in Torch.Typed.NN.Convolution | |
(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 # | |
Defined in Torch.Typed.NN.Convolution 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 # | |
Defined in Torch.Typed.NN.Recurrent.GRU 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 # | |
Defined in Torch.Typed.NN.Recurrent.GRU 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 # | |
Defined in Torch.Typed.NN.Recurrent.LSTM 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 # | |
Defined in Torch.Typed.NN.Recurrent.LSTM 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 # | |
Defined in Torch.Typed.NN.Transformer 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 # | |
Defined in Torch.Typed.NN.Transformer sample :: TransformerLMSpec numAttnLayers numHeads ffnDim paddingIdx numEmbeds embedDim dtype device -> IO (TransformerLM numAttnLayers numHeads ffnDim paddingIdx numEmbeds embedDim dtype device) Source # |
data LinearSpec Source #
LinearSpec | |
|
Instances
Show LinearSpec Source # | |
Eq LinearSpec Source # | |
Defined in Torch.NN (==) :: LinearSpec -> LinearSpec -> Bool Source # (/=) :: LinearSpec -> LinearSpec -> Bool Source # | |
Randomizable LinearSpec Linear Source # | |
Instances
Generic Linear Source # | |
Show Linear Source # | |
Parameterized Linear Source # | |
Randomizable LinearSpec Linear Source # | |
HasForward Linear Tensor Tensor Source # | |
type Rep Linear Source # | |
Defined in Torch.NN type Rep Linear = D1 ('MetaData "Linear" "Torch.NN" "hasktorch-0.2.0.0-F6yFRaDiRF49lpq95SVuR8" 'False) (C1 ('MetaCons "Linear" 'PrefixI 'True) (S1 ('MetaSel ('Just "weight") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Parameter) :*: S1 ('MetaSel ('Just "bias") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Parameter))) |
data Conv1dSpec Source #
Instances
Show Conv1dSpec Source # | |
Eq Conv1dSpec Source # | |
Defined in Torch.NN (==) :: Conv1dSpec -> Conv1dSpec -> Bool Source # (/=) :: Conv1dSpec -> Conv1dSpec -> Bool Source # | |
Randomizable Conv1dSpec Conv1d Source # | |
Instances
Generic Conv1d Source # | |
Show Conv1d Source # | |
Parameterized Conv1d Source # | |
Randomizable Conv1dSpec Conv1d Source # | |
type Rep Conv1d Source # | |
Defined in Torch.NN type Rep Conv1d = D1 ('MetaData "Conv1d" "Torch.NN" "hasktorch-0.2.0.0-F6yFRaDiRF49lpq95SVuR8" 'False) (C1 ('MetaCons "Conv1d" 'PrefixI 'True) (S1 ('MetaSel ('Just "weight") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Parameter) :*: S1 ('MetaSel ('Just "bias") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Parameter))) |
data Conv2dSpec Source #
Conv2dSpec | |
|
Instances
Show Conv2dSpec Source # | |
Eq Conv2dSpec Source # | |
Defined in Torch.NN (==) :: Conv2dSpec -> Conv2dSpec -> Bool Source # (/=) :: Conv2dSpec -> Conv2dSpec -> Bool Source # | |
Randomizable Conv2dSpec Conv2d Source # | |
Instances
Generic Conv2d Source # | |
Show Conv2d Source # | |
Parameterized Conv2d Source # | |
Randomizable Conv2dSpec Conv2d Source # | |
type Rep Conv2d Source # | |
Defined in Torch.NN type Rep Conv2d = D1 ('MetaData "Conv2d" "Torch.NN" "hasktorch-0.2.0.0-F6yFRaDiRF49lpq95SVuR8" 'False) (C1 ('MetaCons "Conv2d" 'PrefixI 'True) (S1 ('MetaSel ('Just "weight") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Parameter) :*: S1 ('MetaSel ('Just "bias") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Parameter))) |
data Conv3dSpec Source #
Conv3dSpec | |
|
Instances
Show Conv3dSpec Source # | |
Eq Conv3dSpec Source # | |
Defined in Torch.NN (==) :: Conv3dSpec -> Conv3dSpec -> Bool Source # (/=) :: Conv3dSpec -> Conv3dSpec -> Bool Source # | |
Randomizable Conv3dSpec Conv3d Source # | |
Instances
Generic Conv3d Source # | |
Show Conv3d Source # | |
Parameterized Conv3d Source # | |
Randomizable Conv3dSpec Conv3d Source # | |
type Rep Conv3d Source # | |
Defined in Torch.NN type Rep Conv3d = D1 ('MetaData "Conv3d" "Torch.NN" "hasktorch-0.2.0.0-F6yFRaDiRF49lpq95SVuR8" 'False) (C1 ('MetaCons "Conv3d" 'PrefixI 'True) (S1 ('MetaSel ('Just "weight") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Parameter) :*: S1 ('MetaSel ('Just "bias") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Parameter))) |
data ConvTranspose1dSpec Source #
Instances
Show ConvTranspose1dSpec Source # | |
Eq ConvTranspose1dSpec Source # | |
Defined in Torch.NN (==) :: ConvTranspose1dSpec -> ConvTranspose1dSpec -> Bool Source # (/=) :: ConvTranspose1dSpec -> ConvTranspose1dSpec -> Bool Source # | |
Randomizable ConvTranspose1dSpec ConvTranspose1d Source # | |
Defined in Torch.NN |
data ConvTranspose1d Source #
Instances
Generic ConvTranspose1d Source # | |
Defined in Torch.NN from :: ConvTranspose1d -> Rep ConvTranspose1d x Source # to :: Rep ConvTranspose1d x -> ConvTranspose1d Source # | |
Show ConvTranspose1d Source # | |
Parameterized ConvTranspose1d Source # | |
Defined in Torch.NN | |
Randomizable ConvTranspose1dSpec ConvTranspose1d Source # | |
Defined in Torch.NN | |
type Rep ConvTranspose1d Source # | |
Defined in Torch.NN type Rep ConvTranspose1d = D1 ('MetaData "ConvTranspose1d" "Torch.NN" "hasktorch-0.2.0.0-F6yFRaDiRF49lpq95SVuR8" 'False) (C1 ('MetaCons "ConvTranspose1d" 'PrefixI 'True) (S1 ('MetaSel ('Just "weight") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Parameter) :*: S1 ('MetaSel ('Just "bias") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Parameter))) |
convTranspose1dForward Source #
:: ConvTranspose1d | layer |
-> Int | stride |
-> Int | padding |
-> Tensor | input |
-> Tensor | output |
data ConvTranspose2dSpec Source #
Instances
Show ConvTranspose2dSpec Source # | |
Eq ConvTranspose2dSpec Source # | |
Defined in Torch.NN (==) :: ConvTranspose2dSpec -> ConvTranspose2dSpec -> Bool Source # (/=) :: ConvTranspose2dSpec -> ConvTranspose2dSpec -> Bool Source # | |
Randomizable ConvTranspose2dSpec ConvTranspose2d Source # | |
Defined in Torch.NN |
data ConvTranspose2d Source #
Instances
Generic ConvTranspose2d Source # | |
Defined in Torch.NN from :: ConvTranspose2d -> Rep ConvTranspose2d x Source # to :: Rep ConvTranspose2d x -> ConvTranspose2d Source # | |
Show ConvTranspose2d Source # | |
Parameterized ConvTranspose2d Source # | |
Defined in Torch.NN | |
Randomizable ConvTranspose2dSpec ConvTranspose2d Source # | |
Defined in Torch.NN | |
type Rep ConvTranspose2d Source # | |
Defined in Torch.NN type Rep ConvTranspose2d = D1 ('MetaData "ConvTranspose2d" "Torch.NN" "hasktorch-0.2.0.0-F6yFRaDiRF49lpq95SVuR8" 'False) (C1 ('MetaCons "ConvTranspose2d" 'PrefixI 'True) (S1 ('MetaSel ('Just "weight") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Parameter) :*: S1 ('MetaSel ('Just "bias") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Parameter))) |
data ConvTranspose3dSpec Source #
Instances
Show ConvTranspose3dSpec Source # | |
Eq ConvTranspose3dSpec Source # | |
Defined in Torch.NN (==) :: ConvTranspose3dSpec -> ConvTranspose3dSpec -> Bool Source # (/=) :: ConvTranspose3dSpec -> ConvTranspose3dSpec -> Bool Source # | |
Randomizable ConvTranspose3dSpec ConvTranspose3d Source # | |
Defined in Torch.NN |
data ConvTranspose3d Source #
Instances
Generic ConvTranspose3d Source # | |
Defined in Torch.NN from :: ConvTranspose3d -> Rep ConvTranspose3d x Source # to :: Rep ConvTranspose3d x -> ConvTranspose3d Source # | |
Show ConvTranspose3d Source # | |
Parameterized ConvTranspose3d Source # | |
Defined in Torch.NN | |
Randomizable ConvTranspose3dSpec ConvTranspose3d Source # | |
Defined in Torch.NN | |
type Rep ConvTranspose3d Source # | |
Defined in Torch.NN type Rep ConvTranspose3d = D1 ('MetaData "ConvTranspose3d" "Torch.NN" "hasktorch-0.2.0.0-F6yFRaDiRF49lpq95SVuR8" 'False) (C1 ('MetaCons "ConvTranspose3d" 'PrefixI 'True) (S1 ('MetaSel ('Just "weight") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Parameter) :*: S1 ('MetaSel ('Just "bias") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Parameter))) |
data BatchNormSpec Source #
Instances
Show BatchNormSpec Source # | |
Eq BatchNormSpec Source # | |
Defined in Torch.NN (==) :: BatchNormSpec -> BatchNormSpec -> Bool Source # (/=) :: BatchNormSpec -> BatchNormSpec -> Bool Source # | |
Randomizable BatchNormSpec BatchNorm Source # | |
BatchNorm | |
|
Instances
Generic BatchNorm Source # | |
Show BatchNorm Source # | |
Randomizable BatchNormSpec BatchNorm Source # | |
type Rep BatchNorm Source # | |
Defined in Torch.NN type Rep BatchNorm = D1 ('MetaData "BatchNorm" "Torch.NN" "hasktorch-0.2.0.0-F6yFRaDiRF49lpq95SVuR8" 'False) (C1 ('MetaCons "BatchNorm" 'PrefixI 'True) ((S1 ('MetaSel ('Just "weight") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Parameter) :*: S1 ('MetaSel ('Just "bias") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Parameter)) :*: (S1 ('MetaSel ('Just "runningMean") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MutableTensor) :*: S1 ('MetaSel ('Just "runningVar") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MutableTensor)))) |
data InstanceNormSpec Source #
Instances
Show InstanceNormSpec Source # | |
Eq InstanceNormSpec Source # | |
Defined in Torch.NN (==) :: InstanceNormSpec -> InstanceNormSpec -> Bool Source # (/=) :: InstanceNormSpec -> InstanceNormSpec -> Bool Source # | |
Randomizable InstanceNormSpec InstanceNorm Source # | |
Defined in Torch.NN sample :: InstanceNormSpec -> IO InstanceNorm Source # |
data InstanceNorm Source #
InstanceNorm | |
|
Instances
Generic InstanceNorm Source # | |
Defined in Torch.NN from :: InstanceNorm -> Rep InstanceNorm x Source # to :: Rep InstanceNorm x -> InstanceNorm Source # | |
Show InstanceNorm Source # | |
Randomizable InstanceNormSpec InstanceNorm Source # | |
Defined in Torch.NN sample :: InstanceNormSpec -> IO InstanceNorm Source # | |
type Rep InstanceNorm Source # | |
Defined in Torch.NN type Rep InstanceNorm = D1 ('MetaData "InstanceNorm" "Torch.NN" "hasktorch-0.2.0.0-F6yFRaDiRF49lpq95SVuR8" 'False) (C1 ('MetaCons "InstanceNorm" 'PrefixI 'True) ((S1 ('MetaSel ('Just "weight") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Parameter) :*: S1 ('MetaSel ('Just "bias") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Parameter)) :*: (S1 ('MetaSel ('Just "runningMean") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MutableTensor) :*: S1 ('MetaSel ('Just "runningVar") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MutableTensor)))) |
instanceNormForwardIO :: InstanceNorm -> Bool -> Double -> Double -> Tensor -> IO Tensor Source #
data UpSampleSpec Source #
Instances
Show UpSampleSpec Source # | |
Eq UpSampleSpec Source # | |
Defined in Torch.NN (==) :: UpSampleSpec -> UpSampleSpec -> Bool Source # (/=) :: UpSampleSpec -> UpSampleSpec -> Bool Source # | |
Parameterized UpSampleSpec Source # | |
Defined in Torch.NN | |
Randomizable UpSampleSpec UpSample Source # | |
Instances
Generic UpSample Source # | |
Show UpSample Source # | |
Parameterized UpSample Source # | |
Defined in Torch.NN | |
Randomizable UpSampleSpec UpSample Source # | |
HasForward UpSample Tensor Tensor Source # | |
type Rep UpSample Source # | |
Defined in Torch.NN type Rep UpSample = D1 ('MetaData "UpSample" "Torch.NN" "hasktorch-0.2.0.0-F6yFRaDiRF49lpq95SVuR8" 'False) (C1 ('MetaCons "UpSample" 'PrefixI 'True) (S1 ('MetaSel ('Just "upsampleSpec") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 UpSampleSpec))) |