draw chart using simple options

This commit is contained in:
Mahdi Dibaiee
2016-09-16 14:16:14 +04:30
parent 0d43814448
commit 6def5f6197
4 changed files with 20 additions and 1024 deletions

View File

@ -47,20 +47,14 @@ module Main where
, network = rnetwork
, training = zip trinputs trlabels
, test = zip teinputs telabels
, drawChart = True
, chartName = "notmnist.png"
} :: Session
let initialCost = crossEntropy session
newsession <- run (sgd . learningRateDecay (1.1, 5e-2)) session
let el = map (\(e, l, _) -> (e, l)) (chart newsession)
ea = map (\(e, _, a) -> (e, a)) (chart newsession)
toFile Chart.def "notmnist.png" $ do
Chart.layoutlr_title Chart..= "loss over time"
Chart.plotLeft (Chart.line "loss" [el])
Chart.plotRight (Chart.line "learningRate" [ea])
let cost = crossEntropy newsession
putStrLn "parameters: "