Skip to content

Commit

Permalink
add speedometer
Browse files Browse the repository at this point in the history
  • Loading branch information
iblislin committed Dec 12, 2017
1 parent ebd7404 commit 5e27ab1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/mnist/lenet-stn.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,5 @@ initializer = mx.XavierInitializer(distribution=mx.xv_normal,
mx.fit(model, optimizer, train_provider,
n_epoch=20,
eval_data=eval_provider,
initializer=initializer)
initializer=initializer,
callbacks=[mx.speedometer()])
5 changes: 4 additions & 1 deletion examples/mnist/lenet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,7 @@ model = mx.FeedForward(lenet, context=mx.gpu())
optimizer = mx.SGD(lr=0.05, momentum=0.9, weight_decay=0.00001)

# fit parameters
mx.fit(model, optimizer, train_provider, n_epoch=20, eval_data=eval_provider)
mx.fit(model, optimizer, train_provider,
n_epoch=20,
eval_data=eval_provider,
callbacks=[mx.speedometer()])

0 comments on commit 5e27ab1

Please sign in to comment.