Skip to content

Commit

Permalink
example: fix MSE init (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
iblislin authored and pluskid committed Dec 15, 2017
1 parent 6609616 commit 881759f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/regression-example.jl
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ optimizer = mx.ADAM()
trainprovider, evalprovider = data_source(#= batchsize =# 200)
mx.fit(model, optimizer, trainprovider,
initializer = mx.NormalInitializer(0.0, 0.1),
eval_metric = mx.MSE{mx.NDArray{Float32,1}}(),
eval_metric = mx.MSE(),
eval_data = evalprovider,
n_epoch = 20,
callbacks = [mx.speedometer()])
# more training with the full sample
trainprovider, evalprovider = data_source(#= batchsize =# samplesize)
mx.fit(model, optimizer, trainprovider,
initializer = mx.NormalInitializer(0.0, 0.1),
eval_metric = mx.MSE{mx.NDArray{Float32,1}}(),
eval_metric = mx.MSE(),
eval_data = evalprovider,
n_epoch = 500, # previous setting is batchsize = 200, epoch = 20
# implies we did (5000 / 200) * 20 times update in previous `fit`
Expand Down

0 comments on commit 881759f

Please sign in to comment.