examples/iris_example.rb in ruby-dnn-1.1.0 vs examples/iris_example.rb in ruby-dnn-1.1.1
- old
+ new
@@ -40,10 +40,10 @@
x = DNN::Tensor.convert(x_batch)
y = DNN::Tensor.convert(y_batch)
out = net.(x, y)
loss = lf.(out, y)
loss.link.backward
- puts "epoch: #{epoch}, step: #{step}, loss = #{loss.data}"
+ puts "epoch: #{epoch}, step: #{step}, loss = #{loss.data.to_f}"
opt.update([w1, b1, w2, b2])
end
end
correct = 0