File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -43,9 +43,11 @@ let main () =
4343 let epoch_loss_target_limits = [| 87. ; 32. ; 29. ; 26. ; 23. ; 20. ; 19. ; 17. ; 16. ; 15. |] in
4444 let per_epoch_callback ~at_step :_ ~at_epoch ~learning_rate :_ ~epoch_loss =
4545 if at_epoch < 10 then
46- Stdio. printf " Epoch=%d, loss under target %g: %b\n %!" at_epoch
46+ Stdio. printf " Epoch=%d, loss under target %g: %b%s \n %!" at_epoch
4747 epoch_loss_target_limits.(at_epoch)
48- Float. (epoch_loss_target_limits.(at_epoch) > epoch_loss);
48+ Float. (epoch_loss_target_limits.(at_epoch) > epoch_loss)
49+ (if Float. (epoch_loss_target_limits.(at_epoch) > epoch_loss) then " "
50+ else " , actual loss: " ^ Float. to_string epoch_loss);
4951 if at_epoch > 10 && at_epoch % 10 = 0 then Stdio. printf " .%!"
5052 in
5153 let {
@@ -65,7 +67,9 @@ let main () =
6567 ()
6668 in
6769 let epoch_loss = List. hd_exn rev_epoch_losses in
68- Stdio. printf " \n Final epoch loss under target 0.002: %b\n %!" Float. (0.002 > epoch_loss);
70+ Stdio. printf " \n Final epoch loss under target 0.002: %b%s\n %!"
71+ Float. (0.002 > epoch_loss)
72+ (if Float. (0.002 > epoch_loss) then " " else " , actual loss: " ^ Float. to_string epoch_loss);
6973 (* if Float.(epoch_loss < 1.5) then Stdio.printf "Success\n" else *)
7074 let points = Tn. points_2d ~xdim: 0 ~ydim: 1 inputs.value in
7175 let classes = Tn. points_1d ~xdim: 0 outputs.value in
You can’t perform that action at this time.
0 commit comments