Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
data EmbeddingType Source #
Instances
Generic EmbeddingType Source # | |
Defined in Torch.Typed.NN.Sparse from :: EmbeddingType -> Rep EmbeddingType x Source # to :: Rep EmbeddingType x -> EmbeddingType Source # | |
Show EmbeddingType Source # | |
Defined in Torch.Typed.NN.Sparse | |
type Rep EmbeddingType Source # | |
data EmbeddingSpec (paddingIdx :: Maybe Nat) (numEmbeds :: Nat) (embedSize :: Nat) (embeddingType :: EmbeddingType) (dtype :: DType) (device :: (DeviceType, Nat)) where Source #
ConstEmbeddingSpec :: forall paddingIdx numEmbeds embedSize dtype device. Tensor device dtype '[numEmbeds, embedSize] -> EmbeddingSpec paddingIdx numEmbeds embedSize 'Constant dtype device | |
LearnedEmbeddingWithRandomInitSpec :: forall paddingIdx numEmbeds embedSize dtype device. EmbeddingSpec paddingIdx numEmbeds embedSize 'Learned dtype device | |
LearnedEmbeddingWithCustomInitSpec :: forall paddingIdx numEmbeds embedSize dtype device. Tensor device dtype '[numEmbeds, embedSize] -> EmbeddingSpec paddingIdx numEmbeds embedSize 'Learned dtype device |
Instances
Show (EmbeddingSpec paddingIdx numEmbeds embedSize embeddingType dtype device) Source # | |
Defined in Torch.Typed.NN.Sparse showsPrec :: Int -> EmbeddingSpec paddingIdx numEmbeds embedSize embeddingType dtype device -> ShowS Source # show :: EmbeddingSpec paddingIdx numEmbeds embedSize embeddingType dtype device -> String Source # showList :: [EmbeddingSpec paddingIdx numEmbeds embedSize embeddingType dtype device] -> ShowS 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 |
data Embedding (paddingIdx :: Maybe Nat) (numEmbeds :: Nat) (embedSize :: Nat) (embeddingType :: EmbeddingType) (dtype :: DType) (device :: (DeviceType, Nat)) where Source #
ConstEmbedding | |
| |
LearnedEmbedding | |
|
Instances
Generic (Embedding paddingIdx numEmbeds embedSize 'Constant dtype device) Source # | |
Defined in Torch.Typed.NN.Sparse from :: Embedding paddingIdx numEmbeds embedSize 'Constant dtype device -> Rep (Embedding paddingIdx numEmbeds embedSize 'Constant dtype device) x Source # to :: Rep (Embedding paddingIdx numEmbeds embedSize 'Constant dtype device) x -> Embedding paddingIdx numEmbeds embedSize 'Constant dtype device Source # | |
Generic (Embedding paddingIdx numEmbeds embedSize 'Learned dtype device) Source # | |
Defined in Torch.Typed.NN.Sparse from :: Embedding paddingIdx numEmbeds embedSize 'Learned dtype device -> Rep (Embedding paddingIdx numEmbeds embedSize 'Learned dtype device) x Source # to :: Rep (Embedding paddingIdx numEmbeds embedSize 'Learned dtype device) x -> Embedding paddingIdx numEmbeds embedSize 'Learned dtype device Source # | |
Show (Embedding paddingIdx numEmbeds embedSize embeddingType dtype device) Source # | |
Defined in Torch.Typed.NN.Sparse | |
Parameterized (Embedding paddingIdx numEmbeds embedSize 'Constant dtype device) Source # | |
Defined in Torch.Typed.NN.Sparse type Parameters (Embedding paddingIdx numEmbeds embedSize 'Constant dtype device) :: [Type] Source # 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 # | |
Defined in Torch.Typed.NN.Sparse 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 # | |
(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 # | |
(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 | |
type Rep (Embedding paddingIdx numEmbeds embedSize 'Constant dtype device) Source # | |
type Rep (Embedding paddingIdx numEmbeds embedSize 'Learned dtype device) Source # | |
type Parameters (Embedding paddingIdx numEmbeds embedSize 'Constant dtype device) Source # | |
Defined in Torch.Typed.NN.Sparse type Parameters (Embedding paddingIdx numEmbeds embedSize 'Constant dtype device) = GParameters (Rep (Embedding paddingIdx numEmbeds embedSize 'Constant dtype device)) | |
type Parameters (Embedding paddingIdx numEmbeds embedSize 'Learned dtype device) Source # | |
Defined in Torch.Typed.NN.Sparse type Parameters (Embedding paddingIdx numEmbeds embedSize 'Learned dtype device) = GParameters (Rep (Embedding paddingIdx numEmbeds embedSize 'Learned dtype device)) |
embed :: forall paddingIdx shape numEmbeds embedSize embeddingType dtype device shape'. (KnownMaybeNat paddingIdx, PaddingIdxCheck paddingIdx numEmbeds, shape' ~ Reverse (embedSize ': Reverse shape)) => Embedding paddingIdx numEmbeds embedSize embeddingType dtype device -> Tensor device 'Int64 shape -> Tensor device dtype shape' Source #