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

Torch.GraduallyTyped.NN.Transformer.GPooler

Documentation

data GPooler (dense :: Type) (activation :: Type) where Source #

Constructors

GPooler 

Fields

Instances

Instances details
(HasForward dense (Tensor gradient layout device dataType shape) generatorDevice tensor0 generatorDevice0, HasForward activation tensor0 generatorDevice0 output generatorOutputDevice) => HasForward (GPooler dense activation) (Tensor gradient layout device dataType shape) generatorDevice output generatorOutputDevice Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Transformer.GPooler

Methods

forward :: MonadThrow m => GPooler dense activation -> Tensor gradient layout device dataType shape -> Generator generatorDevice -> m (output, Generator generatorOutputDevice) Source #

type ModelSpec (GPooler dense activation) Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Transformer.GPooler

type ModelSpec (GPooler dense activation) = GPooler (ModelSpec dense) (ModelSpec activation)

poolerSpec :: forall style gradient device dataType inputEmbedDim. STransformerStyle style -> SGradient gradient -> SDevice device -> SDataType dataType -> SDim inputEmbedDim -> GPooler (PoolerDenseF style gradient device dataType inputEmbedDim) (PoolerActivationF style) Source #

type family PoolerDenseF (style :: TransformerStyle) (gradient :: Gradient RequiresGradient) (device :: Device (DeviceType Nat)) (dataType :: DataType DType) (inputEmbedDim :: Dim (Name Symbol) (Size Nat)) :: Type where ... Source #

Equations

PoolerDenseF 'RoBERTa gradient device dataType inputEmbedDim = NamedModel (GLinearF 'WithBias gradient device dataType inputEmbedDim inputEmbedDim) 

type family PoolerActivationF (style :: TransformerStyle) :: Type where ... Source #