Skip to content

Commit 66ffda6

Browse files
committed
Again
Signed-off-by: Lukasz Stafiniak <lukstafi@gmail.com>
1 parent 684faa2 commit 66ffda6

File tree

4 files changed

+28
-65
lines changed

4 files changed

+28
-65
lines changed

test/training/moons_demo.expected

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,7 @@ Epoch=1, step=7, batch=7, lr=0.199891, loss=1.4389, epoch loss=31.117
1111
Epoch=1, step=8, batch=8, lr=0.199875, loss=0.91047, epoch loss=32.028
1212
Epoch=1, step=9, batch=9, lr=0.199859, loss=0.43296, epoch loss=32.46
1313
...............................................................
14-
Half-moons scatterplot and decision boundary:
15-
┌────────────┐
16-
│****#*******│
17-
│#######***..│
18-
│###%####*%%.│
19-
│##.%%%##%%%%│
20-
│*...%%%%%%%.│
21-
└────────────┘
14+
2215
Loss:
2316
┌────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐
2417
│ 1.86e+1│- │

test/training/moons_demo.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,17 @@ let main () =
9191
Train.run result_routine;
9292
Float.(mlp_result.@[0] >= 0.)
9393
in
94-
let plot_moons =
95-
PrintBox_utils.plot ~as_canvas:true ~size:(100, 100)
94+
let _plot_moons =
95+
PrintBox_utils.plot ~as_canvas:true
9696
[
9797
Scatterplot { points = points1; content = PrintBox.line "#" };
9898
Scatterplot { points = points2; content = PrintBox.line "%" };
9999
Boundary_map
100100
{ content_false = PrintBox.line "."; content_true = PrintBox.line "*"; callback };
101101
]
102102
in
103-
Stdio.printf "Half-moons scatterplot and decision boundary:\n%!";
104-
PrintBox_text.output Stdio.stdout plot_moons;
103+
(* Stdio.printf "Half-moons scatterplot and decision boundary:\n%!"; *)
104+
(* PrintBox_text.output Stdio.stdout plot_moons; *)
105105
Stdio.printf "\nLoss:\n%!";
106106
let plot_loss =
107107
PrintBox_utils.plot ~x_label:"step" ~y_label:"loss"

test/training/moons_demo_parallel.expected

Lines changed: 20 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -15,55 +15,25 @@ Epoch loss: 0.000
1515

1616
Half-moons scatterplot and decision boundary:
1717
┌────────────┐
18-
│***#*****...│
19-
#######**...│
20-
###%%###*%%%
21-
##.%%%##%%%.│
22-
│...%%%%%%%%.│
18+
│*********...│
19+
*********...│
20+
***...***...
21+
**..........│
22+
│............│
2323
└────────────┘
2424
Epoch loss:
25-
┌────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐
26-
│ 8.60e+1│- │
27-
│ │ │
28-
│ │ │
29-
│ │ │
30-
│ │ │
31-
│ │ │
32-
│ │ │
33-
│ │ │
34-
│ │ │
35-
│ │ │
36-
│ │ │
37-
│ │ │
38-
│ │ │
39-
│ │ │
40-
│ │ │
41-
│e │ │
42-
│p │ │
43-
│o │ │
44-
│c │ │
45-
│h │ │
46-
│ │ │
47-
│l │ │
48-
│o │ │
49-
│s │ │
50-
│s │ │
51-
│ │ │
52-
│ │- │
53-
│ │ - │
54-
│ │ │
55-
│ │ - │
56-
│ │ - │
57-
│ │ - │
58-
│ │ - │
59-
│ │ - │
60-
│ │ ---- │
61-
│ │ ----------------- - │
62-
│ │ - --- │
63-
│ │ --- │
64-
│ │ -- - │
65-
│ 0.00 │ ---------------------------------------------------------------│
66-
├────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
67-
│ │0.00 1.19e+2│
68-
│ │ step │
69-
└────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘
25+
┌────────┬─────────────────────────┐
26+
│e8.60e+1│- │
27+
│p │ │
28+
│o │ │
29+
│c │ │
30+
│h │ │
31+
│ │ │
32+
│l │- │
33+
│o │- │
34+
│s │ --- - │
35+
│s0.00 │ ----------------------│
36+
├────────┼─────────────────────────┤
37+
│ │0.00 1.19e+2│
38+
│ │ step │
39+
└────────┴─────────────────────────┘

test/training/moons_demo_parallel.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ let main () =
7272
let plot_moons =
7373
PrintBox_utils.plot ~as_canvas:true ~size:(100, 100)
7474
[
75-
PrintBox_ext_plot.Scatterplot { points = points1; content = PrintBox.line "#" };
76-
Scatterplot { points = points2; content = PrintBox.line "%" };
7775
Boundary_map
7876
{ content_false = PrintBox.line "."; content_true = PrintBox.line "*"; callback };
77+
Scatterplot { points = points1; content = PrintBox.line "#" };
78+
Scatterplot { points = points2; content = PrintBox.line "%" };
7979
]
8080
in
8181
Stdio.printf "\nHalf-moons scatterplot and decision boundary:\n";
@@ -95,7 +95,7 @@ let main () =
9595
(* PrintBox_text.output Stdio.stdout plot_loss; *)
9696
Stdio.printf "\nEpoch loss:\n%!";
9797
let plot_loss =
98-
PrintBox_utils.plot ~x_label:"step" ~y_label:"epoch loss"
98+
PrintBox_utils.plot ~x_label:"step" ~y_label:"epoch loss" ~small:true
9999
[
100100
Line_plot
101101
{

0 commit comments

Comments
 (0)