| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Torch.Typed.Optim.CppOptim
Documentation
class CppOptimizer option where Source #
Minimal complete definition
Methods
initOptimizer :: forall model (tensors :: [Type]). (Parameterized model, HMap' ToDependent (Parameters model) tensors, Castable (HList tensors) [ATenTensor]) => option -> model -> IO (CppOptimizerState option (Parameters model)) Source #
unsafeStep :: forall model (dev :: (DeviceType, Nat)) (dtype :: DType) (lossShape :: [Nat]) (tensors :: [Type]) res. (Parameterized model, HMap' ToDependent (Parameters model) tensors, HMap' ToParameter tensors (Parameters model), Castable (HList tensors) [ATenTensor]) => model -> CppOptimizerState option (Parameters model) -> Tensor dev dtype lossShape -> IO (model, CppOptimizerState option (Parameters model)) Source #
Instances
runStep :: forall option model (tensors :: [Type]) (dev :: (DeviceType, Nat)) (dtype :: DType). (CppOptimizer option, Parameterized model, HMap' ToDependent (Parameters model) tensors, HMap' ToParameter tensors (Parameters model), Castable (HList tensors) [ATenTensor]) => model -> CppOptimizerState option (Parameters model) -> Loss dev dtype -> IO (model, CppOptimizerState option (Parameters model)) Source #
type CppOptimizerRef = ForeignPtr Optimizer Source #
data CppOptimizerState option (params :: [Type]) Source #
Constructors
| CppOptimizerState option CppOptimizerRef |
data ToParameter Source #
Constructors
| ToParameter |
Instances
| Apply' ToParameter (Tensor dev dtype shape) (Parameter dev dtype shape) Source # | |
Defined in Torch.Typed.Optim.CppOptim | |
data AdagradOptions Source #
Constructors
| AdagradOptions | |
Fields | |
Instances
| Default AdagradOptions Source # | |
Defined in Torch.Optim.CppOptim Methods def :: AdagradOptions # | |
| Show AdagradOptions Source # | |
Defined in Torch.Optim.CppOptim Methods showsPrec :: Int -> AdagradOptions -> ShowS # show :: AdagradOptions -> String # showList :: [AdagradOptions] -> ShowS # | |
| Eq AdagradOptions Source # | |
Defined in Torch.Optim.CppOptim Methods (==) :: AdagradOptions -> AdagradOptions -> Bool # (/=) :: AdagradOptions -> AdagradOptions -> Bool # | |
| CppOptimizer AdagradOptions Source # | |
Defined in Torch.Optim.CppOptim Methods initOptimizer :: Parameterized model => AdagradOptions -> model -> IO (CppOptimizerState AdagradOptions) Source # unsafeStep :: Parameterized model => model -> CppOptimizerState AdagradOptions -> Tensor -> IO (model, CppOptimizerState AdagradOptions) Source # | |
data AdamOptions Source #
Constructors
| AdamOptions | |
Instances
data AdamwOptions Source #
Constructors
| AdamwOptions | |
Fields
| |
Instances
data LbfgsOptions Source #
Constructors
| LbfgsOptions | |
Fields
| |
Instances
data RmspropOptions Source #
Constructors
| RmspropOptions | |
Fields
| |
Instances
data SGDOptions Source #
Constructors
| SGDOptions | |
Fields
| |