1. Test Modules
  2. Training Characteristics
    1. Input Learning
      1. Gradient Descent
      2. Conjugate Gradient Descent
      3. Limited-Memory BFGS
    2. Results
  3. Results

Subreport: Logs for com.simiacryptus.ref.lang.ReferenceCountingBase

Test Modules

Using Seed 5127576727217145856

Training Characteristics

Input Learning

In this apply, we use a network to learn this target input, given it's pre-evaluated output:

TrainingTester.java:332 executed in 0.04 seconds (0.000 gc):

    return RefArrays.stream(RefUtil.addRef(input_target)).flatMap(RefArrays::stream).map(x -> {
      try {
        return x.prettyPrint();
      } finally {
        x.freeRef();
      }
    }).reduce((a, b) -> a + "\n" + b).orElse("");

Returns

    [
    	[ [ -0.844 ], [ 1.352 ], [ 1.508 ], [ 0.036 ], [ 0.34 ], [ -1.056 ], [ -0.972 ], [ 0.088 ], ... ],
    	[ [ -0.216 ], [ 0.2 ], [ -0.008 ], [ 1.284 ], [ -0.64 ], [ -1.284 ], [ -1.872 ], [ 0.092 ], ... ],
    	[ [ 1.344 ], [ -0.38 ], [ -1.224 ], [ 0.416 ], [ 0.78 ], [ 1.488 ], [ -1.008 ], [ 0.588 ], ... ],
    	[ [ -1.452 ], [ 1.48 ], [ 0.272 ], [ 1.04 ], [ -1.644 ], [ 0.48 ], [ -0.788 ], [ -0.172 ], ... ],
    	[ [ 1.62 ], [ 0.668 ], [ -0.036 ], [ -0.7 ], [ -1.456 ], [ -0.248 ], [ 1.808 ], [ 0.812 ], ... ],
    	[ [ -1.036 ], [ -1.108 ], [ 0.552 ], [ -0.452 ], [ -0.068 ], [ 0.056 ], [ 0.94 ], [ -1.136 ], ... ],
    	[ [ -1.512 ], [ -0.3 ], [ -1.748 ], [ 1.82 ], [ 0.14 ], [ -1.348 ], [ 0.596 ], [ -1.98 ], ... ],
    	[ [ 1.276 ], [ -0.624 ], [ 0.06 ], [ -0.692 ], [ 1.56 ], [ 1.652 ], [ 1.576 ], [ 0.488 ], ... ],
    	...
    ]
    [
    	[ [ -1.196 ], [ 1.036 ], [ -1.136 ], [ -0.484 ], [ -0.072 ], [ -0.124 ], [ 0.428 ], [ 0.428 ], ... ],
    	[ [ -1.56 ], [ -1.316 ], [ -1.916 ], [ -1.9 ], [ -0.032 ], [ -0.644 ], [ -0.628 ], [ -0.804 ], ... ],
    	[ [ -1.944 ], [ 1.412 ], [ -1.024 ], [ -0.732 ], [ 0.932 ], [ -1.224 ], [ -0.032 ], [ 0.092 ], ... ],
    	[ [ 0.876 ], [ 0.8 ], [ -1.012 ], [ -1.672 ], [ 0.936 ], [ -1.52 ], [ -1.816 ], [ 0.912 ], ... ],
    	[ [ 1.0 ], [ -1.836 ], [ 1.6 ], [ 1.296 ], [ -0.112 ], [ 1.476 ], [ -0.616 ], [ 0.04 ], ... ],
    	[ [ -1.5 ], [ 0.236 ], [ 0.584 ], [ -0.108 ], [ -0.804 ], [ -0.932 ], [ 1.404 ], [ 1.44 ], ... ],
    	[ [ -1.436 ], [ -1.82 ], [ 0.312 ], [ 0.732 ], [ -1.364 ], [ 0.1 ], [ 1.588 ], [ 0.26 ], ... ],
    	[ [ 1.664 ], [ -0.548 ], [ 0.856 ], [ 0.32 ], [ -1.364 ], [ 0.12 ], [ -0.304 ], [ 0.996 ], ... ],
    	...
    ]
    [
    	[ [ 1.42 ], [ 1.904 ], [ -1.084 ], [ 0.12 ], [ -0.776 ], [ 1.056 ], [ 0.348 ], [ -1.696 ], ... ],
    	[ [ 1.408 ], [ 1.996 ], [ -0.356 ], [ 0.724 ], [ -0.548 ], [ 0.452 ], [ 1.372 ], [ 0.296 ], ... ],
    	[ [ 1.384 ], [ -1.584 ], [ 1.02 ], [ 0.676 ], [ -1.26 ], [ -1.016 ], [ -1.784 ], [ -1.364 ], ... ],
    	[ [ 0.592 ], [ 0.5 ], [ -1.94 ], [ -0.052 ], [ -1.744 ], [ 0.94 ], [ -0.616 ], [ 1.452 ], ... ],
    	[ [ 0.476 ], [ 0.564 ], [ -1.924 ], [ 0.62 ], [ -1.836 ], [ 0.792 ], [ -1.48 ], [ -0.964 ], ... ],
    	[ [ 1.564 ], [ -1.636 ], [ -0.452 ], [ -0.232 ], [ -1.732 ], [ 0.196 ], [ 0.972 ], [ 1.088 ], ... ],
    	[ [ -1.808 ], [ -0.18 ], [ -0.996 ], [ -1.44 ], [ 1.884 ], [ -1.548 ], [ 0.124 ], [ 1.648 ], ... ],
    	[ [ -0.24 ], [ -1.056 ], [ 0.132 ], [ -1.816 ], [ -0.044 ], [ -0.476 ], [ 0.74 ], [ -1.656 ], ... ],
    	...
    ]
    [
    	[ [ 0.136 ], [ 1.856 ], [ 1.108 ], [ 0.56 ], [ -1.036 ], [ 1.66 ], [ 0.252 ], [ -0.992 ], ... ],
    	[ [ -0.464 ], [ 1.616 ], [ -0.632 ], [ -0.224 ], [ -1.964 ], [ -0.324 ], [ -1.392 ], [ 0.82 ], ... ],
    	[ [ -0.028 ], [ 1.144 ], [ -1.336 ], [ 0.42 ], [ 1.616 ], [ 0.504 ], [ -0.428 ], [ -1.724 ], ... ],
    	[ [ -0.04 ], [ -1.728 ], [ -1.708 ], [ -0.936 ], [ 0.284 ], [ -1.528 ], [ 0.728 ], [ -0.368 ], ... ],
    	[ [ -0.176 ], [ -1.324 ], [ -1.328 ], [ 0.12 ], [ 0.116 ], [ -0.148 ], [ 1.624 ], [ -1.16 ], ... ],
    	[ [ 1.752 ], [ -0.432 ], [ 1.16 ], [ 1.76 ], [ -0.636 ], [ -0.672 ], [ -1.292 ], [ -1.124 ], ... ],
    	[ [ -1.228 ], [ 1.296 ], [ 0.224 ], [ -1.744 ], [ -0.208 ], [ 1.928 ], [ 0.068 ], [ 0.744 ], ... ],
    	[ [ 1.56 ], [ -1.608 ], [ 0.484 ], [ 0.848 ], [ 1.272 ], [ 1.216 ], [ -1.72 ], [ -1.884 ], ... ],
    	...
    ]
    [
    	[ [ 0.304 ], [ 1.052 ], [ 1.652 ], [ 0.852 ], [ 0.092 ], [ 0.88 ], [ 1.264 ], [ 1.316 ], ... ],
    	[ [ 0.004 ], [ -1.68 ], [ -1.852 ], [ 1.312 ], [ 0.836 ], [ -0.384 ], [ 0.676 ], [ -1.316 ], ... ],
    	[ [ 1.156 ], [ 0.456 ], [ 1.324 ], [ 0.84 ], [ -1.648 ], [ 0.856 ], [ -1.752 ], [ 1.752 ], ... ],
    	[ [ 0.54 ], [ 1.704 ], [ -1.564 ], [ -1.296 ], [ 0.076 ], [ 0.044 ], [ -0.552 ], [ -0.456 ], ... ],
    	[ [ -1.208 ], [ -0.812 ], [ 0.504 ], [ -1.572 ], [ -0.544 ], [ -0.54 ], [ 1.684 ], [ -1.824 ], ... ],
    	[ [ 1.596 ], [ 1.28 ], [ -0.924 ], [ -1.62 ], [ 1.96 ], [ 1.02 ], [ -1.236 ], [ -1.428 ], ... ],
    	[ [ -0.184 ], [ 0.452 ], [ 1.232 ], [ -1.588 ], [ -0.532 ], [ -0.228 ], [ -1.84 ], [ 1.856 ], ... ],
    	[ [ 1.58 ], [ -2.0 ], [ -1.236 ], [ 0.412 ], [ -0.756 ], [ -1.008 ], [ -0.692 ], [ -0.7 ], ... ],
    	...
    ]

Gradient Descent

First, we train using basic gradient descent method apply weak line search conditions.

TrainingTester.java:480 executed in 30.85 seconds (1.350 gc):

    IterativeTrainer iterativeTrainer = new IterativeTrainer(trainable.addRef());
    try {
      iterativeTrainer.setLineSearchFactory(label -> new ArmijoWolfeSearch());
      iterativeTrainer.setOrientation(new GradientDescent());
      iterativeTrainer.setMonitor(TrainingTester.getMonitor(history));
      iterativeTrainer.setTimeout(30, TimeUnit.SECONDS);
      iterativeTrainer.setMaxIterations(250);
      iterativeTrainer.setTerminateThreshold(0);
      return iterativeTrainer.run();
    } finally {
      iterativeTrainer.freeRef();
    }
Logging
Reset training subject: 5662325055646
Reset training subject: 5662896283939
Constructing line search parameters: GD
th(0)=0.833966833306717;dx=-2.77844615730762E-7
New Minimum: 0.833966833306717 > 0.8339662346442014
WOLFE (weak): th(2.154434690031884)=0.8339662346442014; dx=-2.77844449606038E-7 evalInputDelta=5.986625155607328E-7
New Minimum: 0.8339662346442014 > 0.8339656361782186
WOLFE (weak): th(4.308869380063768)=0.8339656361782186; dx=-2.778442834298863E-7 evalInputDelta=1.1971284983314234E-6
New Minimum: 0.8339656361782186 > 0.8339632418821916
WOLFE (weak): th(12.926608140191302)=0.8339632418821916; dx=-2.7784361862165596E-7 evalInputDelta=3.59142452532879E-6
New Minimum: 0.8339632418821916 > 0.8339524667656665
WOLFE (weak): th(51.70643256076521)=0.8339524667656665; dx=-2.7784062526521025E-7 evalInputDelta=1.4366541050470083E-5
New Minimum: 0.8339524667656665 > 0.8338950047143981
WOLFE (weak): th(258.53216280382605)=0.8338950047143981; dx=-2.77824663048863E-7 evalInputDelta=7.182859231880112E-5
New Minimum: 0.8338950047143981 > 0.8335359348010032
WOLFE (weak): th(1551.1929768229563)=0.8335359348010032; dx=-2.77724896146431E-7 evalInputDelta=4.3089850571376154E-4
New Minimum: 0.8335359348010032 > 0.8309544488295424
WOLFE (weak): th(10858.350837760694)=0.8309544488295424; dx=-2.7700657895872847E-7 evalInputDelta=0.0030123844771745567
New Minimum: 0.8309544488295424 > 0.8101225495486803
WOLFE (weak): th(86866.80670208555)=0.8101225495486803; dx=-2.711403174895804E-7 evalInputDelta=0.0238442837580366
New Minimum: 0.8101225495486803 > 0.6403339925693641
END: th(781801.26031877)=0.6403339925693641; dx=-2.175059295458161E-7 evalInputDelta=0.19363284073735287
Fitness changed from 0.833966833306717 to 0.6403339925693641
Iteration 1 complete. Error: 0.6403339925693641 Total: 8.2037; Orientation: 0.2722; Line Search: 6.7060
th(0)=0.6403339925693641;dx=-1.702708158053101E-7
New Minimum: 0.6403339925693641 > 0.42063152889406563
END: th(1684339.7559414052)=0.42063152889406563; dx=-9.060584256997826E-8 evalInputDelta=0.21970246367529844
Fitness changed from 0.6403339925693641 to 0.42063152889406563
Iteration 2 complete. Error: 0.42063152889406563 Total: 1.6238; Orientation: 0.2753; Line Search: 1.0144
th(0)=0.42063152889406563;dx=-4.821389190501381E-8
New Minimum: 0.42063152889406563 > 0.3338483671173741
WOLF (strong): th(3628800.0)=0.3338483671173741; dx=1.2779133010295748E-10 evalInputDelta=0.08678316177669154
END: th(1814400.0)=0.3551970236083581; dx=-2.3914090473452256E-8 evalInputDelta=0.06543450528570754
Fitness changed from 0.42063152889406563 to 0.3338483671173741
Iteration 3 complete. Error: 0.3338483671173741 Total: 2.5370; Orientation: 0.2746; Line Search: 1.9312
Low gradient: 1.0111035894765125E-6
th(0)=0.3338483671173741;dx=-1.0223304686522879E-12
New Minimum: 0.3338483671173741 > 0.3338465404804449
WOLF (strong): th(3909006.30159385)=0.3338465404804449; dx=8.775176007650418E-14 evalInputDelta=1.8266369292141427E-6
END: th(1954503.150796925)=0.33384691138409806; dx=-4.672893310754086E-13 evalInputDelta=1.4557332760345432E-6
Fitness changed from 0.3338483671173741 to 0.3338465404804449
Iteration 4 complete. Error: 0.3338465404804449 Total: 2.0593; Orientation: 0.2578; Line Search: 1.4943
Low gradient: 8.678810171566942E-8
th(0)=0.3338465404804449;dx=-7.532174599409377E-15
New Minimum: 0.3338465404804449 > 0.33384652731287906
WOLF (strong): th(4210849.389853513)=0.33384652731287906; dx=1.278056266049445E-15 evalInputDelta=1.316756581548617E-8
END: th(2105424.6949267564)=0.333846529259339; dx=-3.127054510278447E-15 evalInputDelta=1.122110587781222E-8
Fitness changed from 0.3338465404804449 to 0.33384652731287906
Iteration 5 complete. Error: 0.33384652731287906 Total: 2.1348; Orientation: 0.2545; Line Search: 1.5686
Low gradient: 1.4726175573369834E-8
th(0)=0.33384652731287906;dx=-2.168602470177142E-16
New Minimum: 0.33384652731287906 > 0.3338465269489174
WOLF (strong): th(4536000.0)=0.3338465269489174; dx=5.638249581708594E-17 evalInputDelta=3.639616386053035E-10
END: th(2268000.0)=0.3338465269759713; dx=-8.023949159949472E-17 evalInputDelta=3.369077794523889E-10
Fitness changed from 0.33384652731287906 to 0.3338465269489174
Iteration 6 complete. Error: 0.3338465269489174 Total: 1.9834; Orientation: 0.2616; Line Search: 1.4062
Low gradient: 3.828750644010107E-9
th(0)=0.3338465269489174;dx=-1.4659331494007803E-17
New Minimum: 0.3338465269489174 > 0.3338465269259011
WOLF (strong): th(4886257.876992312)=0.3338465269259011; dx=5.23894985615843E-18 evalInputDelta=2.3016311079260277E-11
New Minimum: 0.3338465269259011 > 0.3338465269252558
END: th(2443128.938496156)=0.3338465269252558; dx=-4.710762570061612E-18 evalInputDelta=2.366162821232365E-11
Fitness changed from 0.3338465269489174 to 0.3338465269252558
Iteration 7 complete. Error: 0.3338465269252558 Total: 2.0263; Orientation: 0.2552; Line Search: 1.4633
Low gradient: 1.2304418104358141E-9
th(0)=0.3338465269252558;dx=-1.5139870488685587E-18
New Minimum: 0.3338465269252558 > 0.333846526923113
WOLF (strong): th(5263561.737316892)=0.333846526923113; dx=6.997115249069016E-19 evalInputDelta=2.1427859486777834E-12
New Minimum: 0.333846526923113 > 0.33384652692272804
END: th(2631780.868658446)=0.33384652692272804; dx=-4.07146940118583E-19 evalInputDelta=2.5277557824665564E-12
Fitness changed from 0.3338465269252558 to 0.33384652692272804
Iteration 8 complete. Error: 0.33384652692272804 Total: 2.3355; Orientation: 0.2561; Line Search: 1.7725
Low gradient: 3.311749765233236E-10
th(0)=0.33384652692272804;dx=-1.0967686507522338E-19
New Minimum: 0.33384652692272804 > 0.3338465269225965
WOLF (strong): th(5670000.000000001)=0.3338465269225965; dx=6.318507204595844E-20 evalInputDelta=1.3156142841808105E-13
New Minimum: 0.3338465269225965 > 0.3338465269225398
END: th(2835000.0000000005)=0.3338465269225398; dx=-2.3206940340455228E-20 evalInputDelta=1.882383138251953E-13
Fitness changed from 0.33384652692272804 to 0.3338465269225398
Iteration 9 complete. Error: 0.3338465269225398 Total: 2.0892; Orientation: 0.2538; Line Search: 1.5158
Zero gradient: 7.139376990771328E-11
th(0)=0.3338465269225398;dx=-5.097070381635473E-21
New Minimum: 0.3338465269225398 > 0.3338465269225356
WOLF (strong): th(6107822.346240392)=0.3338465269225356; dx=3.637501388937913E-21 evalInputDelta=4.218847493575595E-15
New Minimum: 0.3338465269225356 > 0.33384652692253103
END: th(3053911.173120196)=0.33384652692253103; dx=-6.371221155228025E-22 evalInputDelta=8.770761894538737E-15
Fitness changed from 0.3338465269225398 to 0.33384652692253103
Iteration 10 complete. Error: 0.33384652692253103 Total: 2.0861; Orientation: 0.2520; Line Search: 1.5198
Zero gradient: 1.4727937545784155E-11
th(0)=0.33384652692253103;dx=-2.169121443525178E-22
WOLF (strong): th(6579452.171646116)=0.33384652692253103; dx=2.1228376704081053E-22 evalInputDelta=0.0
New Minimum: 0.33384652692253103 > 0.33384652692253064
END: th(3289726.085823058)=0.33384652692253064; dx=-2.1803154947749554E-24 evalInputDelta=3.885780586188048E-16
Fitness changed from 0.33384652692253103 to 0.33384652692253064
Iteration 11 complete. Error: 0.33384652692253064 Total: 1.9585; Orientation: 0.2343; Line Search: 1.3921
Zero gradient: 9.892978450994838E-13
th(0)=0.33384652692253064;dx=-9.787102263184819E-25
WOLF (strong): th(7087500.000000003)=0.33384652692253064; dx=1.0452721765999807E-24 evalInputDelta=0.0
END: th(3543750.0000000014)=0.33384652692253064; dx=-3.924209615743787E-28 evalInputDelta=0.0
Fitness changed from 0.33384652692253064 to 0.33384652692253064
Static Iteration Total: 1.8017; Orientation: 0.2317; Line Search: 1.2867
Iteration 12 failed. Error: 0.33384652692253064
Previous Error: 0.0 -> 0.33384652692253064
Optimization terminated 12
Final threshold in iteration 12: 0.33384652692253064 (> 0.0) after 30.840s (< 30.000s)

Returns

    0.33384652692253064

This training apply resulted in the following configuration:

TrainingTester.java:610 executed in 0.00 seconds (0.000 gc):

    RefList<double[]> state = network.state();
    assert state != null;
    String description = state.stream().map(RefArrays::toString).reduce((a, b) -> a + "\n" + b)
        .orElse("");
    state.freeRef();
    return description;

Returns

    

And regressed input:

TrainingTester.java:622 executed in 0.01 seconds (0.000 gc):

    return RefArrays.stream(RefUtil.addRef(data)).flatMap(x -> {
      return RefArrays.stream(x);
    }).limit(1).map(x -> {
      String temp_18_0015 = x.prettyPrint();
      x.freeRef();
      return temp_18_0015;
    }).reduce((a, b) -> a + "\n" + b).orElse("");

Returns

    [
    	[ [ -0.624 ], [ -1.712 ], [ 1.5080000472353532 ], [ 0.03600000139884036 ], [ 0.33999999977767237 ], [ -0.96 ], [ -6.398438568891718E-4 ], [ -1.716 ], ... ],
    	[ [ -1.152 ], [ -0.952 ], [ -0.0018129014922690645 ], [ -1.892 ], [ -0.006465124871015915 ], [ -0.005052131626525513 ], [ -1.672 ], [ 0.09200000653461925 ], ... ],
    	[ [ 1.3440000143526523 ], [ -0.002026190425150065 ], [ -0.003959049148077098 ], [ 0.41600000534143233 ], [ -0.988 ], [ 1.488000051840964 ], [ -0.0012397007203825139 ], [ 0.5879999837215522 ], ... ],
    	[ [ -1.9995320891251153E-4 ], [ -0.544 ], [ 0.2720000237243383 ], [ -0.616 ], [ -0.984 ], [ -1.644 ], [ -0.005958618391012083 ], [ -1.908 ], ... ],
    	[ [ 1.6199999661080857 ], [ 0.668000002617904 ], [ -1.856 ], [ -6.665070040610087E-5 ], [ -0.003985699845683255 ], [ -0.0028793230124365965 ], [ 1.8079999271242968 ], [ 0.8119999723245733 ], ... ],
    	[ [ -0.976 ], [ -6.26513377748647E-4 ], [ -0.772 ], [ -8.931158229683878E-4 ], [ -1.516 ], [ 0.05600000431362014 ], [ -1.032 ], [ -0.0020128739643983096 ], ... ],
    	[ [ -0.004892148312717892 ], [ -1.836 ], [ -0.004412272008970652 ], [ 1.8200000692504084 ], [ -0.792 ], [ -0.0030126202884135367 ], [ 0.5960000032860795 ], [ -0.964 ], ... ],
    	[ [ -0.328 ], [ -6.665070040610087E-5 ], [ -0.944 ], [ -2.932609834123967E-4 ], [ 1.5599999881688915 ], [ -0.072 ], [ 1.5759999352682788 ], [ -1.308 ], ... ],
    	...
    ]

To produce the following output:

TrainingTester.java:633 executed in 0.06 seconds (0.000 gc):

    Result[] array = ConstantResult.batchResultArray(pop(RefUtil.addRef(data)));
    @Nullable
    Result eval = layer.eval(array);
    assert eval != null;
    TensorList tensorList = Result.getData(eval);
    String temp_18_0016 = tensorList.stream().limit(1).map(x -> {
      String temp_18_0017 = x.prettyPrint();
      x.freeRef();
      return temp_18_0017;
    }).reduce((a, b) -> a + "\n" + b).orElse("");
    tensorList.freeRef();
    return temp_18_0016;

Returns

    [
    	[ [ 0.0 ], [ 0.0 ], [ 1.5080000162124634 ], [ 0.036000002175569534 ], [ 0.3400000035762787 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.09200000762939453 ], ... ],
    	[ [ 1.343999981880188 ], [ 0.0 ], [ 0.0 ], [ 0.41600000858306885 ], [ 0.0 ], [ 1.4880000352859497 ], [ 0.0 ], [ 0.5879999995231628 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.2720000147819519 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 1.6200000047683716 ], [ 0.6679999828338623 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 1.8079999685287476 ], [ 0.8119999766349792 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.056000005453825 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 1.8200000524520874 ], [ 0.0 ], [ 0.0 ], [ 0.5960000157356262 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 1.559999942779541 ], [ 0.0 ], [ 1.5759999752044678 ], [ 0.0 ], ... ],
    	...
    ]

Conjugate Gradient Descent

First, we use a conjugate gradient descent method, which converges the fastest for purely linear functions.

TrainingTester.java:452 executed in 26.90 seconds (0.855 gc):

    IterativeTrainer iterativeTrainer = new IterativeTrainer(trainable.addRef());
    try {
      iterativeTrainer.setLineSearchFactory(label -> new QuadraticSearch());
      iterativeTrainer.setOrientation(new GradientDescent());
      iterativeTrainer.setMonitor(TrainingTester.getMonitor(history));
      iterativeTrainer.setTimeout(30, TimeUnit.SECONDS);
      iterativeTrainer.setMaxIterations(250);
      iterativeTrainer.setTerminateThreshold(0);
      return iterativeTrainer.run();
    } finally {
      iterativeTrainer.freeRef();
    }
Logging
Reset training subject: 5693302768710
Reset training subject: 5693625187612
Constructing line search parameters: GD
F(0.0) = LineSearchPoint{point=PointSample{avg=0.833966833306717}, derivative=-2.77844615730762E-7}
F(1.0E-10) = LineSearchPoint{point=PointSample{avg=0.833966833306717}, derivative=-2.77844615730762E-7}, evalInputDelta = 0.0
F(7.000000000000001E-10) = LineSearchPoint{point=PointSample{avg=0.833966833306717}, derivative=-2.77844615730762E-7}, evalInputDelta = 0.0
F(4.900000000000001E-9) = LineSearchPoint{point=PointSample{avg=0.833966833306717}, derivative=-2.77844615730762E-7}, evalInputDelta = 0.0
F(3.430000000000001E-8) = LineSearchPoint{point=PointSample{avg=0.833966833306717}, derivative=-2.77844615730762E-7}, evalInputDelta = 0.0
F(2.4010000000000004E-7) = LineSearchPoint{point=PointSample{avg=0.833966833306717}, derivative=-2.77844615730762E-7}, evalInputDelta = 0.0
F(1.6807000000000003E-6) = LineSearchPoint{point=PointSample{avg=0.833966833306717}, derivative=-2.77844615730762E-7}, evalInputDelta = 0.0
F(1.1764900000000001E-5) = LineSearchPoint{point=PointSample{avg=0.833966833306717}, derivative=-2.77844615730762E-7}, evalInputDelta = 0.0
F(8.235430000000001E-5) = LineSearchPoint{point=PointSample{avg=0.833966833306717}, derivative=-2.77844615730762E-7}, evalInputDelta = 0.0
New Minimum: 0.833966833306717 > 0.8339668333066825
F(5.764801000000001E-4) = LineSearchPoint{point=PointSample{avg=0.8339668333066825}, derivative=-2.77844615730762E-7}, evalInputDelta = -3.441691376337985E-14
New Minimum: 0.8339668333066825 > 0.8339668324550171
F(0.004035360700000001) = LineSearchPoint{point=PointSample{avg=0.8339668324550171}, derivative=-2.778446155885222E-7}, evalInputDelta = -8.516998217800165E-10
New Minimum: 0.8339668324550171 > 0.833966825480274
F(0.028247524900000005) = LineSearchPoint{point=PointSample{avg=0.833966825480274}, derivative=-2.778446138666231E-7}, evalInputDelta = -7.826442938174694E-9
New Minimum: 0.833966825480274 > 0.8339667779410849
F(0.19773267430000002) = LineSearchPoint{point=PointSample{avg=0.8339667779410849}, derivative=-2.7784460061741133E-7}, evalInputDelta = -5.536563207897416E-8
New Minimum: 0.8339667779410849 > 0.8339664487186725
F(1.3841287201) = LineSearchPoint{point=PointSample{avg=0.8339664487186725}, derivative=-2.778445085439856E-7}, evalInputDelta = -3.845880444108829E-7
New Minimum: 0.8339664487186725 > 0.8339641411341286
F(9.688901040700001) = LineSearchPoint{point=PointSample{avg=0.8339641411341286}, derivative=-2.7784386812960764E-7}, evalInputDelta = -2.692172588303343E-6
New Minimum: 0.8339641411341286 > 0.83394799240113
F(67.8223072849) = LineSearchPoint{point=PointSample{avg=0.83394799240113}, derivative=-2.778393824192088E-7}, evalInputDelta = -1.884090558690321E-5
New Minimum: 0.83394799240113 > 0.8338349304795521
F(474.7561509943) = LineSearchPoint{point=PointSample{avg=0.8338349304795521}, derivative=-2.77807973916712E-7}, evalInputDelta = -1.3190282716479818E-4
New Minimum: 0.8338349304795521 > 0.8330439003709118
F(3323.2930569601003) = LineSearchPoint{point=PointSample{avg=0.8330439003709118}, derivative=-2.7758812741905485E-7}, evalInputDelta = -9.22932935805143E-4
New Minimum: 0.8330439003709118 > 0.8275242032214131
F(23263.0513987207) = LineSearchPoint{point=PointSample{avg=0.8275242032214131}, derivative=-2.7604919566192505E-7}, evalInputDelta = -0.00644263008530388
New Minimum: 0.8275242032214131 > 0.7897455284867928
F(162841.3597910449) = LineSearchPoint{point=PointSample{avg=0.7897455284867928}, derivative=-2.652766726357106E-7}, evalInputDelta = -0.044221304819924145
New Minimum: 0.7897455284867928 > 0.5673959000900038
F(1139889.5185373144) = LineSearchPoint{point=PointSample{avg=0.5673959000900038}, derivative=-1.898690143990263E-7}, evalInputDelta = -0.2665709332167131
New Minimum: 0.5673959000900038 > 0.4819470935645759
F(7979226.6297612) = LineSearchPoint{point=PointSample{avg=0.4819470935645759}, derivative=6.137831016157113E-8}, evalInputDelta = -0.35201973974214107
0.4819470935645759 <= 0.833966833306717
New Minimum: 0.4819470935645759 > 0.40590457178079503
F(6535481.500676397) = LineSearchPoint{point=PointSample{avg=0.40590457178079503}, derivative=4.396151845142292E-8}, evalInputDelta = -0.4280622615259219
Right bracket at 6535481.500676397
New Minimum: 0.40590457178079503 > 0.3715110787987381
F(5642677.852569854) = LineSearchPoint{point=PointSample{avg=0.3715110787987381}, derivative=3.3023441568032956E-8}, evalInputDelta = -0.4624557545079788
Right bracket at 5642677.852569854
New Minimum: 0.3715110787987381 > 0.35401983384840746
F(5043257.494072002) = LineSearchPoint{point=PointSample{avg=0.35401983384840746}, derivative=2.525319425812843E-8}, evalInputDelta = -0.4799469994583095
Right bracket at 5043257.494072002
New Minimum: 0.35401983384840746 > 0.3446337808877452
F(4623068.508885238) = LineSearchPoint{point=PointSample{avg=0.3446337808877452}, derivative=1.932363926516903E-8}, evalInputDelta = -0.48933305241897174
Right bracket at 4623068.508885238
New Minimum: 0.3446337808877452 > 0.3395186859261048
F(4322449.224483261) = LineSearchPoint{point=PointSample{avg=0.3395186859261048}, derivative=1.4622249216223262E-8}, evalInputDelta = -0.49444814738061216
Right bracket at 4322449.224483261
New Minimum: 0.3395186859261048 > 0.3367561498616808
F(4106342.9322497044) = LineSearchPoint{point=PointSample{avg=0.3367561498616808}, derivative=1.0876782792148229E-8}, evalInputDelta = -0.49721068344503616
Right bracket at 4106342.9322497044
New Minimum: 0.3367561498616808 > 0.3352987227908028
F(3951647.7819329924) = LineSearchPoint{point=PointSample{avg=0.3352987227908028}, derivative=7.92216447002194E-9}, evalInputDelta = -0.49866811051591414
Right bracket at 3951647.7819329924
New Minimum: 0.3352987227908028 > 0.3345530414986816
F(3842098.296740645) = LineSearchPoint{point=PointSample{avg=0.3345530414986816}, derivative=5.664215207474726E-9}, evalInputDelta = -0.49941379180803536
Right bracket at 3842098.296740645
New Minimum: 0.3345530414986816 > 0.33418244336177955
F(3765337.1195702865) = LineSearchPoint{point=PointSample{avg=0.33418244336177955}, derivative=3.977553148252744E-9}, evalInputDelta = -0.4997843899449374
Right bracket at 3765337.1195702865
New Minimum: 0.33418244336177955 > 0.3340033696067506
F(3712194.2863653894) = LineSearchPoint{point=PointSample{avg=0.3340033696067506}, derivative=2.7541671030079E-9}, evalInputDelta = -0.49996346369996636
Right bracket at 3712194.2863653894
Converged to right
Fitness changed from 0.833966833306717 to 0.3340033696067506
Iteration 1 complete. Error: 0.3340033696067506 Total: 22.8352; Orientation: 0.2837; Line Search: 21.5902
Low gradient: 9.264655183761367E-6
F(0.0) = LineSearchPoint{point=PointSample{avg=0.3340033696067506}, derivative=-8.583383567399629E-11}
New Minimum: 0.3340033696067506 > 0.3338490187634479
F(3712194.2863653894) = LineSearchPoint{point=PointSample{avg=0.3338490187634479}, derivative=2.6750183366747737E-12}, evalInputDelta = -1.5435084330267523E-4
0.3338490187634479 <= 0.3340033696067506
New Minimum: 0.3338490187634479 > 0.3338488687025598
F(3599999.999179957) = LineSearchPoint{point=PointSample{avg=0.3338488687025598}, derivative=1.8465316790713257E-19}, evalInputDelta = -1.5450090419077966E-4
Right bracket at 3599999.999179957
Converged to right
Fitness changed from 0.3340033696067506 to 0.3338488687025598
Iteration 2 complete. Error: 0.3338488687025598 Total: 2.6809; Orientation: 0.2511; Line Search: 2.0372
Zero gradient: 4.487174104174897E-12
F(0.0) = LineSearchPoint{point=PointSample{avg=0.3338488687025598}, derivative=-2.0134731441177788E-23}
F(3599999.999179957) = LineSearchPoint{point=PointSample{avg=0.3338488687025598}, derivative=0.0}, evalInputDelta = 0.0
0.3338488687025598 <= 0.3338488687025598
Converged to right
Fitness changed from 0.3338488687025598 to 0.3338488687025598
Static Iteration Total: 1.3815; Orientation: 0.2294; Line Search: 0.8696
Iteration 3 failed. Error: 0.3338488687025598
Previous Error: 0.0 -> 0.3338488687025598
Optimization terminated 3
Final threshold in iteration 3: 0.3338488687025598 (> 0.0) after 26.899s (< 30.000s)

Returns

    0.3338488687025598

This training apply resulted in the following configuration:

TrainingTester.java:610 executed in 0.00 seconds (0.000 gc):

    RefList<double[]> state = network.state();
    assert state != null;
    String description = state.stream().map(RefArrays::toString).reduce((a, b) -> a + "\n" + b)
        .orElse("");
    state.freeRef();
    return description;

Returns

    

And regressed input:

TrainingTester.java:622 executed in 0.00 seconds (0.000 gc):

    return RefArrays.stream(RefUtil.addRef(data)).flatMap(x -> {
      return RefArrays.stream(x);
    }).limit(1).map(x -> {
      String temp_18_0015 = x.prettyPrint();
      x.freeRef();
      return temp_18_0015;
    }).reduce((a, b) -> a + "\n" + b).orElse("");

Returns

    [
    	[ [ -0.624 ], [ -1.712 ], [ 1.5080000742927595 ], [ 0.035999997328949374 ], [ 0.3400000028865766 ], [ -0.96 ], [ -0.00598369055268369 ], [ -1.716 ], ... ],
    	[ [ -1.152 ], [ -0.952 ], [ -0.01695384968651792 ], [ -1.892 ], [ -0.06046025630224383 ], [ -0.04724621584882582 ], [ -1.672 ], [ 0.09200000159457594 ], ... ],
    	[ [ 1.3439999899957356 ], [ -0.01894833583234712 ], [ -0.03702407342520342 ], [ 0.41599999684979727 ], [ -0.988 ], [ 1.4880000902231831 ], [ -0.011593404402333696 ], [ 0.5880000275352162 ], ... ],
    	[ [ -0.0018699046165500041 ], [ -0.544 ], [ 0.2720000030846452 ], [ -0.616 ], [ -0.984 ], [ -1.644 ], [ -0.055723077387940245 ], [ -1.908 ], ... ],
    	[ [ 1.6199999467031563 ], [ 0.6679999548210938 ], [ -1.856 ], [ -6.233006596257709E-4 ], [ -0.03727344749757644 ], [ -0.026926660240530254 ], [ 1.8079999282832921 ], [ 0.8119999739329468 ], ... ],
    	[ [ -0.976 ], [ -0.005859024617878628 ], [ -0.772 ], [ -0.008352237807072449 ], [ -1.516 ], [ 0.05600000167759077 ], [ -1.032 ], [ -0.01882369099892367 ], ... ],
    	[ [ -0.045750309036691084 ], [ -1.836 ], [ -0.04126258860028642 ], [ 1.820000023370782 ], [ -0.792 ], [ -0.028173192980292083 ], [ 0.5960000282546737 ], [ -0.964 ], ... ],
    	[ [ -0.328 ], [ -6.233006596257709E-4 ], [ -0.944 ], [ -0.0027425239574224713 ], [ 1.5599999043555166 ], [ -0.072 ], [ 1.5759999488549457 ], [ -1.308 ], ... ],
    	...
    ]

To produce the following output:

TrainingTester.java:633 executed in 0.06 seconds (0.000 gc):

    Result[] array = ConstantResult.batchResultArray(pop(RefUtil.addRef(data)));
    @Nullable
    Result eval = layer.eval(array);
    assert eval != null;
    TensorList tensorList = Result.getData(eval);
    String temp_18_0016 = tensorList.stream().limit(1).map(x -> {
      String temp_18_0017 = x.prettyPrint();
      x.freeRef();
      return temp_18_0017;
    }).reduce((a, b) -> a + "\n" + b).orElse("");
    tensorList.freeRef();
    return temp_18_0016;

Returns

    [
    	[ [ 0.0 ], [ 0.0 ], [ 1.5080000162124634 ], [ 0.035999998450279236 ], [ 0.3400000035762787 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.09200000017881393 ], ... ],
    	[ [ 1.343999981880188 ], [ 0.0 ], [ 0.0 ], [ 0.41600000858306885 ], [ 0.0 ], [ 1.4880000352859497 ], [ 0.0 ], [ 0.5879999995231628 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.2720000147819519 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 1.6200000047683716 ], [ 0.6679999828338623 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 1.8079999685287476 ], [ 0.8119999766349792 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0560000017285347 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 1.8200000524520874 ], [ 0.0 ], [ 0.0 ], [ 0.5960000157356262 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 1.559999942779541 ], [ 0.0 ], [ 1.5759999752044678 ], [ 0.0 ], ... ],
    	...
    ]

Limited-Memory BFGS

Next, we apply the same optimization using L-BFGS, which is nearly ideal for purely second-order or quadratic functions.

TrainingTester.java:509 executed in 95.37 seconds (1.425 gc):

    IterativeTrainer iterativeTrainer = new IterativeTrainer(trainable.addRef());
    try {
      iterativeTrainer.setLineSearchFactory(label -> new ArmijoWolfeSearch());
      iterativeTrainer.setOrientation(new LBFGS());
      iterativeTrainer.setMonitor(TrainingTester.getMonitor(history));
      iterativeTrainer.setTimeout(30, TimeUnit.SECONDS);
      iterativeTrainer.setIterationsPerSample(100);
      iterativeTrainer.setMaxIterations(250);
      iterativeTrainer.setTerminateThreshold(0);
      return iterativeTrainer.run();
    } finally {
      iterativeTrainer.freeRef();
    }
Logging
Reset training subject: 5720329549398
Reset training subject: 5720656474354
Adding measurement 23834f85 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD
Non-optimal measurement 0.833966833306717 < 0.833966833306717. Total: 1
th(0)=0.833966833306717;dx=-2.77844615730762E-7
Adding measurement 5bb4cec to history. Total: 1
New Minimum: 0.833966833306717 > 0.8339662346442014
WOLFE (weak): th(2.154434690031884)=0.8339662346442014; dx=-2.77844449606038E-7 evalInputDelta=5.986625155607328E-7
Adding measurement 50a0ad5e to history. Total: 2
New Minimum: 0.8339662346442014 > 0.8339656361782186
WOLFE (weak): th(4.308869380063768)=0.8339656361782186; dx=-2.778442834298863E-7 evalInputDelta=1.1971284983314234E-6
Adding measurement 40c2dd12 to history. Total: 3
New Minimum: 0.8339656361782186 > 0.8339632418821916
WOLFE (weak): th(12.926608140191302)=0.8339632418821916; dx=-2.7784361862165596E-7 evalInputDelta=3.59142452532879E-6
Adding measurement 623697ad to history. Total: 4
New Minimum: 0.8339632418821916 > 0.8339524667656665
WOLFE (weak): th(51.70643256076521)=0.8339524667656665; dx=-2.7784062526521025E-7 evalInputDelta=1.4366541050470083E-5
Adding measurement 7b86354f to history. Total: 5
New Minimum: 0.8339524667656665 > 0.8338950047143981
WOLFE (weak): th(258.53216280382605)=0.8338950047143981; dx=-2.77824663048863E-7 evalInputDelta=7.182859231880112E-5
Adding measurement 326436e1 to history. Total: 6
New Minimum: 0.8338950047143981 > 0.8335359348010032
WOLFE (weak): th(1551.1929768229563)=0.8335359348010032; dx=-2.77724896146431E-7 evalInputDelta=4.3089850571376154E-4
Adding measurement 3ff18d5d to history. Total: 7
New Minimum: 0.8335359348010032 > 0.8309544488295424
WOLFE (weak): th(10858.350837760694)=0.8309544488295424; dx=-2.7700657895872847E-7 evalInputDelta=0.0030123844771745567
Adding measurement 5372ee7d to history. Total: 8
New Minimum: 0.8309544488295424 > 0.8101225495486803
WOLFE (weak): th(86866.80670208555)=0.8101225495486803; dx=-2.711403174895804E-7 evalInputDelta=0.0238442837580366
Adding measurement 4c1bb825 to history. Total: 9
New Minimum: 0.8101225495486803 > 0.6403339925693641
END: th(781801.26031877)=0.6403339925693641; dx=-2.175059295458161E-7 evalInputDelta=0.19363284073735287
Fitness changed from 0.833966833306717 to 0.6403339925693641
Iteration 1 complete. Error: 0.6403339925693641 Total: 7.8634; Orientation: 0.2848; Line Search: 6.4992
Non-optimal measurement 0.6403339925693641 < 0.6403339925693641. Total: 10
Rejected: LBFGS Orientation magnitude: 1.504e+03, gradient 4.126e-04, dot -0.996; [268c3ca3-262f-477a-875c-01a318cebe0a = 1.000/1.000e+00, daab5556-3a6b-4488-9941-2d8953289a52 = 1.000/1.000e+00, 8f4a2c16-4696-4da6-baf0-b4349ff86bd1 = 1.000/1.000e+00, d0a139f7-abf0-4776-a370-9be6350925fd = 1.000/1.000e+00, f76890bb-25f4-4bf6-b47b-0529124264ae = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.6403339925693641, 0.8101225495486803, 0.8309544488295424, 0.8335359348010032, 0.8338950047143981, 0.8339524667656665, 0.8339632418821916, 0.8339656361782186, 0.8339662346442014, 0.833966833306717
Rejected: LBFGS Orientation magnitude: 1.504e+03, gradient 4.126e-04, dot -0.996; [8f4a2c16-4696-4da6-baf0-b4349ff86bd1 = 1.000/1.000e+00, 268c3ca3-262f-477a-875c-01a318cebe0a = 1.000/1.000e+00, d0a139f7-abf0-4776-a370-9be6350925fd = 1.000/1.000e+00, f76890bb-25f4-4bf6-b47b-0529124264ae = 1.000/1.000e+00, daab5556-3a6b-4488-9941-2d8953289a52 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.6403339925693641, 0.8101225495486803, 0.8309544488295424, 0.8335359348010032, 0.8338950047143981, 0.8339524667656665, 0.8339632418821916, 0.8339656361782186, 0.8339662346442014
Rejected: LBFGS Orientation magnitude: 1.487e+03, gradient 4.126e-04, dot -1.000; [8f4a2c16-4696-4da6-baf0-b4349ff86bd1 = 1.000/1.000e+00, daab5556-3a6b-4488-9941-2d8953289a52 = 1.000/1.000e+00, d0a139f7-abf0-4776-a370-9be6350925fd = 1.000/1.000e+00, 268c3ca3-262f-477a-875c-01a318cebe0a = 1.000/1.000e+00, f76890bb-25f4-4bf6-b47b-0529124264ae = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.6403339925693641, 0.8101225495486803, 0.8309544488295424, 0.8335359348010032, 0.8338950047143981, 0.8339524667656665, 0.8339632418821916, 0.8339656361782186
Rejected: LBFGS Orientation magnitude: 1.485e+03, gradient 4.126e-04, dot -1.000; [d0a139f7-abf0-4776-a370-9be6350925fd = 1.000/1.000e+00, 268c3ca3-262f-477a-875c-01a318cebe0a = 1.000/1.000e+00, 8f4a2c16-4696-4da6-baf0-b4349ff86bd1 = 1.000/1.000e+00, f76890bb-25f4-4bf6-b47b-0529124264ae = 1.000/1.000e+00, daab5556-3a6b-4488-9941-2d8953289a52 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.6403339925693641, 0.8101225495486803, 0.8309544488295424, 0.8335359348010032, 0.8338950047143981, 0.8339524667656665, 0.8339632418821916
Rejected: LBFGS Orientation magnitude: 1.486e+03, gradient 4.126e-04, dot -1.000; [f76890bb-25f4-4bf6-b47b-0529124264ae = 1.000/1.000e+00, daab5556-3a6b-4488-9941-2d8953289a52 = 1.000/1.000e+00, 268c3ca3-262f-477a-875c-01a318cebe0a = 1.000/1.000e+00, 8f4a2c16-4696-4da6-baf0-b4349ff86bd1 = 1.000/1.000e+00, d0a139f7-abf0-4776-a370-9be6350925fd = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.6403339925693641, 0.8101225495486803, 0.8309544488295424, 0.8335359348010032, 0.8338950047143981, 0.8339524667656665
Rejected: LBFGS Orientation magnitude: 1.485e+03, gradient 4.126e-04, dot -1.000; [f76890bb-25f4-4bf6-b47b-0529124264ae = 1.000/1.000e+00, d0a139f7-abf0-4776-a370-9be6350925fd = 1.000/1.000e+00, 268c3ca3-262f-477a-875c-01a318cebe0a = 1.000/1.000e+00, daab5556-3a6b-4488-9941-2d8953289a52 = 1.000/1.000e+00, 8f4a2c16-4696-4da6-baf0-b4349ff86bd1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.6403339925693641, 0.8101225495486803, 0.8309544488295424, 0.8335359348010032, 0.8338950047143981
Rejected: LBFGS Orientation magnitude: 1.486e+03, gradient 4.126e-04, dot -1.000; [f76890bb-25f4-4bf6-b47b-0529124264ae = 1.000/1.000e+00, d0a139f7-abf0-4776-a370-9be6350925fd = 1.000/1.000e+00, 8f4a2c16-4696-4da6-baf0-b4349ff86bd1 = 1.000/1.000e+00, 268c3ca3-262f-477a-875c-01a318cebe0a = 1.000/1.000e+00, daab5556-3a6b-4488-9941-2d8953289a52 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.6403339925693641, 0.8101225495486803, 0.8309544488295424, 0.8335359348010032
LBFGS Accumulation History: 3 points
Removed measurement 4c1bb825 to history. Total: 9
Removed measurement 5372ee7d to history. Total: 8
Removed measurement 3ff18d5d to history. Total: 7
Removed measurement 326436e1 to history. Total: 6
Removed measurement 7b86354f to history. Total: 5
Removed measurement 623697ad to history. Total: 4
Removed measurement 40c2dd12 to history. Total: 3
Adding measurement 5b59a94f to history. Total: 3
th(0)=0.6403339925693641;dx=-1.702708158053101E-7
Adding measurement 499fd87b to history. Total: 4
New Minimum: 0.6403339925693641 > 0.42063152889406563
END: th(1684339.7559414052)=0.42063152889406563; dx=-9.060584256997826E-8 evalInputDelta=0.21970246367529844
Fitness changed from 0.6403339925693641 to 0.42063152889406563
Iteration 2 complete. Error: 0.42063152889406563 Total: 87.5063; Orientation: 85.9278; Line Search: 1.2572
Final threshold in iteration 2: 0.42063152889406563 (> 0.0) after 95.370s (< 30.000s)

Returns

    0.42063152889406563

This training apply resulted in the following configuration:

TrainingTester.java:610 executed in 0.00 seconds (0.000 gc):

    RefList<double[]> state = network.state();
    assert state != null;
    String description = state.stream().map(RefArrays::toString).reduce((a, b) -> a + "\n" + b)
        .orElse("");
    state.freeRef();
    return description;

Returns

    

And regressed input:

TrainingTester.java:622 executed in 0.00 seconds (0.000 gc):

    return RefArrays.stream(RefUtil.addRef(data)).flatMap(x -> {
      return RefArrays.stream(x);
    }).limit(1).map(x -> {
      String temp_18_0015 = x.prettyPrint();
      x.freeRef();
      return temp_18_0015;
    }).reduce((a, b) -> a + "\n" + b).orElse("");

Returns

    [
    	[ [ -0.624 ], [ -1.712 ], [ 1.3013826665989494 ], [ 0.40424543384022354 ], [ 0.5382860189844029 ], [ -0.96 ], [ 0.07998091235039222 ], [ -1.716 ], ... ],
    	[ [ -1.152 ], [ -0.952 ], [ 0.22661256841205404 ], [ -1.892 ], [ 0.808140456382984 ], [ 0.6315159091642094 ], [ -1.672 ], [ 0.7801690818691689 ], ... ],
    	[ [ 1.5822764329328551 ], [ 0.253272887227885 ], [ 0.49488185248879074 ], [ 0.9642024545682475 ], [ -0.988 ], [ 1.2230632660274166 ], [ 0.15496300637367053 ], [ 1.141201273581673 ], ... ],
    	[ [ 0.024994032138956363 ], [ -0.544 ], [ 0.5569319970203641 ], [ -0.616 ], [ -0.984 ], [ -1.644 ], [ 0.7448221779792242 ], [ -1.908 ], ... ],
    	[ [ 1.1367819928832843 ], [ 0.8279618069246819 ], [ -1.856 ], [ 0.008331344630418316 ], [ 0.498214405338191 ], [ 0.35991408249874707 ], [ 1.1964792875493422 ], [ 0.8103337190384806 ], ... ],
    	[ [ -0.976 ], [ 0.07831464105602949 ], [ -0.772 ], [ 0.11164001735568994 ], [ -1.516 ], [ 0.39092004762304405 ], [ -1.032 ], [ 0.2516066019151335 ], ... ],
    	[ [ 0.6115207124506579 ], [ -1.836 ], [ 0.5515350074176478 ], [ 1.361776102981268 ], [ -0.792 ], [ 0.3765768029578025 ], [ 0.5510107466968509 ], [ -0.964 ], ... ],
    	[ [ -0.328 ], [ 0.008331344630418316 ], [ -0.944 ], [ 0.036657916151639304 ], [ 1.6999665336162262 ], [ -0.072 ], [ 0.9244888558247873 ], [ -1.308 ], ... ],
    	...
    ]

To produce the following output:

TrainingTester.java:633 executed in 0.05 seconds (0.000 gc):

    Result[] array = ConstantResult.batchResultArray(pop(RefUtil.addRef(data)));
    @Nullable
    Result eval = layer.eval(array);
    assert eval != null;
    TensorList tensorList = Result.getData(eval);
    String temp_18_0016 = tensorList.stream().limit(1).map(x -> {
      String temp_18_0017 = x.prettyPrint();
      x.freeRef();
      return temp_18_0017;
    }).reduce((a, b) -> a + "\n" + b).orElse("");
    tensorList.freeRef();
    return temp_18_0016;

Returns

    [
    	[ [ 0.0 ], [ 0.0 ], [ 1.3013826608657837 ], [ 0.40424543619155884 ], [ 0.538286030292511 ], [ 0.0 ], [ 0.07998090982437134 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.22661256790161133 ], [ 0.0 ], [ 0.8081404566764832 ], [ 0.6315159201622009 ], [ 0.0 ], [ 0.7801690697669983 ], ... ],
    	[ [ 1.582276463508606 ], [ 0.2532728910446167 ], [ 0.49488183856010437 ], [ 0.9642024636268616 ], [ 0.0 ], [ 1.2230632305145264 ], [ 0.15496300160884857 ], [ 1.1412012577056885 ], ... ],
    	[ [ 0.024994032457470894 ], [ 0.0 ], [ 0.5569319725036621 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.7448222041130066 ], [ 0.0 ], ... ],
    	[ [ 1.1367820501327515 ], [ 0.827961802482605 ], [ 0.0 ], [ 0.008331344462931156 ], [ 0.49821439385414124 ], [ 0.359914094209671 ], [ 1.196479320526123 ], [ 0.8103337287902832 ], ... ],
    	[ [ 0.0 ], [ 0.0783146396279335 ], [ 0.0 ], [ 0.11164001375436783 ], [ 0.0 ], [ 0.3909200429916382 ], [ 0.0 ], [ 0.25160661339759827 ], ... ],
    	[ [ 0.6115207076072693 ], [ 0.0 ], [ 0.5515350103378296 ], [ 1.3617761135101318 ], [ 0.0 ], [ 0.37657681107521057 ], [ 0.5510107278823853 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.008331344462931156 ], [ 0.0 ], [ 0.03665791451931 ], [ 1.699966549873352 ], [ 0.0 ], [ 0.9244888424873352 ], [ 0.0 ], ... ],
    	...
    ]

TrainingTester.java:432 executed in 0.15 seconds (0.000 gc):

    return TestUtil.compare(title + " vs Iteration", runs);
Logging
Plotting range=[1.0, -0.476453137466221], [11.0, -0.193593442743305]; valueStats=DoubleSummaryStatistics{count=15, sum=5.794404, min=0.333847, average=0.386294, max=0.640334}
Plotting 11 points for GD
Plotting 2 points for CjGD
Plotting 2 points for LBFGS

Returns

Result

TrainingTester.java:435 executed in 0.01 seconds (0.000 gc):

    return TestUtil.compareTime(title + " vs Time", runs);
Logging
Plotting range=[0.0, -0.476453137466221], [87.506, -0.193593442743305]; valueStats=DoubleSummaryStatistics{count=15, sum=5.794404, min=0.333847, average=0.386294, max=0.640334}
Plotting 11 points for GD
Plotting 2 points for CjGD
Plotting 2 points for LBFGS

Returns

Result

Results

TrainingTester.java:255 executed in 0.00 seconds (0.000 gc):

    return grid(inputLearning, modelLearning, completeLearning);

Returns

Result

TrainingTester.java:258 executed in 0.00 seconds (0.000 gc):

    return new ComponentResult(null == inputLearning ? null : inputLearning.value,
        null == modelLearning ? null : modelLearning.value, null == completeLearning ? null : completeLearning.value);

Returns

    {"input":{ "LBFGS": { "type": "NonConverged", "value": 0.42063152889406563 }, "CjGD": { "type": "NonConverged", "value": 0.3338488687025598 }, "GD": { "type": "NonConverged", "value": 0.33384652692253064 } }, "model":null, "complete":null}

LayerTests.java:425 executed in 0.00 seconds (0.000 gc):

    throwException(exceptions.addRef());

Results

detailsresult
{"input":{ "LBFGS": { "type": "NonConverged", "value": 0.42063152889406563 }, "CjGD": { "type": "NonConverged", "value": 0.3338488687025598 }, "GD": { "type": "NonConverged", "value": 0.33384652692253064 } }, "model":null, "complete":null}OK
  {
    "result": "OK",
    "performance": {
      "execution_time": "155.419",
      "gc_time": "3.913"
    },
    "created_on": 1586740292961,
    "file_name": "trainingTest",
    "report": {
      "simpleName": "ReLu_Float",
      "canonicalName": "com.simiacryptus.mindseye.layers.cudnn.ActivationLayerTest.ReLu_Float",
      "link": "https://github.com/SimiaCryptus/mindseye-cudnn/tree/59d5b3318556370acb2d83ee6ec123ce0fc6974f/src/test/java/com/simiacryptus/mindseye/layers/cudnn/ActivationLayerTest.java",
      "javaDoc": ""
    },
    "training_analysis": {
      "input": {
        "LBFGS": {
          "type": "NonConverged",
          "value": 0.42063152889406563
        },
        "CjGD": {
          "type": "NonConverged",
          "value": 0.3338488687025598
        },
        "GD": {
          "type": "NonConverged",
          "value": 0.33384652692253064
        }
      }
    },
    "archive": "s3://code.simiacrypt.us/tests/com/simiacryptus/mindseye/layers/cudnn/ActivationLayer/ReLu_Float/trainingTest/202004131132",
    "id": "e2f22148-b15a-4f85-8835-b9575ef24bd1",
    "report_type": "Components",
    "display_name": "Comparative Training",
    "target": {
      "simpleName": "ActivationLayer",
      "canonicalName": "com.simiacryptus.mindseye.layers.cudnn.ActivationLayer",
      "link": "https://github.com/SimiaCryptus/mindseye-cudnn/tree/59d5b3318556370acb2d83ee6ec123ce0fc6974f/src/main/java/com/simiacryptus/mindseye/layers/cudnn/ActivationLayer.java",
      "javaDoc": ""
    }
  }