hasktorch-gradually-typed-0.2.0.0: experimental project for hasktorch
Safe HaskellSafe-Inferred
LanguageHaskell2010

Torch.GraduallyTyped.NN.Normalization

Documentation

data LayerNorm (hasBias :: HasBias) (gradient :: Gradient RequiresGradient) (device :: Device (DeviceType Nat)) (dataType :: DataType DType) (normalizedShape :: Shape [Dim (Name Symbol) (Size Nat)]) where Source #

Constructors

LayerNormWithBias 

Fields

LayerNormWithoutBias 

Fields

Instances

Instances details
HasStateDict (LayerNorm hasBias gradient device dataType normalizedShape) Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Normalization

Methods

fromStateDict :: (MonadIO m, MonadThrow m, MonadState StateDict m) => ModelSpec (LayerNorm hasBias gradient device dataType normalizedShape) -> StateDictKey -> m (LayerNorm hasBias gradient device dataType normalizedShape) Source #

toStateDict :: (MonadThrow m, MonadState StateDict m) => StateDictKey -> LayerNorm hasBias gradient device dataType normalizedShape -> m () Source #

HasInitialize (LayerNorm hasBias gradient device dataType normalizedShape) generatorDevice (LayerNorm hasBias gradient device dataType normalizedShape) generatorDevice Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Normalization

Methods

initialize :: MonadThrow m => ModelSpec (LayerNorm hasBias gradient device dataType normalizedShape) -> Generator generatorDevice -> m (LayerNorm hasBias gradient device dataType normalizedShape, Generator generatorDevice) Source #

(SGetShape normalizedShape, output ~ Tensor (gradient <|> gradient') ('Layout 'Dense <+> layout') (device <+> device') (dataType <+> dataType') (LayerNormWithBiasF normalizedShape normalizedShape shape')) => HasForward (LayerNorm 'WithBias gradient device dataType normalizedShape) (Tensor gradient' layout' device' dataType' shape') generatorDevice output generatorDevice Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Normalization

Methods

forward :: MonadThrow m => LayerNorm 'WithBias gradient device dataType normalizedShape -> Tensor gradient' layout' device' dataType' shape' -> Generator generatorDevice -> m (output, Generator generatorDevice) Source #

(SGetShape normalizedShape, SGetShape shape', output ~ Tensor (gradient <|> gradient') ('Layout 'Dense <+> layout') (device <+> device') (dataType <+> dataType') (LayerNormWithoutBiasF normalizedShape shape')) => HasForward (LayerNorm 'WithoutBias gradient device dataType normalizedShape) (Tensor gradient' layout' device' dataType' shape') generatorDevice output generatorDevice Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Normalization

Methods

forward :: MonadThrow m => LayerNorm 'WithoutBias gradient device dataType normalizedShape -> Tensor gradient' layout' device' dataType' shape' -> Generator generatorDevice -> m (output, Generator generatorDevice) Source #

type ModelSpec (LayerNorm hasBias gradient device dataType normalizedShape) Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Normalization

type ModelSpec (LayerNorm hasBias gradient device dataType normalizedShape) = LayerNormSpec hasBias gradient device dataType normalizedShape

data LayerNormSpec (hasBias :: HasBias) (gradient :: Gradient RequiresGradient) (device :: Device (DeviceType Nat)) (dataType :: DataType DType) (normalizedShape :: Shape [Dim (Name Symbol) (Size Nat)]) where Source #

Constructors

LayerNormSpec :: forall hasBias gradient device dataType normalizedShape. SHasBias hasBias -> SGradient gradient -> SDevice device -> SDataType dataType -> SShape normalizedShape -> Double -> LayerNormSpec hasBias gradient device dataType normalizedShape 

Instances

Instances details
Generic (LayerNormSpec hasBias gradient device dataType normalizedShape) Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Normalization

Associated Types

type Rep (LayerNormSpec hasBias gradient device dataType normalizedShape) :: Type -> Type Source #

Methods

from :: LayerNormSpec hasBias gradient device dataType normalizedShape -> Rep (LayerNormSpec hasBias gradient device dataType normalizedShape) x Source #

to :: Rep (LayerNormSpec hasBias gradient device dataType normalizedShape) x -> LayerNormSpec hasBias gradient device dataType normalizedShape Source #

Show (LayerNormSpec hasBias gradient device dataType normalizedShape) Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Normalization

Methods

showsPrec :: Int -> LayerNormSpec hasBias gradient device dataType normalizedShape -> ShowS Source #

show :: LayerNormSpec hasBias gradient device dataType normalizedShape -> String Source #

showList :: [LayerNormSpec hasBias gradient device dataType normalizedShape] -> ShowS Source #

type Rep (LayerNormSpec hasBias gradient device dataType normalizedShape) Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Normalization

type Rep (LayerNormSpec hasBias gradient device dataType normalizedShape) = D1 ('MetaData "LayerNormSpec" "Torch.GraduallyTyped.NN.Normalization" "hasktorch-gradually-typed-0.2.0.0-1KV1aIPzzbp6JpSr37tC1K" 'False) (C1 ('MetaCons "LayerNormSpec" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SHasBias hasBias)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SGradient gradient)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SDevice device)))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SDataType dataType)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SShape normalizedShape)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)))))