Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
data Embedding (gradient :: Gradient RequiresGradient) (layout :: Layout LayoutType) (device :: Device (DeviceType Nat)) (dataType :: DataType DType) (embedNumDim :: Dim (Name Symbol) (Size Nat)) (embedDim :: Dim (Name Symbol) (Size Nat)) (paddingIdx :: Maybe Nat) where Source #
Embedding | |
|
Instances
Generic (Embedding gradient layout device dataType embedNumDim embedDim paddingIdx) Source # | |
Defined in Torch.GraduallyTyped.NN.Sparse type Rep (Embedding gradient layout device dataType embedNumDim embedDim paddingIdx) :: Type -> Type Source # from :: Embedding gradient layout device dataType embedNumDim embedDim paddingIdx -> Rep (Embedding gradient layout device dataType embedNumDim embedDim paddingIdx) x Source # to :: Rep (Embedding gradient layout device dataType embedNumDim embedDim paddingIdx) x -> Embedding gradient layout device dataType embedNumDim embedDim paddingIdx Source # | |
Show (Embedding gradient layout device dataType embedNumDim embedDim paddingIdx) Source # | |
Defined in Torch.GraduallyTyped.NN.Sparse showsPrec :: Int -> Embedding gradient layout device dataType embedNumDim embedDim paddingIdx -> ShowS Source # show :: Embedding gradient layout device dataType embedNumDim embedDim paddingIdx -> String Source # showList :: [Embedding gradient layout device dataType embedNumDim embedDim paddingIdx] -> ShowS Source # | |
HasStateDict (Embedding gradient layout device dataType embedNumDim embedDim paddingIdx) Source # | |
Defined in Torch.GraduallyTyped.NN.Sparse fromStateDict :: (MonadIO m, MonadThrow m, MonadState StateDict m) => ModelSpec (Embedding gradient layout device dataType embedNumDim embedDim paddingIdx) -> StateDictKey -> m (Embedding gradient layout device dataType embedNumDim embedDim paddingIdx) Source # toStateDict :: (MonadThrow m, MonadState StateDict m) => StateDictKey -> Embedding gradient layout device dataType embedNumDim embedDim paddingIdx -> m () Source # | |
(output ~ Embedding gradient layout (device <+> generatorDevice) dataType embedNumDim embedDim paddingIdx, generatorOutputDevice ~ (device <+> generatorDevice), SGetGeneratorDevice generatorDevice) => HasInitialize (Embedding gradient layout device dataType embedNumDim embedDim paddingIdx) generatorDevice output generatorOutputDevice Source # | |
Defined in Torch.GraduallyTyped.NN.Sparse initialize :: MonadThrow m => ModelSpec (Embedding gradient layout device dataType embedNumDim embedDim paddingIdx) -> Generator generatorDevice -> m (output, Generator generatorOutputDevice) Source # | |
(SGetLayout layout, KnownNat paddingIdx, Catch (dataType' <+> 'DataType 'Int64), output ~ Tensor (gradient <|> gradient') (layout <+> layout') (device <+> device') dataType (EmbeddingF ('Shape '[embedNumDim, embedDim]) shape')) => HasForward (Embedding gradient layout device dataType embedNumDim embedDim ('Just paddingIdx)) (Tensor gradient' layout' device' dataType' shape') generatorDevice output generatorDevice Source # | |
Defined in Torch.GraduallyTyped.NN.Sparse | |
(SGetLayout layout, Catch (dataType' <+> 'DataType 'Int64), output ~ Tensor (gradient <|> gradient') (layout <+> layout') (device <+> device') dataType (EmbeddingF ('Shape '[embedNumDim, embedDim]) shape')) => HasForward (Embedding gradient layout device dataType embedNumDim embedDim ('Nothing :: Maybe Nat)) (Tensor gradient' layout' device' dataType' shape') generatorDevice output generatorDevice Source # | |
Defined in Torch.GraduallyTyped.NN.Sparse | |
type Rep (Embedding gradient layout device dataType embedNumDim embedDim paddingIdx) Source # | |
Defined in Torch.GraduallyTyped.NN.Sparse type Rep (Embedding gradient layout device dataType embedNumDim embedDim paddingIdx) = D1 ('MetaData "Embedding" "Torch.GraduallyTyped.NN.Sparse" "hasktorch-gradually-typed-0.2.0.0-1KV1aIPzzbp6JpSr37tC1K" 'False) (C1 ('MetaCons "Embedding" 'PrefixI 'True) (S1 ('MetaSel ('Just "embeddingWeight") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Tensor gradient layout device dataType ('Shape '[embedNumDim, embedDim]))))) | |
type ModelSpec (Embedding gradient layout device dataType embedNumDim embedDim paddingIdx) Source # | |
Defined in Torch.GraduallyTyped.NN.Sparse type ModelSpec (Embedding gradient layout device dataType embedNumDim embedDim paddingIdx) = EmbeddingSpec gradient layout device dataType embedNumDim embedDim paddingIdx |
data EmbeddingSpec (gradient :: Gradient RequiresGradient) (layout :: Layout LayoutType) (device :: Device (DeviceType Nat)) (dataType :: DataType DType) (embedNumDim :: Dim (Name Symbol) (Size Nat)) (embedDim :: Dim (Name Symbol) (Size Nat)) (paddingIdx :: Maybe Nat) where Source #
EmbeddingSpec :: forall gradient layout device dataType embedNumDim embedDim paddingIdx. SGradient gradient -> SLayout layout -> SDevice device -> SDataType dataType -> SDim embedNumDim -> SDim embedDim -> SMaybe paddingIdx -> EmbeddingSpec gradient layout device dataType embedNumDim embedDim paddingIdx |
Instances
Generic (EmbeddingSpec gradient layout device dataType embedNumDim embedDim paddingIdx) Source # | |
Defined in Torch.GraduallyTyped.NN.Sparse type Rep (EmbeddingSpec gradient layout device dataType embedNumDim embedDim paddingIdx) :: Type -> Type Source # from :: EmbeddingSpec gradient layout device dataType embedNumDim embedDim paddingIdx -> Rep (EmbeddingSpec gradient layout device dataType embedNumDim embedDim paddingIdx) x Source # to :: Rep (EmbeddingSpec gradient layout device dataType embedNumDim embedDim paddingIdx) x -> EmbeddingSpec gradient layout device dataType embedNumDim embedDim paddingIdx Source # | |
Show (EmbeddingSpec gradient layout device dataType embedNumDim embedDim paddingIdx) Source # | |
Defined in Torch.GraduallyTyped.NN.Sparse showsPrec :: Int -> EmbeddingSpec gradient layout device dataType embedNumDim embedDim paddingIdx -> ShowS Source # show :: EmbeddingSpec gradient layout device dataType embedNumDim embedDim paddingIdx -> String Source # showList :: [EmbeddingSpec gradient layout device dataType embedNumDim embedDim paddingIdx] -> ShowS Source # | |
type Rep (EmbeddingSpec gradient layout device dataType embedNumDim embedDim paddingIdx) Source # | |
Defined in Torch.GraduallyTyped.NN.Sparse type Rep (EmbeddingSpec gradient layout device dataType embedNumDim embedDim paddingIdx) = D1 ('MetaData "EmbeddingSpec" "Torch.GraduallyTyped.NN.Sparse" "hasktorch-gradually-typed-0.2.0.0-1KV1aIPzzbp6JpSr37tC1K" 'False) (C1 ('MetaCons "EmbeddingSpec" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SGradient gradient)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SLayout layout)) :*: 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 (SDim embedNumDim))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SDim embedDim)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SMaybe paddingIdx)))))) |