Skip to content

Commit 684faa2

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

File tree

6 files changed

+27
-62
lines changed

6 files changed

+27
-62
lines changed

test/training/bigram_mlp.expected

Lines changed: 10 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,16 @@ Retrieving commandline, environment, or config file variable ocannl_log_level
22
Found 0, in the config file
33
bigrams: 228146
44
input_size: 229000
5-
Epoch 0, batch 0, loss=4.0377
6-
Epoch 0, batch 100, loss=2.3477
7-
Epoch 0, batch 200, loss=2.6327
8-
Epoch 0, epoch loss=588.22
9-
Epoch 1, batch 0, loss=2.5969
10-
Epoch 1, batch 100, loss=2.3154
11-
Epoch 1, batch 200, loss=2.6052
12-
Epoch 1, epoch loss=564.92
13-
Epoch 2, batch 0, loss=2.5874
14-
Epoch 2, batch 100, loss=2.3016
15-
Epoch 2, batch 200, loss=2.5952
16-
Epoch 2, epoch loss=562.39
17-
Epoch 3, batch 0, loss=2.5766
18-
Epoch 3, batch 100, loss=2.2964
19-
Epoch 3, batch 200, loss=2.5905
20-
Epoch 3, epoch loss=561.13
21-
Epoch 4, batch 0, loss=2.5725
22-
Epoch 4, batch 100, loss=2.2911
23-
Epoch 4, batch 200, loss=2.5884
24-
Epoch 4, epoch loss=560.26
25-
Epoch 5, batch 0, loss=2.5685
26-
Epoch 5, batch 100, loss=2.2871
27-
Epoch 5, batch 200, loss=2.5854
28-
Epoch 5, epoch loss=559.69
29-
Epoch 6, batch 0, loss=2.561
30-
Epoch 6, batch 100, loss=2.2826
31-
Epoch 6, batch 200, loss=2.5834
32-
Epoch 6, epoch loss=559.19
33-
Epoch 7, batch 0, loss=2.5539
34-
Epoch 7, batch 100, loss=2.2788
35-
Epoch 7, batch 200, loss=2.58
36-
Epoch 7, epoch loss=558.79
37-
Epoch 8, batch 0, loss=2.547
38-
Epoch 8, batch 100, loss=2.2744
39-
Epoch 8, batch 200, loss=2.5786
40-
Epoch 8, epoch loss=558.48
41-
Epoch 9, batch 0, loss=2.5428
42-
Epoch 9, batch 100, loss=2.2702
43-
Epoch 9, batch 200, loss=2.5779
44-
Epoch 9, epoch loss=558.23
5+
Epoch 0, epoch loss=588.2
6+
Epoch 1, epoch loss=564.9
7+
Epoch 2, epoch loss=562.4
8+
Epoch 3, epoch loss=561.1
9+
Epoch 4, epoch loss=560.3
10+
Epoch 5, epoch loss=559.7
11+
Epoch 6, epoch loss=559.2
12+
Epoch 7, epoch loss=558.8
13+
Epoch 8, epoch loss=558.5
14+
Epoch 9, epoch loss=558.2
4515
nnou
4616
kyns
4717
hain

test/training/bigram_mlp.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,9 @@ let () =
8383
Train.run sgd_step;
8484
let loss = batch_loss.@[0] in
8585
epoch_loss := !epoch_loss +. loss;
86-
if batch % 100 = 0 then Stdio.printf "Epoch %d, batch %d, loss=%.5g\n%!" epoch batch loss;
8786
Int.incr step_ref
8887
done;
89-
Stdio.printf "Epoch %d, epoch loss=%.5g\n%!" epoch !epoch_loss
88+
Stdio.printf "Epoch %d, epoch loss=%.4g\n%!" epoch !epoch_loss
9089
done;
9190

9291
(* Train.printf_tree batch_loss; *)

test/training/moons_demo.expected

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,13 @@ 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
...............................................................
1414
Half-moons scatterplot and decision boundary:
15-
┌──────────────────┐
16-
│******#***********│
17-
│*#########******..│
18-
│############***%%.│
19-
│####.%%%.####*.%%.│
20-
│##*..%%%%###*.%%%%│
21-
│*#...%%%%%##%%%%%.│
22-
│*......%%%%%%%%%..│
23-
└──────────────────┘
15+
┌────────────┐
16+
│****#*******│
17+
│#######***..│
18+
│###%####*%%.│
19+
│##.%%%##%%%%│
20+
│*...%%%%%%%.│
21+
└────────────┘
2422
Loss:
2523
┌────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐
2624
│ 1.86e+1│- │

test/training/moons_demo.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ let main () =
9292
Float.(mlp_result.@[0] >= 0.)
9393
in
9494
let plot_moons =
95-
PrintBox_utils.plot ~as_canvas:true ~size:(150, 150)
95+
PrintBox_utils.plot ~as_canvas:true ~size:(100, 100)
9696
[
9797
Scatterplot { points = points1; content = PrintBox.line "#" };
9898
Scatterplot { points = points2; content = PrintBox.line "%" };

test/training/moons_demo_parallel.expected

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@ Epoch=9, lr=0.191708, loss=13.168
1414
Epoch loss: 0.000
1515

1616
Half-moons scatterplot and decision boundary:
17-
┌──────────────────┐
18-
│****#*********....│
19-
│**########****....│
20-
│############*..%%.│
21-
│####.%%%.###*..%%%│
22-
│###..%%%.###*.%%%.│
23-
│*....%%%%%##%%%%%.│
24-
│.......%%%%%%%%%..│
25-
└──────────────────┘
17+
┌────────────┐
18+
│***#*****...│
19+
│#######**...│
20+
│###%%###*%%%│
21+
│##.%%%##%%%.│
22+
│...%%%%%%%%.│
23+
└────────────┘
2624
Epoch loss:
2725
┌────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐
2826
│ 8.60e+1│- │

test/training/moons_demo_parallel.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ let main () =
7070
let points1, points2 = Array.partitioni_tf points ~f:Float.(fun i _ -> classes.(i) > 0.) in
7171
let callback (x, y) = Float.((infer_callback [| x; y |]).(0) >= 0.) in
7272
let plot_moons =
73-
PrintBox_utils.plot ~as_canvas:true ~size:(150, 150)
73+
PrintBox_utils.plot ~as_canvas:true ~size:(100, 100)
7474
[
7575
PrintBox_ext_plot.Scatterplot { points = points1; content = PrintBox.line "#" };
7676
Scatterplot { points = points2; content = PrintBox.line "%" };

0 commit comments

Comments
 (0)