Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type Minimizer a = forall m. MonadBuild m => [Variable a] -> [Tensor Value a] -> m ControlNode
- minimizeWith :: (MonadBuild m, GradientCompatible a) => Minimizer a -> Tensor v a -> [Variable a] -> m ControlNode
- gradientDescent :: GradientCompatible a => a -> Minimizer a
- data AdamConfig = AdamConfig {}
- adam :: Minimizer Float
- adam' :: AdamConfig -> Minimizer Float
Documentation
type Minimizer a = forall m. MonadBuild m => [Variable a] -> [Tensor Value a] -> m ControlNode Source #
:: (MonadBuild m, GradientCompatible a) | |
=> Minimizer a | |
-> Tensor v a | Loss. |
-> [Variable a] | Parameters of the loss function. |
-> m ControlNode |
:: GradientCompatible a | |
=> a | Learning rate. |
-> Minimizer a |
Perform one step of the gradient descent algorithm.
data AdamConfig Source #
AdamConfig | |
|
Default AdamConfig Source # | |
adam :: Minimizer Float Source #
Perform one step of the adam algorithm.
See https://arxiv.org/abs/1412.6980.
NOTE: Currently requires all Variable
s to have an initializedValue
.