Skip to content

Commit 1edfb11

Browse files
committed
Small plots in test expectations
(same rationale as few significant digits) Signed-off-by: Lukasz Stafiniak <lukstafi@gmail.com>
1 parent 0ad4f44 commit 1edfb11

File tree

2 files changed

+35
-92
lines changed

2 files changed

+35
-92
lines changed

test/training/moons_demo.expected

Lines changed: 33 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -13,96 +13,39 @@ Epoch=1, step=9, batch=9, lr=0.2, loss=0.433, epoch loss=32.46
1313
...............................................................
1414

1515
Loss:
16-
┌────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐
17-
│ 1.86e+1│- │
18-
│ │ │
19-
│ │ │
20-
│ │ │
21-
│ │ │
22-
│ │ │
23-
│ │ │
24-
│ │ │
25-
│ │ │
26-
│ │ │
27-
│ │ │
28-
│ │ │
29-
│ │ │
30-
│ │ │
31-
│ │ │
32-
│ │ │
33-
│ │ │
34-
│ │ │
35-
│l │ │
36-
│o │ │
37-
│s │ │
38-
│s │ │
39-
│ │ │
40-
│ │ │
41-
│ │ │
42-
│ │ │
43-
│ │ │
44-
│ │ - │
45-
│ │- │
46-
│ │ │
47-
│ │ │
48-
│ │ -- │
49-
│ │ │
50-
│ │ - - │
51-
│ │ - │
52-
│ │ --- - - - - │
53-
│ │---- -- -- --- - - - - - │
54-
│ │---- - -- ---- - - │
55-
│ │---- ---- -- ---- - -- -- --- -- - ---- - - - - -- - │
56-
│ 0.00 │----------------------------------------------------------------------------------------------------│
57-
├────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
58-
│ │0.00 6.39e+3│
59-
│ │ step │
60-
└────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘Log-loss, for better visibility:
16+
┌────────┬─────────────────────────┐
17+
│ 1.86e+1│- │
18+
│ │ │
19+
│ │ │
20+
│l │ │
21+
│o │ │
22+
│s │ │
23+
│s │ │
24+
│ │- │
25+
│ │---- │
26+
│ 0.00 │-------------------------│
27+
├────────┼─────────────────────────┤
28+
│ │0.00 6.39e+3│
29+
│ │ step │
30+
└────────┴─────────────────────────┘Log-loss, for better visibility:
6131

6232
Learning rate:
63-
┌─────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐
64-
│ -1.00e-1│ -│
65-
│ │ ---│
66-
│ │ ---- │
67-
│ │ --- │
68-
│ │ ---- │
69-
│ │ --- │
70-
│ │ ---- │
71-
│ │ --- │
72-
│ │ ---- │
73-
│ │ ---- │
74-
│ │ --- │
75-
│ │ ---- │
76-
│ │ --- │
77-
│l │ ---- │
78-
│e │ --- │
79-
│a │ ---- │
80-
│r │ ---- │
81-
│n │ --- │
82-
│i │ ---- │
83-
│n │ --- │
84-
│g │ ---- │
85-
│ │ --- │
86-
│r │ ---- │
87-
│a │ --- │
88-
│t │ ---- │
89-
│e │ ---- │
90-
│ │ --- │
91-
│ │ ---- │
92-
│ │ --- │
93-
│ │ ---- │
94-
│ │ --- │
95-
│ │ ---- │
96-
│ │ ---- │
97-
│ │ --- │
98-
│ │ ---- │
99-
│ │ --- │
100-
│ │ ---- │
101-
│ │ --- │
102-
│ │ ---- │
103-
│ -2.00e-1│--- │
104-
├─────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
105-
│ │0.00 6.39e+3│
106-
│ │ step │
107-
└─────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘mlp_result's name: mlp_point_mlp_result
33+
┌─────────┬─────────────────────────┐
34+
│l-1.00e-1│ -│
35+
│e │ ---│
36+
│a │ ---- │
37+
│r │ ---- │
38+
│n │ ---- │
39+
│i │ --- │
40+
│n │ ---- │
41+
│g │ ---- │
42+
│ │ ---- │
43+
│r │--- │
44+
│a │ │
45+
│t │ │
46+
│e-2.00e-1│ │
47+
├─────────┼─────────────────────────┤
48+
│ │0.00 6.39e+3│
49+
│ │ step │
50+
└─────────┴─────────────────────────┘mlp_result's name: mlp_point_mlp_result
10851
(mlp moons_input) name: mlp_moons_input

test/training/moons_demo.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ let main () =
104104
(* PrintBox_text.output Stdio.stdout plot_moons; *)
105105
Stdio.printf "\nLoss:\n%!";
106106
let plot_loss =
107-
PrintBox_utils.plot ~x_label:"step" ~y_label:"loss"
107+
PrintBox_utils.plot ~x_label:"step" ~y_label:"loss" ~small:true
108108
[ Line_plot { points = Array.of_list_rev !losses; content = PrintBox.line "-" } ]
109109
in
110110
PrintBox_text.output Stdio.stdout plot_loss;
@@ -116,7 +116,7 @@ let main () =
116116
(* PrintBox_text.output Stdio.stdout plot_loss; *)
117117
Stdio.printf "\nLearning rate:\n%!";
118118
let plot_lr =
119-
PrintBox_utils.plot ~x_label:"step" ~y_label:"learning rate"
119+
PrintBox_utils.plot ~x_label:"step" ~y_label:"learning rate" ~small:true
120120
[ Line_plot { points = Array.of_list_rev !learning_rates; content = PrintBox.line "-" } ]
121121
in
122122
PrintBox_text.output Stdio.stdout plot_lr;

0 commit comments

Comments
 (0)