Skip to content

Commit

Permalink
using logarithmic printing for neural net
Browse files Browse the repository at this point in the history
  • Loading branch information
benhamner committed Jul 6, 2014
1 parent a94d5fe commit 99cdf02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/neural_net.jl
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ end
function train_preset_stop!(net::NeuralNet, x::Matrix{Float64}, actuals::Matrix{Float64}, temp::NeuralNetTemporary)
num_samples = size(x,1)
for iter=1:net.options.stop_criteria.max_iteration
if net.options.display
if net.options.display && (log(2, iter) % 1 == 0.0 || iter == net.options.stop_criteria.max_iteration)
println("Iteration ", iter)
end
if net.options.track_cost
if net.options.track_cost && (log(2, iter) % 1 == 0.0 || iter == net.options.stop_criteria.max_iteration)
println(" Cost: ", cost(net, x, actuals))
end
for j=1:num_samples
Expand Down

0 comments on commit 99cdf02

Please sign in to comment.