Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
data LayerNorm (hasBias :: HasBias) (gradient :: Gradient RequiresGradient) (device :: Device (DeviceType Nat)) (dataType :: DataType DType) (normalizedShape :: Shape [Dim (Name Symbol) (Size Nat)]) where Source #
LayerNormWithBias | |
| |
LayerNormWithoutBias | |
|
Instances
HasStateDict (LayerNorm hasBias gradient device dataType normalizedShape) Source # | |
Defined in Torch.GraduallyTyped.NN.Normalization 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 # | |
Defined in Torch.GraduallyTyped.NN.Normalization 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 # | |
Defined in Torch.GraduallyTyped.NN.Normalization | |
(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 # | |
Defined in Torch.GraduallyTyped.NN.Normalization 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 # | |
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 #
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
Generic (LayerNormSpec hasBias gradient device dataType normalizedShape) Source # | |
Defined in Torch.GraduallyTyped.NN.Normalization 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 # | |
Defined in Torch.GraduallyTyped.NN.Normalization | |
type Rep (LayerNormSpec hasBias gradient device dataType normalizedShape) Source # | |
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))))) |