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

Torch.GraduallyTyped.NN.Activation

Synopsis

Documentation

data Softmax (selectDim :: SelectDim (By Symbol Nat)) where Source #

Softmax is a non-linear activation function.

Constructors

Softmax 

Fields

Instances

Instances details
Generic (Softmax selectDim) Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Associated Types

type Rep (Softmax selectDim) :: Type -> Type Source #

Methods

from :: Softmax selectDim -> Rep (Softmax selectDim) x Source #

to :: Rep (Softmax selectDim) x -> Softmax selectDim Source #

HasStateDict (Softmax selectDim) Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Methods

fromStateDict :: (MonadIO m, MonadThrow m, MonadState StateDict m) => ModelSpec (Softmax selectDim) -> StateDictKey -> m (Softmax selectDim) Source #

toStateDict :: (MonadThrow m, MonadState StateDict m) => StateDictKey -> Softmax selectDim -> m () Source #

HasInitialize (Softmax selectDim) generatorDevice (Softmax selectDim) generatorDevice Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Methods

initialize :: MonadThrow m => ModelSpec (Softmax selectDim) -> Generator generatorDevice -> m (Softmax selectDim, Generator generatorDevice) Source #

(shape' ~ SoftmaxF selectDim shape, Catch shape', output ~ Tensor requiresGradient layout device dataType shape') => HasForward (Softmax selectDim) (Tensor requiresGradient layout device dataType shape) generator output generator Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Methods

forward :: MonadThrow m => Softmax selectDim -> Tensor requiresGradient layout device dataType shape -> Generator generator -> m (output, Generator generator) Source #

type Rep (Softmax selectDim) Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

type Rep (Softmax selectDim) = D1 ('MetaData "Softmax" "Torch.GraduallyTyped.NN.Activation" "hasktorch-gradually-typed-0.2.0.0-1KV1aIPzzbp6JpSr37tC1K" 'False) (C1 ('MetaCons "Softmax" 'PrefixI 'True) (S1 ('MetaSel ('Just "softmaxSelectDim") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SSelectDim selectDim))))
type ModelSpec (Softmax selectDim) Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

type ModelSpec (Softmax selectDim) = Softmax selectDim

data LogSoftmax (selectDim :: SelectDim (By Symbol Nat)) where Source #

LogSoftmax is a non-linear activation function.

Constructors

LogSoftmax 

Fields

Instances

Instances details
Generic (LogSoftmax selectDim) Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Associated Types

type Rep (LogSoftmax selectDim) :: Type -> Type Source #

Methods

from :: LogSoftmax selectDim -> Rep (LogSoftmax selectDim) x Source #

to :: Rep (LogSoftmax selectDim) x -> LogSoftmax selectDim Source #

HasStateDict (LogSoftmax selectDim) Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

HasInitialize (LogSoftmax selectDim) generatorDevice (LogSoftmax selectDim) generatorDevice Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Methods

initialize :: MonadThrow m => ModelSpec (LogSoftmax selectDim) -> Generator generatorDevice -> m (LogSoftmax selectDim, Generator generatorDevice) Source #

(shape' ~ SoftmaxF selectDim shape, Catch shape', output ~ Tensor requiresGradient layout device dataType shape') => HasForward (LogSoftmax selectDim) (Tensor requiresGradient layout device dataType shape) generator output generator Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Methods

forward :: MonadThrow m => LogSoftmax selectDim -> Tensor requiresGradient layout device dataType shape -> Generator generator -> m (output, Generator generator) Source #

type Rep (LogSoftmax selectDim) Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

type Rep (LogSoftmax selectDim) = D1 ('MetaData "LogSoftmax" "Torch.GraduallyTyped.NN.Activation" "hasktorch-gradually-typed-0.2.0.0-1KV1aIPzzbp6JpSr37tC1K" 'False) (C1 ('MetaCons "LogSoftmax" 'PrefixI 'True) (S1 ('MetaSel ('Just "logSoftmaxSelectDim") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SSelectDim selectDim))))
type ModelSpec (LogSoftmax selectDim) Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

type ModelSpec (LogSoftmax selectDim) = LogSoftmax selectDim

data Relu where Source #

Relu is a step-wise linear activation function.

Constructors

Relu :: Relu 

Instances

Instances details
Generic Relu Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Associated Types

type Rep Relu :: Type -> Type Source #

Methods

from :: Relu -> Rep Relu x Source #

to :: Rep Relu x -> Relu Source #

Show Relu Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Eq Relu Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Methods

(==) :: Relu -> Relu -> Bool Source #

(/=) :: Relu -> Relu -> Bool Source #

Ord Relu Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

HasStateDict Relu Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

HasInitialize Relu generatorDevice Relu generatorDevice Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Methods

initialize :: MonadThrow m => ModelSpec Relu -> Generator generatorDevice -> m (Relu, Generator generatorDevice) Source #

HasForward Relu (Tensor requiresGradient layout device dataType shape) generator (Tensor requiresGradient layout device dataType shape) generator Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Methods

forward :: MonadThrow m => Relu -> Tensor requiresGradient layout device dataType shape -> Generator generator -> m (Tensor requiresGradient layout device dataType shape, Generator generator) Source #

type Rep Relu Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

type Rep Relu = D1 ('MetaData "Relu" "Torch.GraduallyTyped.NN.Activation" "hasktorch-gradually-typed-0.2.0.0-1KV1aIPzzbp6JpSr37tC1K" 'False) (C1 ('MetaCons "Relu" 'PrefixI 'False) (U1 :: Type -> Type))
type ModelSpec Relu Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

data Gelu where Source #

Gelu is a non-linear activation function.

Constructors

Gelu :: Gelu 

Instances

Instances details
Generic Gelu Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Associated Types

type Rep Gelu :: Type -> Type Source #

Methods

from :: Gelu -> Rep Gelu x Source #

to :: Rep Gelu x -> Gelu Source #

Show Gelu Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Eq Gelu Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Methods

(==) :: Gelu -> Gelu -> Bool Source #

(/=) :: Gelu -> Gelu -> Bool Source #

Ord Gelu Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

HasStateDict Gelu Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

HasInitialize Gelu generatorDevice Gelu generatorDevice Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Methods

initialize :: MonadThrow m => ModelSpec Gelu -> Generator generatorDevice -> m (Gelu, Generator generatorDevice) Source #

HasForward Gelu (Tensor requiresGradient layout device dataType shape) generator (Tensor requiresGradient layout device dataType shape) generator Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Methods

forward :: MonadThrow m => Gelu -> Tensor requiresGradient layout device dataType shape -> Generator generator -> m (Tensor requiresGradient layout device dataType shape, Generator generator) Source #

type Rep Gelu Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

type Rep Gelu = D1 ('MetaData "Gelu" "Torch.GraduallyTyped.NN.Activation" "hasktorch-gradually-typed-0.2.0.0-1KV1aIPzzbp6JpSr37tC1K" 'False) (C1 ('MetaCons "Gelu" 'PrefixI 'False) (U1 :: Type -> Type))
type ModelSpec Gelu Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

data GeluNew where Source #

GeluNew is a non-linear activation function. It is a modified version of the Gelu function.

Constructors

GeluNew :: GeluNew 

Instances

Instances details
Generic GeluNew Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Associated Types

type Rep GeluNew :: Type -> Type Source #

Show GeluNew Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Eq GeluNew Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Ord GeluNew Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

HasStateDict GeluNew Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

HasInitialize GeluNew generator GeluNew generator Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Methods

initialize :: MonadThrow m => ModelSpec GeluNew -> Generator generator -> m (GeluNew, Generator generator) Source #

HasForward GeluNew (Tensor requiresGradient layout device dataType shape) generator (Tensor requiresGradient layout device dataType shape) generator Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Methods

forward :: MonadThrow m => GeluNew -> Tensor requiresGradient layout device dataType shape -> Generator generator -> m (Tensor requiresGradient layout device dataType shape, Generator generator) Source #

type Rep GeluNew Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

type Rep GeluNew = D1 ('MetaData "GeluNew" "Torch.GraduallyTyped.NN.Activation" "hasktorch-gradually-typed-0.2.0.0-1KV1aIPzzbp6JpSr37tC1K" 'False) (C1 ('MetaCons "GeluNew" 'PrefixI 'False) (U1 :: Type -> Type))
type ModelSpec GeluNew Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

data Tanh where Source #

Tanh is a non-linear activation function.

Constructors

Tanh :: Tanh 

Instances

Instances details
Generic Tanh Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Associated Types

type Rep Tanh :: Type -> Type Source #

Methods

from :: Tanh -> Rep Tanh x Source #

to :: Rep Tanh x -> Tanh Source #

Show Tanh Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Eq Tanh Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Methods

(==) :: Tanh -> Tanh -> Bool Source #

(/=) :: Tanh -> Tanh -> Bool Source #

Ord Tanh Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

HasStateDict Tanh Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

HasInitialize Tanh generator Tanh generator Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Methods

initialize :: MonadThrow m => ModelSpec Tanh -> Generator generator -> m (Tanh, Generator generator) Source #

HasForward Tanh (Tensor requiresGradient layout device dataType shape) generator (Tensor requiresGradient layout device dataType shape) generator Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

Methods

forward :: MonadThrow m => Tanh -> Tensor requiresGradient layout device dataType shape -> Generator generator -> m (Tensor requiresGradient layout device dataType shape, Generator generator) Source #

type Rep Tanh Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation

type Rep Tanh = D1 ('MetaData "Tanh" "Torch.GraduallyTyped.NN.Activation" "hasktorch-gradually-typed-0.2.0.0-1KV1aIPzzbp6JpSr37tC1K" 'False) (C1 ('MetaCons "Tanh" 'PrefixI 'False) (U1 :: Type -> Type))
type ModelSpec Tanh Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Activation