summaryrefslogtreecommitdiff
path: root/examples/test_nn_lib.lua
diff options
context:
space:
mode:
authorcloudygoose <[email protected]>2015-06-21 10:50:46 +0800
committercloudygoose <[email protected]>2015-06-21 10:50:46 +0800
commitad2c4013dec71667d6bbd5e9a249df2085208507 (patch)
tree474c536ff4a7d757bb61915a1bfc7a073f40d09f /examples/test_nn_lib.lua
parent839d938df0d83ec311c5d1299923c667adff6a87 (diff)
parentf3f4e74eb4dbb8829e5ee136ba4b0c0a7938b551 (diff)
Merge upstream 'parameter update big-change'.
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'examples/test_nn_lib.lua')
-rw-r--r--examples/test_nn_lib.lua18
1 files changed, 9 insertions, 9 deletions
diff --git a/examples/test_nn_lib.lua b/examples/test_nn_lib.lua
index 6fdbd67..5444810 100644
--- a/examples/test_nn_lib.lua
+++ b/examples/test_nn_lib.lua
@@ -144,17 +144,17 @@ for data in buffer.get_data, buffer do
main:back_propagate(err_output, err_input, input, output)
main:update(err_input, input, output)
--- nerv.utils.printf("cross entropy: %.8f\n", sm.total_ce)
--- nerv.utils.printf("correct: %d\n", sm.total_correct)
--- nerv.utils.printf("frames: %d\n", sm.total_frames)
--- nerv.utils.printf("err/frm: %.8f\n", sm.total_ce / sm.total_frames)
--- nerv.utils.printf("accuracy: %.8f\n", sm.total_correct / sm.total_frames)
+-- nerv.printf("cross entropy: %.8f\n", sm.total_ce)
+-- nerv.printf("correct: %d\n", sm.total_correct)
+-- nerv.printf("frames: %d\n", sm.total_frames)
+-- nerv.printf("err/frm: %.8f\n", sm.total_ce / sm.total_frames)
+-- nerv.printf("accuracy: %.8f\n", sm.total_correct / sm.total_frames)
collectgarbage("collect")
end
-nerv.utils.printf("cross entropy: %.8f\n", sm.total_ce)
-nerv.utils.printf("correct: %d\n", sm.total_correct)
-nerv.utils.printf("accuracy: %.3f%%\n", sm.total_correct / sm.total_frames * 100)
-nerv.utils.printf("writing back...\n")
+nerv.printf("cross entropy: %.8f\n", sm.total_ce)
+nerv.printf("correct: %d\n", sm.total_correct)
+nerv.printf("accuracy: %.3f%%\n", sm.total_correct / sm.total_frames * 100)
+nerv.printf("writing back...\n")
cf = nerv.ChunkFile("output.nerv", "w")
for i, p in ipairs(main:get_params()) do
print(p)