{-# OPTIONS_GHC -Wall #-}

-- | Hyper Parameters of OpNet
module HyperParameters where

import qualified Torch            as T
import qualified Torch.Extensions as T

------------------------------------------------------------------------------
-- Adam
------------------------------------------------------------------------------

-- | First gradient momentum estimate, default = 0.9
β1 :: Float
β1 :: Float
β1 = Float
0.9
-- | second gradient momentum estimate, default = 0.999 
β2 :: Float
β2 :: Float
β2 = Float
0.999
-- | Learning Rate
α :: T.Tensor
α :: Tensor
α  = Float -> TensorOptions -> Tensor
forall a. TensorLike a => a -> TensorOptions -> Tensor
T.asTensor' (Float
1.0e-3 :: Float) 
   (TensorOptions -> Tensor)
-> (TensorOptions -> TensorOptions) -> TensorOptions -> Tensor
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DType -> TensorOptions -> TensorOptions
T.withDType DType
T.Float (TensorOptions -> TensorOptions)
-> (TensorOptions -> TensorOptions)
-> TensorOptions
-> TensorOptions
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Device -> TensorOptions -> TensorOptions
T.withDevice Device
T.gpu (TensorOptions -> Tensor) -> TensorOptions -> Tensor
forall a b. (a -> b) -> a -> b
$ TensorOptions
T.defaultOpts