packages feed

sgd 0.2.0 → 0.2.1

raw patch · 3 files changed

+9/−6 lines, 3 filesdep +deepseqdep ~basedep ~containers

Dependencies added: deepseq

Dependency ranges changed: base, containers

Files

Numeric/SGD/Grad.hs view
@@ -23,10 +23,13 @@ , parUnions ) where -import Control.Applicative ((<$>), (<*>)) import Data.List (foldl') import qualified Data.IntMap as M+#if MIN_VERSION_containers(0,4,2)+import Control.Applicative ((<$>), (<*>)) import Control.Monad.Par.Scheds.Direct (Par, runPar, spawn, get)+#else+#endif  import Numeric.SGD.LogSigned 
Numeric/SGD/LogSigned.hs view
@@ -14,9 +14,7 @@  import qualified Data.Number.LogFloat as L import Data.Function (on)-import Control.Monad.Par (NFData)--instance NFData L.LogFloat+import Control.DeepSeq (NFData(..))  -- | Signed real value in the logarithmic domain. data LogSigned = LogSigned@@ -31,7 +29,8 @@     compare = compare `on` toLogFloat  -- All fields are strict and unpacked.-instance NFData LogSigned+instance NFData LogSigned where+    rnf (LogSigned p q) = p `seq` q `seq` ()  -- | Smart LogSigned constructor. {-# INLINE logSigned #-}
sgd.cabal view
@@ -1,5 +1,5 @@ name:               sgd-version:            0.2.0+version:            0.2.1 synopsis:           Stochastic gradient descent description:     Implementation of a Stochastic Gradient Descent optimization method.@@ -29,6 +29,7 @@       , primitive       , logfloat       , monad-par+      , deepseq      exposed-modules:         Numeric.SGD