1. Test Modules
  2. Network Diagram
  3. Training Characteristics
    1. Input Learning
      1. Gradient Descent
      2. Conjugate Gradient Descent
      3. Limited-Memory BFGS
    2. Model Learning
      1. Gradient Descent
      2. Conjugate Gradient Descent
      3. Limited-Memory BFGS
    3. Composite Learning
      1. Gradient Descent
      2. Conjugate Gradient Descent
      3. Limited-Memory BFGS
    4. Results
  4. Results

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

Test Modules

Network Diagram

This is a network apply the following layout:

LayerTests.java:203 executed in 0.07 seconds (0.000 gc):

    return Graphviz.fromGraph((Graph) TestUtil.toGraph(((DAGNetwork) layer).addRef())).height(400).width(600)
        .render(Format.PNG).toImage();
Logging
executing command [/bin/sh, -c, dot -Tsvg /tmp/GraphvizJava/DotEngine5644821106977984985/dotfile.dot -ooutfile.svg]

Returns

Result

Using Seed 1080848172365400064

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.01 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.368, -1.744, 1.424, -0.9 ], [ -1.412, 0.032, -1.72, 1.444 ], [ -1.376, -1.04, -0.036, 1.376 ], [ 1.708, -1.228, 1.02, -0.96 ], [ 1.92, -0.36, 1.76, -0.036 ], [ -1.484, -1.376, 1.644, 1.08 ], [ 1.804, -1.18, 1.428, -1.336 ], [ 1.94, -0.14, -1.628, 0.48 ], ... ],
    	[ [ 1.748, -1.576, -1.776, -1.564 ], [ 1.012, -0.48, 0.868, 1.9 ], [ 0.708, 1.428, 1.112, 0.676 ], [ -0.876, -0.856, -1.476, -0.832 ], [ -0.408, -0.54, 1.04, -1.868 ], [ 1.896, -0.328, -1.936, -0.252 ], [ 1.88, -0.54, -0.72, -1.688 ], [ 0.456, -1.356, 1.812, 1.58 ], ... ],
    	[ [ -0.748, 0.872, -1.004, -0.752 ], [ 0.48, -1.976, -0.148, 0.724 ], [ -0.236, -1.888, 1.572, -1.48 ], [ 0.724, 0.532, 0.98, -1.496 ], [ 1.484, 1.28, 1.72, -0.124 ], [ -0.156, 0.388, 1.276, -0.044 ], [ -0.848, 0.616, -0.248, -0.672 ], [ 0.936, 1.86, -0.992, -0.04 ], ... ],
    	[ [ -1.96, -0.66, 1.668, -1.604 ], [ -0.708, -0.856, -0.384, 0.736 ], [ -1.624, -0.028, -1.184, 1.396 ], [ 0.164, 0.484, 0.0, 1.42 ], [ -0.728, 0.24, -0.348, 0.036 ], [ -1.68, -0.332, -0.484, -0.656 ], [ 1.78, 0.772, 1.6, 1.124 ], [ -0.632, -1.66, -1.968, -1.036 ], ... ],
    	[ [ 0.524, 0.132, 0.588, 1.812 ], [ -1.556, -0.132, 1.952, 0.92 ], [ 1.756, 1.176, -0.9, -1.06 ], [ 0.516, -0.828, 1.44, -0.108 ], [ -0.668, 1.1, 1.532, -1.444 ], [ -0.66, 1.12, -1.564, -1.324 ], [ 0.66, -1.28, -0.92, -0.228 ], [ 0.716, -0.296, -1.308, 0.884 ], ... ],
    	[ [ 0.076, 0.148, -1.016, 0.444 ], [ -0.472, -1.288, -1.916, 1.376 ], [ -0.852, 1.3, 0.128, -0.844 ], [ 0.28, 0.16, 1.064, -1.012 ], [ -1.1, -1.648, -0.796, -0.216 ], [ -0.904, 0.392, 0.532, 1.348 ], [ 1.508, -0.572, 0.56, -1.14 ], [ -0.36, -0.592, 1.608, -1.868 ], ... ],
    	[ [ -1.132, -1.572, 1.468, 1.008 ], [ 0.288, 0.716, -1.64, 1.984 ], [ 1.916, 1.672, -0.284, -1.868 ], [ 0.308, -0.136, 1.112, 1.024 ], [ 0.572, 0.108, 0.128, -1.768 ], [ -1.064, -0.848, -0.22, 1.944 ], [ -1.76, -1.896, -1.572, -1.2 ], [ -1.74, 1.492, 0.108, 1.816 ], ... ],
    	[ [ 0.004, 1.712, -1.764, -1.264 ], [ -0.804, 0.12, -1.028, 0.456 ], [ 0.956, 1.648, -1.888, -1.976 ], [ -0.46, 1.5, 0.956, 1.016 ], [ -1.888, 1.132, -1.66, 1.824 ], [ -1.144, 0.316, 1.316, 1.656 ], [ -0.204, -0.212, -1.712, -0.832 ], [ -0.524, -1.716, -1.58, -0.404 ], ... ],
    	...
    ]
    [
    	[ [ 1.42, -0.704, 1.896, 0.072 ], [ -1.672, -1.688, -0.208, 0.492 ], [ 0.312, 1.408, -1.636, 1.18 ], [ 0.756, -0.788, -1.828, -1.048 ], [ -0.12, 1.372, -1.048, 1.428 ], [ -1.528, 1.148, 1.572, 1.252 ], [ -1.46, 1.072, 1.46, -1.476 ], [ -0.744, 1.944, -1.588, 0.892 ], ... ],
    	[ [ -1.592, 1.768, -1.488, -1.044 ], [ 1.892, -1.732, -1.504, 0.956 ], [ 1.308, -0.108, 1.036, 1.92 ], [ 0.096, 1.932, 1.348, 1.816 ], [ 0.224, -0.352, 0.804, 1.904 ], [ -0.156, -0.588, 1.988, -0.86 ], [ -0.56, -1.412, 0.284, -0.336 ], [ -0.388, 0.432, -0.24, -0.036 ], ... ],
    	[ [ -1.04, -1.632, 0.948, -1.08 ], [ 0.096, 0.736, 0.624, -0.52 ], [ 0.308, -1.724, -1.38, -0.964 ], [ -1.172, 1.964, -1.576, 0.016 ], [ 0.528, 1.672, 0.344, -0.96 ], [ 1.044, -0.676, 0.364, -0.3 ], [ -1.96, 0.572, -0.88, 1.444 ], [ 0.292, 0.42, -1.576, -0.012 ], ... ],
    	[ [ -1.568, -1.544, 1.264, -0.88 ], [ -0.528, -0.424, 1.216, 0.716 ], [ 0.204, -1.2, -0.36, 0.944 ], [ 0.372, -0.448, -1.86, 0.296 ], [ 1.876, 0.052, -0.112, 1.78 ], [ -1.636, -1.588, 1.936, -0.42 ], [ 0.132, -0.312, -1.728, -1.648 ], [ 0.232, 1.856, 1.772, -1.776 ], ... ],
    	[ [ 0.184, 1.332, -0.38, 1.46 ], [ -1.236, -1.88, 0.784, 0.792 ], [ 1.12, 1.092, -1.732, -1.872 ], [ 1.076, -0.628, -1.28, -0.888 ], [ 0.468, -1.584, 1.94, 1.608 ], [ 0.616, -0.48, 1.516, -1.088 ], [ -0.04, 1.868, 0.416, 1.264 ], [ -1.66, -1.628, -0.216, -1.876 ], ... ],
    	[ [ 0.076, 1.172, -0.176, -1.688 ], [ -1.164, 1.764, -0.288, -1.04 ], [ -1.968, 0.024, 0.004, 0.308 ], [ -0.152, 1.264, 0.616, -0.852 ], [ 1.176, 1.22, 1.884, -1.044 ], [ 0.924, 1.448, -0.8, 1.288 ], [ 1.4, 0.256, -1.872, -0.236 ], [ 1.344, 1.916, -0.716, -1.74 ], ... ],
    	[ [ -0.476, -1.84, -1.836, 1.368 ], [ 1.716, 1.768, 1.072, 0.424 ], [ -1.156, -1.036, 0.0, -1.588 ], [ 1.712, -0.116, -1.336, 1.8 ], [ 1.6, -1.548, -1.912, -1.208 ], [ -0.36, -1.0, 0.832, 0.828 ], [ -1.06, 0.928, -1.192, -1.124 ], [ -1.276, 1.88, 0.128, -1.308 ], ... ],
    	[ [ -0.684, 0.696, 0.412, 1.452 ], [ -0.664, -0.208, -1.608, 0.836 ], [ -0.82, 1.7, -0.96, 1.728 ], [ 0.984, 0.644, -1.008, 1.676 ], [ -1.5, 1.78, -0.836, 1.356 ], [ -1.396, -0.136, 0.444, -0.852 ], [ 0.6, 1.516, -0.156, 0.656 ], [ -1.076, 1.576, -1.096, 1.74 ], ... ],
    	...
    ]

Gradient Descent

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

TrainingTester.java:480 executed in 30.18 seconds (0.711 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: 12094211450573
Reset training subject: 12094527064709
Constructing line search parameters: GD
th(0)=139.89239583202956;dx=-0.01986180719446971
New Minimum: 139.89239583202956 > 139.849608798641
WOLFE (weak): th(2.154434690031884)=139.849608798641; dx=-0.019858156085489832 evalInputDelta=0.04278703338857781
New Minimum: 139.849608798641 > 139.80682963132824
WOLFE (weak): th(4.308869380063768)=139.80682963132824; dx=-0.01985450497650996 evalInputDelta=0.08556620070132226
New Minimum: 139.80682963132824 > 139.63579162283582
WOLFE (weak): th(12.926608140191302)=139.63579162283582; dx=-0.019839900540590462 evalInputDelta=0.25660420919373905
New Minimum: 139.63579162283582 > 138.8676780676367
WOLFE (weak): th(51.70643256076521)=138.8676780676367; dx=-0.01977418057895273 evalInputDelta=1.024717764392875
New Minimum: 138.8676780676367 > 134.81411560692266
WOLFE (weak): th(258.53216280382605)=134.81411560692266; dx=-0.019423674116884834 evalInputDelta=5.078280225106909
New Minimum: 134.81411560692266 > 111.12178686354694
END: th(1551.1929768229563)=111.12178686354694; dx=-0.01723300872896045 evalInputDelta=28.77060896848262
Fitness changed from 139.89239583202956 to 111.12178686354694
Iteration 1 complete. Error: 111.12178686354694 Total: 2.5091; Orientation: 0.1196; Line Search: 1.8519
th(0)=111.12178686354694;dx=-0.01498384636502758
New Minimum: 111.12178686354694 > 67.98489839617203
END: th(3341.943960201201)=67.98489839617203; dx=-0.010831600561124869 evalInputDelta=43.136888467374916
Fitness changed from 111.12178686354694 to 67.98489839617203
Iteration 2 complete. Error: 67.98489839617203 Total: 0.6108; Orientation: 0.1107; Line Search: 0.3866
th(0)=67.98489839617203;dx=-0.007947455524100543
New Minimum: 67.98489839617203 > 26.478502616104862
END: th(7200.000000000001)=26.478502616104862; dx=-0.003582098859251447 evalInputDelta=41.506395780067166
Fitness changed from 67.98489839617203 to 26.478502616104862
Iteration 3 complete. Error: 26.478502616104862 Total: 0.8453; Orientation: 0.1022; Line Search: 0.6316
th(0)=26.478502616104862;dx=-0.0019355021974935967
New Minimum: 26.478502616104862 > 8.953765001724907
END: th(15511.929768229566)=8.953765001724907; dx=-3.240152031425101E-4 evalInputDelta=17.524737614379955
Fitness changed from 26.478502616104862 to 8.953765001724907
Iteration 4 complete. Error: 8.953765001724907 Total: 0.6433; Orientation: 0.0988; Line Search: 0.4320
th(0)=8.953765001724907;dx=-3.6751219897612395E-4
New Minimum: 8.953765001724907 > 5.1126564969873876
WOLF (strong): th(33419.43960201202)=5.1126564969873876; dx=1.376394931210405E-4 evalInputDelta=3.8411085047375195
New Minimum: 5.1126564969873876 > 4.922974941369228
END: th(16709.71980100601)=4.922974941369228; dx=-1.1493635292754176E-4 evalInputDelta=4.030790060355679
Fitness changed from 8.953765001724907 to 4.922974941369228
Iteration 5 complete. Error: 4.922974941369228 Total: 0.8892; Orientation: 0.0939; Line Search: 0.6926
th(0)=4.922974941369228;dx=-1.4591344181744999E-4
New Minimum: 4.922974941369228 > 3.3180720076377783
WOLF (strong): th(36000.000000000015)=3.3180720076377783; dx=5.6752167721258466E-5 evalInputDelta=1.6049029337314495
New Minimum: 3.3180720076377783 > 3.208528231579314
END: th(18000.000000000007)=3.208528231579314; dx=-4.458063704809578E-5 evalInputDelta=1.7144467097899136
Fitness changed from 4.922974941369228 to 3.208528231579314
Iteration 6 complete. Error: 3.208528231579314 Total: 0.7251; Orientation: 0.0938; Line Search: 0.5262
th(0)=3.208528231579314;dx=-8.327418034288593E-5
New Minimum: 3.208528231579314 > 2.8818201262366037
WOLF (strong): th(38779.824420573925)=2.8818201262366037; dx=6.64247948583358E-5 evalInputDelta=0.32670810534271055
New Minimum: 2.8818201262366037 > 2.319511682127555
END: th(19389.912210286962)=2.319511682127555; dx=-8.42469274227507E-6 evalInputDelta=0.889016549451759
Fitness changed from 3.208528231579314 to 2.319511682127555
Iteration 7 complete. Error: 2.319511682127555 Total: 0.7192; Orientation: 0.0931; Line Search: 0.5245
th(0)=2.319511682127555;dx=-6.681355211720457E-5
Armijo: th(41774.29950251503)=3.4019915645612264; dx=1.1863871233890982E-4 evalInputDelta=-1.0824798824336712
New Minimum: 2.319511682127555 > 1.8923593184932228
WOLF (strong): th(20887.149751257515)=1.8923593184932228; dx=2.591258011085261E-5 evalInputDelta=0.4271523636343324
END: th(6962.383250419171)=1.961929270949185; dx=-3.5904841374518844E-5 evalInputDelta=0.3575824111783703
Fitness changed from 2.319511682127555 to 1.8923593184932228
Iteration 8 complete. Error: 1.8923593184932228 Total: 0.8810; Orientation: 0.0955; Line Search: 0.6839
th(0)=1.8923593184932228;dx=-8.558416775136969E-5
New Minimum: 1.8923593184932228 > 1.5019069364843676
WOLF (strong): th(15000.000000000007)=1.5019069364843676; dx=3.3523850150189014E-5 evalInputDelta=0.39045238200885524
New Minimum: 1.5019069364843676 > 1.4738055939233723
END: th(7500.000000000004)=1.4738055939233723; dx=-2.603015880059034E-5 evalInputDelta=0.4185537245698505
Fitness changed from 1.8923593184932228 to 1.4738055939233723
Iteration 9 complete. Error: 1.4738055939233723 Total: 0.8542; Orientation: 0.0959; Line Search: 0.6221
th(0)=1.4738055939233723;dx=-1.7122832156871056E-5
New Minimum: 1.4738055939233723 > 1.2377810712032233
END: th(16158.260175239137)=1.2377810712032233; dx=-1.2091268886239041E-5 evalInputDelta=0.23602452272014895
Fitness changed from 1.4738055939233723 to 1.2377810712032233
Iteration 10 complete. Error: 1.2377810712032233 Total: 0.5560; Orientation: 0.0986; Line Search: 0.3496
th(0)=1.2377810712032233;dx=-1.2253913913778512E-5
New Minimum: 1.2377810712032233 > 0.9269078196917651
END: th(34811.91625209586)=0.9269078196917651; dx=-5.606249213135949E-6 evalInputDelta=0.3108732515114583
Fitness changed from 1.2377810712032233 to 0.9269078196917651
Iteration 11 complete. Error: 0.9269078196917651 Total: 0.5377; Orientation: 0.0935; Line Search: 0.3415
th(0)=0.9269078196917651;dx=-1.3317310556854834E-5
Armijo: th(75000.00000000004)=2.303885890972559; dx=5.003672579100932E-5 evalInputDelta=-1.376978071280794
Armijo: th(37500.00000000002)=1.0214527645709355; dx=1.8359707617077243E-5 evalInputDelta=-0.09454494487917042
New Minimum: 0.9269078196917651 > 0.8264352255934382
END: th(12500.000000000007)=0.8264352255934382; dx=-2.758304498877473E-6 evalInputDelta=0.10047259409832687
Fitness changed from 0.9269078196917651 to 0.8264352255934382
Iteration 12 complete. Error: 0.8264352255934382 Total: 0.9752; Orientation: 0.0934; Line Search: 0.7808
th(0)=0.8264352255934382;dx=-6.4480037576920334E-6
New Minimum: 0.8264352255934382 > 0.7147182099806808
END: th(26930.433625398564)=0.7147182099806808; dx=-1.8487074773914636E-6 evalInputDelta=0.11171701561275738
Fitness changed from 0.8264352255934382 to 0.7147182099806808
Iteration 13 complete. Error: 0.7147182099806808 Total: 0.5621; Orientation: 0.0983; Line Search: 0.3559
th(0)=0.7147182099806808;dx=-9.258379973566754E-6
Armijo: th(58019.86042015978)=1.2790511802894453; dx=2.8711476420957708E-5 evalInputDelta=-0.5643329703087645
Armijo: th(29009.93021007989)=0.7215089741120855; dx=9.72654822369548E-6 evalInputDelta=-0.00679076413140467
New Minimum: 0.7147182099806808 > 0.6557871933527095
END: th(9669.976736693296)=0.6557871933527095; dx=-2.930070574479343E-6 evalInputDelta=0.05893101662797129
Fitness changed from 0.7147182099806808 to 0.6557871933527095
Iteration 14 complete. Error: 0.6557871933527095 Total: 0.8588; Orientation: 0.0926; Line Search: 0.6649
th(0)=0.6557871933527095;dx=-3.565044015847301E-6
New Minimum: 0.6557871933527095 > 0.5878412323746941
END: th(20833.333333333347)=0.5878412323746941; dx=-2.95776823804218E-6 evalInputDelta=0.06794596097801542
Fitness changed from 0.6557871933527095 to 0.5878412323746941
Iteration 15 complete. Error: 0.5878412323746941 Total: 0.5397; Orientation: 0.0936; Line Search: 0.3436
th(0)=0.5878412323746941;dx=-3.09696019306955E-6
New Minimum: 0.5878412323746941 > 0.49212556092161686
END: th(44884.05604233094)=0.49212556092161686; dx=-1.1680586083866357E-6 evalInputDelta=0.09571567145307724
Fitness changed from 0.5878412323746941 to 0.49212556092161686
Iteration 16 co

...skipping 3746 bytes...

0.1057; Line Search: 0.3386
th(0)=0.284187086230574;dx=-1.1729633017367882E-6
New Minimum: 0.284187086230574 > 0.276850774276454
WOLF (strong): th(48225.30864197536)=0.276850774276454; dx=8.687117723755255E-7 evalInputDelta=0.0073363119541199895
New Minimum: 0.276850774276454 > 0.26821137892905217
END: th(24112.65432098768)=0.26821137892905217; dx=-1.5212576468063135E-7 evalInputDelta=0.015975707301521813
Fitness changed from 0.284187086230574 to 0.26821137892905217
Iteration 24 complete. Error: 0.26821137892905217 Total: 0.7119; Orientation: 0.0921; Line Search: 0.5199
th(0)=0.26821137892905217;dx=-2.099775494076814E-6
Armijo: th(51949.13893788306)=0.3897885827447706; dx=6.78039990100265E-6 evalInputDelta=-0.1215772038157184
Armijo: th(25974.56946894153)=0.2713352976629422; dx=2.3403122034629177E-6 evalInputDelta=-0.0031239187338900076
New Minimum: 0.26821137892905217 > 0.25643831113502236
END: th(8658.18982298051)=0.25643831113502236; dx=-6.197462615635704E-7 evalInputDelta=0.011773067794029812
Fitness changed from 0.26821137892905217 to 0.25643831113502236
Iteration 25 complete. Error: 0.25643831113502236 Total: 0.8683; Orientation: 0.0929; Line Search: 0.6741
th(0)=0.25643831113502236;dx=-7.448096416008052E-7
New Minimum: 0.25643831113502236 > 0.24310120492434528
WOLFE (weak): th(18653.504507510228)=0.24310120492434528; dx=-6.851743279323552E-7 evalInputDelta=0.013337106210677074
New Minimum: 0.24310120492434528 > 0.23087650630598944
END: th(37307.009015020456)=0.23087650630598944; dx=-6.255390142639053E-7 evalInputDelta=0.02556180482903292
Fitness changed from 0.25643831113502236 to 0.23087650630598944
Iteration 26 complete. Error: 0.23087650630598944 Total: 0.7126; Orientation: 0.0920; Line Search: 0.5209
th(0)=0.23087650630598944;dx=-7.932953450071092E-7
Armijo: th(80375.5144032923)=0.2429762991856766; dx=1.0943769111909418E-6 evalInputDelta=-0.012099792879687155
New Minimum: 0.23087650630598944 > 0.21796107416874028
WOLF (strong): th(40187.75720164615)=0.21796107416874028; dx=1.5054078309191626E-7 evalInputDelta=0.012915432137249161
END: th(13395.919067215384)=0.22235684479866355; dx=-4.78683302307434E-7 evalInputDelta=0.008519661507325887
Fitness changed from 0.23087650630598944 to 0.21796107416874028
Iteration 27 complete. Error: 0.21796107416874028 Total: 0.9629; Orientation: 0.1015; Line Search: 0.7605
th(0)=0.21796107416874028;dx=-3.4726782706529387E-6
Armijo: th(28860.632743268376)=0.2745215326563512; dx=7.39223602884543E-6 evalInputDelta=-0.05656045848761093
New Minimum: 0.21796107416874028 > 0.20704526573943233
WOLF (strong): th(14430.316371634188)=0.20704526573943233; dx=1.9597788790962462E-6 evalInputDelta=0.01091580842930795
New Minimum: 0.20704526573943233 > 0.20561224076494572
END: th(4810.105457211396)=0.20561224076494572; dx=-1.6618592207365439E-6 evalInputDelta=0.012348833403794557
Fitness changed from 0.21796107416874028 to 0.20561224076494572
Iteration 28 complete. Error: 0.20561224076494572 Total: 0.8920; Orientation: 0.0982; Line Search: 0.6859
th(0)=0.20561224076494572;dx=-9.563801479100172E-7
New Minimum: 0.20561224076494572 > 0.19879007774413388
END: th(10363.058059727908)=0.19879007774413388; dx=-3.602510977111273E-7 evalInputDelta=0.0068221630208118444
Fitness changed from 0.20561224076494572 to 0.19879007774413388
Iteration 29 complete. Error: 0.19879007774413388 Total: 0.5360; Orientation: 0.0930; Line Search: 0.3424
th(0)=0.19879007774413388;dx=-5.365424062717544E-7
New Minimum: 0.19879007774413388 > 0.1884729672522568
END: th(22326.53177869231)=0.1884729672522568; dx=-3.876593993775541E-7 evalInputDelta=0.010317110491877085
Fitness changed from 0.19879007774413388 to 0.1884729672522568
Iteration 30 complete. Error: 0.1884729672522568 Total: 0.5335; Orientation: 0.0932; Line Search: 0.3398
th(0)=0.1884729672522568;dx=-6.036894817587317E-7
New Minimum: 0.1884729672522568 > 0.18292385952959106
WOLF (strong): th(48101.05457211397)=0.18292385952959106; dx=3.729624105114078E-7 evalInputDelta=0.00554910772266573
New Minimum: 0.18292385952959106 > 0.1798261651449184
END: th(24050.527286056986)=0.1798261651449184; dx=-1.153635356236619E-7 evalInputDelta=0.008646802107338397
Fitness changed from 0.1884729672522568 to 0.1798261651449184
Iteration 31 complete. Error: 0.1798261651449184 Total: 0.7088; Orientation: 0.0921; Line Search: 0.5158
th(0)=0.1798261651449184;dx=-1.0627826345955223E-6
Armijo: th(51815.29029863955)=0.2370909867826118; dx=3.273127160608801E-6 evalInputDelta=-0.05726482163769342
Armijo: th(25907.645149319775)=0.18037527287036176; dx=1.1051722630066394E-6 evalInputDelta=-5.491077254433652E-4
New Minimum: 0.1798261651449184 > 0.1737684670326432
END: th(8635.881716439924)=0.1737684670326432; dx=-3.4013100206146844E-7 evalInputDelta=0.006057698112275189
Fitness changed from 0.1798261651449184 to 0.1737684670326432
Iteration 32 complete. Error: 0.1737684670326432 Total: 0.8527; Orientation: 0.0918; Line Search: 0.6597
th(0)=0.1737684670326432;dx=-4.0586913249374037E-7
New Minimum: 0.1737684670326432 > 0.16648704120029
WOLFE (weak): th(18605.44314891026)=0.16648704120029; dx=-3.768508246796158E-7 evalInputDelta=0.007281425832353194
New Minimum: 0.16648704120029 > 0.15974551384425012
END: th(37210.88629782052)=0.15974551384425012; dx=-3.4783251686549126E-7 evalInputDelta=0.014022953188393084
Fitness changed from 0.1737684670326432 to 0.15974551384425012
Iteration 33 complete. Error: 0.15974551384425012 Total: 0.7094; Orientation: 0.0932; Line Search: 0.5159
th(0)=0.15974551384425012;dx=-4.425242169990223E-7
Armijo: th(80168.42428685662)=0.16466997606252723; dx=5.65377129778161E-7 evalInputDelta=-0.004924462218277109
New Minimum: 0.15974551384425012 > 0.15210751210242276
WOLF (strong): th(40084.21214342831)=0.15210751210242276; dx=6.14264563895693E-8 evalInputDelta=0.007638001741827355
END: th(13361.404047809438)=0.15495501707453746; dx=-2.745406592028251E-7 evalInputDelta=0.00479049676971266
Fitness changed from 0.15974551384425012 to 0.15210751210242276
Iteration 34 complete. Error: 0.15210751210242276 Total: 0.8836; Orientation: 0.0940; Line Search: 0.6899
th(0)=0.15210751210242276;dx=-1.8965317795122918E-6
Armijo: th(28786.272388133082)=0.1820611395375804; dx=3.97763676117055E-6 evalInputDelta=-0.029953627435157643
New Minimum: 0.15210751210242276 > 0.14594739886176425
WOLF (strong): th(14393.136194066541)=0.14594739886176425; dx=1.040552490829129E-6 evalInputDelta=0.006160113240658516
New Minimum: 0.14594739886176425 > 0.14535704614259498
END: th(4797.712064688847)=0.14535704614259498; dx=-9.175036893984849E-7 evalInputDelta=0.006750465959827784
Fitness changed from 0.15210751210242276 to 0.14535704614259498
Iteration 35 complete. Error: 0.14535704614259498 Total: 0.8747; Orientation: 0.0945; Line Search: 0.6769
th(0)=0.14535704614259498;dx=-5.373501075696359E-7
New Minimum: 0.14535704614259498 > 0.14145620858353886
END: th(10336.357304950145)=0.14145620858353886; dx=-2.1742982968891066E-7 evalInputDelta=0.003900837559056125
Fitness changed from 0.14535704614259498 to 0.14145620858353886
Iteration 36 complete. Error: 0.14145620858353886 Total: 0.5799; Orientation: 0.0941; Line Search: 0.3842
th(0)=0.14145620858353886;dx=-3.135746838419422E-7
New Minimum: 0.14145620858353886 > 0.1353648724475175
END: th(22269.006746349063)=0.1353648724475175; dx=-2.3349382311066544E-7 evalInputDelta=0.006091336136021364
Fitness changed from 0.14145620858353886 to 0.1353648724475175
Iteration 37 complete. Error: 0.1353648724475175 Total: 0.5956; Orientation: 0.1016; Line Search: 0.3836
th(0)=0.1353648724475175;dx=-3.5281999050849095E-7
New Minimum: 0.1353648724475175 > 0.13123942379532702
WOLF (strong): th(47977.12064688847)=0.13123942379532702; dx=1.8084432391716842E-7 evalInputDelta=0.004125448652190472
New Minimum: 0.13123942379532702 > 0.1301016884716549
END: th(23988.560323444235)=0.1301016884716549; dx=-8.598783329566125E-8 evalInputDelta=0.00526318397586259
Fitness changed from 0.1353648724475175 to 0.1301016884716549
Iteration 38 complete. Error: 0.1301016884716549 Total: 0.7903; Orientation: 0.1021; Line Search: 0.5770
Final threshold in iteration 38: 0.1301016884716549 (> 0.0) after 30.171s (< 30.000s)

Returns

    0.1301016884716549

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.23938617008598856, -0.4012189901436759, 1.4102222877709671, -0.3386039321443383 ], [ -1.9700113588547168, -0.5471629287152922, -1.5725778386584839, 1.3583852006436696 ], [ -0.2605673875621406, -0.08370305882343178, 0.3093361371383343, 1.4478924670642384 ], [ 0.5881583120524198, -0.5378318635884791, 1.1731515211772774, -0.458136542374698 ], [ 1.7250172961221253, -0.6680054989544094, 1.3558408036798235, 0.3007321041359972 ], [ -0.9683101915295773, -0.05595364143564586, 2.4132540444732755, 1.2747419714144486 ], [ 1.935104378801152, -0.7772180456141722, 2.0365342968294495, -1.3461340627565117 ], [ 1.761224297481083, 1.1303957467488217, -1.7646894030306688, 1.1724480537577309 ], ... ],
    	[ [ 1.4889999601513912, -0.9797524237238733, -2.190829743136714, -1.3125976968814237 ], [ 1.1408538060835098, -0.14271582550882156, 1.7455297797235636, 1.8205270458945413 ], [ 0.27667434628793364, 1.825966650677606, 1.0220086793337062, 0.9945998759149467 ], [ -1.193327904360476, -0.6055423025996989, -0.8821647044755394, -1.5483198350433345 ], [ 0.26779813106566613, -0.02248224560451005, 1.8418647225985985, -1.6249907168723452 ], [ 1.2755694606276358, 0.208308769536513, -0.7334678171366191, -0.1975496653612222 ], [ 1.5870677977020742, -0.19633820328021048, -0.0449835952233055, -1.822809774722948 ], [ 0.20004328249717335, -0.9998277643127981, 1.9107697237908445, 1.143459801144837 ], ... ],
    	[ [ 0.06740597836258369, 1.5811192740792743, -0.5121486166125755, -0.4515321383069044 ], [ -0.36028972869964543, -1.8870160641506735, 0.07107688885119655, 0.6012857524886502 ], [ 0.06655948206828709, -2.00505522852379, 1.696458357966622, -1.4681971106368188 ], [ 0.639965260231654, 0.922965236937057, 1.8919074190993832, -1.3912289200157621 ], [ 1.150884790005441, 0.6025421262399214, 1.4721881482407837, -0.3538223348954624 ], [ -0.5537676753961841, -0.07282966065567273, 0.9516312589355335, -0.2509383793315351 ], [ -0.8043333515599199, 0.2460261133699761, -0.09286136562571076, -0.9069755590009644 ], [ 1.5240252685862579, 2.1424773809730366, -0.4236308297460877, -0.06216457922463725 ], ... ],
    	[ [ -2.035424732709176, -0.17630170036295376, 1.6811184989950483, -1.9409189188349687 ], [ -0.9683293085825118, -0.8370345255839954, 0.3005289979101107, 0.2792958994702877 ], [ -1.2314831726373587, 0.14191068128638737, -1.080933734851709, 1.4857186600386647 ], [ -0.550899020358424, 0.3151381419370381, 0.09786302189675335, 1.1597751339241897 ], [ -0.20812165570823324, 0.038396993291685715, -0.35808385792707886, -0.03113706395444829 ], [ -1.80096186470715, -0.21682940480648974, -0.4713024241080447, -0.2749604009115653 ], [ 2.2060303936293857, 0.584894953151645, 1.7254230348763824, 1.1785379653540686 ], [ -0.9869424740497442, -1.4477224966428848, -2.355851094720091, -1.1758803816040087 ], ... ],
    	[ [ 0.5995845523814336, 0.23784902067760538, 0.527401781704661, 1.9132453051753147 ], [ -1.7150664584205688, -0.06075196562253845, 2.048241266741616, 1.0045678625584242 ], [ 1.6952043740800231, 0.7558087816781591, -1.2629308023076256, -1.2980906523017393 ], [ 0.22845263265474386, -0.8602836630868408, 1.2548875389360532, -0.0337217912326388 ], [ -0.759088731699708, 0.7969790512325635, 1.2235118974721222, -1.3705891345284082 ], [ -0.34056050735839566, 0.9071930680751428, -1.573164810047455, -1.7848028925212165 ], [ 0.4739841943479378, -1.2239790890262148, -1.1617442166958516, -0.2056279669993837 ], [ 0.6373397100949258, -0.08173287022966239, -1.3963480625925608, 1.1635691439847455 ], ... ],
    	[ [ 0.4023383089683737, 0.4333143789879416, -0.43652103127902725, -0.21358437014421808 ], [ -0.623911968893555, -0.9923543747500396, -1.7330006723581695, 1.560117614057588 ], [ -0.6336096026377296, 0.943285533055849, 0.406199069934662, -0.8997887075606615 ], [ 0.4001739382741196, 0.2682946273082089, 0.8071046893501834, -1.0267579110612066 ], [ -1.0069562858203542, -1.90497696585823, -0.8233345628927898, -0.012852590742188346 ], [ -1.0268791276562328, 0.1400630359584423, 0.6125234233203258, 1.4645353675183204 ], [ 1.652661115597877, -0.6287922682304136, 0.4104985817380496, -0.9788951008830782 ], [ -0.27750049187521436, 0.11084858719372434, 1.6771526588820347, -1.5817449855729526 ], ... ],
    	[ [ -1.5223039362916644, -2.260572082812681, 2.4838361050286566, -0.1657424395365004 ], [ 0.4404435596522934, 0.5516407947421961, -1.4637806000317621, 1.819811177136495 ], [ 1.6377464854334711, 1.2570511443046395, -0.06951968063914886, -1.790134784580689 ], [ 0.38935031572193207, -0.4603898046003145, 0.7809338541292187, 0.8598518136328108 ], [ 0.3976301716230633, -0.4365630934395105, -0.29423492859354705, -2.113364716332368 ], [ -1.0060672682162548, -0.9219308106908158, -0.3206937770813043, 1.953520717024667 ], [ -1.2760345059971832, -1.6183253947923066, -1.198764639977474, -1.0761324172927218 ], [ -1.9514674416048177, 2.070681278045869, 0.5604164814649958, 1.6984372947431112 ], ... ],
    	[ [ -0.379353443159741, 0.3915571881918103, -0.770026935361592, -1.813977068037152 ], [ -0.1455949696285173, 0.14818860200734663, -1.6280222044302182, 0.8715623981905571 ], [ 0.10221559427210195, 0.9138394469242972, -2.795937686592135, -1.442958264555137 ], [ -0.010900439614500658, 0.7729719318588659, 0.2122239399084589, 0.6149943520904372 ], [ -1.2901912965972688, 1.0567102423244261, -1.8052569595693606, 1.8956854338146751 ], [ -1.281947174297567, 0.5525600661059094, 1.025990180483584, 2.2654701189032784 ], [ -0.48352769245151944, -0.20899155253564422, -1.55337636358312, -0.8796573850150549 ], [ -0.3158640364642741, -1.0832169557073044, -1.3321625423565968, -0.5077187441667648 ], ... ],
    	...
    ]

To produce the following output:

TrainingTester.java:633 executed in 0.04 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

    [
    	[ [ 1.5998662855299735, -2.796499162486697, -14.850697319366075, -1.6574524874325125 ], [ -4.488631715068807, 3.8440246567718446, 1.6027467841475609, -12.053025298966604 ], [ -6.843709890032311, -15.178826157303432, 4.829830274074669, 4.383929879803453 ], [ 2.1818460634295604, 1.4880055814016557, -1.0460497171396295, 3.5285063730031645 ], [ -1.8889607368435395, -5.401929525937269, 1.4651605048999912, -3.7850624828441326 ], [ -1.2592371996728187, -0.2617848125257171, 2.08096013866689, 9.194140394962874 ], [ -1.7907126199132828, 5.628255645701054, -14.205871524982175, -6.856230627409079 ], [ 5.205139512283062, 11.268287744909957, -3.2894429041344186, -12.677141454097397 ], ... ],
    	[ [ 3.025133404891385, -6.506714306337161, -1.0251427221773592, -8.28960143212922 ], [ 11.390015737427543, 4.999082622111739, -8.752815898440074, -2.49742386950179 ], [ -12.422519420118748, 5.418117826127196, 5.52364881161151, -3.721415915492351 ], [ -11.705115325794187, -3.310522370264143, 23.418380233408495, -0.8348894297620476 ], [ 0.26372720268059213, -6.636912759749166, -3.642056450044881, 8.715038765646906 ], [ -4.87137134601692, 4.195380044502114, 2.866915704425282, -3.2523209598776663 ], [ 0.983760951638436, -14.011329958078676, 12.6762763811965, -5.898501451034439 ], [ 4.716448618827781, -4.8768262688993245, -2.444760994803811, 1.8004942936752393 ], ... ],
    	[ [ 8.232241924850173, -3.6238350166215434, 17.475085190700902, -5.666748483360287 ], [ 2.387782154551659, -9.273277640947038, -6.178182533083334, 3.2594144304231323 ], [ 2.0937721523450112, 7.456070439492284, 6.26014646341152, 2.5546200096199327 ], [ 0.4220177069319397, 20.303157854910406, 13.200436924082412, -2.3030123864300567 ], [ -11.89982699380136, -4.659247227875372, 0.38557624742376323, -7.645999804123989 ], [ -1.5638252587034265, 15.315964085998848, 7.183248318748859, 1.4015130771338196 ], [ 5.065607281193776, -0.923700419750408, 14.33424845180366, -0.9920522664936668 ], [ 6.527615993859173, -8.549393823166113, -14.780015975214068, 6.22961201203044 ], ... ],
    	[ [ -6.85695800345915, 4.5522346186871525, 5.766446400912492, -4.541493995176162 ], [ -13.036448501342841, 5.424276280879514, 1.584576183705041, 12.137737874350876 ], [ -3.864468014694692, -11.130606130621205, 3.4473251080502316, -3.6817979680887833 ], [ 0.3523137112414518, -11.110317046402606, -0.8620389179229746, -8.975234251637842 ], [ -0.1884970710593822, -13.738044018066706, 13.079761959331847, 5.343535005432479 ], [ 12.725672689340216, -1.9270514029266823, -1.1043476119627427, 10.897058929674145 ], [ 4.867836473319519, -5.186730710940426, -20.174600940427904, -1.8933158792253084 ], [ 7.520672197678649, 15.38055622354232, 6.501501208327653, 4.91455923472361 ], ... ],
    	[ [ 7.731805101667106, -13.296199988438635, -6.7275868300927515, -9.736551571729299 ], [ 2.8616711217904767, 8.760480739664427, -4.728862645050037, 7.605387727229137 ], [ -11.784507002692084, 5.72585751218195, 2.7299492358492516, -1.3355798748190573 ], [ -7.106656423770542, -5.4707678779014195, 0.46593663082592995, 3.0069017641930604 ], [ 5.384829342792332, 14.486342329360069, -1.379315122946261, 1.7999988371923068 ], [ -9.529730186124548, 14.894480302488219, 6.811317693822734, 1.180973513440314 ], [ -13.877594952329956, -10.77499531317054, -10.827091655439956, 5.388654051628668 ], [ 4.736075008214157, -8.38308429668159, 16.74230946990862, -8.9517211678103 ], ... ],
    	[ [ 11.635045908917727, 2.731125143325464, -11.963060363347395, -2.286545788059052 ], [ -7.730655704249709, -4.144647086691673, 6.004364456337686, 5.211294381851885 ], [ 2.439030360022984, -2.035553584978881, 13.543632190166722, 2.253376125653811 ], [ -12.121083194757139, -4.081811508051279, -9.19354115293509, -2.797028782873324 ], [ -5.1731181925781495, -11.558886251177315, -3.3067893313377676, -11.195229837004177 ], [ 11.343946054610013, 6.643557315197255, 6.7454107280768145, 4.242295620461608 ], [ 3.2998307308133703, 6.863428826566605, 7.087968944122787, 0.05519138583853911 ], [ -18.091833392468786, 12.703747266987635, 9.426608532379687, 9.209848348466956 ], ... ],
    	[ [ 4.990709758163718, -12.224330514851111, -7.392857829871, 14.375106979362217 ], [ 8.359953860475462, 15.744805399134545, -1.3549490901405503, 14.50527098160335 ], [ 4.801155063621069, 0.29078532929354717, -6.439934536444516, -1.8490140480289108 ], [ 4.1642944073283505, 0.48029637449807044, -3.148656212174924, -0.16699071358076067 ], [ 5.212945033706899, 10.938624168532302, 2.8838621140354643, -9.653639939485112 ], [ -19.743089650488812, -1.3158129221093227, -0.6255994820320829, 2.148317662464057 ], [ 3.690584947922567, -4.978459811327592, 18.60691155579108, 0.7908862843186696 ], [ 16.107748231828047, -2.158438452753703, -8.972025813615428, 10.802712517101929 ], ... ],
    	[ [ -4.24620495583269, -5.055460610441203, -5.3257270949125655, -2.99885019559451 ], [ -11.83816532420658, -3.5684241425406524, -1.013633741287981, 12.79717619381264 ], [ 19.95838709422533, -4.0362005211055525, 8.249663027072202, 0.8200563862527286 ], [ 7.356832757486531, 1.1526106305666501, -16.946433090685126, 4.214732241212566 ], [ 8.126219747578043, -11.265041156288204, 10.007694752381942, -22.30680897604613 ], [ -6.6017593297257555, -9.361284874210034, -10.676568792160309, 13.21930562912631 ], [ -5.363862316657808, -4.594667130320217, 10.265203385009281, 1.225300999324689 ], [ -9.54220452331643, 3.953023993711053, -6.7634578594152375, 13.048456673686548 ], ... ],
    	...
    ]

Conjugate Gradient Descent

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

TrainingTester.java:452 executed in 30.54 seconds (0.370 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: 12124468575519
Reset training subject: 12124579645787
Constructing line search parameters: GD
F(0.0) = LineSearchPoint{point=PointSample{avg=139.89239583202956}, derivative=-0.01986180719446971}
New Minimum: 139.89239583202956 > 139.89239583202757
F(1.0E-10) = LineSearchPoint{point=PointSample{avg=139.89239583202757}, derivative=-0.01986180719446954}, evalInputDelta = -1.9895196601282805E-12
New Minimum: 139.89239583202757 > 139.89239583201567
F(7.000000000000001E-10) = LineSearchPoint{point=PointSample{avg=139.89239583201567}, derivative=-0.01986180719446852}, evalInputDelta = -1.389821591146756E-11
New Minimum: 139.89239583201567 > 139.89239583193225
F(4.900000000000001E-9) = LineSearchPoint{point=PointSample{avg=139.89239583193225}, derivative=-0.019861807194461407}, evalInputDelta = -9.731593308970332E-11
New Minimum: 139.89239583193225 > 139.89239583134832
F(3.430000000000001E-8) = LineSearchPoint{point=PointSample{avg=139.89239583134832}, derivative=-0.019861807194411583}, evalInputDelta = -6.812399533373537E-10
New Minimum: 139.89239583134832 > 139.89239582726074
F(2.4010000000000004E-7) = LineSearchPoint{point=PointSample{avg=139.89239582726074}, derivative=-0.019861807194062817}, evalInputDelta = -4.768821781908628E-9
New Minimum: 139.89239582726074 > 139.89239579864784
F(1.6807000000000003E-6) = LineSearchPoint{point=PointSample{avg=139.89239579864784}, derivative=-0.019861807191621436}, evalInputDelta = -3.338172405165096E-8
New Minimum: 139.89239579864784 > 139.89239559835738
F(1.1764900000000001E-5) = LineSearchPoint{point=PointSample{avg=139.89239559835738}, derivative=-0.019861807174531797}, evalInputDelta = -2.3367218204839446E-7
New Minimum: 139.89239559835738 > 139.89239419632435
F(8.235430000000001E-5) = LineSearchPoint{point=PointSample{avg=139.89239419632435}, derivative=-0.01986180705490432}, evalInputDelta = -1.6357052174953424E-6
New Minimum: 139.89239419632435 > 139.89238438209324
F(5.764801000000001E-4) = LineSearchPoint{point=PointSample{avg=139.89238438209324}, derivative=-0.019861806217511956}, evalInputDelta = -1.144993632351543E-5
New Minimum: 139.89238438209324 > 139.89231568248718
F(0.004035360700000001) = LineSearchPoint{point=PointSample{avg=139.89231568248718}, derivative=-0.01986180035576545}, evalInputDelta = -8.014954238433347E-5
New Minimum: 139.89231568248718 > 139.89183478581242
F(0.028247524900000005) = LineSearchPoint{point=PointSample{avg=139.89183478581242}, derivative=-0.019861759323539906}, evalInputDelta = -5.610462171432573E-4
New Minimum: 139.89183478581242 > 139.88846853690634
F(0.19773267430000002) = LineSearchPoint{point=PointSample{avg=139.88846853690634}, derivative=-0.019861472097961054}, evalInputDelta = -0.00392729512321921
New Minimum: 139.88846853690634 > 139.86490615761707
F(1.3841287201) = LineSearchPoint{point=PointSample{avg=139.86490615761707}, derivative=-0.01985946151890914}, evalInputDelta = -0.02748967441249306
New Minimum: 139.86490615761707 > 139.70003629219724
F(9.688901040700001) = LineSearchPoint{point=PointSample{avg=139.70003629219724}, derivative=-0.0198453874655457}, evalInputDelta = -0.19235953983232434
New Minimum: 139.70003629219724 > 138.54921992490495
F(67.8223072849) = LineSearchPoint{point=PointSample{avg=138.54921992490495}, derivative=-0.01974686909200163}, evalInputDelta = -1.3431759071246177
New Minimum: 138.54921992490495 > 130.6538671955484
F(474.7561509943) = LineSearchPoint{point=PointSample{avg=130.6538671955484}, derivative=-0.01905724047719315}, evalInputDelta = -9.238528636481163
New Minimum: 130.6538671955484 > 83.24412833282051
F(3323.2930569601003) = LineSearchPoint{point=PointSample{avg=83.24412833282051}, derivative=-0.014229840173533799}, evalInputDelta = -56.648267499209055
F(23263.0513987207) = LineSearchPoint{point=PointSample{avg=136.40473818936218}, derivative=0.019561961952081673}, evalInputDelta = -3.4876576426673864
136.40473818936218 <= 139.89239583202956
New Minimum: 83.24412833282051 > 23.50228949544537
F(11719.991559377504) = LineSearchPoint{point=PointSample{avg=23.50228949544537}, derivative=-7.589415207398531E-19}, evalInputDelta = -116.3901063365842
Left bracket at 11719.991559377504
Converged to left
Fitness changed from 139.89239583202956 to 23.50228949544537
Iteration 1 complete. Error: 23.50228949544537 Total: 4.5468; Orientation: 0.1032; Line Search: 4.1128
F(0.0) = LineSearchPoint{point=PointSample{avg=23.50228949544537}, derivative=-0.0018097662160478263}
New Minimum: 23.50228949544537 > 10.715725136266746
F(11719.991559377504) = LineSearchPoint{point=PointSample{avg=10.715725136266746}, derivative=-3.7224292523823917E-4}, evalInputDelta = -12.786564359178625
F(82039.94091564252) = LineSearchPoint{point=PointSample{avg=287.79931650983065}, derivative=0.008252896819619287}, evalInputDelta = 264.29702701438526
F(6310.764685818655) = LineSearchPoint{point=PointSample{avg=14.523707636191581}, derivative=-0.0010357152133042026}, evalInputDelta = -8.97858185925379
F(44175.35280073059) = LineSearchPoint{point=PointSample{avg=63.23414487654546}, derivative=0.0036085908031575414}, evalInputDelta = 39.73185538110009
F(3398.1040615946604) = LineSearchPoint{point=PointSample{avg=18.060674835161514}, derivative=-0.001392969522262798}, evalInputDelta = -5.441614660283857
F(23786.72843116262) = LineSearchPoint{point=PointSample{avg=15.15367617167113}, derivative=0.0011078106404473712}, evalInputDelta = -8.348613323774241
15.15367617167113 <= 23.50228949544537
New Minimum: 10.715725136266746 > 10.15087229430613
F(14754.852955865323) = LineSearchPoint{point=PointSample{avg=10.15087229430613}, derivative=-3.290723000082957E-19}, evalInputDelta = -13.351417201139242
Left bracket at 14754.852955865323
Converged to left
Fitness changed from 23.50228949544537 to 10.15087229430613
Iteration 2 complete. Error: 10.15087229430613 Total: 1.6592; Orientation: 0.0916; Line Search: 1.4679
F(0.0) = LineSearchPoint{point=PointSample{avg=10.15087229430613}, derivative=-6.467199211687223E-4}
New Minimum: 10.15087229430613 > 6.0214765473696055
F(14754.852955865323) = LineSearchPoint{point=PointSample{avg=6.0214765473696055}, derivative=8.69860140551289E-5}, evalInputDelta = -4.129395746936524
6.0214765473696055 <= 10.15087229430613
New Minimum: 6.0214765473696055 > 5.9453945826396986
F(13005.561059775264) = LineSearchPoint{point=PointSample{avg=5.9453945826396986}, derivative=4.6375053862172944E-20}, evalInputDelta = -4.205477711666431
Right bracket at 13005.561059775264
Converged to right
Fitness changed from 10.15087229430613 to 5.9453945826396986
Iteration 3 complete. Error: 5.9453945826396986 Total: 0.8748; Orientation: 0.0968; Line Search: 0.6782
F(0.0) = LineSearchPoint{point=PointSample{avg=5.9453945826396986}, derivative=-2.4988526962074845E-4}
New Minimum: 5.9453945826396986 > 4.048078583045674
F(13005.561059775264) = LineSearchPoint{point=PointSample{avg=4.048078583045674}, derivative=-4.188468799564524E-5}, evalInputDelta = -1.8973159995940243
F(91038.92741842684) = LineSearchPoint{point=PointSample{avg=49.472632146156535}, derivative=0.0012061188017549738}, evalInputDelta = 43.527237563516834
F(7002.994416802065) = LineSearchPoint{point=PointSample{avg=4.587618218593951}, derivative=-1.3788495643800056E-4}, evalInputDelta = -1.3577763640457476
F(49020.96091761445) = LineSearchPoint{point=PointSample{avg=12.912048960195655}, derivative=5.341169226584866E-4}, evalInputDelta = 6.966654377555956
F(3770.843147508804) = LineSearchPoint{point=PointSample{avg=5.116822168118757}, derivative=-1.8957740867619192E-4}, evalInputDelta = -0.8285724145209414
F(26395.90203256163) = LineSearchPoint{point=PointSample{avg=4.921028848850699}, derivative=1.7226975699114735E-4}, evalInputDelta = -1.0243657337889998
4.921028848850699 <= 5.9453945826396986
New Minimum: 4.048078583045674 > 3.993232563169319
F(15624.466559659011) = LineSearchPoint{point=PointSample{avg=3.993232563169319}, derivative=6.6280328122649E-20}, evalInputDelta = -1.9521620194703795
Right bracket at 15624.466559659011
Converged to right
Fitness changed from 5.9453945826396986 to 3.993232563169319
Iteration 4 complete. Error: 3.993232563169319 Total: 1.6634; Orien

...skipping 11347 bytes...

=PointSample{avg=0.7076096970356354}, derivative=1.0587911840678754E-22}, evalInputDelta = -0.07043671562587184
Right bracket at 16522.493264603316
Converged to right
Fitness changed from 0.7780464126615072 to 0.7076096970356354
Iteration 14 complete. Error: 0.7076096970356354 Total: 1.9850; Orientation: 0.1022; Line Search: 1.7725
F(0.0) = LineSearchPoint{point=PointSample{avg=0.7076096970356354}, derivative=-8.527212444433998E-6}
New Minimum: 0.7076096970356354 > 0.65023874737525
F(16522.493264603316) = LineSearchPoint{point=PointSample{avg=0.65023874737525}, derivative=1.5826249972969573E-6}, evalInputDelta = -0.05737094966038536
0.65023874737525 <= 0.7076096970356354
New Minimum: 0.65023874737525 > 0.6481920319747876
F(13936.011433521098) = LineSearchPoint{point=PointSample{avg=0.6481920319747876}, derivative=-1.5881867761018131E-21}, evalInputDelta = -0.05941766506084778
Left bracket at 13936.011433521098
Converged to left
Fitness changed from 0.7076096970356354 to 0.6481920319747876
Iteration 15 complete. Error: 0.6481920319747876 Total: 0.8910; Orientation: 0.0986; Line Search: 0.6844
F(0.0) = LineSearchPoint{point=PointSample{avg=0.6481920319747876}, derivative=-6.131141359898378E-6}
New Minimum: 0.6481920319747876 > 0.5985997604625304
F(13936.011433521098) = LineSearchPoint{point=PointSample{avg=0.5985997604625304}, derivative=-9.859985403990556E-7}, evalInputDelta = -0.0495922715122572
F(97552.08003464769) = LineSearchPoint{point=PointSample{avg=1.80680428374146}, derivative=2.988485837659688E-5}, evalInputDelta = 1.1586122517666724
F(7504.006156511361) = LineSearchPoint{point=PointSample{avg=0.6125786896081137}, derivative=-3.3606798417064364E-6}, evalInputDelta = -0.035613342366673906
F(52528.04309557953) = LineSearchPoint{point=PointSample{avg=0.8354794014747642}, derivative=1.3262089267445227E-5}, evalInputDelta = 0.1872873694999766
F(4040.618699659964) = LineSearchPoint{point=PointSample{avg=0.6264322987118643}, derivative=-4.6393543885642545E-6}, evalInputDelta = -0.021759733262923242
F(28284.330897619748) = LineSearchPoint{point=PointSample{avg=0.6224564881122425}, derivative=4.311367439440484E-6}, evalInputDelta = -0.025735543862545063
0.6224564881122425 <= 0.6481920319747876
New Minimum: 0.5985997604625304 > 0.5972831308825094
F(16606.66362229231) = LineSearchPoint{point=PointSample{avg=0.5972831308825094}, derivative=3.8381180422460484E-22}, evalInputDelta = -0.05090890109227819
Right bracket at 16606.66362229231
Converged to right
Fitness changed from 0.6481920319747876 to 0.5972831308825094
Iteration 16 complete. Error: 0.5972831308825094 Total: 1.7045; Orientation: 0.0931; Line Search: 1.5114
F(0.0) = LineSearchPoint{point=PointSample{avg=0.5972831308825094}, derivative=-6.310378107677056E-6}
New Minimum: 0.5972831308825094 > 0.554700575321825
F(16606.66362229231) = LineSearchPoint{point=PointSample{avg=0.554700575321825}, derivative=1.1820083725879757E-6}, evalInputDelta = -0.042582555560684354
0.554700575321825 <= 0.5972831308825094
New Minimum: 0.554700575321825 > 0.5531522103875516
F(13986.775353847393) = LineSearchPoint{point=PointSample{avg=0.5531522103875516}, derivative=2.514629062161204E-22}, evalInputDelta = -0.044130920494957815
Right bracket at 13986.775353847393
Converged to right
Fitness changed from 0.5972831308825094 to 0.5531522103875516
Iteration 17 complete. Error: 0.5531522103875516 Total: 0.8642; Orientation: 0.0911; Line Search: 0.6735
F(0.0) = LineSearchPoint{point=PointSample{avg=0.5531522103875516}, derivative=-4.64286040526385E-6}
New Minimum: 0.5531522103875516 > 0.5154608514949913
F(13986.775353847393) = LineSearchPoint{point=PointSample{avg=0.5154608514949913}, derivative=-7.467105199876831E-7}, evalInputDelta = -0.037691358892560256
F(97907.42747693176) = LineSearchPoint{point=PointSample{avg=1.4336987351354262}, derivative=2.2630188791669315E-5}, evalInputDelta = 0.8805465247478746
F(7531.340575148597) = LineSearchPoint{point=PointSample{avg=0.5260853482797481}, derivative=-2.544933543961298E-6}, evalInputDelta = -0.027066862107803513
F(52719.38402604018) = LineSearchPoint{point=PointSample{avg=0.6954884112115903}, derivative=1.0042627623854011E-5}, evalInputDelta = 0.14233620082403875
F(4055.3372327723214) = LineSearchPoint{point=PointSample{avg=0.5366144075035942}, derivative=-3.513207479947091E-6}, evalInputDelta = -0.016537802883957342
F(28387.36062940625) = LineSearchPoint{point=PointSample{avg=0.5335911851309423}, derivative=3.2647100719534585E-6}, evalInputDelta = -0.0195610252566093
0.5335911851309423 <= 0.5531522103875516
New Minimum: 0.5154608514949913 > 0.5144600303143856
F(16667.388935191175) = LineSearchPoint{point=PointSample{avg=0.5144600303143856}, derivative=9.661469554619363E-22}, evalInputDelta = -0.038692180073165994
Right bracket at 16667.388935191175
Converged to right
Fitness changed from 0.5531522103875516 to 0.5144600303143856
Iteration 18 complete. Error: 0.5144600303143856 Total: 1.6688; Orientation: 0.0919; Line Search: 1.4765
F(0.0) = LineSearchPoint{point=PointSample{avg=0.5144600303143856}, derivative=-4.879788968638062E-6}
New Minimum: 0.5144600303143856 > 0.4814623443777142
F(16667.388935191175) = LineSearchPoint{point=PointSample{avg=0.4814623443777142}, derivative=9.202382477689033E-7}, evalInputDelta = -0.032997685936671406
0.4814623443777142 <= 0.5144600303143856
New Minimum: 0.4814623443777142 > 0.4802455754733864
F(14022.923966955252) = LineSearchPoint{point=PointSample{avg=0.4802455754733864}, derivative=-2.514629062161204E-22}, evalInputDelta = -0.034214454840999164
Left bracket at 14022.923966955252
Converged to left
Fitness changed from 0.5144600303143856 to 0.4802455754733864
Iteration 19 complete. Error: 0.4802455754733864 Total: 0.8683; Orientation: 0.0932; Line Search: 0.6747
F(0.0) = LineSearchPoint{point=PointSample{avg=0.4802455754733864}, derivative=-3.651211511291837E-6}
New Minimum: 0.4802455754733864 > 0.4505279668377001
F(14022.923966955252) = LineSearchPoint{point=PointSample{avg=0.4505279668377001}, derivative=-5.872210304113398E-7}, evalInputDelta = -0.029717608635686343
F(98160.46776868677) = LineSearchPoint{point=PointSample{avg=1.1745105315496818}, derivative=1.7796721854871644E-5}, evalInputDelta = 0.6942649560762953
F(7550.805212975905) = LineSearchPoint{point=PointSample{avg=0.4589048026782766}, derivative=-2.001370483125415E-6}, evalInputDelta = -0.02134077279510982
F(52855.63649083134) = LineSearchPoint{point=PointSample{avg=0.5924703588648894}, derivative=7.897675685873114E-6}, evalInputDelta = 0.11222478339150299
F(4065.818191602411) = LineSearchPoint{point=PointSample{avg=0.46720640081473397}, derivative=-2.7628355730483785E-6}, evalInputDelta = -0.013039174658652453
F(28460.727341216876) = LineSearchPoint{point=PointSample{avg=0.4648228289273537}, derivative=2.567420056412368E-6}, evalInputDelta = -0.015422746546032706
0.4648228289273537 <= 0.4802455754733864
New Minimum: 0.4505279668377001 > 0.4497388807736278
F(16710.450547941553) = LineSearchPoint{point=PointSample{avg=0.4497388807736278}, derivative=0.0}, evalInputDelta = -0.03050669469975864
Right bracket at 16710.450547941553
Converged to right
Fitness changed from 0.4802455754733864 to 0.4497388807736278
Iteration 20 complete. Error: 0.4497388807736278 Total: 1.6477; Orientation: 0.0933; Line Search: 1.4541
F(0.0) = LineSearchPoint{point=PointSample{avg=0.4497388807736278}, derivative=-3.896894156361137E-6}
New Minimum: 0.4497388807736278 > 0.42334881776737454
F(16710.450547941553) = LineSearchPoint{point=PointSample{avg=0.42334881776737454}, derivative=7.38384105355468E-7}, evalInputDelta = -0.02639006300625324
0.42334881776737454 <= 0.4497388807736278
New Minimum: 0.42334881776737454 > 0.4223660587620043
F(14048.53245343666) = LineSearchPoint{point=PointSample{avg=0.4223660587620043}, derivative=-5.823351512373315E-22}, evalInputDelta = -0.0273728220116235
Left bracket at 14048.53245343666
Converged to left
Fitness changed from 0.4497388807736278 to 0.4223660587620043
Iteration 21 complete. Error: 0.4223660587620043 Total: 0.8988; Orientation: 0.0969; Line Search: 0.6949
Final threshold in iteration 21: 0.4223660587620043 (> 0.0) after 30.543s (< 30.000s)

Returns

    0.4223660587620043

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.13789022729245315, -0.3286988947261689, 1.3173348698665068, -0.13076844643756882 ], [ -1.9654995619294708, -0.6285687748834478, -1.5206113102043184, 1.3504445945899803 ], [ -0.017908127203500407, 0.11732281210875736, 0.7012249338627251, 1.4010125578520092 ], [ 0.1922600146893127, -0.031625532672948424, 1.2494536613337575, -0.32564677085853644 ], [ 1.5745323795491424, -0.7659359474161189, 0.980334940535421, 0.33775584301224093 ], [ -0.6660169995559966, 0.3697583262455184, 2.329723173352273, 1.0940979555596217 ], [ 2.0502487827030067, -0.7350051272184457, 2.117135004120241, -1.3839336302577026 ], [ 1.8558854972279395, 1.3285525435775078, -1.3921407092443356, 1.4759941028631725 ], ... ],
    	[ [ 1.4537769972165364, -0.7579573126272781, -2.206071228370044, -1.134997348461678 ], [ 1.2134892136028337, -0.22186724955325057, 1.8597993580277192, 1.7810143187181533 ], [ 0.3044690777913217, 1.52541282997008, 0.8151929952442271, 0.8784777012872109 ], [ -1.2815088757949729, -0.7233457823120159, -0.739923315537567, -1.913733635994105 ], [ 0.5545141181658045, 0.028160031023736203, 2.1969037187727913, -1.6034168842990737 ], [ 0.9389483680329485, 0.4409836745071165, -0.17008891792416408, -0.11703378366706794 ], [ 1.320258271400132, -2.990414952331877E-4, 0.06992326435970295, -1.6939768151937074 ], [ 0.2234539660338301, -1.2955856571609816, 1.851663930693031, 0.9004387958452321 ], ... ],
    	[ [ 0.05464818736998283, 1.578316726512572, -0.35651278654301616, -0.5334349170573903 ], [ -0.5855624132515036, -1.7764036466401099, 0.2667053740430161, 0.5766029653637501 ], [ 0.11929199032315493, -2.0170411819405465, 1.4577706615544772, -1.144988856026081 ], [ 0.7054284551581651, 0.9739513671292598, 1.6665704112126576, -1.2899809675071303 ], [ 1.1120238424133764, 0.13929892443740538, 1.0500402226726027, -0.5925078371489028 ], [ -0.4554448552747316, -0.3104518975955628, 0.543126768451396, -0.3438654415211891 ], [ -0.8294164415905521, 0.28380590478238343, 0.013759993614711492, -0.9867717985426943 ], [ 1.392469219286678, 2.163894614013615, -0.4307017612481948, 0.234054961711963 ], ... ],
    	[ [ -2.020324661710287, -0.392073359401037, 1.859271235991934, -2.3080336044775915 ], [ -0.9894421394784538, -0.8266132419628212, 0.3819871492023819, 0.33714983444953994 ], [ -1.2734948942887945, 0.1761165518803766, -0.787394961951366, 1.4725239953400566 ], [ -0.5563596030119962, 0.47989168850665415, 0.21069078437627894, 1.1781544193319176 ], [ -0.10210868080912658, 0.366446345108104, -0.21800277163906162, 0.2066478885254818 ], [ -1.91555055256072, -0.05176560294073143, -0.34203709940380156, -0.01505829697741325 ], [ 2.3359020540968034, 0.7709196688899983, 1.9305601680678823, 1.056185994040259 ], [ -1.0581335777911043, -1.0798847027245464, -2.3103800627197146, -1.1442931087381172 ], ... ],
    	[ [ 0.4294853667879369, 0.26854329190391607, 0.38376954618624304, 2.0075646900352173 ], [ -1.8393794489786168, -0.2330029631738497, 1.5999402404495444, 1.13682906036446 ], [ 1.7112721954192995, 0.45873410573815226, -1.2912920080263692, -1.566536063175941 ], [ 0.2215093947477847, -0.8615116380622805, 1.1223384134252856, -0.020857432443247087 ], [ -0.9919077060137228, 0.6753983604084758, 1.042388545758198, -1.4539695305204088 ], [ -0.04217082502075465, 0.6943477254686389, -1.5067147193235606, -2.1289542161583297 ], [ 0.189466065963668, -0.9485543535102501, -0.7400673523783519, -0.21637998362146474 ], [ 0.4636756842212985, 0.1201770492524177, -1.3220015752705825, 1.363087152719823 ], ... ],
    	[ [ 0.25459710708125854, 0.5774820273360113, -0.38035192888394176, -0.21018876603613584 ], [ -0.3884997563327087, -0.712860930206476, -1.6204248470449554, 1.7053990320591157 ], [ -0.7644917397496016, 0.8486005715635286, 0.5214846461196818, -0.5659545147546203 ], [ 0.51385885625881, 0.20099507756988177, 0.8123671179631741, -1.116175373111844 ], [ -0.8733792656065623, -1.5474149129293027, -0.7645440047745761, 0.20052601283698163 ], [ -1.2068994957530628, -0.18162246431064277, 0.5640358855770631, 1.5920356476216593 ], [ 1.769186913251645, -0.8568337426512039, 0.11971342099013227, -1.0821020878160659 ], [ -0.42759708283162634, 0.3330679557483436, 1.9061239048094198, -1.601542999342428 ], ... ],
    	[ [ -1.5538672332534087, -2.2663132171820917, 2.818413539792755, -0.30824852426476573 ], [ 0.13342684610358727, 0.6433933305002241, -1.273659154054292, 1.7683082268095731 ], [ 1.5082972157275651, 1.0219685471374582, -0.08275911452076845, -1.858681440513815 ], [ 0.599416884285381, -0.5043810956875525, 0.9430640154826185, 0.69435506369948 ], [ 0.20398565141975594, -0.34753288612980565, -0.46621333276570087, -2.221682161657522 ], [ -1.1771702515951574, -0.7386421034720623, -0.3358766795658798, 1.9966908580617129 ], [ -1.1762408540924423, -1.5664752253670198, -1.1514635342516801, -0.885555808549965 ], [ -1.8966818746666436, 2.226782664033733, 0.6959480340506468, 1.494347896619652 ], ... ],
    	[ [ -0.48354936520981007, 0.09007436209576447, -0.7331396124787058, -1.9335425590345243 ], [ 0.011198892048716966, 0.12256472793899333, -1.7472619893751673, 0.9477672699345615 ], [ -0.06380541183936926, 0.6071282569865917, -2.7386058501828296, -1.2848626487058383 ], [ -0.0717800215013765, 0.46762873167595465, -0.17560366671401242, 0.6768311040731374 ], [ -1.0319709066372291, 1.127107048865633, -1.9838504048113157, 1.9727672425597578 ], [ -1.5139322274700575, 0.4560055451360161, 0.8018106793061518, 2.2668548915957865 ], [ -0.4727604275555348, -0.5336648318787823, -1.186951828257116, -1.1076348764777117 ], [ -0.33591573376297973, -0.7893268868152578, -1.0072339188630948, -0.5236733347550533 ], ... ],
    	...
    ]

To produce the following output:

TrainingTester.java:633 executed in 0.03 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

    [
    	[ [ 1.3284875384817927, -2.820561133627114, -14.554209696900086, -1.7206261204911986 ], [ -4.160721461481244, 3.5032381570262383, 1.8418091482436563, -12.24992161478231 ], [ -6.610115525446349, -15.58918554695069, 4.756546414624589, 4.2196341764106835 ], [ 1.4281135262872613, 2.244281022091081, -1.1325294756873494, 3.2129597492496003 ], [ -2.2549066429690097, -4.741071696403313, 1.7025596877436875, -4.360658186133297 ], [ -0.8103047083566582, 0.09895208297509975, 2.7402691982771747, 8.885515469687364 ], [ -1.3130515341970241, 5.273006682383754, -13.671931827312848, -6.678804664198133 ], [ 5.721590230366157, 10.629176475174086, -2.8895521070015997, -13.19081977920054 ], ... ],
    	[ [ 3.0942071758551526, -6.207891587522784, -1.0923084258582856, -8.407897576788343 ], [ 11.502077248677505, 4.83086856952089, -8.650935369814812, -2.5597117620274186 ], [ -12.063878619181354, 5.17925429779968, 5.34849498246782, -3.7919788615189036 ], [ -11.674888254323209, -3.033812191285477, 23.105146393127935, 0.1038345112847103 ], [ 0.2770798878696046, -5.750599235441745, -3.8653807757396943, 9.152834421458735 ], [ -4.697178508185721, 4.443285973735216, 3.0576065975562683, -3.0158010039274403 ], [ 1.4766944822709582, -13.866903762486787, 13.011819388032736, -6.512421619124799 ], [ 4.3309843123284795, -4.524632871713953, -2.506629161291976, 1.6237215949357489 ], ... ],
    	[ [ 8.08998821907788, -3.6679570430943484, 17.45331114431396, -5.324641040052782 ], [ 2.089560443480136, -9.085418185605183, -5.969025928775404, 3.2236192854099093 ], [ 1.941766546577409, 7.760751340944734, 6.35816669431159, 1.7505630871111126 ], [ 0.8675108062508907, 19.91372876865835, 13.466995698922197, -2.802898978158649 ], [ -11.939754838267845, -4.240217760285554, 0.3578950602774464, -7.559625312975837 ], [ -1.0330192988108189, 15.573010009820022, 6.765769927666643, 1.7412873840166696 ], [ 4.695065974806989, -1.0140592143374885, 14.654912406781257, 0.11154466963951565 ], [ 6.189896553126893, -8.527339235887139, -14.649535894517856, 5.957565832649396 ], ... ],
    	[ [ -6.563364175498472, 4.483682815661904, 5.738981894922788, -4.231125115689333 ], [ -12.830592921765154, 5.54278191858401, 1.3247144694297146, 12.465044436113034 ], [ -4.227564876787419, -10.822368222834559, 3.4379263495177272, -3.151707670673405 ], [ 0.5554305139098683, -11.05399760330423, -0.6342056099190763, -8.990665167917431 ], [ -0.05676225912094159, -13.942246772508089, 13.511482593609555, 4.79644180184586 ], [ 12.25106222365245, -1.8090982312465038, -1.104021545963571, 10.047867717372014 ], [ 4.918558639294031, -5.551788573501921, -20.622227907546627, -2.0225897576339262 ], [ 7.577600311605602, 15.733447762582799, 6.467183939260875, 5.131004023830653 ], ... ],
    	[ [ 8.095107898896917, -13.756560876242986, -6.582797670597235, -9.747686061682739 ], [ 2.4830640220867006, 8.7955654437995, -4.777412658418959, 6.985787225125681 ], [ -12.140618194379728, 5.779434779583363, 2.3665647227169244, -1.4264165843952008 ], [ -6.880574650348335, -5.6572180033636394, 0.5421622533760307, 3.593282875153453 ], [ 5.202645573045889, 14.442039696613726, -0.6651648527463535, 2.425799641579098 ], [ -9.106088916663358, 15.710542261920503, 6.716057453996579, 1.1900019389903893 ], [ -13.387704096706093, -11.11829903151991, -10.285710528959191, 5.375937697961074 ], [ 3.997707601480914, -8.288961709237624, 16.60336896902111, -9.290203641713747 ], ... ],
    	[ [ 11.472267330626323, 2.878512928994203, -11.863921348233514, -2.344739547776267 ], [ -7.910723625634508, -3.936034241634294, 5.764324801825641, 5.177763818996598 ], [ 2.359052685890518, -2.425892212728712, 13.515980789742011, 2.0402986081932655 ], [ -12.08020002644285, -4.362649392636095, -9.361475410131357, -2.876487427441485 ], [ -4.87468753865733, -11.490639561780515, -3.45229729908984, -11.375047917499279 ], [ 11.676000705488127, 6.6822332024403694, 6.980383192848339, 4.193320143003508 ], [ 3.509475863424834, 7.173224482412096, 6.521194841115483, -0.18351338078198912 ], [ -18.29170298690056, 12.678799278480774, 9.287937479754033, 10.18165348346999 ], ... ],
    	[ [ 4.933809410767763, -12.29410317260439, -7.696034776960987, 14.50150851720776 ], [ 8.06880870119283, 15.420287952172908, -1.0478140522721344, 14.733467704684927 ], [ 4.379651430781077, 0.8435436004652912, -6.521065642281298, -2.171676777907036 ], [ 4.883020232595641, 0.24399188082189716, -3.0268759105501286, 0.44074604570498144 ], [ 5.181328217870179, 10.859043774792028, 3.5121435559755048, -9.73256437545734 ], [ -20.066334662359814, -0.9831546793671591, -0.5989099297252208, 1.8743061454189789 ], [ 3.3828368137302607, -4.943549444295683, 18.895851492282375, 0.03726905476988647 ], [ 15.703007132669995, -2.547737125420863, -9.012928398995404, 10.431193839928817 ], ... ],
    	[ [ -4.432010461749465, -5.073668233728286, -5.3431552147063845, -3.2473498421396796 ], [ -11.388285094638988, -3.5215794946035337, -1.64691501751134, 12.996985293890141 ], [ 19.630475413309803, -3.8663889270837055, 8.264737033455742, 1.4055619409143418 ], [ 7.682423492913204, 0.9092586697377173, -17.1287218207674, 4.015841707133618 ], [ 8.19421997344393, -11.724464260588794, 10.024692169159366, -21.942133320249653 ], [ -6.5314970153842165, -9.404950891181613, -10.320809398785801, 13.814745390101361 ], [ -5.386494385971612, -3.952534492412506, 10.185985536665328, 1.5192524352206904 ], [ -9.10613262897399, 4.3161737469528605, -6.544263698856011, 13.16850686126848 ], ... ],
    	...
    ]

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 32.77 seconds (0.616 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: 12155084780914
Reset training subject: 12155184948629
Adding measurement 47157d23 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD
Non-optimal measurement 139.89239583202956 < 139.89239583202956. Total: 1
th(0)=139.89239583202956;dx=-0.01986180719446971
Adding measurement 6cfe090f to history. Total: 1
New Minimum: 139.89239583202956 > 139.849608798641
WOLFE (weak): th(2.154434690031884)=139.849608798641; dx=-0.019858156085489832 evalInputDelta=0.04278703338857781
Adding measurement bce7b50 to history. Total: 2
New Minimum: 139.849608798641 > 139.80682963132824
WOLFE (weak): th(4.308869380063768)=139.80682963132824; dx=-0.01985450497650996 evalInputDelta=0.08556620070132226
Adding measurement 37ec31f2 to history. Total: 3
New Minimum: 139.80682963132824 > 139.63579162283582
WOLFE (weak): th(12.926608140191302)=139.63579162283582; dx=-0.019839900540590462 evalInputDelta=0.25660420919373905
Adding measurement 7633e807 to history. Total: 4
New Minimum: 139.63579162283582 > 138.8676780676367
WOLFE (weak): th(51.70643256076521)=138.8676780676367; dx=-0.01977418057895273 evalInputDelta=1.024717764392875
Adding measurement 63ed718b to history. Total: 5
New Minimum: 138.8676780676367 > 134.81411560692266
WOLFE (weak): th(258.53216280382605)=134.81411560692266; dx=-0.019423674116884834 evalInputDelta=5.078280225106909
Adding measurement 4236716e to history. Total: 6
New Minimum: 134.81411560692266 > 111.12178686354694
END: th(1551.1929768229563)=111.12178686354694; dx=-0.01723300872896045 evalInputDelta=28.77060896848262
Fitness changed from 139.89239583202956 to 111.12178686354694
Iteration 1 complete. Error: 111.12178686354694 Total: 2.1480; Orientation: 0.2160; Line Search: 1.6324
Non-optimal measurement 111.12178686354694 < 111.12178686354694. Total: 7
Rejected: LBFGS Orientation magnitude: 1.636e+03, gradient 1.224e-01, dot -0.972; [00926f54-1190-4abc-ae86-d1b7a530d49b = 1.000/1.000e+00, ec309f84-9f06-4d4d-826d-9424afe64142 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 111.12178686354694, 134.81411560692266, 138.8676780676367, 139.63579162283582, 139.80682963132824, 139.849608798641, 139.89239583202956
Rejected: LBFGS Orientation magnitude: 1.636e+03, gradient 1.224e-01, dot -0.972; [00926f54-1190-4abc-ae86-d1b7a530d49b = 1.000/1.000e+00, ec309f84-9f06-4d4d-826d-9424afe64142 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 111.12178686354694, 134.81411560692266, 138.8676780676367, 139.63579162283582, 139.80682963132824, 139.849608798641
Rejected: LBFGS Orientation magnitude: 1.636e+03, gradient 1.224e-01, dot -0.972; [ec309f84-9f06-4d4d-826d-9424afe64142 = 1.000/1.000e+00, 00926f54-1190-4abc-ae86-d1b7a530d49b = 1.000/1.000e+00]
Orientation rejected. Popping history element from 111.12178686354694, 134.81411560692266, 138.8676780676367, 139.63579162283582, 139.80682963132824
Rejected: LBFGS Orientation magnitude: 1.636e+03, gradient 1.224e-01, dot -0.972; [ec309f84-9f06-4d4d-826d-9424afe64142 = 1.000/1.000e+00, 00926f54-1190-4abc-ae86-d1b7a530d49b = 1.000/1.000e+00]
Orientation rejected. Popping history element from 111.12178686354694, 134.81411560692266, 138.8676780676367, 139.63579162283582
LBFGS Accumulation History: 3 points
Removed measurement 4236716e to history. Total: 6
Removed measurement 63ed718b to history. Total: 5
Removed measurement 7633e807 to history. Total: 4
Removed measurement 37ec31f2 to history. Total: 3
Adding measurement 2bb52a5a to history. Total: 3
th(0)=111.12178686354694;dx=-0.01498384636502758
Adding measurement 3ac5509d to history. Total: 4
New Minimum: 111.12178686354694 > 67.98489839617203
END: th(3341.943960201201)=67.98489839617203; dx=-0.010831600561124869 evalInputDelta=43.136888467374916
Fitness changed from 111.12178686354694 to 67.98489839617203
Iteration 2 complete. Error: 67.98489839617203 Total: 16.5217; Orientation: 15.9751; Line Search: 0.4467
Non-optimal measurement 67.98489839617203 < 67.98489839617203. Total: 5
Rejected: LBFGS Orientation magnitude: 1.255e+03, gradient 8.915e-02, dot -0.979; [ec309f84-9f06-4d4d-826d-9424afe64142 = 1.000/1.000e+00, 00926f54-1190-4abc-ae86-d1b7a530d49b = 1.000/1.000e+00]
Orientation rejected. Popping history element from 67.98489839617203, 111.12178686354694, 139.80682963132824, 139.849608798641, 139.89239583202956
Rejected: LBFGS Orientation magnitude: 1.255e+03, gradient 8.915e-02, dot -0.979; [00926f54-1190-4abc-ae86-d1b7a530d49b = 1.000/1.000e+00, ec309f84-9f06-4d4d-826d-9424afe64142 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 67.98489839617203, 111.12178686354694, 139.80682963132824, 139.849608798641
LBFGS Accumulation History: 3 points
Removed measurement 3ac5509d to history. Total: 4
Removed measurement 2bb52a5a to history. Total: 3
Adding measurement 380818d8 to history. Total: 3
th(0)=67.98489839617203;dx=-0.007947455524100543
Adding measurement 143c5cbb to history. Total: 4
New Minimum: 67.98489839617203 > 26.478502616104862
END: th(7200.000000000001)=26.478502616104862; dx=-0.003582098859251447 evalInputDelta=41.506395780067166
Fitness changed from 67.98489839617203 to 26.478502616104862
Iteration 3 complete. Error: 26.478502616104862 Total: 7.1923; Orientation: 6.6076; Line Search: 0.4844
Non-optimal measurement 26.478502616104862 < 26.478502616104862. Total: 5
Rejected: LBFGS Orientation magnitude: 7.027e+02, gradient 4.399e-02, dot -0.997; [ec309f84-9f06-4d4d-826d-9424afe64142 = 1.000/1.000e+00, 00926f54-1190-4abc-ae86-d1b7a530d49b = 1.000/1.000e+00]
Orientation rejected. Popping history element from 26.478502616104862, 67.98489839617203, 139.80682963132824, 139.849608798641, 139.89239583202956
Rejected: LBFGS Orientation magnitude: 7.027e+02, gradient 4.399e-02, dot -0.997; [ec309f84-9f06-4d4d-826d-9424afe64142 = 1.000/1.000e+00, 00926f54-1190-4abc-ae86-d1b7a530d49b = 1.000/1.000e+00]
Orientation rejected. Popping history element from 26.478502616104862, 67.98489839617203, 139.80682963132824, 139.849608798641
LBFGS Accumulation History: 3 points
Removed measurement 143c5cbb to history. Total: 4
Removed measurement 380818d8 to history. Total: 3
Adding measurement 263ab390 to history. Total: 3
th(0)=26.478502616104862;dx=-0.0019355021974935967
Adding measurement 2d0dc096 to history. Total: 4
New Minimum: 26.478502616104862 > 8.953765001724907
END: th(15511.929768229566)=8.953765001724907; dx=-3.240152031425101E-4 evalInputDelta=17.524737614379955
Fitness changed from 26.478502616104862 to 8.953765001724907
Iteration 4 complete. Error: 8.953765001724907 Total: 6.9100; Orientation: 6.3540; Line Search: 0.4555
Final threshold in iteration 4: 8.953765001724907 (> 0.0) after 32.773s (< 30.000s)

Returns

    8.953765001724907

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.2393165576720394, 0.19160030809196343, 0.22448584239077773, 1.0706871798721562 ], [ -1.525851770731934, -0.6035539563324476, -1.4726620010665201, 1.181140272923978 ], [ -0.2426971571641122, 0.44336314083454326, 1.9424066385576997, 1.0512639138902373 ], [ -0.1562037259093049, 0.42912532432749834, 1.2589732060787724, -0.6159827287266157 ], [ 1.1050486701521203, -0.5905503368687257, 0.3511415710556387, -0.121296802128396 ], [ -0.2602661371875499, 0.7691098207080395, 1.9633007167798842, 0.18280463641938044 ], [ 2.1011032795331874, -0.33554835273172223, 1.8015326090433579, -1.5030138836484384 ], [ 2.2005948160352653, 2.0125415949340977, -0.5463078251722541, 2.3038068355757946 ], ... ],
    	[ [ 0.8657671905536114, -0.8197869683148327, -1.897434324774002, -0.9296557144291637 ], [ 1.7081349512425361, -0.18922719163367918, 1.3593716453284528, 1.5465287479268544 ], [ -0.5517357209478648, 0.3785017859244002, 0.411002749039579, 0.5585157736207459 ], [ -1.426584077682326, -0.6680317791411975, 0.08307870739370049, -2.6619708172957357 ], [ 0.6872975500290832, 0.16105187683143316, 3.0206590785871623, -0.7086855420656752 ], [ 0.362209158425468, 1.16558986031893, 0.43590333189522323, 0.3555744466523229 ], [ 0.29573915701911646, 0.530232807688694, -0.059776324317588975, -0.8941812116937183 ], [ 0.16298798346370874, -1.6217515420553237, 1.354515186044933, 0.5877824165128791 ], ... ],
    	[ [ -0.22832200776161965, 1.1428627457750427, 0.27289490948657374, -0.24041511882036234 ], [ -0.5471779816857513, -1.6451058152011357, 1.0429208541422663, 0.46022305306039457 ], [ 0.448316287123257, -1.9358816263778602, 1.0428124196541482, 0.30047294958149007 ], [ 0.5365128608640453, 1.3220106997764158, 0.8113486908082034, -0.25005947481721547 ], [ 0.480672141437513, -0.27898509109978675, 0.21803491508456058, -1.3610666376710978 ], [ -0.13074821850959964, -0.3741563888720748, -0.6563688858774376, -0.5458512359148788 ], [ -0.35598695364728244, 0.6396550802456733, 0.1355460567324588, -0.8323794404545655 ], [ 0.3173442159957306, 1.983605981450264, -0.4932641052942253, 0.204536380774879 ], ... ],
    	[ [ -1.1072262143080294, -0.6449195787651182, 1.2020035697249474, -2.7625569331853472 ], [ -0.677721111946035, -0.958064121077932, 0.5443462125771776, -0.09176309651303804 ], [ -0.5794383183923211, -0.34215933519762065, 0.4629494731604764, 0.6507832620219639 ], [ -0.5366298889009974, 0.4623827479111241, 0.05561404686386691, 1.0888213373413511 ], [ -0.4844123809810501, 0.6568514508112455, 0.030737236394156847, 0.7502685984864437 ], [ -2.0058309185946044, -0.4409394935667175, -0.4847198530894117, 0.49745943493833744 ], [ 2.0534417702225842, 0.5176435673958876, 1.6694423111437797, 0.4616274354247488 ], [ -1.0136207942409012, -0.428054941808352, -2.1885983822418917, -1.6713670451774867 ], ... ],
    	[ [ -0.5362259077304495, 0.9451712893126052, 0.31576534762842806, 1.1864403424755934 ], [ -1.8546845347534762, -0.39036601716337427, 1.315777727353368, 1.0889428659325793 ], [ 1.711776450238557, -0.057074054024107965, -0.9746515757607697, -1.8989976358424108 ], [ 0.83968438833592, -1.698481577826176, 1.4624926479271423, -0.6859685015963332 ], [ -0.7948897335817413, 0.7976437146792713, 1.0755318353008987, -1.4474689386826227 ], [ 0.5280239095870769, 0.7170085899750633, -1.058027575846445, -2.1256302964939966 ], [ -0.31371912002613156, -0.3231884176349832, 0.29026267427490393, -0.0991120751193208 ], [ 0.2182876696909689, 0.28857070100847926, -1.3869701193203117, 2.1133415909861024 ], ... ],
    	[ [ 0.264253399647891, 0.6443938723464637, -1.1320873925190291, 0.05195651987857364 ], [ -0.6357257858503105, -0.04811171179977353, -1.340502612502359, 1.401547803357804 ], [ -1.1914560520901822, 0.39144753785136077, 1.5931146101291243, -0.06585577153927585 ], [ 0.5254260980793362, 0.8669169654058521, 1.167124398480602, -0.4878793689349049 ], [ -0.026416796030578005, -1.41937859087717, -0.7868460409865546, 0.07241176361835816 ], [ -1.5473098785398327, -0.48716729619608967, -0.17674786608415366, 1.3799124478380518 ], [ 2.3155904880602263, -1.3399664293414988, -0.9306913211399525, -1.7512210500098495 ], [ 0.24024890557558903, 1.597025157155305, 2.2453341123643122, -1.8295212102996403 ], ... ],
    	[ [ -1.5603940833364365, -2.130784562679567, 2.4222318360629638, -0.6520518629667735 ], [ -0.5168435918026912, 0.9252208006582002, -0.9076443662878997, 1.68014306576484 ], [ 1.1897957340582657, 0.2847380251538686, -0.15853956685051745, -1.300094967332088 ], [ 1.4312746094890776, -0.5543535539696351, 1.4465370885030762, -0.1979307617776303 ], [ 0.10445511026228224, -0.41491775881237314, -0.6700214649747679, -1.5967731510666545 ], [ -1.0179528013607144, 0.20503635350399751, -0.8149964290389148, 1.698693449788187 ], [ -1.2722141991062417, -1.2572260660959784, -1.1342311541514625, -0.5844508120338499 ], [ -1.3115748295363914, 1.5393877745649207, 0.9344494007236523, 0.6092596839595328 ], ... ],
    	[ [ -0.6442632695668209, -0.22849543944993103, -1.352077097756338, -1.742225647616623 ], [ -0.18562201009518095, 0.005857568764476587, -2.418243837727799, 0.8897979386742201 ], [ -1.0659887155971484, 0.5119163428300424, -1.582611438111398, -0.9789981541931247 ], [ 0.3540987226971418, -0.4383731333897759, 0.06361150657965858, 0.7836972968375303 ], [ -0.08426245679610578, 0.5776531507602533, -2.0926533162435503, 1.8140112567711186 ], [ -1.0097117781276364, -0.45687470590858703, 0.1892190734763931, 1.4936063603186769 ], [ -0.4247252765534381, -1.3937512194124406, 0.233686164813707, -1.624571042232463 ], [ -0.35774626035438767, 0.0033335184639177173, 0.8715279753899852, 0.7329006814307476 ], ... ],
    	...
    ]

To produce the following output:

TrainingTester.java:633 executed in 0.03 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

    [
    	[ [ 5.796432881870582, -1.9373251138396002, -14.015106708162842, -0.48469611203219887 ], [ -2.43216330520447, -2.168435862647776, 5.092815462070008, -14.660841786499955 ], [ -6.881875360116727, -12.819504053280204, 5.451689688521049, 4.969292705069461 ], [ -2.4007648841251514, 6.14590231880332, 1.3270573530905878, 2.1036233103039383 ], [ -3.4033226001184738, 0.41442701757160655, 3.8258738571047646, -3.8299546263093593 ], [ -1.6944238706205488, 1.4531826114929465, 3.9045158577751216, 9.78411216555539 ], [ 1.9896180749672336, 7.4592483893119415, -12.83599076585192, -4.70313292645872 ], [ 5.508210824956668, 5.8104838533508625, -1.3171789497850936, -15.864776587147793 ], ... ],
    	[ [ 1.3624373032488788, 0.9018432309337736, -2.688878155762394, -5.189812859387044 ], [ 10.778703664169964, 4.825152811005881, -8.275105175228406, -4.7007302618846705 ], [ -11.620498184316936, 5.324805076202324, 5.838461054281123, -4.575483858036679 ], [ -14.597070444087251, -3.81316371109427, 23.4883474916801, 1.5150899075158577 ], [ 0.8097435901325687, -5.178260006132449, -7.177584262369584, 12.292839337318577 ], [ -0.8530740300654439, 5.722168126849693, 1.8352194244291575, -3.015764880603126 ], [ 2.034484302854183, -15.824035992914169, 13.138660723177752, -8.384718952288766 ], [ 5.176311554773799, -3.131738778233399, -4.733221888269003, 5.4745284819634 ], ... ],
    	[ [ 4.18335133678192, -6.6361719558072485, 15.042047485163867, -3.8470897549947245 ], [ -0.0045844024898307675, -8.46030434079332, -8.684046620038117, 2.1710398236641613 ], [ 3.0087558920587316, 6.168178058848477, 2.0477363801209956, -3.8032226125511217 ], [ 5.583721150087391, 15.179782991848157, 13.925898151800146, -5.021482115469193 ], [ -10.452066070298141, -1.6734124255958556, -0.456060353441739, -6.52263837816618 ], [ 3.6133836065933034, 14.094099293873251, 3.2188881317145692, 2.7829976021063136 ], [ 3.6266042732604076, -2.2511162105338545, 13.48164911717397, 3.810255116231072 ], [ 4.868581735407766, -3.960784173676602, -12.445263551479872, 7.558341299615808 ], ... ],
    	[ [ -6.33326689296136, 5.703751998888058, 8.25109677679967, -2.100251215950162 ], [ -10.07880940282283, 3.6059872919652625, 5.034859483375403, 11.321935749635028 ], [ -9.108530284746545, -11.227560171366518, 1.3400233886023807, -1.4422424334718225 ], [ -2.0844035913544685, -8.73478880347013, -1.8802721072592634, -11.011789391091083 ], [ -2.514949142061744, -16.25703643270206, 12.74467295781285, 3.970113621251448 ], [ 7.649045089612632, -0.5760690407062071, -0.04350874108831522, 9.44128600301193 ], [ 4.818996172952733, -2.330045910382917, -19.315424161924774, 0.9192904347513281 ], [ 8.898286049524854, 19.206083744417317, 7.2016895944811035, 4.676696500125908 ], ... ],
    	[ [ 7.451400817580807, -11.008585829896651, -0.20411057700583554, -7.331711418055398 ], [ -1.4631436204385182, 8.708268772899832, -3.979823343693342, 5.500492516402697 ], [ -12.440723176470936, 5.3149469292058145, 4.1215975876909425, -5.3009537406430995 ], [ -8.132845191977177, -4.576761283705947, 2.679477633357847, 5.985251738943314 ], [ 5.063822643982234, 14.345080228912607, -2.703205744104626, 3.812456423162822 ], [ -9.547123476449752, 14.273601836133947, 6.31316262909227, 2.981816442646039 ], [ -13.17539007419403, -11.20109069870167, -13.426618821619563, 6.085000427846372 ], [ 1.4166712303106355, -11.191204963424903, 17.45639648630735, -11.217237703490712 ], ... ],
    	[ [ 14.225636395941923, 4.093552801567208, -10.206365836788738, -3.0754378347754896 ], [ -7.022589833214826, -0.788086952547198, 8.437399124825111, 5.075891180716248 ], [ 0.723885437488634, -1.2472357341744602, 12.239067847062005, 4.379719165642814 ], [ -12.128522290567243, -7.735337710204803, -7.73337835415855, -6.869915881903622 ], [ -3.6543973741247697, -13.104595680609775, -5.805074016041693, -12.967661005532715 ], [ 12.337343398709786, 7.4193093449718095, 9.567817578922089, 6.515937285096536 ], [ 6.851327566786447, 9.549596324064838, 5.183496750075846, 1.4341219332262731 ], [ -15.284870589893387, 11.130809092036385, 9.28609292000701, 9.765001795954927 ], ... ],
    	[ [ 6.223272876810229, -10.019202733017154, -6.27772003724708, 14.86721071108801 ], [ 10.614883842828814, 14.919018572900981, -3.212065566310038, 14.205539163994585 ], [ 1.6907094159055969, 3.8537314511440552, -5.744243409419377, -2.254555036496885 ], [ 4.566922632228444, 1.2461785219833101, -4.697912010003495, -1.1121708809137159 ], [ 5.248409961914042, 8.210429196342357, 6.194669832027459, -9.972654340576197 ], [ -19.81485190723047, 0.6928827757397948, 0.3455233727655945, -4.558689584704876 ], [ 0.989008727951146, -1.5806905439644954, 19.252337048331434, -5.84698064401845 ], [ 11.345480498419194, -1.9820766335035658, -11.04110277234509, 9.239214498340269 ], ... ],
    	[ [ -2.4703579065271253, -2.4259018686652984, -3.6093064835507365, -4.836759635232102 ], [ -9.21386200276882, -4.017531538331425, 0.7782781257842154, 13.10789291506866 ], [ 15.529470008538178, -2.7468544129083923, 8.023308030748751, 3.8266867612861204 ], [ 7.989842000646301, -2.5762461416139746, -16.877171914576433, 3.177674922483652 ], [ 3.4730857101856363, -11.736595678929907, 11.937398299362727, -19.30644670384961 ], [ -4.31551905590852, -8.124979729889146, -6.123415817129445, 15.11069793449505 ], [ -4.181952525229105, -0.5677862433143761, 10.980776708222624, 1.9340806033406175 ], [ -9.028533801618023, 2.581186002597285, -6.462472565903076, 12.844986844453583 ], ... ],
    	...
    ]

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

    return TestUtil.compare(title + " vs Iteration", runs);
Logging
Plotting range=[1.0, -0.8857170670881895], [38.0, 2.045799216339521]; valueStats=DoubleSummaryStatistics{count=63, sum=515.022176, min=0.130102, average=8.174955, max=111.121787}
Plotting 38 points for GD
Plotting 21 points for CjGD
Plotting 4 points for LBFGS

Returns

Result

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

    return TestUtil.compareTime(title + " vs Time", runs);
Logging
Plotting range=[0.0, -0.8857170670881895], [30.624, 2.045799216339521]; valueStats=DoubleSummaryStatistics{count=63, sum=515.022176, min=0.130102, average=8.174955, max=111.121787}
Plotting 38 points for GD
Plotting 21 points for CjGD
Plotting 4 points for LBFGS

Returns

Result

Model Learning

In this apply, attempt to train a network to emulate a randomized network given an example input/output. The target state is:

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

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

Returns

    

Gradient Descent

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

TrainingTester.java:480 executed in 9.55 seconds (0.000 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: 12188358388638
Reset training subject: 12188522844539
Constructing line search parameters: GD
th(0)=143.49156505659928;dx=-190.9534410314659
New Minimum: 143.49156505659928 > 26.983446325717097
WOLF (strong): th(2.154434690031884)=26.983446325717097; dx=82.79688444616696 evalInputDelta=116.50811873088219
New Minimum: 26.983446325717097 > 11.515355989091715
END: th(1.077217345015942)=11.515355989091715; dx=-54.078278292649514 evalInputDelta=131.97620906750757
Fitness changed from 143.49156505659928 to 11.515355989091715
Iteration 1 complete. Error: 11.515355989091715 Total: 0.8349; Orientation: 0.0004; Line Search: 0.3785
th(0)=11.515355989091715;dx=-15.320180418020556
New Minimum: 11.515355989091715 > 3.406819550917559
WOLF (strong): th(2.3207944168063896)=3.406819550917559; dx=8.332455542904558 evalInputDelta=8.108536438174156
New Minimum: 3.406819550917559 > 0.5994745848960155
END: th(1.1603972084031948)=0.5994745848960155; dx=-3.493862437557989 evalInputDelta=10.9158814041957
Fitness changed from 11.515355989091715 to 0.5994745848960155
Iteration 2 complete. Error: 0.5994745848960155 Total: 0.4640; Orientation: 0.0004; Line Search: 0.3466
th(0)=0.5994745848960155;dx=-0.7972705206107984
New Minimum: 0.5994745848960155 > 0.2631468677262814
WOLF (strong): th(2.5000000000000004)=0.2631468677262814; dx=0.5282083468750123 evalInputDelta=0.3363277171697341
New Minimum: 0.2631468677262814 > 0.017098580221831958
END: th(1.2500000000000002)=0.017098580221831958; dx=-0.13453108686789353 evalInputDelta=0.5823760046741835
Fitness changed from 0.5994745848960155 to 0.017098580221831958
Iteration 3 complete. Error: 0.017098580221831958 Total: 0.4623; Orientation: 0.0004; Line Search: 0.3466
th(0)=0.017098580221831958;dx=-0.02272888470763526
New Minimum: 0.017098580221831958 > 0.010671547032871665
WOLF (strong): th(2.6930433625398553)=0.010671547032871665; dx=0.01795582143033338 evalInputDelta=0.006427033188960292
New Minimum: 0.010671547032871665 > 1.8935389963419373E-4
END: th(1.3465216812699277)=1.8935389963419373E-4; dx=-0.0023865316386509415 evalInputDelta=0.016909226322197764
Fitness changed from 0.017098580221831958 to 1.8935389963419373E-4
Iteration 4 complete. Error: 1.8935389963419373E-4 Total: 0.4648; Orientation: 0.0004; Line Search: 0.3486
th(0)=1.8935389963419373E-4;dx=-2.5149467828699114E-4
New Minimum: 1.8935389963419373E-4 > 1.6257855268378375E-4
WOLF (strong): th(2.9009930210079875)=1.6257855268378375E-4; dx=2.330352426685579E-4 evalInputDelta=2.6775346950409985E-5
New Minimum: 1.6257855268378375E-4 > 2.6398626378875514E-7
END: th(1.4504965105039938)=2.6398626378875514E-7; dx=-9.229717809216417E-6 evalInputDelta=1.8908991337040498E-4
Fitness changed from 1.8935389963419373E-4 to 2.6398626378875514E-7
Iteration 5 complete. Error: 2.6398626378875514E-7 Total: 0.4646; Orientation: 0.0004; Line Search: 0.3488
th(0)=2.6398626378875514E-7;dx=-3.4980884098576774E-7
Armijo: th(3.125000000000001)=3.0254730360519247E-7; dx=3.744879064682896E-7 evalInputDelta=-3.856103981643733E-8
New Minimum: 2.6398626378875514E-7 > 3.3836672274125536E-10
WOLF (strong): th(1.5625000000000004)=3.3836672274125536E-10; dx=1.2339532741298208E-8 evalInputDelta=2.636478970660139E-7
END: th(0.5208333333333335)=1.1323064988357706E-7; dx=-2.2909271641008237E-7 evalInputDelta=1.5075561390517808E-7
Fitness changed from 2.6398626378875514E-7 to 3.3836672274125536E-10
Iteration 6 complete. Error: 3.3836672274125536E-10 Total: 0.5770; Orientation: 0.0004; Line Search: 0.4620
th(0)=3.3836672274125536E-10;dx=-4.493818689473836E-10
New Minimum: 3.3836672274125536E-10 > 2.198848182871079E-11
END: th(1.122101401058273)=2.198848182871079E-11; dx=-1.145212517756525E-10 evalInputDelta=3.163782409125446E-10
Fitness changed from 3.3836672274125536E-10 to 2.198848182871079E-11
Iteration 7 complete. Error: 2.198848182871079E-11 Total: 0.3487; Orientation: 0.0004; Line Search: 0.2337
Low gradient: 5.403282019313929E-6
th(0)=2.198848182871079E-11;dx=-2.919545658024121E-11
New Minimum: 2.198848182871079E-11 > 8.048790998814984E-12
WOLF (strong): th(2.417494184173323)=8.048790998814984E-12; dx=1.766310963925598E-11 evalInputDelta=1.3939690829895805E-11
New Minimum: 8.048790998814984E-12 > 8.585974994968758E-13
END: th(1.2087470920866614)=8.585974994968758E-13; dx=-5.766173470733724E-12 evalInputDelta=2.1129884329213913E-11
Fitness changed from 2.198848182871079E-11 to 8.585974994968758E-13
Iteration 8 complete. Error: 8.585974994968758E-13 Total: 0.4624; Orientation: 0.0004; Line Search: 0.3469
Low gradient: 1.0675324191171098E-6
th(0)=8.585974994968758E-13;dx=-1.1396254658660286E-12
New Minimum: 8.585974994968758E-13 > 4.554846388984824E-13
WOLF (strong): th(2.6041666666666674)=4.554846388984824E-13; dx=8.300347889265928E-13 evalInputDelta=4.031128605983935E-13
New Minimum: 4.554846388984824E-13 > 1.5875621683011562E-14
END: th(1.3020833333333337)=1.5875621683011562E-14; dx=-1.547953385165353E-13 evalInputDelta=8.427218778138643E-13
Fitness changed from 8.585974994968758E-13 to 1.5875621683011562E-14
Iteration 9 complete. Error: 1.5875621683011562E-14 Total: 0.4637; Orientation: 0.0005; Line Search: 0.3472
Low gradient: 1.4512395085125819E-7
th(0)=1.5875621683011562E-14;dx=-2.10609611106784E-14
New Minimum: 1.5875621683011562E-14 > 1.1764457029419271E-14
WOLF (strong): th(2.805253502645683)=1.1764457029419271E-14; dx=1.812991430923555E-14 evalInputDelta=4.111164653592291E-15
New Minimum: 1.1764457029419271E-14 > 7.74967872146158E-17
END: th(1.4026267513228414)=7.74967872146158E-17; dx=-1.4655234047295313E-15 evalInputDelta=1.5798124895796945E-14
Fitness changed from 1.5875621683011562E-14 to 7.74967872146158E-17
Iteration 10 complete. Error: 7.74967872146158E-17 Total: 0.6127; Orientation: 0.0005; Line Search: 0.4973
Low gradient: 1.0134247199733718E-8
th(0)=7.74967872146158E-17;dx=-1.0270296630531072E-16
Armijo: th(3.021867730216654)=7.787604674679895E-17; dx=1.0295397631960278E-16 evalInputDelta=-3.792595321831519E-19
New Minimum: 7.74967872146158E-17 > 2.907156347936791E-21
WOLF (strong): th(1.510933865108327)=2.907156347936791E-21; dx=1.2550496320395735E-19 evalInputDelta=7.749388005826786E-17
END: th(0.5036446217027757)=3.4402492424142565E-17; dx=-6.842680994277792E-17 evalInputDelta=4.3094294790473235E-17
Fitness changed from 7.74967872146158E-17 to 2.907156347936791E-21
Iteration 11 complete. Error: 2.907156347936791E-21 Total: 0.5801; Orientation: 0.0005; Line Search: 0.4637
Zero gradient: 6.224432089386763E-11
th(0)=2.907156347936791E-21;dx=-3.8743554835387656E-21
New Minimum: 2.907156347936791E-21 > 2.231178183930949E-22
END: th(1.0850694444444449)=2.231178183930949E-22; dx=-1.0728667137764618E-21 evalInputDelta=2.6840385295436962E-21
Fitness changed from 2.907156347936791E-21 to 2.231178183930949E-22
Iteration 12 complete. Error: 2.231178183930949E-22 Total: 0.3473; Orientation: 0.0005; Line Search: 0.2317
Zero gradient: 1.7240564020028782E-11
th(0)=2.231178183930949E-22;dx=-2.97237047728711E-22
New Minimum: 2.231178183930949E-22 > 6.929837961992105E-23
WOLF (strong): th(2.337711252204736)=6.929837961992105E-23; dx=1.656389506595394E-22 evalInputDelta=1.5381943877317384E-22
New Minimum: 6.929837961992105E-23 > 1.0949451781594075E-23
END: th(1.168855626102368)=1.0949451781594075E-23; dx=-6.580030545253306E-23 evalInputDelta=2.121683666115008E-22
Fitness changed from 2.231178183930949E-22 to 1.0949451781594075E-23
Iteration 13 complete. Error: 1.0949451781594075E-23 Total: 0.4651; Orientation: 0.0004; Line Search: 0.3475
Zero gradient: 3.818298001903608E-12
th(0)=1.0949451781594075E-23;dx=-1.4579399631341085E-23
New Minimum: 1.0949451781594075E-23 > 5.013661995824046E-24
WOLF (strong): th(2.5182231085138786)=5.013661995824046E-24; dx=9.865113188249602E-24 evalInputDelta=5.935789785770029E-24
New Minimum: 5.013661995824046E-24 > 2.869604130070348E-25
END: th(1.2591115542569393)=2.869604130070348E-25; dx=-2.3569879081332984E-24 evalInputDelta=1.066249136858704E-23
Fitness changed from 1.0949451781594075E-23 to 2.869604130070348E-25
Iteration 14 complete. Error: 2.869604130070348E-25 Total: 0.4612; Orientation: 0.0005; Line Search: 0.3453
Zero gradient: 6.178954825253526E-13
th(0)=2.869604130070348E-25;dx=-3.8179482732523824E-25
New Minimum: 2.869604130070348E-25 > 1.8583763874834145E-25
WOLF (strong): th(2.7126736111111125)=1.8583763874834145E-25; dx=3.072376131295277E-25 evalInputDelta=1.0112277425869335E-25
New Minimum: 1.8583763874834145E-25 > 2.75908375633223E-27
END: th(1.3563368055555562)=2.75908375633223E-27; dx=-3.725648926038678E-26 evalInputDelta=2.842013292507026E-25
Fitness changed from 2.869604130070348E-25 to 2.75908375633223E-27
Iteration 15 complete. Error: 2.75908375633223E-27 Total: 0.4618; Orientation: 0.0004; Line Search: 0.3469
Zero gradient: 6.048341567634447E-14
th(0)=2.75908375633223E-27;dx=-3.658243571877472E-27
New Minimum: 2.75908375633223E-27 > 2.448001215160342E-27
WOLF (strong): th(2.9221390652559203)=2.448001215160342E-27; dx=3.445235092398115E-27 evalInputDelta=3.110825411718881E-28
New Minimum: 2.448001215160342E-27 > 6.0907937138098774E-30
END: th(1.4610695326279601)=6.0907937138098774E-30; dx=-1.0854052039021409E-28 evalInputDelta=2.75299296261842E-27
Fitness changed from 2.75908375633223E-27 to 6.0907937138098774E-30
Iteration 16 complete. Error: 6.0907937138098774E-30 Total: 0.4641; Orientation: 0.0005; Line Search: 0.3492
Zero gradient: 1.9122691704274545E-15
th(0)=6.0907937138098774E-30;dx=-3.656773380167305E-30
Armijo: th(3.1477788856423485)=6.2140305550863485E-30; dx=3.722350657255879E-30 evalInputDelta=-1.2323684127647112E-31
New Minimum: 6.0907937138098774E-30 > 4.254912438850331E-32
WOLF (strong): th(1.5738894428211743)=4.254912438850331E-32; dx=1.5932979525556756E-32 evalInputDelta=6.048244589421374E-30
END: th(0.5246298142737248)=4.4754762994966646E-30; dx=-2.623114445737665E-30 evalInputDelta=1.6153174143132128E-30
Fitness changed from 6.0907937138098774E-30 to 4.254912438850331E-32
Iteration 17 complete. Error: 4.254912438850331E-32 Total: 0.5792; Orientation: 0.0004; Line Search: 0.4633
Zero gradient: 2.9463170109108996E-17
th(0)=4.254912438850331E-32;dx=-8.680783928782938E-34
New Minimum: 4.254912438850331E-32 > 6.909911372293018E-33
END: th(1.130280671296297)=6.909911372293018E-33; dx=-1.5329093276549706E-34 evalInputDelta=3.563921301621029E-32
Fitness changed from 4.254912438850331E-32 to 6.909911372293018E-33
Iteration 18 complete. Error: 6.909911372293018E-33 Total: 0.3450; Orientation: 0.0004; Line Search: 0.2295
Zero gradient: 1.1917657288581682E-17
th(0)=6.909911372293018E-33;dx=-1.4203055524808408E-34
New Minimum: 6.909911372293018E-33 > 0.0
END: th(2.435115887713267)=0.0; dx=0.0 evalInputDelta=6.909911372293018E-33
Fitness changed from 6.909911372293018E-33 to 0.0
Iteration 19 complete. Error: 0.0 Total: 0.3462; Orientation: 0.0006; Line Search: 0.2309
Zero gradient: 0.0
th(0)=0.0;dx=0.0 (ERROR: Starting derivative negative)
Fitness changed from 0.0 to 0.0
Static Iteration Total: 0.3450; Orientation: 0.0004; Line Search: 0.2299
Iteration 20 failed. Error: 0.0
Previous Error: 0.0 -> 0.0
Optimization terminated 20
Final threshold in iteration 20: 0.0 (> 0.0) after 9.550s (< 30.000s)

Returns

    0.0

Training Converged

Conjugate Gradient Descent

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

TrainingTester.java:452 executed in 10.75 seconds (0.000 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: 12197935335681
Reset training subject: 12198049901034
Constructing line search parameters: GD
F(0.0) = LineSearchPoint{point=PointSample{avg=143.49156505659928}, derivative=-190.9534410314659}
New Minimum: 143.49156505659928 > 143.49156503750396
F(1.0E-10) = LineSearchPoint{point=PointSample{avg=143.49156503750396}, derivative=-190.9534410187597}, evalInputDelta = -1.9095324432782945E-8
New Minimum: 143.49156503750396 > 143.4915649229319
F(7.000000000000001E-10) = LineSearchPoint{point=PointSample{avg=143.4915649229319}, derivative=-190.9534409425209}, evalInputDelta = -1.3366738471631834E-7
New Minimum: 143.4915649229319 > 143.49156412092742
F(4.900000000000001E-9) = LineSearchPoint{point=PointSample{avg=143.49156412092742}, derivative=-190.95344040885425}, evalInputDelta = -9.35671863544485E-7
New Minimum: 143.49156412092742 > 143.49155850689635
F(3.430000000000001E-8) = LineSearchPoint{point=PointSample{avg=143.49155850689635}, derivative=-190.95343667318252}, evalInputDelta = -6.549702931124557E-6
New Minimum: 143.49155850689635 > 143.49151920868175
F(2.4010000000000004E-7) = LineSearchPoint{point=PointSample{avg=143.49151920868175}, derivative=-190.95341052348505}, evalInputDelta = -4.584791753359241E-5
New Minimum: 143.49151920868175 > 143.4912441213304
F(1.6807000000000003E-6) = LineSearchPoint{point=PointSample{avg=143.4912441213304}, derivative=-190.95322747559766}, evalInputDelta = -3.209352688884337E-4
New Minimum: 143.4912441213304 > 143.48931851725453
F(1.1764900000000001E-5) = LineSearchPoint{point=PointSample{avg=143.48931851725453}, derivative=-190.95194614038422}, evalInputDelta = -0.0022465393447532733
New Minimum: 143.48931851725453 > 143.47583965051803
F(8.235430000000001E-5) = LineSearchPoint{point=PointSample{avg=143.47583965051803}, derivative=-190.94297679389425}, evalInputDelta = -0.015725406081259052
New Minimum: 143.47583965051803 > 143.38150531130466
F(5.764801000000001E-4) = LineSearchPoint{point=PointSample{avg=143.38150531130466}, derivative=-190.88019136846307}, evalInputDelta = -0.11005974529462037
New Minimum: 143.38150531130466 > 142.72203360597092
F(0.004035360700000001) = LineSearchPoint{point=PointSample{avg=142.72203360597092}, derivative=-190.4406933904464}, evalInputDelta = -0.7695314506283637
New Minimum: 142.72203360597092 > 138.14829645747218
F(0.028247524900000005) = LineSearchPoint{point=PointSample{avg=138.14829645747218}, derivative=-187.3642075443286}, evalInputDelta = -5.3432685991271
New Minimum: 138.14829645747218 > 108.21781107100583
F(0.19773267430000002) = LineSearchPoint{point=PointSample{avg=108.21781107100583}, derivative=-165.82880662150558}, evalInputDelta = -35.27375398559346
New Minimum: 108.21781107100583 > 0.9024713639624418
F(1.3841287201) = LineSearchPoint{point=PointSample{avg=0.9024713639624418}, derivative=-15.081000161741976}, evalInputDelta = -142.58909369263685
F(9.688901040700001) = LineSearchPoint{point=PointSample{avg=4257.399935327498}, derivative=1040.1536450566018}, evalInputDelta = 4113.908370270899
F(0.7453000800538463) = LineSearchPoint{point=PointSample{avg=36.46411208530159}, derivative=-96.25289594776848}, evalInputDelta = -107.02745297129769
F(5.217100560376924) = LineSearchPoint{point=PointSample{avg=876.4861947299918}, derivative=471.9503745544167}, evalInputDelta = 732.9946296733925
F(0.40131542772130185) = LineSearchPoint{point=PointSample{avg=77.09106197458411}, derivative=-139.9608398325518}, evalInputDelta = -66.40050308201518
F(2.809207994049113) = LineSearchPoint{point=PointSample{avg=108.43451225853644}, derivative=165.99476736093308}, evalInputDelta = -35.05705279806284
108.43451225853644 <= 143.49156505659928
New Minimum: 0.9024713639624418 > 0.0075003233703577485
F(1.5028172727150266) = LineSearchPoint{point=PointSample{avg=0.0075003233703577485}, derivative=-2.8917840344533374E-13}, evalInputDelta = -143.48406473322893
Left bracket at 1.5028172727150266
Converged to left
Fitness changed from 143.49156505659928 to 0.0075003233703577485
Iteration 1 complete. Error: 0.0075003233703577485 Total: 2.7714; Orientation: 0.0004; Line Search: 2.4276
F(0.0) = LineSearchPoint{point=PointSample{avg=0.0075003233703577485}, derivative=-0.009998630859711713}
New Minimum: 0.0075003233703577485 > 9.702200592916928E-7
F(1.5028172727150266) = LineSearchPoint{point=PointSample{avg=9.702200592916928E-7}, derivative=1.823831770967459E-5}, evalInputDelta = -0.007499353150298457
9.702200592916928E-7 <= 0.0075003233703577485
Converged to right
Fitness changed from 0.0075003233703577485 to 9.702200592916928E-7
Iteration 2 complete. Error: 9.702200592916928E-7 Total: 0.3448; Orientation: 0.0004; Line Search: 0.2301
F(0.0) = LineSearchPoint{point=PointSample{avg=9.702200592916928E-7}, derivative=-1.298402767473548E-6}
New Minimum: 9.702200592916928E-7 > 1.7788812968006064E-10
F(1.5028172727150266) = LineSearchPoint{point=PointSample{avg=1.7788812968006064E-10}, derivative=7.437872706850237E-9}, evalInputDelta = -9.700421711620128E-7
1.7788812968006064E-10 <= 9.702200592916928E-7
Converged to right
Fitness changed from 9.702200592916928E-7 to 1.7788812968006064E-10
Iteration 3 complete. Error: 1.7788812968006064E-10 Total: 0.3441; Orientation: 0.0003; Line Search: 0.2294
F(0.0) = LineSearchPoint{point=PointSample{avg=1.7788812968006064E-10}, derivative=-2.391076827480852E-10}
New Minimum: 1.7788812968006064E-10 > 4.082784577474984E-14
F(1.5028172727150266) = LineSearchPoint{point=PointSample{avg=4.082784577474984E-14}, derivative=2.422484802466126E-12}, evalInputDelta = -1.7784730183428589E-10
4.082784577474984E-14 <= 1.7788812968006064E-10
New Minimum: 4.082784577474984E-14 > 2.2570950588291466E-14
F(1.4877444060791276) = LineSearchPoint{point=PointSample{avg=2.2570950588291466E-14}, derivative=-5.47632894959395E-22}, evalInputDelta = -1.7786555872947234E-10
Left bracket at 1.4877444060791276
Converged to left
Fitness changed from 1.7788812968006064E-10 to 2.2570950588291466E-14
Iteration 4 complete. Error: 2.2570950588291466E-14 Total: 0.5757; Orientation: 0.0004; Line Search: 0.4606
Low gradient: 1.7293388099744627E-7
F(0.0) = LineSearchPoint{point=PointSample{avg=2.2570950588291466E-14}, derivative=-2.9906127196838913E-14}
New Minimum: 2.2570950588291466E-14 > 7.883012400414393E-18
F(1.4877444060791276) = LineSearchPoint{point=PointSample{avg=7.883012400414393E-18}, derivative=-4.2578664785974855E-16}, evalInputDelta = -2.256306757589105E-14
F(10.414210842553894) = LineSearchPoint{point=PointSample{avg=7.856729240998412E-13}, derivative=1.7645625663605146E-13}, evalInputDelta = 7.631019735115498E-13
F(0.801093141734915) = LineSearchPoint{point=PointSample{avg=4.971645287446598E-15}, derivative=-1.4032097672000915E-14}, evalInputDelta = -1.7599305300844868E-14
F(5.607651992144405) = LineSearchPoint{point=PointSample{avg=1.6642391334388846E-13}, derivative=8.12120794776173E-14}, evalInputDelta = 1.43852962755597E-13
F(0.4313578455495696) = LineSearchPoint{point=PointSample{avg=1.1514235298161605E-14}, derivative=-2.1358572827336588E-14}, evalInputDelta = -1.1056715290129861E-14
F(3.019504918846987) = LineSearchPoint{point=PointSample{avg=2.2602090924921232E-14}, derivative=2.99267533176333E-14}, evalInputDelta = 3.114033662976601E-17
F(0.23226960914207592) = LineSearchPoint{point=PointSample{avg=1.6159179944610602E-14}, derivative=-2.5303597921544504E-14}, evalInputDelta = -6.411770643680864E-15
F(1.6258872639945314) = LineSearchPoint{point=PointSample{avg=1.3813729489742262E-16}, derivative=2.3115776981074817E-15}, evalInputDelta = -2.2432813293394044E-14
1.3813729489742262E-16 <= 2.2570950588291466E-14
New Minimum: 7.883012400414393E-18 > 3.3084462959543234E-18
F(1.5092320040577418) = LineSearchPoint{point=PointSample{avg=3.3084462959543234E-18}, derivative=5.102461740116297E-24}, evalInputDelta = -2.2567642141995512E-14
Right bracket at 1.5092320040577418
Converged to right
Fitness changed from 2.2570950588291466E-14 to 3.3084462959543234E-18
Iteration 5 complete. Error: 3.3084462959543234E-18 Total: 1.3912; Orientation: 0.0004; Line Search: 1.2755
Low gradient: 2.108459994758385E-9
F(0.0) = LineSearchPoint{point=PointSample{avg=3.3084462959543234E-18}, derivative=-4.4456035494965285E-18}
New Minimum: 3.3084462959543234E-18 > 1.1663605377194453E-21
F(1.5092320040577418) = LineSearchPoint{point=PointSample{avg=1.1663605377194453E-21}, derivative=6.287126724119772E-20}, evalInputDelta = -3.307279935416604E-18
1.1663605377194453E-21 <= 3.3084462959543234E-18
New Minimum: 1.1663605377194453E-21 > 5.0475554780517665E-22
F(1.4881855676212303) = LineSearchPoint{point=PointSample{avg=5.0475554780517665E-22}, derivative=-1.0045518361291445E-26}, evalInputDelta = -3.3079415404065184E-18
Left bracket at 1.4881855676212303
Converged to left
Fitness changed from 3.3084462959543234E-18 to 5.0475554780517665E-22
Iteration 6 complete. Error: 5.0475554780517665E-22 Total: 0.5790; Orientation: 0.0004; Line Search: 0.4630
Zero gradient: 2.5858468839085757E-11
F(0.0) = LineSearchPoint{point=PointSample{avg=5.0475554780517665E-22}, derivative=-6.686604107019692E-22}
New Minimum: 5.0475554780517665E-22 > 1.7849845481297504E-25
F(1.4881855676212303) = LineSearchPoint{point=PointSample{avg=1.7849845481297504E-25}, derivative=-9.447896186650286E-24}, evalInputDelta = -5.045770493503637E-22
F(10.417298973348613) = LineSearchPoint{point=PointSample{avg=1.757431143438664E-20}, derivative=3.945814856715677E-21}, evalInputDelta = 1.7069555886581464E-20
F(0.8013306902575856) = LineSearchPoint{point=PointSample{avg=1.111569469513531E-22}, derivative=-3.1370025970284997E-22}, evalInputDelta = -3.935986008538236E-22
F(5.6093148318031) = LineSearchPoint{point=PointSample{avg=3.722811996505311E-21}, derivative=1.8160571955513237E-21}, evalInputDelta = 3.2180564487001347E-21
F(0.43148575629254615) = LineSearchPoint{point=PointSample{avg=2.574740836867905E-22}, derivative=-4.775289183765928E-22}, evalInputDelta = -2.4728146411838614E-22
F(3.020400294047823) = LineSearchPoint{point=PointSample{avg=5.0566733705558235E-22}, derivative=6.692641565077883E-22}, evalInputDelta = 9.117892504057004E-25
F(0.23233848415752484) = LineSearchPoint{point=PointSample{avg=3.613559529129882E-22}, derivative=-5.657432531952616E-22}, evalInputDelta = -1.4339959489218844E-22
F(1.6263693891026738) = LineSearchPoint{point=PointSample{avg=3.101870603584985E-24}, derivative=5.1760482637351654E-23}, evalInputDelta = -5.016536772015917E-22
3.101870603584985E-24 <= 5.0475554780517665E-22
New Minimum: 1.7849845481297504E-25 > 7.771733654583894E-26
F(1.5095187184671135) = LineSearchPoint{point=PointSample{avg=7.771733654583894E-26}, derivative=4.513281695073703E-28}, evalInputDelta = -5.046778304686308E-22
Right bracket at 1.5095187184671135
Converged to right
Fitness changed from 5.0475554780517665E-22 to 7.771733654583894E-26
Iteration 7 complete. Error: 7.771733654583894E-26 Total: 1.3976; Orientation: 0.0005; Line Search: 1.2810
Zero gradient: 3.231178561718869E-13
F(0.0) = LineSearchPoint{point=PointSample{avg=7.771733654583894E-26}, derivative=-1.044051489771162E-25}
New Minimum: 7.771733654583894E-26 > 3.2596738219922137E-29
F(1.5095187184671135) = LineSearchPoint{point=PointSample{avg=3.2596738219922137E-29}, derivative=1.4759163053785312E-27}, evalInputDelta = -7.768473980761901E-26
3.2596738219922137E-29 <= 7.771733654583894E-26
New Minimum: 3.2596738219922137E-29 > 1.645175185049514E-29
F(1.4884769648361358) = LineSearchPoint{point=PointSample{avg=1.645175185049514E-29}, derivative=2.6108118942436626E-30}, evalInputDelta = -7.770088479398844E-26
Right bracket at 1.4884769648361358
Converged to right
Fitness changed from 7.771733654583894E-26 to 1.645175185049514E-29
Iteration 8 complete. Error: 1.645175185049514E-29 Total: 0.5796; Orientation: 0.0005; Line Search: 0.4644
Zero gradient: 3.997213811810254E-15
F(0.0) = LineSearchPoint{point=PointSample{avg=1.645175185049514E-29}, derivative=-1.5977718257326662E-29}
New Minimum: 1.645175185049514E-29 > 4.1982338753742094E-32
F(1.4884769648361358) = LineSearchPoint{point=PointSample{avg=4.1982338753742094E-32}, derivative=-2.8014276470056624E-32}, evalInputDelta = -1.6409769511741398E-29
F(10.419338753852951) = LineSearchPoint{point=PointSample{avg=4.276934764854573E-28}, derivative=9.454433123530857E-29}, evalInputDelta = 4.112417246349622E-28
F(0.801487596450227) = LineSearchPoint{point=PointSample{avg=5.458803845719187E-30}, derivative=-7.037254089424648E-30}, evalInputDelta = -1.0992948004775954E-29
F(5.6104131751515895) = LineSearchPoint{point=PointSample{avg=9.443160663166724E-29}, derivative=4.344389190148314E-29}, evalInputDelta = 7.79798547811721E-29
F(0.43157024424242996) = LineSearchPoint{point=PointSample{avg=1.0127420645920666E-29}, derivative=-1.1256407870083739E-29}, evalInputDelta = -6.324331204574475E-30
F(3.0209917096970096) = LineSearchPoint{point=PointSample{avg=1.6375715129726897E-29}, derivative=1.597114037747973E-29}, evalInputDelta = -7.603672076824429E-32
1.6375715129726897E-29 <= 1.645175185049514E-29
New Minimum: 4.1982338753742094E-32 > 2.0245457979119945E-32
F(1.5108068474994805) = LineSearchPoint{point=PointSample{avg=2.0245457979119945E-32}, derivative=1.1593102827052316E-33}, evalInputDelta = -1.643150639251602E-29
Right bracket at 1.5108068474994805
Converged to right
Fitness changed from 1.645175185049514E-29 to 2.0245457979119945E-32
Iteration 9 complete. Error: 2.0245457979119945E-32 Total: 1.3780; Orientation: 0.0005; Line Search: 1.2630
Zero gradient: 1.6572159415344544E-17
F(0.0) = LineSearchPoint{point=PointSample{avg=2.0245457979119945E-32}, derivative=-2.746364676875928E-34}
New Minimum: 2.0245457979119945E-32 > 3.949537304512986E-34
F(1.5108068474994805) = LineSearchPoint{point=PointSample{avg=3.949537304512986E-34}, derivative=5.9682639970050295E-36}, evalInputDelta = -1.9850504248668647E-32
3.949537304512986E-34 <= 2.0245457979119945E-32
F(1.4786730553847598) = LineSearchPoint{point=PointSample{avg=3.949537304512986E-34}, derivative=5.9682639970050295E-36}, evalInputDelta = -1.9850504248668647E-32
Right bracket at 1.4786730553847598
F(1.4472227262801394) = LineSearchPoint{point=PointSample{avg=1.7685515090205528E-33}, derivative=-2.0674572939814302E-35}, evalInputDelta = -1.8476906470099393E-32
Left bracket at 1.4472227262801394
Converged to right
Fitness changed from 2.0245457979119945E-32 to 3.949537304512986E-34
Iteration 10 complete. Error: 3.949537304512986E-34 Total: 0.8086; Orientation: 0.0004; Line Search: 0.6939
Zero gradient: 1.0143744371779123E-18
F(0.0) = LineSearchPoint{point=PointSample{avg=3.949537304512986E-34}, derivative=-1.0289554988000064E-36}
New Minimum: 3.949537304512986E-34 > 0.0
F(1.4786730553847598) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=0.0}, evalInputDelta = -3.949537304512986E-34
0.0 <= 3.949537304512986E-34
Converged to right
Fitness changed from 3.949537304512986E-34 to 0.0
Iteration 11 complete. Error: 0.0 Total: 0.3465; Orientation: 0.0004; Line Search: 0.2316
Zero gradient: 0.0
F(0.0) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=0.0}
Fitness changed from 0.0 to 0.0
Static Iteration Total: 0.2296; Orientation: 0.0005; Line Search: 0.1149
Iteration 12 failed. Error: 0.0
Previous Error: 0.0 -> 0.0
Optimization terminated 12
Final threshold in iteration 12: 0.0 (> 0.0) after 10.746s (< 30.000s)

Returns

    0.0

Training Converged

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 13.19 seconds (0.000 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: 12208708921547
Reset training subject: 12208824201062
Adding measurement 6d271f3a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD
Non-optimal measurement 143.49156505659928 < 143.49156505659928. Total: 1
th(0)=143.49156505659928;dx=-190.9534410314659
Adding measurement 2d482165 to history. Total: 1
New Minimum: 143.49156505659928 > 26.983446325717097
WOLF (strong): th(2.154434690031884)=26.983446325717097; dx=82.79688444616696 evalInputDelta=116.50811873088219
Adding measurement 11e44334 to history. Total: 2
New Minimum: 26.983446325717097 > 11.515355989091715
END: th(1.077217345015942)=11.515355989091715; dx=-54.078278292649514 evalInputDelta=131.97620906750757
Fitness changed from 143.49156505659928 to 11.515355989091715
Iteration 1 complete. Error: 11.515355989091715 Total: 0.6936; Orientation: 0.0011; Line Search: 0.3471
Non-optimal measurement 11.515355989091715 < 11.515355989091715. Total: 3
LBFGS Accumulation History: 3 points
Non-optimal measurement 11.515355989091715 < 11.515355989091715. Total: 3
th(0)=11.515355989091715;dx=-15.320180418020556
Adding measurement 18b1d36a to history. Total: 3
New Minimum: 11.515355989091715 > 3.406819550917559
WOLF (strong): th(2.3207944168063896)=3.406819550917559; dx=8.332455542904558 evalInputDelta=8.108536438174156
Adding measurement 3d091773 to history. Total: 4
New Minimum: 3.406819550917559 > 0.5994745848960155
END: th(1.1603972084031948)=0.5994745848960155; dx=-3.493862437557989 evalInputDelta=10.9158814041957
Fitness changed from 11.515355989091715 to 0.5994745848960155
Iteration 2 complete. Error: 0.5994745848960155 Total: 0.4637; Orientation: 0.0009; Line Search: 0.3484
Non-optimal measurement 0.5994745848960155 < 0.5994745848960155. Total: 5
Rejected: LBFGS Orientation magnitude: 1.343e+00, gradient 8.929e-01, dot -1.000; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.5994745848960155, 3.406819550917559, 11.515355989091715, 26.983446325717097, 143.49156505659928
Rejected: LBFGS Orientation magnitude: 1.343e+00, gradient 8.929e-01, dot -1.000; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.5994745848960155, 3.406819550917559, 11.515355989091715, 26.983446325717097
LBFGS Accumulation History: 3 points
Removed measurement 3d091773 to history. Total: 4
Removed measurement 18b1d36a to history. Total: 3
Adding measurement 59d5f315 to history. Total: 3
th(0)=0.5994745848960155;dx=-0.7972705206107984
Adding measurement 4ef54b95 to history. Total: 4
New Minimum: 0.5994745848960155 > 0.2631468677262814
WOLF (strong): th(2.5000000000000004)=0.2631468677262814; dx=0.5282083468750123 evalInputDelta=0.3363277171697341
Adding measurement 71a5712d to history. Total: 5
New Minimum: 0.2631468677262814 > 0.017098580221831958
END: th(1.2500000000000002)=0.017098580221831958; dx=-0.13453108686789353 evalInputDelta=0.5823760046741835
Fitness changed from 0.5994745848960155 to 0.017098580221831958
Iteration 3 complete. Error: 0.017098580221831958 Total: 0.9090; Orientation: 0.4457; Line Search: 0.3486
Non-optimal measurement 0.017098580221831958 < 0.017098580221831958. Total: 6
Rejected: LBFGS Orientation magnitude: 2.268e-01, gradient 1.508e-01, dot -1.000; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.017098580221831958, 0.2631468677262814, 0.5994745848960155, 11.515355989091715, 26.983446325717097, 143.49156505659928
Rejected: LBFGS Orientation magnitude: 2.268e-01, gradient 1.508e-01, dot -1.000; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.017098580221831958, 0.2631468677262814, 0.5994745848960155, 11.515355989091715, 26.983446325717097
Rejected: LBFGS Orientation magnitude: 2.268e-01, gradient 1.508e-01, dot -1.000; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.017098580221831958, 0.2631468677262814, 0.5994745848960155, 11.515355989091715
LBFGS Accumulation History: 3 points
Removed measurement 71a5712d to history. Total: 5
Removed measurement 4ef54b95 to history. Total: 4
Removed measurement 59d5f315 to history. Total: 3
Adding measurement 3a39d192 to history. Total: 3
th(0)=0.017098580221831958;dx=-0.02272888470763526
Adding measurement 68cbf51e to history. Total: 4
New Minimum: 0.017098580221831958 > 0.010671547032871665
WOLF (strong): th(2.6930433625398553)=0.010671547032871665; dx=0.01795582143033338 evalInputDelta=0.006427033188960292
Adding measurement 1470c6dd to history. Total: 5
New Minimum: 0.010671547032871665 > 1.8935389963419373E-4
END: th(1.3465216812699277)=1.8935389963419373E-4; dx=-0.0023865316386509415 evalInputDelta=0.016909226322197764
Fitness changed from 0.017098580221831958 to 1.8935389963419373E-4
Iteration 4 complete. Error: 1.8935389963419373E-4 Total: 0.7556; Orientation: 0.2937; Line Search: 0.3479
Non-optimal measurement 1.8935389963419373E-4 < 1.8935389963419373E-4. Total: 6
Rejected: LBFGS Orientation magnitude: 2.388e-02, gradient 1.586e-02, dot -1.000; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.8935389963419373E-4, 0.010671547032871665, 0.017098580221831958, 11.515355989091715, 26.983446325717097, 143.49156505659928
Rejected: LBFGS Orientation magnitude: 2.388e-02, gradient 1.586e-02, dot -1.000; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.8935389963419373E-4, 0.010671547032871665, 0.017098580221831958, 11.515355989091715, 26.983446325717097
Rejected: LBFGS Orientation magnitude: 2.388e-02, gradient 1.586e-02, dot -1.000; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.8935389963419373E-4, 0.010671547032871665, 0.017098580221831958, 11.515355989091715
LBFGS Accumulation History: 3 points
Removed measurement 1470c6dd to history. Total: 5
Removed measurement 68cbf51e to history. Total: 4
Removed measurement 3a39d192 to history. Total: 3
Adding measurement e9b17d2 to history. Total: 3
th(0)=1.8935389963419373E-4;dx=-2.5149467828699114E-4
Adding measurement 19470b94 to history. Total: 4
New Minimum: 1.8935389963419373E-4 > 1.6257855268378375E-4
WOLF (strong): th(2.9009930210079875)=1.6257855268378375E-4; dx=2.330352426685579E-4 evalInputDelta=2.6775346950409985E-5
Adding measurement 5b35185d to history. Total: 5
New Minimum: 1.6257855268378375E-4 > 2.6398626378875514E-7
END: th(1.4504965105039938)=2.6398626378875514E-7; dx=-9.229717809216417E-6 evalInputDelta=1.8908991337040498E-4
Fitness changed from 1.8935389963419373E-4 to 2.6398626378875514E-7
Iteration 5 complete. Error: 2.6398626378875514E-7 Total: 0.5818; Orientation: 0.1183; Line Search: 0.3491
Non-optimal measurement 2.6398626378875514E-7 < 2.6398626378875514E-7. Total: 6
Rejected: LBFGS Orientation magnitude: 8.928e-04, gradient 5.914e-04, dot -1.000; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.6398626378875514E-7, 1.6257855268378375E-4, 1.8935389963419373E-4, 11.515355989091715, 26.983446325717097, 143.49156505659928
Rejected: LBFGS Orientation magnitude: 8.928e-04, gradient 5.914e-04, dot -1.000; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.6398626378875514E-7, 1.6257855268378375E-4, 1.8935389963419373E-4, 11.515355989091715, 26.983446325717097
Rejected: LBFGS Orientation magnitude: 8.928e-04, gradient 5.914e-04, dot -1.000; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.6398626378875514E-7, 1.6257855268378375E-4, 1.8935389963419373E-4, 11.515355989091715
LBFGS Accumulation History: 3 points
Removed measurement 5b35185d to history. Total: 5
Removed measurement 19470b94 to history. Total: 4
Removed measurement e9b17d2 to history. Total: 3
Adding measurement 11093404 to history. Total: 3
th(0)=2.6398626378875514E-7;dx=-3.4980884098576774E-7
No

...skipping 15433 bytes...

25
Adding measurement 1673d294 to history. Total: 4
New Minimum: 2.869604130070348E-25 > 1.8583763874834145E-25
WOLF (strong): th(2.7126736111111125)=1.8583763874834145E-25; dx=3.072376131295277E-25 evalInputDelta=1.0112277425869335E-25
Adding measurement 55f1ba07 to history. Total: 5
New Minimum: 1.8583763874834145E-25 > 2.75908375633223E-27
END: th(1.3563368055555562)=2.75908375633223E-27; dx=-3.725648926038678E-26 evalInputDelta=2.842013292507026E-25
Fitness changed from 2.869604130070348E-25 to 2.75908375633223E-27
Iteration 15 complete. Error: 2.75908375633223E-27 Total: 0.5848; Orientation: 0.1226; Line Search: 0.3476
Non-optimal measurement 2.75908375633223E-27 < 2.75908375633223E-27. Total: 6
Rejected: LBFGS Orientation magnitude: 9.098e-14, gradient 6.048e-14, dot -1.000; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.75908375633223E-27, 1.8583763874834145E-25, 2.869604130070348E-25, 11.515355989091715, 26.983446325717097, 143.49156505659928
Rejected: LBFGS Orientation magnitude: 9.098e-14, gradient 6.048e-14, dot -1.000; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.75908375633223E-27, 1.8583763874834145E-25, 2.869604130070348E-25, 11.515355989091715, 26.983446325717097
Rejected: LBFGS Orientation magnitude: 9.098e-14, gradient 6.048e-14, dot -1.000; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.75908375633223E-27, 1.8583763874834145E-25, 2.869604130070348E-25, 11.515355989091715
LBFGS Accumulation History: 3 points
Removed measurement 55f1ba07 to history. Total: 5
Removed measurement 1673d294 to history. Total: 4
Removed measurement 1e98301 to history. Total: 3
Adding measurement 434a37ab to history. Total: 3
th(0)=2.75908375633223E-27;dx=-3.658243571877472E-27
Adding measurement 475e45ab to history. Total: 4
New Minimum: 2.75908375633223E-27 > 2.448001215160342E-27
WOLF (strong): th(2.9221390652559203)=2.448001215160342E-27; dx=3.445235092398115E-27 evalInputDelta=3.110825411718881E-28
Adding measurement 2295f3c1 to history. Total: 5
New Minimum: 2.448001215160342E-27 > 6.0907937138098774E-30
END: th(1.4610695326279601)=6.0907937138098774E-30; dx=-1.0854052039021409E-28 evalInputDelta=2.75299296261842E-27
Fitness changed from 2.75908375633223E-27 to 6.0907937138098774E-30
Iteration 16 complete. Error: 6.0907937138098774E-30 Total: 0.7445; Orientation: 0.2790; Line Search: 0.3506
Non-optimal measurement 6.0907937138098774E-30 < 6.0907937138098774E-30. Total: 6
Rejected: LBFGS Orientation magnitude: 2.890e-15, gradient 1.912e-15, dot -1.000; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 6.0907937138098774E-30, 2.448001215160342E-27, 2.75908375633223E-27, 11.515355989091715, 26.983446325717097, 143.49156505659928
Rejected: LBFGS Orientation magnitude: 2.890e-15, gradient 1.912e-15, dot -1.000; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 6.0907937138098774E-30, 2.448001215160342E-27, 2.75908375633223E-27, 11.515355989091715, 26.983446325717097
Rejected: LBFGS Orientation magnitude: 2.890e-15, gradient 1.912e-15, dot -1.000; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 6.0907937138098774E-30, 2.448001215160342E-27, 2.75908375633223E-27, 11.515355989091715
LBFGS Accumulation History: 3 points
Removed measurement 2295f3c1 to history. Total: 5
Removed measurement 475e45ab to history. Total: 4
Removed measurement 434a37ab to history. Total: 3
Adding measurement 407e709f to history. Total: 3
th(0)=6.0907937138098774E-30;dx=-3.656773380167305E-30
Non-optimal measurement 6.2140305550863485E-30 < 6.0907937138098774E-30. Total: 4
Armijo: th(3.1477788856423485)=6.2140305550863485E-30; dx=3.722350657255879E-30 evalInputDelta=-1.2323684127647112E-31
Adding measurement 5b71f70d to history. Total: 4
New Minimum: 6.0907937138098774E-30 > 4.254912438850331E-32
WOLF (strong): th(1.5738894428211743)=4.254912438850331E-32; dx=1.5932979525556756E-32 evalInputDelta=6.048244589421374E-30
Non-optimal measurement 4.4754762994966646E-30 < 4.254912438850331E-32. Total: 5
END: th(0.5246298142737248)=4.4754762994966646E-30; dx=-2.623114445737665E-30 evalInputDelta=1.6153174143132128E-30
Fitness changed from 6.0907937138098774E-30 to 4.254912438850331E-32
Iteration 17 complete. Error: 4.254912438850331E-32 Total: 0.8830; Orientation: 0.3055; Line Search: 0.4629
Non-optimal measurement 4.254912438850331E-32 < 4.254912438850331E-32. Total: 5
Rejected: LBFGS Orientation magnitude: 4.431e-17, gradient 2.946e-17, dot -1.000; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 4.254912438850331E-32, 6.0907937138098774E-30, 11.515355989091715, 26.983446325717097, 143.49156505659928
Rejected: LBFGS Orientation magnitude: 4.431e-17, gradient 2.946e-17, dot -1.000; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 4.254912438850331E-32, 6.0907937138098774E-30, 11.515355989091715, 26.983446325717097
LBFGS Accumulation History: 3 points
Removed measurement 5b71f70d to history. Total: 4
Removed measurement 407e709f to history. Total: 3
Adding measurement 3439b330 to history. Total: 3
th(0)=4.254912438850331E-32;dx=-8.680783928782938E-34
Adding measurement 1ae61c5e to history. Total: 4
New Minimum: 4.254912438850331E-32 > 6.909911372293018E-33
END: th(1.130280671296297)=6.909911372293018E-33; dx=-1.5329093276549706E-34 evalInputDelta=3.563921301621029E-32
Fitness changed from 4.254912438850331E-32 to 6.909911372293018E-33
Iteration 18 complete. Error: 6.909911372293018E-33 Total: 0.7950; Orientation: 0.4475; Line Search: 0.2326
Non-optimal measurement 6.909911372293018E-33 < 6.909911372293018E-33. Total: 5
Rejected: LBFGS Orientation magnitude: 1.791e-17, gradient 1.192e-17, dot -1.000; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 6.909911372293018E-33, 4.254912438850331E-32, 11.515355989091715, 26.983446325717097, 143.49156505659928
Rejected: LBFGS Orientation magnitude: 1.791e-17, gradient 1.192e-17, dot -1.000; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 6.909911372293018E-33, 4.254912438850331E-32, 11.515355989091715, 26.983446325717097
LBFGS Accumulation History: 3 points
Removed measurement 1ae61c5e to history. Total: 4
Removed measurement 3439b330 to history. Total: 3
Adding measurement 63617da1 to history. Total: 3
th(0)=6.909911372293018E-33;dx=-1.4203055524808408E-34
Adding measurement 208971e3 to history. Total: 4
New Minimum: 6.909911372293018E-33 > 0.0
END: th(2.435115887713267)=0.0; dx=0.0 evalInputDelta=6.909911372293018E-33
Fitness changed from 6.909911372293018E-33 to 0.0
Iteration 19 complete. Error: 0.0 Total: 0.4008; Orientation: 0.0545; Line Search: 0.2314
Non-optimal measurement 0.0 < 0.0. Total: 5
Rejected: LBFGS Orientation magnitude: 0.000e+00, gradient 0.000e+00, dot NaN; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 0.000e+00]
Orientation rejected. Popping history element from 0.0, 6.909911372293018E-33, 11.515355989091715, 26.983446325717097, 143.49156505659928
Rejected: LBFGS Orientation magnitude: 0.000e+00, gradient 0.000e+00, dot NaN; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 0.000e+00]
Orientation rejected. Popping history element from 0.0, 6.909911372293018E-33, 11.515355989091715, 26.983446325717097
LBFGS Accumulation History: 3 points
Removed measurement 208971e3 to history. Total: 4
Removed measurement 63617da1 to history. Total: 3
Adding measurement 46a73c61 to history. Total: 3
th(0)=0.0;dx=0.0 (ERROR: Starting derivative negative)
Non-optimal measurement 0.0 < 0.0. Total: 4
Fitness changed from 0.0 to 0.0
Static Iteration Total: 0.4061; Orientation: 0.0601; Line Search: 0.2311
Iteration 20 failed. Error: 0.0
Previous Error: 0.0 -> 0.0
Optimization terminated 20
Final threshold in iteration 20: 0.0 (> 0.0) after 13.188s (< 30.000s)

Returns

    0.0

Training Converged

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

    return TestUtil.compare(title + " vs Iteration", runs);
Logging
Plotting range=[1.0, -33.40345377978289], [19.0, 1.061277368414743]; valueStats=DoubleSummaryStatistics{count=46, sum=24.271739, min=0.000000, average=0.527646, max=11.515356}
Plotting 19 points for GD
Plotting 11 points for CjGD
Plotting 19 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, -33.40345377978289], [12.087, 1.061277368414743]; valueStats=DoubleSummaryStatistics{count=46, sum=24.271739, min=0.000000, average=0.527646, max=11.515356}
Plotting 19 points for GD
Plotting 11 points for CjGD
Plotting 19 points for LBFGS

Returns

Result

Composite Learning

In this apply, attempt to train a network to emulate a randomized network given an example input/output. The target state is:

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

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

Returns

    

We simultaneously regress this target input:

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

    return RefArrays.stream(RefUtil.addRef(input_target)).flatMap(x -> {
      RefStream<Tensor> temp_18_0006 = RefArrays.stream(RefUtil.addRef(x));
      if (null != x)
        RefUtil.freeRef(x);
      return temp_18_0006;
    }).map(x -> {
      String temp_18_0007 = x.prettyPrint();
      x.freeRef();
      return temp_18_0007;
    }).reduce((a, b) -> a + "\n" + b).orElse("");

Returns

    [
    	[ [ 0.292, -0.504, 1.048, 0.872 ], [ 0.504, 1.46, -1.28, -0.136 ], [ 0.968, -0.764, 1.868, -0.788 ], [ -1.952, 1.072, 0.78, 0.356 ], [ -0.676, 1.848, -1.156, -1.3 ], [ 1.22, -0.848, -1.72, -1.608 ], [ -1.8, -1.252, -1.856, -1.06 ], [ 0.196, 1.624, 1.012, 0.956 ], ... ],
    	[ [ -0.948, -1.376, -0.044, -1.752 ], [ 1.856, 0.72, -0.64, -0.184 ], [ 0.872, -1.216, 1.832, -1.248 ], [ -1.396, 0.552, -0.624, -1.064 ], [ 0.468, 1.22, 1.836, 0.032 ], [ -0.176, -0.972, -0.56, 0.132 ], [ 0.724, 1.928, -0.816, -0.08 ], [ -1.568, -0.808, 1.836, 1.212 ], ... ],
    	[ [ -0.576, -1.136, 0.968, 1.368 ], [ 0.724, -0.2, -0.956, 1.704 ], [ -0.64, -0.448, -1.46, -0.56 ], [ -0.884, -0.352, 1.808, -1.712 ], [ -1.632, 0.544, 1.94, 0.416 ], [ 1.44, 0.82, 0.84, -0.196 ], [ -0.16, 1.42, 1.228, -1.368 ], [ -0.492, 0.668, 1.74, 1.644 ], ... ],
    	[ [ -1.336, -0.184, -0.972, -1.364 ], [ -1.296, 0.428, 0.396, 0.752 ], [ 1.276, -0.152, 1.876, -0.968 ], [ 1.212, 0.312, -1.716, 1.008 ], [ -1.956, -1.332, 0.82, 1.7 ], [ 0.332, -1.864, -1.324, -1.496 ], [ -1.112, 0.584, -1.02, -0.144 ], [ 1.532, -0.448, -1.212, 1.872 ], ... ],
    	[ [ -0.292, 0.86, -1.372, 0.656 ], [ 0.96, -1.948, -1.96, 1.568 ], [ 1.372, -0.304, -0.256, -0.184 ], [ 1.424, 0.592, 1.108, 0.18 ], [ -1.508, -1.252, -1.088, -0.512 ], [ 1.052, 1.192, -1.492, 0.012 ], [ -0.18, 1.7, 0.704, 1.752 ], [ -0.8, 1.768, -1.16, -0.46 ], ... ],
    	[ [ 1.744, 1.772, 1.724, 0.3 ], [ 0.808, 0.236, -0.464, -0.488 ], [ 1.424, -1.976, 1.572, 1.096 ], [ 1.716, -0.588, 1.176, 0.432 ], [ -1.184, -0.22, 1.116, 0.708 ], [ -0.396, -0.972, 0.028, 0.2 ], [ -0.272, 1.068, -1.152, 1.396 ], [ 0.448, -0.448, 1.704, -1.984 ], ... ],
    	[ [ 0.672, 1.56, -0.36, -0.308 ], [ 1.192, 1.244, 1.42, -0.316 ], [ -1.276, -0.16, -0.288, -1.892 ], [ -1.08, 0.608, 0.08, -0.36 ], [ -0.912, 1.616, -0.008, 0.028 ], [ -1.444, -1.028, -1.456, 1.072 ], [ -1.052, 1.108, -1.712, -1.98 ], [ -0.872, 0.02, -0.032, -0.284 ], ... ],
    	[ [ -0.208, 0.98, 0.068, 1.632 ], [ 1.988, -1.46, 0.54, -0.736 ], [ -1.4, -1.816, 0.844, -0.16 ], [ 0.276, 0.452, 0.624, 0.936 ], [ 1.704, 0.564, -0.688, 0.5 ], [ -1.164, -1.92, -0.688, 0.008 ], [ -0.64, -1.656, 0.896, -1.592 ], [ -0.044, -0.66, 0.428, -1.408 ], ... ],
    	...
    ]
    [
    	[ [ -0.32, 1.124, -0.472, 1.352 ], [ -1.596, 0.712, 0.232, 1.828 ], [ 0.144, -0.916, 1.944, 0.492 ], [ 1.6, -0.548, -1.644, -0.88 ], [ -0.768, 1.932, 0.532, 1.996 ], [ -0.016, 0.476, -0.98, -1.004 ], [ 0.272, 0.356, -1.596, 0.224 ], [ 1.132, 0.412, -1.196, -1.208 ], ... ],
    	[ [ 0.74, 0.964, -1.988, 0.376 ], [ 1.384, 0.224, -1.388, -0.792 ], [ 0.284, -1.264, -0.368, -1.152 ], [ -1.728, 1.08, 1.08, -0.392 ], [ -1.896, 1.076, 1.56, 0.7 ], [ 0.724, -0.252, -0.992, -0.08 ], [ -0.068, -0.668, 1.516, -0.004 ], [ -1.448, 1.268, -1.68, -0.136 ], ... ],
    	[ [ -1.396, -1.072, -0.336, 0.396 ], [ -1.632, 1.088, 1.7, -0.192 ], [ 1.812, 1.728, -1.904, -0.068 ], [ -0.888, 0.04, -0.26, -0.752 ], [ 1.008, 0.716, -0.58, -0.812 ], [ -1.668, 0.236, -1.776, -0.84 ], [ 0.784, 1.044, -0.668, 0.976 ], [ -1.548, 1.084, 1.624, -0.004 ], ... ],
    	[ [ -0.884, -0.536, -1.34, -0.156 ], [ -1.948, 0.068, -0.96, -1.728 ], [ -1.592, -1.736, -0.664, -1.764 ], [ -1.16, 0.892, -1.792, 0.164 ], [ -1.6, 1.6, -0.764, -0.704 ], [ 1.28, 0.936, 0.604, 1.712 ], [ 1.932, -0.484, -0.456, -1.18 ], [ 0.788, -1.464, -1.884, -1.816 ], ... ],
    	[ [ 0.24, -0.736, 0.54, 1.324 ], [ -1.02, -1.98, -0.832, -0.6 ], [ -0.728, 0.928, -0.64, 0.624 ], [ -0.12, 1.336, -0.52, -0.196 ], [ 0.076, -0.528, -1.724, 0.808 ], [ 1.704, 1.18, 0.524, -0.8 ], [ 1.076, 1.24, -0.584, 1.948 ], [ 0.896, 0.652, -1.78, 0.7 ], ... ],
    	[ [ 0.16, -1.14, -0.76, 1.944 ], [ 1.9, -0.404, -1.396, 0.448 ], [ 1.688, -0.92, 0.748, -1.708 ], [ -1.048, 0.256, 1.956, 0.936 ], [ -0.604, 0.504, 1.176, -1.504 ], [ -0.784, 0.536, -1.612, -0.164 ], [ -1.22, -0.648, 1.248, 0.948 ], [ -1.072, 0.74, -1.908, -1.104 ], ... ],
    	[ [ -1.792, 1.16, -1.852, 1.548 ], [ -0.34, 0.3, 0.896, 0.04 ], [ -0.892, 1.684, 0.74, 1.512 ], [ 1.152, -1.604, 1.204, -0.808 ], [ 1.644, 0.788, 0.656, 0.332 ], [ 1.512, -0.344, -0.78, -1.412 ], [ -1.52, -1.236, 0.452, -1.316 ], [ 0.472, -1.568, -0.928, -1.86 ], ... ],
    	[ [ -0.856, 0.124, -0.072, 0.132 ], [ 0.508, 0.548, -0.872, -1.956 ], [ -0.968, -0.036, -0.944, -0.884 ], [ -0.992, 0.0, 1.752, -0.724 ], [ -0.544, 1.308, -1.896, -1.22 ], [ 1.068, 1.864, 0.416, -1.76 ], [ 0.796, 1.5, 1.936, -0.312 ], [ -0.088, 1.596, 0.992, -1.456 ], ... ],
    	...
    ]

Which produces the following output:

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

    return RefStream.of(RefUtil.addRef(output_target)).map(x -> {
      String temp_18_0008 = x.prettyPrint();
      x.freeRef();
      return temp_18_0008;
    }).reduce((a, b) -> a + "\n" + b).orElse("");

Returns

    [
    	[ [ 0.1535360000000002, -2.227552, 9.276464, -7.605424000000001 ], [ -8.764624000000001, 4.850128000000001, -1.6997919999999993, 3.9047840000000003 ], [ -1.318479999999999, 6.437727999999999, -1.8683040000000004, -17.894416000000003 ], [ 2.7549280000000005, 1.0532000000000006, 4.551024000000001, -5.111776000000001 ], [ -4.777488000000001, -6.856175999999999, -4.3010079999999995, 2.920559999999999 ], [ -1.023087999999999, -1.0286399999999996, 5.603936, -1.7317120000000004 ], [ 13.325536, 2.1927040000000004, -20.77848, 5.200224000000002 ], [ -0.0219200000000016, -6.024688, -7.840272000000001, -9.541295999999997 ], ... ],
    	[ [ 4.8783199999999995, 1.4249599999999998, -7.380656, 4.253872 ], [ 1.083695999999999, 6.430464, -2.188448, -5.555375999999999 ], [ -5.225888, -1.3267840000000015, 2.8193120000000005, 2.3245919999999995 ], [ 3.9894879999999997, 11.104912, -12.408655999999999, 4.223392000000001 ], [ 9.431328, 10.317760000000002, 11.401359999999997, -9.037615999999998 ], [ 0.9752480000000006, 7.287168000000002, 3.3957440000000014, -3.026512 ], [ -11.234048, 0.19024000000000127, -7.0995839999999975, 10.404528 ], [ -3.7047359999999996, -6.769440000000001, 12.517504, -12.327888 ], ... ],
    	[ [ 1.5589920000000002, 3.970656, 1.6605279999999998, 2.0620960000000013 ], [ -6.796767999999998, -8.564896000000001, 13.171440000000002, 9.358128 ], [ -2.9457120000000008, -2.814320000000001, -10.123871999999999, 0.44638399999999917 ], [ 10.126912, 17.376592, -11.137967999999997, -8.076976 ], [ -0.14238399999999982, 6.848192000000001, -0.16104000000000052, -1.4970560000000004 ], [ -4.386623999999999, 15.96344, 13.799071999999997, -2.849600000000002 ], [ 22.609536000000002, -6.145791999999998, -0.9783040000000014, -1.7124959999999965 ], [ -0.7615839999999985, 0.3031999999999997, 2.6925280000000003, 11.103583999999998 ], ... ],
    	[ [ 7.270991999999999, 2.0200320000000005, -2.3245280000000004, 10.112528000000001 ], [ 9.381408, 0.5811679999999992, -5.212832000000001, -6.7980800000000015 ], [ 2.9770719999999993, -0.1029599999999995, -5.021120000000001, 8.411312 ], [ -14.427679999999997, 3.860416000000001, -9.520912000000001, 2.7192799999999986 ], [ -12.648464000000002, 0.42912000000000083, 13.501792000000002, -4.664640000000001 ], [ 8.357376, 0.046864000000000385, -3.074479999999998, 16.584608000000003 ], [ 10.339167999999999, -14.484032000000003, -21.849808000000003, 7.607728 ], [ -3.5008480000000004, -2.6242240000000003, 11.879472, 10.787680000000003 ], ... ],
    	[ [ -4.382799999999999, -3.028016, -5.488208, 4.384223999999999 ], [ -24.189328000000003, 1.3835040000000016, -0.8654399999999991, 0.8473599999999982 ], [ -4.402016000000002, -0.4001920000000023, -9.664688, -3.382752000000002 ], [ 0.8778079999999999, 0.9436959999999996, 8.10488, -9.99784 ], [ -4.724416000000001, -1.0703840000000002, -7.924368, 6.273328000000001 ], [ 12.649183999999998, 2.04664, -6.0607359999999995, -1.0592479999999989 ], [ 2.754687999999999, -1.7160319999999998, 17.019312, -4.586703999999999 ], [ -12.435136, -8.66408, -1.8407999999999998, -3.353280000000003 ], ... ],
    	[ [ 6.390544000000001, -2.2876, 11.128272, -1.792848 ], [ -17.103151999999998, 2.8926079999999987, -3.178511999999998, -0.7745759999999974 ], [ -3.0110719999999986, -3.967232000000001, 2.0166399999999993, -15.894816 ], [ 12.105872, -7.9366400000000015, 6.280576000000003, 4.427664000000002 ], [ 3.9393760000000007, 2.2207840000000005, -0.5206720000000005, -1.8637920000000008 ], [ -0.7907359999999994, -6.179999999999998, 17.833055999999996, -0.3422559999999984 ], [ -8.35656, -9.069888, 8.813456, 6.817056 ], [ 8.634048, -8.070992000000002, 3.807727999999999, -3.2468479999999986 ], ... ],
    	[ [ 3.548064, 3.6532959999999997, -1.5533599999999992, -2.0744 ], [ -7.000304000000001, 0.24960000000000016, 0.27979199999999926, -16.317424000000003 ], [ -2.3851680000000015, 2.8925760000000005, -4.733824, 6.696655999999999 ], [ 25.820831999999992, 1.3773120000000008, -6.603695999999999, -2.7429120000000005 ], [ 0.7051039999999993, 4.414624000000002, -1.0414079999999992, 0.6532960000000003 ], [ -9.33224, -0.8456479999999988, 3.7105759999999997, -9.612064000000002 ], [ -9.682288, 1.431936000000001, 6.845088000000001, 5.614031999999999 ], [ 10.853488000000002, -4.694768000000001, -7.247744, -9.448512000000001 ], ... ],
    	[ [ -11.696, -2.3512159999999995, 4.668528, -2.15192 ], [ -0.1303359999999994, 8.410112000000002, 3.393584000000001, 7.853024 ], [ 3.100319999999997, 9.618352, -21.45472, -9.894335999999997 ], [ -18.787776, 13.933776, 7.452143999999999, -2.7744959999999987 ], [ -10.7304, 2.512512, 24.845824000000007, 0.451488 ], [ -9.85232, 0.23376000000000086, -4.823584, -3.3779840000000005 ], [ 3.857232, 1.783568, -2.097791999999999, -1.3987679999999978 ], [ -11.274816, 18.035968, -2.5193600000000003, -0.08203199999999956 ], ... ],
    	...
    ]
    [
    	[ [ 4.878016000000001, 2.3650079999999996, 4.947424, 0.2616959999999998 ], [ -6.576816, 0.6143199999999998, -1.131071999999999, -4.528384 ], [ -7.577007999999999, -6.776415999999999, 3.627104, -2.953711999999999 ], [ 7.19656, -0.41051199999999827, -5.865024, 14.594048 ], [ 1.9401599999999999, -13.075919999999996, 4.344528, -10.878879999999999 ], [ -5.785375999999999, -0.13766399999999962, 10.278432, 6.973663999999999 ], [ -2.414672, -9.954368, -9.075104000000001, -7.447039999999999 ], [ 7.694128, 0.6655519999999989, 1.5115520000000013, 10.300176 ], ... ],
    	[ [ -5.938831999999999, -18.040288, 4.1226080000000005, 5.892352 ], [ -2.2005280000000007, -17.859504, 4.3192960000000005, 11.539664000000002 ], [ 4.488815999999999, 10.259872000000001, -3.1362719999999995, -5.737007999999999 ], [ 12.816896, 0.1363520000000001, -8.90912, -12.3904 ], [ -1.4169119999999975, 0.4144480000000004, 10.989264, -6.047808000000002 ], [ 7.804336000000003, -1.8239039999999993, -1.255008000000002, 2.175552000000001 ], [ 7.034496, -4.621536000000001, 3.640239999999999, 0.9908800000000009 ], [ 6.206240000000001, -16.339216000000004, -9.538352000000001, 13.825312 ], ... ],
    	[ [ 3.8394079999999984, 7.755584000000001, 8.079584, -12.478959999999997 ], [ 1.9793600000000007, -8.441136, 5.703136000000001, -7.102768 ], [ -5.494800000000001, -12.998, 3.232576000000001, 4.992224 ], [ 11.375135999999992, -12.661536000000002, -0.06985599999999999, 1.6130880000000005 ], [ 4.8108, -5.609728, 4.935104, 17.546655999999995 ], [ 5.938752, -3.4170399999999996, -13.58144, -0.9713919999999987 ], [ -9.559999999999999, 11.945840000000002, 0.5592319999999987, -13.681648000000003 ], [ 6.580144, 6.9811679999999985, 0.38150400000000084, -21.783312000000002 ], ... ],
    	[ [ -12.734336000000003, -3.7151680000000007, -4.981296, -0.7016319999999993 ], [ -7.332543999999997, 7.028048, 9.550592000000002, 4.409551999999999 ], [ 24.973423999999998, 4.068575999999999, 1.5452959999999996, -0.7226879999999988 ], [ 0.5417279999999984, -6.176015999999997, -10.840624, 3.8740799999999997 ], [ 12.008256, 0.4454079999999996, -2.7336960000000015, 1.9360479999999995 ], [ 0.8650239999999996, -4.695200000000001, -3.3781919999999994, -2.3870399999999994 ], [ -15.523552, -14.654144, 4.457792, -0.5628160000000014 ], [ -5.055919999999998, -6.508768, -9.405823999999999, 12.576528 ], ... ],
    	[ [ 0.6634240000000002, -0.34336000000000017, 5.858912000000001, -1.811599999999999 ], [ -2.140704000000001, 11.668, 0.6218079999999986, 9.720128 ], [ -13.06808, 5.4344160000000015, -11.983839999999997, 2.2562880000000005 ], [ -8.054224, 3.4873920000000016, 9.830544000000002, -2.295311999999998 ], [ -10.519488, -3.6495039999999994, 5.5919039999999995, -8.701808 ], [ -3.3947040000000004, -2.5212800000000004, 8.652624, 3.746479999999999 ], [ 11.292736, -11.857664000000005, -4.159328000000001, -14.728751999999998 ], [ 5.926751999999998, -8.543952, 11.494015999999998, 2.9438239999999998 ], ... ],
    	[ [ 7.025120000000001, -11.78488, 1.6373440000000001, 12.986863999999999 ], [ -3.169232000000001, -18.107439999999997, -10.213887999999999, 15.072848000000002 ], [ 1.9304480000000004, 10.990975999999996, 7.273904000000001, 1.86464 ], [ -1.2236959999999997, 3.2006719999999995, 4.957903999999999, -15.341183999999998 ], [ -11.850767999999999, 15.296144, 8.889312, -2.741264 ], [ -8.675456, 8.89664, -0.44222400000000134, -11.797904 ], [ -1.1694879999999994, -1.8909439999999988, 15.806176000000004, -21.358336000000005 ], [ 2.3023360000000004, -5.646799999999999, 9.507632, 3.1799199999999987 ], ... ],
    	[ [ -5.787759999999999, 0.03166400000000001, 6.545472, 1.653840000000001 ], [ 7.155632000000001, 0.47372800000000004, 5.210303999999999, -12.134687999999999 ], [ -3.078688, -15.590383999999995, -8.490031999999996, -1.679568 ], [ 1.6447839999999987, 3.9214560000000005, 2.2560160000000007, 5.669568000000001 ], [ 2.2050880000000013, 5.811184000000001, 9.247504000000005, -5.995696000000003 ], [ -3.5634719999999995, -5.229824000000001, -1.139728000000001, 6.927312000000003 ], [ -11.107199999999999, -0.42944000000000226, -9.723311999999998, -2.1579360000000003 ], [ 11.229631999999999, 12.314863999999998, -8.632128000000002, -9.613615999999999 ], ... ],
    	[ [ -4.957167999999999, -7.192848, 1.9394719999999999, 1.2191519999999996 ], [ -16.609999999999992, -4.6353599999999995, 2.162816000000001, 2.270959999999999 ], [ 2.155008000000001, -1.8747839999999996, -7.251407999999999, -4.301328 ], [ 6.654336, 0.5756800000000002, -5.326176, -5.8704160000000005 ], [ -6.995456000000002, 12.70776, -0.7778239999999987, -8.605343999999999 ], [ 12.996032, 4.963696, -17.149312, -17.530528 ], [ 6.682432000000002, 13.411615999999999, -4.411088000000001, -7.737567999999999 ], [ -3.416112, 8.787584, -0.38668800000000064, -5.501872 ], ... ],
    	...
    ]

Gradient Descent

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

TrainingTester.java:480 executed in 30.16 seconds (0.329 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: 12222235032735
Reset training subject: 12222405563857
Constructing line search parameters: GD
th(0)=140.2819486262868;dx=-93.35190322086805
New Minimum: 140.2819486262868 > 83.343288710638
WOLF (strong): th(2.154434690031884)=83.343288710638; dx=40.4721788114312 evalInputDelta=56.9386599156488
New Minimum: 83.343288710638 > 75.77321355522233
END: th(1.077217345015942)=75.77321355522233; dx=-26.422946107443465 evalInputDelta=64.50873507106448
Fitness changed from 140.2819486262868 to 75.77321355522233
Iteration 1 complete. Error: 75.77321355522233 Total: 1.5055; Orientation: 0.0972; Line Search: 0.8981
th(0)=75.77321355522233;dx=-7.481641053351125
New Minimum: 75.77321355522233 > 71.81303234496278
WOLF (strong): th(2.3207944168063896)=71.81303234496278; dx=4.068693147617407 evalInputDelta=3.960181210259549
New Minimum: 71.81303234496278 > 70.44237906079155
END: th(1.1603972084031948)=70.44237906079155; dx=-1.7063485570252743 evalInputDelta=5.330834494430775
Fitness changed from 75.77321355522233 to 70.44237906079155
Iteration 2 complete. Error: 70.44237906079155 Total: 1.0731; Orientation: 0.0970; Line Search: 0.8058
th(0)=70.44237906079155;dx=-0.3893803310269362
New Minimum: 70.44237906079155 > 70.27811294264833
WOLF (strong): th(2.5000000000000004)=70.27811294264833; dx=0.25796691585491954 evalInputDelta=0.16426611814321745
New Minimum: 70.27811294264833 > 70.15794998707376
END: th(1.2500000000000002)=70.15794998707376; dx=-0.06570631709291304 evalInputDelta=0.2844290737177886
Fitness changed from 70.44237906079155 to 70.15794998707376
Iteration 3 complete. Error: 70.15794998707376 Total: 1.1018; Orientation: 0.1064; Line Search: 0.8161
th(0)=70.15794998707376;dx=-0.01110041632437677
New Minimum: 70.15794998707376 > 70.15481128713992
WOLF (strong): th(2.6930433625398553)=70.15481128713992; dx=0.008769447115675774 evalInputDelta=0.003138699933842304
New Minimum: 70.15481128713992 > 70.14969183662538
END: th(1.3465216812699277)=70.14969183662538; dx=-0.0011654842456279998 evalInputDelta=0.008258150448384072
Fitness changed from 70.15794998707376 to 70.14969183662538
Iteration 4 complete. Error: 70.14969183662538 Total: 1.1035; Orientation: 0.1047; Line Search: 0.8184
th(0)=70.14969183662538;dx=-1.230476470096748E-4
New Minimum: 70.14969183662538 > 70.14967782939817
WOLF (strong): th(2.9009930210079875)=70.14967782939817; dx=1.1339079694123558E-4 evalInputDelta=1.4007227207457618E-5
New Minimum: 70.14967782939817 > 70.1495990947273
END: th(1.4504965105039938)=70.1495990947273; dx=-4.82842497017705E-6 evalInputDelta=9.274189808650135E-5
Fitness changed from 70.14969183662538 to 70.1495990947273
Iteration 5 complete. Error: 70.1495990947273 Total: 1.0323; Orientation: 0.0960; Line Search: 0.7601
th(0)=70.1495990947273;dx=-5.063235081660033E-7
New Minimum: 70.1495990947273 > 70.14959806072801
END: th(3.125000000000001)=70.14959806072801; dx=-1.5543603898025127E-7 evalInputDelta=1.0339992826402522E-6
Fitness changed from 70.1495990947273 to 70.14959806072801
Iteration 6 complete. Error: 70.14959806072801 Total: 0.7681; Orientation: 0.0981; Line Search: 0.4992
th(0)=70.14959806072801;dx=-5.314077492110816E-7
New Minimum: 70.14959806072801 > 70.14959740288292
WOLF (strong): th(6.732608406349639)=70.14959740288292; dx=3.359871781436225E-7 evalInputDelta=6.578450921779222E-7
New Minimum: 70.14959740288292 > 70.14959700182666
END: th(3.3663042031748196)=70.14959700182666; dx=-9.771028502720042E-8 evalInputDelta=1.058901347050778E-6
Fitness changed from 70.14959806072801 to 70.14959700182666
Iteration 7 complete. Error: 70.14959700182666 Total: 1.0420; Orientation: 0.0990; Line Search: 0.7723
th(0)=70.14959700182666;dx=-6.318964608460841E-7
Armijo: th(7.25248255251997)=70.1495975570491; dx=7.850088430480944E-7 evalInputDelta=-5.552224422444851E-7
New Minimum: 70.14959700182666 > 70.14959599492775
WOLF (strong): th(3.626241276259985)=70.14959599492775; dx=7.655619184670466E-8 evalInputDelta=1.0068989126921224E-6
END: th(1.2087470920866616)=70.149596380747; dx=-3.957455764489503E-7 evalInputDelta=6.210796641425986E-7
Fitness changed from 70.14959700182666 to 70.14959599492775
Iteration 8 complete. Error: 70.14959599492775 Total: 1.3481; Orientation: 0.1057; Line Search: 1.0600
th(0)=70.14959599492775;dx=-9.182613056080291E-7
New Minimum: 70.14959599492775 > 70.14959490958566
WOLF (strong): th(2.604166666666668)=70.14959490958566; dx=8.471856782802979E-8 evalInputDelta=1.0853420917555923E-6
END: th(1.302083333333334)=70.14959512576587; dx=-4.167713686802135E-7 evalInputDelta=8.691618802458834E-7
Fitness changed from 70.14959599492775 to 70.14959490958566
Iteration 9 complete. Error: 70.14959490958566 Total: 1.0879; Orientation: 0.1059; Line Search: 0.8002
th(0)=70.14959490958566;dx=-6.441453499324815E-7
New Minimum: 70.14959490958566 > 70.14959390279495
END: th(2.8052535026456833)=70.14959390279495; dx=-7.364410937761043E-8 evalInputDelta=1.0067907112443208E-6
Fitness changed from 70.14959490958566 to 70.14959390279495
Iteration 10 complete. Error: 70.14959390279495 Total: 1.1522; Orientation: 0.1056; Line Search: 0.8674
th(0)=70.14959390279495;dx=-5.645380375926356E-7
New Minimum: 70.14959390279495 > 70.14959323994479
WOLF (strong): th(6.043735460433309)=70.14959323994479; dx=3.451868865172842E-7 evalInputDelta=6.628501552086163E-7
New Minimum: 70.14959323994479 > 70.14959288410277
END: th(3.0218677302166546)=70.14959288410277; dx=-1.0967557512655355E-7 evalInputDelta=1.01869217417061E-6
Fitness changed from 70.14959390279495 to 70.14959288410277
Iteration 11 complete. Error: 70.14959288410277 Total: 1.0824; Orientation: 0.1007; Line Search: 0.7826
th(0)=70.14959288410277;dx=-5.665992574107975E-7
New Minimum: 70.14959288410277 > 70.14959241291584
WOLF (strong): th(6.5104166666666705)=70.14959241291584; dx=4.218506264034191E-7 evalInputDelta=4.711869365792154E-7
New Minimum: 70.14959241291584 > 70.14959184410672
END: th(3.2552083333333353)=70.14959184410672; dx=-7.237431512474941E-8 evalInputDelta=1.0399960501672467E-6
Fitness changed from 70.14959288410277 to 70.14959184410672
Iteration 12 complete. Error: 70.14959184410672 Total: 1.0289; Orientation: 0.0996; Line Search: 0.7602
th(0)=70.14959184410672;dx=-6.455026206257828E-7
Armijo: th(7.013133756614209)=70.14959233631748; dx=7.858709017324141E-7 evalInputDelta=-4.922107592619795E-7
New Minimum: 70.14959184410672 > 70.14959083541036
WOLF (strong): th(3.5065668783071047)=70.14959083541036; dx=7.018414123468421E-8 evalInputDelta=1.00869635843992E-6
END: th(1.1688556261023682)=70.14959122902977; dx=-4.0694036652039986E-7 evalInputDelta=6.150769564783332E-7
Fitness changed from 70.14959184410672 to 70.14959083541036
Iteration 13 complete. Error: 70.14959083541036 Total: 1.2469; Orientation: 0.0959; Line Search: 0.9807
th(0)=70.14959083541036;dx=-8.792958887360033E-7
New Minimum: 70.14959083541036 > 70.14958975991141
WOLF (strong): th(2.518223108513879)=70.14958975991141; dx=2.5123004907922778E-8 evalInputDelta=1.0754989574479623E-6
END: th(1.2591115542569395)=70.14959001296981; dx=-4.2708644178848037E-7 evalInputDelta=8.224405547707647E-7
Fitness changed from 70.14959083541036 to 70.14958975991141
Iteration 14 complete. Error: 70.14958975991141 Total: 1.0169; Orientation: 0.0975; Line Search: 0.7490
th(0)=70.14958975991141;dx=-5.817806353531515E-7
New Minimum: 70.14958975991141 > 70.14958877668488
END: th(2.712673611111113)=70.14958877668488; dx=-1.4313262114997366E-7 evalInputDelta=9.832265277509578E-7
Fitness changed from 70.14958975991141 to 70.14958877668488
Iteration 15 complete. Error: 70.14958877668488 Total: 0.7627; Orientation: 0.0972; Line Search: 0.4968
th(0)=70.14958877668488;dx=-4.943028228528041E-7
New Minimum: 70.14958877668488 > 70.14958765690332
WOLF (strong): th(5.844278130511841)=70.14958765690332; dx=1.1109670450047078E-7 evalInputDelta=1.1197815581454051E-6
END: th(2.9221390652559207)=70.1495877745287; dx=-1.9160305902669242E-7 evalInputDelta=1.0021561820394709E-6
Fitness changed from 70.14958877668488 to 70.14958765690332
Iteration 16 complete. Error: 70.14958765690332 Total: 1.0121; Orientation: 0.0966; Line Search: 0.7396
th(0)=70.14958765690332;dx=-1.6325942717240744E-6
Armijo: th(6.295557771284698)=70.14959440309873; dx=3.7757547823073383E-6 evalInputDelta=-6.74619541030097E-6
New Minimum: 70.14958765690332 > 70.14958677392929
WOLF (strong): th(3.147778885642349)=70.14958677392929; dx=1.0715802570844794E-6 evalInputDelta=8.829740352211957E-7
New Minimum: 70.14958677392929 > 70.14958641678493
END: th(1.0492596285474496)=70.14958641678493; dx=-7.312027617211948E-7 evalInputDelta=1.2401183937527094E-6
Fitness changed from 70.14958765690332 to 70.14958641678493
Iteration 17 complete. Error: 70.14958641678493 Total: 1.2704; Orientation: 0.0967; Line Search: 1.0031
th(0)=70.14958641678493;dx=-4.577108443784218E-7
New Minimum: 70.14958641678493 > 70.14958558418525
END: th(2.260561342592594)=70.14958558418525; dx=-2.789200602033058E-7 evalInputDelta=8.325996816438419E-7
Fitness changed from 70.14958641678493 to 70.14958558418525
Iteration 18 complete. Error: 70.14958558418525 Total: 0.7676; Orientation: 0.0969; Line Search: 0.5000
th(0)=70.14958558418525;dx=-3.6846764832195495E-7
New Minimum: 70.14958558418525 > 70.14958402445498
END: th(4.870231775426534)=70.14958402445498; dx=-2.7204818135610374E-7 evalInputDelta=1.559730264943937E-6
Fitness changed from 70.14958558418525 to 70.14958402445498
Iteration 19 complete. Error: 70.14958402445498 Total: 0.7660; Orientation: 0.0958; Line Search: 0.5003
th(0)=70.14958402445498;dx=-4.87738101210957E-7
Armijo: th(10.492596285474496)=70.14958434811595; dx=5.494313125636614E-7 evalInputDelta=-3.236609700252302E-7
New Minimum: 70.14958402445498 > 70.14958282596048
WOLF (strong): th(5.246298142737248)=70.14958282596048; dx=3.08466062338265E-8 evalInputDelta=1.1984945018639337E-6
END: th(1.7487660475790827)=70.14958332266235; dx=-3.148765319380276E-7 evalInputDelta=7.0179262934289E-7
Fitness changed from 70.14958402445498 to 70.14958282596048
Iteration 20 complete. Error: 70.14958282596048 Total: 1.2588; Orientation: 0.0974; Line Search: 0.9900
th(0)=70.14958282596048;dx=-1.2574507610706125E-6
New Minimum: 70.14958282596048 > 70.14958241655432
WOLF (strong): th(3.7676022376543234)=70.14958241655432; dx=1.0401209492975227E-6 evalInputDelta=4.0940615519957646E-7
New Minimum: 70.14958241655432 > 70.14958153921535
END: th(1.8838011188271617)=70.14958153921535; dx=-1.0866490556302034E-7 evalInputDelta=1.2867451317788436E-6
Fitness changed from 70.14958282596048 to 70.14958153921535
Iteration 21 complete. Error: 70.14958153921535 Total: 1.0297; Orientation: 0.0965; Line Search: 0.7634
th(0)=70.14958153921535;dx=-3.970253674666536E-7
New Minimum: 70.14958153921535 > 70.14958024437294
END: th(4.058526479522112)=70.14958024437294; dx=-2.410596314792639E-7 evalInputDelta=1.2948424057412922E-6
Fitness changed from 70.14958153921535 to 70.14958024437294
Iteration 22 complete. Error: 70.14958024437294 Total: 0.7674; Orientation: 0.0976; Line Search: 0.4980
th(0)=70.14958024437294;dx=-5.05861939117377E-7
New Minimum: 70.14958024437294 > 70.14958005016516
WOLF (strong): th(8.743830237895414)=70.14958005016516; dx=4.614402688165269E-7 evalInputDelta=1.9420778585299558E-7
New Minimum: 70.14958005016516 > 70.14957909002827
END: th(4.371915118947707)=70.14957909002827; dx=-2.2210834995407384E-8 evalInputDelta=1.154344673182095E-6
Fitness changed from 70.14958024437294 to 70.14957909002827
Iteration 23 complete. Error: 70.14957909002827 Total: 1.0298; Orientation: 0.0965; Line Search: 0.7630
th(0)=70.14957909002827;dx=-9.437824600497745E-7
Armijo: th(9.41900559413581)=70.14958801101474; dx=2.8380347517835137E-6 evalInputDelta=-8.92098647398143E-6
Armijo: th(4.709502797067905)=70.1495790979018; dx=9.47126146899571E-7 evalInputDelta=-7.873538265812385E-9
New Minimum: 70.14957909002827 > 70.14957810318174
END: th(1.5698342656893016)=70.14957810318174; dx=-3.1347959083468683E-7 evalInputDelta=9.868465298268347E-7
Fitness changed from 70.14957909002827 to 70.14957810318174
Iteration 24 complete. Error: 70.14957810318174 Total: 1.2512; Orientation: 0.0976; Line Search: 0.9828
th(0)=70.14957810318174;dx=-3.407416550322024E-7
New Minimum: 70.14957810318174 > 70.14957695502393
WOLFE (weak): th(3.3821053996017603)=70.14957695502393; dx=-3.382187365820879E-7 evalInputDelta=1.1481578070515752E-6
New Minimum: 70.14957695502393 > 70.1495758153989
WOLFE (weak): th(6.7642107992035205)=70.1495758153989; dx=-3.3569581811564265E-7 evalInputDelta=2.2877828342871E-6
New Minimum: 70.1495758153989 > 70.14957134222655
WOLFE (weak): th(20.29263239761056)=70.14957134222655; dx=-3.256041440859815E-7 evalInputDelta=6.760955187701256E-6
New Minimum: 70.14957134222655 > 70.14955290244079
END: th(81.17052959044224)=70.14955290244079; dx=-2.8019160765298345E-7 evalInputDelta=2.5200740950026557E-5
Fitness changed from 70.14957810318174 to 70.14955290244079
Iteration 25 complete. Error: 70.14955290244079 Total: 1.6210; Orientation: 0.0968; Line Search: 1.3528
th(0)=70.14955290244079;dx=-3.589925926567925E-6
Armijo: th(174.8766047579083)=70.18198573808169; dx=3.7451245129617656E-4 evalInputDelta=-0.032432835640904045
Armijo: th(87.43830237895415)=70.157504162769; dx=1.8546126018415698E-4 evalInputDelta=-0.007951260328212584
Armijo: th(29.146100792984715)=70.15036662091094; dx=5.942713564309665E-5 evalInputDelta=-8.137184701553224E-4
Armijo: th(7.286525198246179)=70.14958414128078; dx=1.2164339426605301E-5 evalInputDelta=-3.123883999478494E-5
New Minimum: 70.14955290244079 > 70.14954996670068
END: th(1.4573050396492357)=70.14954996670068; dx=-4.390728579426131E-7 evalInputDelta=2.9357401132301675E-6
Fitness changed from 70.14955290244079 to 70.14954996670068
Iteration 26 complete. Error: 70.14954996670068 Total: 1.7383; Orientation: 0.0950; Line Search: 1.4725
th(0)=70.14954996670068;dx=-3.4623004197618243E-7
New Minimum: 70.14954996670068 > 70.14954888923768
WOLFE (weak): th(3.1396685313786032)=70.14954888923768; dx=-3.4012458166733956E-7 evalInputDelta=1.0774629970455862E-6
New Minimum: 70.14954888923768 > 70.14954783094376
WOLFE (weak): th(6.2793370627572065)=70.14954783094376; dx=-3.3401912136756657E-7 evalInputDelta=2.1357569153224176E-6
New Minimum: 70.14954783094376 > 70.14954378945944
END: th(18.83801118827162)=70.14954378945944; dx=-3.095972802580709E-7 evalInputDelta=6.177241232308006E-6
Fitness changed from 70.14954996670068 to 70.14954378945944
Iteration 27 complete. Error: 70.14954378945944 Total: 1.2946; Orientation: 0.0959; Line Search: 1.0284
Final threshold in iteration 27: 70.14954378945944 (> 0.0) after 30.159s (< 30.000s)

Returns

    70.14954378945944

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

    [0.006123593732722351, -0.0013678961414010907, -0.005270612070230009, -0.011298033537493927, -0.006821055416220508, 8.813675780073331E-4, -0.006390025010312798, 0.0028883053476774947, 0.010654776104627691, 0.009916420286789754, -0.0045536773945300145, 0.015580011007386355, -5.853021920245855E-4, -7.278938182159005E-4, -0.0015407170490951009, -0.006653835539707168, -1.4383991841416372E-4, 0.007211422828562724, -0.005402613071455085, -0.002009515342346296, -0.007921815426751458, 0.00462603069332847, 0.00553580805028463, 0.006746377196861137, -0.001993010366104307, -0.0064962826479314974, -0.009338772054999932, 0.00807743919953695, -0.010627217105273581, 0.027247199487033018, 0.005297038245919173, 0.004993606450697361, 0.007746428893083908, 6.916778121884288E-4, -0.004626612035519652, -0.009490399314629196, 0.0014741537515247356, 0.003812487743314569, -5.520305556716842E-4, 0.005618237893289187, 0.010470935739690294, -0.0017305397737595912, -0.0025184622523645723, -0.001341826695147716, 0.001138318993373243, 0.007074922172059422, -0.007969623242471463, -0.008494444525162285, 0.008573433356792724, 0.008920993405983802, 0.009904500103922072, 8.147693130478317E-4, 0.004182790333984346, -0.002662184755488254, 0.009001198495099805, -0.0031939735068575175, -0.012735010638805597, 0.005858727615829925, 0.014134150921888813, -0.008926312132355702, 0.005872334203693115, 0.015401509491684194, 0.008369655230064279, 0.004947495236356943, -0.006901143594503312, -0.0070719475901303164, -0.003361082595600988, 0.009230620390278858, 0.0010061587930191218, -0.0025178748316911177, 0.009204623931063971, 1.1969188574413294E-5, 0.009143077853320676, -2.9319926566820343E-4, -0.012347557479913816, 0.008786960135435283, 0.00627890486825136, -5.275631305247829E-4, -0.005731281587820422, -1.8102982735436273E-4, -0.016882666237093166, -6.492836877029474E-4, -0.0035693628250614154, -0.02045805635263503, -8.841520714947685E-4, 0.008004256955368657, 0.004279702679208066, -8.935219002205853E-4, 0.004161559221199976, 0.01159891789262668, 0.010938831277460141, -0.00875258396278505, -0.012033037784414249, -0.0011060441355899917, -0.0036565946621636017, -0.004149654771027439, -0.01944637973876762, -0.005890902865146844, 0.0063124763647687925, 0.005446444501884718, 0.007310020867674251, -0.01685634205952882, 0.0017760566799315757, 0.007924665450776087, -0.01773934045790614, 0.005715464138115237, 0.008586776977052926, 0.01062100019166484, -0.00876142025308374, 0.004387286165490869, 0.004409241840894187, 0.0021711845454059817, -0.003588539661435369, -0.0013597576932387536, -0.004054469664166056, -0.006559882541721482, 0.0068199671224855075, -0.010539830437968698, 0.018677126889639507, -0.007841621339570918, -0.007505791478161624, 0.0017741684795182684, 0.002489576541059755, -0.004620969783959702, -0.006888799613094136, 2.485263685504727E-4, 0.012328686735543201, 0.00601233661494612, 0.006720403551105163, 6.87318254552159E-4, 0.008126720293270962, 0.001195559808574441, -0.003434742582788173, 0.0012431286449897318, 0.0016723856106305433, -0.009652974875681992, 0.013779358406142429, 5.341116088187753E-4, 0.014687783782959976, 0.0018276467145120112, 0.015450797395467524, 0.022821690341412508, -0.0013313419418410316, 0.0070899696292926005]

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

    [
    	[ [ 1.0919455843448145, -1.1960393180566535, 1.35598565441088, 0.7681025966049081 ], [ 1.9719071689499714, -0.3959235441988582, -0.7839790852190297, 1.7320002240019214 ], [ 1.2721430806640441, 0.8639352926057534, -0.45193429606363356, -0.3519948337952692 ], [ -1.8639543820713733, 0.939906123673754, 0.34005059600341075, -1.6559878903190908 ], [ 1.360031804613386, -1.8999078838842354, -1.783975040931436, 1.6238766115247845 ], [ -0.37599560630544876, -0.2760860680493853, -1.379974478467759, -1.9238782631172728 ], [ 0.31582711867130464, -1.2840520080115565, -1.9320472338302601, 1.1439216111938182 ], [ 0.20412516822774177, 0.36404012383745243, -0.11200189759623358, -0.15603740467223853 ], ... ],
    	[ [ 1.7558820985904324, -1.7599295584383816, 1.935972498846463, -0.3199603826246146 ], [ 1.263973947550341, 0.007913539789954764, -1.1239454719468087, -1.8879479154372634 ], [ 1.0799152828515424, 1.523978344040811, -1.4198081112017584, 1.5758721953669863 ], [ 1.6199559805033403, 0.6040692819001879, 1.2759867338291484, 0.7720777369285869 ], [ -0.003925188074593866, -0.8720178662531016, -1.5919362379152662, -1.3717814638489747 ], [ 0.12391815498887156, -0.20396883812053052, 1.2079378521208273, 1.8796113890228983 ], [ -0.4280422762910603, 0.059915615616053956, 1.8639954877240006, -1.887777474452862 ], [ 0.5279618994426937, 1.6680004090648934, -0.3200931217533803, 0.9840372407329812 ], ... ],
    	[ [ -1.051898505755735, 1.995891218855538, 1.0519574664221676, -0.4159567537431721 ], [ -1.9559214862904601, 1.6600759376377974, -1.911923878591902, -1.4279307259560126 ], [ -0.936035160485149, -0.587963815652046, 0.3999927065578884, 1.0760788312972525 ], [ -0.012045775028387684, 1.7078955508939035, -1.7598848205624111, 0.30018699048649994 ], [ 0.5720337377758811, 0.33199576254139757, 0.9120831408536209, 1.991753433406455 ], [ 0.3841962018565078, -1.527978551301827, 0.9559375368373274, -1.5759058696086763 ], [ -1.9440159491361666, 0.660029106784285, -0.011964017143114715, 0.044064328172022736 ], [ 0.37185587611370396, 0.668042631912512, 1.7718769840360806, -0.7317897126088218 ], ... ],
    	[ [ 1.4639642294314092, 0.5719979876483188, -0.6600371791610472, 1.6720708400319864 ], [ -1.6518772827976735, -1.6879977512681308, -1.8800086533595617, -0.34400943748015717 ], [ 1.9239469021889593, -0.05215602574313277, -1.8357367376481335, 0.23200567413774179 ], [ -0.40009093261430656, -1.5918425877601214, -1.7397664508103776, 0.4919169741590956 ], [ 1.3479864131602084, -0.3360929589698177, 0.5758256320245997, -1.7278825530905288 ], [ -1.3280501416624442, 1.0161485292141306, -0.9198820443059161, -0.8922189970838075 ], [ -1.8519891093361012, 1.9597304094915882, 0.01576563900439955, -1.1996995125512564 ], [ 0.3881276733071117, 1.1921451179158558, -1.4679069078294549, 0.5477374913368415 ], ... ],
    	[ [ 0.7038790190977646, -1.0840951857246632, 1.580068444626377, -0.8759045841860088 ], [ 0.8718794582437387, 0.19203515188076814, -0.7959431870737587, 0.8599123469593976 ], [ 1.5400449912732677, -0.939970964090442, 0.5321042284651722, -0.9799855386423552 ], [ -1.8759329095021906, -0.5921441675466328, 0.7239989201383576, 0.10792225898336594 ], [ 1.93980867959145, 0.34006141793839767, -1.1680045410917512, 1.3599373458280681 ], [ -0.33600364984833864, 0.17990386375020395, 1.731910123959691, 1.0000395984620218 ], [ 1.007894124554082, -0.8999493815311198, 1.8279851188924798, 1.155831921111123 ], [ 1.4999405117978266, 1.3198885473566049, 0.05993887527540031, -1.9398821209694972 ], ... ],
    	[ [ -0.2679952023437887, 1.6198680508334662, 0.5560155129255644, -1.0758918200517722 ], [ 0.5280259938566128, -0.863909425848398, -1.2039106783743, 0.15186144478506483 ], [ 1.7481294648045353, 1.5919491472542413, 0.3960344202896669, 1.5438915565086726 ], [ -1.9960362598552344, 1.959932858475284, -0.6159233069816362, -1.6718755231249243 ], [ 0.6559649637299366, 0.39598881196323527, 0.8039549375401978, -0.5198410638122298 ], [ 0.8319114282458459, 1.107988597229077, -1.9800017546152617, 0.23195553968887006 ], [ -0.1799199022066803, -0.331953597020277, 1.8157992630858828, -0.8840797925749309 ], [ -0.8319084999178562, 1.9921142732917612, 1.7719962334823374, -1.3521366135844046 ], ... ],
    	[ [ 0.5360206971920888, 1.0520495949706525, -0.004014833078261866, -1.1320729186722325 ], [ 1.9640891643008154, -0.6280057651379671, -1.3118049209836669, -1.5160218511214874 ], [ 1.735840437363948, 1.7758557147330216, -1.0919656842928396, -1.1878806834771625 ], [ -0.784018610452662, -0.9799774283804101, -0.06812711277373104, -1.8239324255440095 ], [ -1.4519013652694492, 0.6919188477353796, -0.9880107944856509, -1.2921465131822647 ], [ -0.9798652486831301, 0.8838753624678078, 0.8759038189382994, 0.03992254700744104 ], [ 1.1641220387049722, 0.560165375903519, 1.4680302974355233, 0.8398003487760879 ], [ -0.6759231036208885, 1.8478717708305172, 0.5279066838238028, -0.08393368796639657 ], ... ],
    	[ [ -0.843893057719374, 1.663842039825341, 0.5560032395078025, -1.491960891481777 ], [ 1.2799278576125315, -1.3797713650122962, -1.695708675483717, 1.5918707582164056 ], [ -1.9801425590524053, 0.8919172135757751, -1.4640466774500625, -1.5676899044993529 ], [ -0.2520291030427607, 0.899890234111702, -0.527946947458227, 1.4678793330626052 ], [ -0.5918615595237217, 1.1479671645074474, -0.007945904296719607, 0.34389379982116247 ], [ -1.8559429545574793, 1.4680238251590112, -1.5160021161603463, 1.1239848809732436 ], [ 0.6080524516314606, 1.8399949173195769, 0.06811283619131016, -0.7239815907987774 ], [ 0.42004586116474724, 0.011949763646326399, 0.40011578368452233, -0.6598724485808205 ], ... ],
    	...
    ]

To produce the following output:

TrainingTester.java:633 executed in 0.03 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.025866837317519143, 0.01789994550415572, 0.0220189094259664, 0.033655040010693194 ], [ -0.009864848080093738, 0.0659846862699868, -0.019878804678553158, -0.09209129596626742 ], [ 0.0011952729082269744, 0.02916359490437012, 0.06226986881611562, -0.07582613420840756 ], [ -0.026059483281499103, -0.037001732661265066, 0.036696929058561846, 0.01929666115496677 ], [ -0.00780023572702199, 0.010603604507217777, -0.005587102722291837, -0.06602954841228861 ], [ -0.014093092275273446, -0.055906641380861335, 0.06463854963781969, 0.020231620202302965 ], [ 0.04289674867920626, -0.0333742377086115, -0.020057496532477175, -0.031225941664869247 ], [ -0.025334311901986893, -0.021945983746542812, -0.03887305356616417, 0.004313060396486183 ], ... ],
    	[ [ 0.09038427194505524, 0.0267633060107796, -0.1385584260131248, -0.037670955409969634 ], [ -0.0673393017994034, 0.011900481651693, -0.10986713701301061, 0.017224416345779363 ], [ 0.02673118357266017, -0.03301000333586031, 0.046709042057600444, -0.025578028814590453 ], [ 0.0817276090707373, 0.12240954392101935, 0.11357896531397473, -0.060518814163966865 ], [ -0.11374624996754339, -0.01667702447892321, 0.09726278952279707, 0.05504211253486717 ], [ 0.032915960235963784, 0.026360349436234304, -0.02756442124288225, 0.025416429730617255 ], [ 0.013833534731838569, 0.03549181975164602, -0.08951544986529271, 0.02473195058943332 ], [ 0.060363967699563564, 0.04061077844412585, -0.03205029502839991, 0.007878864665596615 ], ... ],
    	[ [ -0.041180372225662884, -0.0274390292369037, 0.0015473359299789742, 0.029306251602455122 ], [ 0.041506860780847546, -0.06685202157165719, -0.05481184158191621, -0.053213803732368954 ], [ 0.06656165179556685, -0.08449217242567574, -0.06499623486249155, 0.07748477678532442 ], [ -0.06760437929955698, -0.04174670358890891, 0.11853064638802709, 0.10156167404931908 ], [ 0.05717626317630253, 0.02728946909690295, 0.024825207521039533, -0.03785191384104403 ], [ -0.04171259453235601, -0.015124156656949482, -0.14086394072653108, -0.038310671458809606 ], [ 0.07976454091482234, -0.039122920272403675, -0.0704473596060917, -0.08054792209803525 ], [ -0.028143062891282086, 0.039638898579364035, -0.029580756041591307, 0.013703077047924742 ], ... ],
    	[ [ 0.037799080923107055, 0.08187092569598522, 0.1069233268100755, -0.12527807335163235 ], [ -0.02992039485339707, -0.010503459582992244, 0.0894537651835127, -0.04990750532476921 ], [ 0.03105234357461941, -0.053113152657250896, 0.04882596390978009, -0.025653215594841582 ], [ 0.09155581784893624, -0.050811488529677915, -0.06415193068237836, -0.10625358295644527 ], [ -0.03407327703358504, -0.008600310862314553, 0.05133087862709018, 0.0967831890197556 ], [ 0.01543990872222421, -0.06512380908901261, 0.06101497120844608, 0.035730238207405625 ], [ -0.018111467012689838, -0.021042779973937487, -0.06340412261440007, 0.07503480175009022 ], [ -0.020638300930620725, 0.007761760812619693, 0.02626757814525821, -0.0617387780891248 ], ... ],
    	[ [ -0.011059036341579263, 0.0665163523212042, 0.0401721893953726, -0.0011097737509019362 ], [ 0.022702100583870635, 0.0760913269628194, 0.002725588734507931, -0.08071395852214024 ], [ -0.02745224077672813, 0.03630618964075302, 0.05038142778587517, -0.016999319741036138 ], [ -0.040001736856236834, -0.015207645156605146, -0.07373469943032274, 0.04240502280925003 ], [ -0.022547327988318516, 0.016383737627453744, 0.04866210852649326, -0.11310196370565145 ], [ -0.0231702440161918, 0.05775815887541106, 0.0018719146442051397, -0.010750902058122657 ], [ 0.03623554574643884, 0.11680636148398213, 0.04201760877077721, -0.011439362816752651 ], [ -0.08700015335495526, 0.13112498551052845, 0.021231646132840957, -0.06659917336945848 ], ... ],
    	[ [ 0.02462314247015371, -0.008774156797005103, -0.002808509856072452, -0.06591926990950502 ], [ -0.1166181148774962, 0.007425541556018525, -0.024668020002660055, -0.012318125129691377 ], [ -0.04266934999801654, -0.011132792894890336, 0.05439232577808238, -0.031344373387302296 ], [ 0.027837523148835544, -0.027495974806564107, -0.13109130399898106, -0.060955289255599454 ], [ 0.0013543654462088552, 0.0034569674483951847, -0.03074583590718838, -0.015244439367366042 ], [ 0.06000029105056531, -0.009736548259604308, -0.046690873671784525, -0.0035380306974957874 ], [ -0.013968725983180857, 0.0029561081321033086, -0.052720091522866955, 0.045942070448729 ], [ -0.027644209065855758, 0.11428029546110988, -0.02820955570061943, -0.049338809184350796 ], ... ],
    	[ [ 0.018344379288164563, 0.06593667119494766, 0.04239654198066807, -0.11331199674654707 ], [ 0.01754063820448704, -0.0761835232148433, -0.12457957999746141, -0.0242233841554416 ], [ 0.07888818092397419, -0.023062449864103482, -0.009545177317093352, -0.09005841573388441 ], [ 0.027311823630740018, -0.03068618806341825, 0.03175928624552511, -0.056814532554997466 ], [ 0.07605192605697907, -0.07408210720620619, -0.02533033877853218, -0.02431075716934171 ], [ -0.013586021733736148, -5.431361144603922E-4, -0.017885335915898297, 0.060605384012264896 ], [ 5.441786299244362E-4, -0.0047642854979169985, 0.019268444016100124, 0.045348107852434205 ], [ -0.12482958056959675, 0.08921345410113923, 0.06689484823823558, 0.02022055139675133 ], ... ],
    	[ [ -0.04717610527421545, 0.08867742079284627, 0.12137150233895859, -0.048039795366816566 ], [ -0.004189637812080275, 0.04164410767043408, -7.486347647257127E-4, -0.06757783857201646 ], [ -0.06385015103862277, -0.05695531540461801, -0.01964255066317141, 0.04097379351950583 ], [ 0.05415050725001988, -0.05798601891448725, 0.02076362117329652, -0.02283005842465803 ], [ 0.016244501917414632, -0.04514586760697092, 0.03162213197430756, 0.021271054036018006 ], [ 0.05728892028694609, -0.08467038330786089, -0.03324759587661406, 0.033926258376464964 ], [ 0.07456151821889788, -0.005111997889809465, 0.05207727309262862, -0.049930838410564705 ], [ 0.07717029225093967, 0.01846446179769308, -0.01886964871218239, 0.05573882164761923 ], ... ],
    	...
    ]

Conjugate Gradient Descent

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

TrainingTester.java:452 executed in 30.90 seconds (0.206 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: 12252461453548
Reset training subject: 12252632928062
Constructing line search parameters: GD
F(0.0) = LineSearchPoint{point=PointSample{avg=140.2819486262868}, derivative=-93.35190322086805}
New Minimum: 140.2819486262868 > 140.28194861695164
F(1.0E-10) = LineSearchPoint{point=PointSample{avg=140.28194861695164}, derivative=-93.35190321465349}, evalInputDelta = -9.335167305835057E-9
New Minimum: 140.28194861695164 > 140.28194856094046
F(7.000000000000001E-10) = LineSearchPoint{point=PointSample{avg=140.28194856094046}, derivative=-93.35190317736527}, evalInputDelta = -6.534634167110198E-8
New Minimum: 140.28194856094046 > 140.28194816886253
F(4.900000000000001E-9) = LineSearchPoint{point=PointSample{avg=140.28194816886253}, derivative=-93.35190291634765}, evalInputDelta = -4.5742427801087615E-7
New Minimum: 140.28194816886253 > 140.28194542431658
F(3.430000000000001E-8) = LineSearchPoint{point=PointSample{avg=140.28194542431658}, derivative=-93.35190108922433}, evalInputDelta = -3.2019702302932274E-6
New Minimum: 140.28194542431658 > 140.28192621249664
F(2.4010000000000004E-7) = LineSearchPoint{point=PointSample{avg=140.28192621249664}, derivative=-93.35188829936217}, evalInputDelta = -2.241379016254541E-5
New Minimum: 140.28192621249664 > 140.28179172983084
F(1.6807000000000003E-6) = LineSearchPoint{point=PointSample{avg=140.28179172983084}, derivative=-93.35179877032658}, evalInputDelta = -1.5689645596239643E-4
New Minimum: 140.28179172983084 > 140.28085035478162
F(1.1764900000000001E-5) = LineSearchPoint{point=PointSample{avg=140.28085035478162}, derivative=-93.35117206707949}, evalInputDelta = -0.0010982715051852665
New Minimum: 140.28085035478162 > 140.2742609063912
F(8.235430000000001E-5) = LineSearchPoint{point=PointSample{avg=140.2742609063912}, derivative=-93.34678514443281}, evalInputDelta = -0.007687719895614009
New Minimum: 140.2742609063912 > 140.22814343842438
F(5.764801000000001E-4) = LineSearchPoint{point=PointSample{avg=140.22814343842438}, derivative=-93.31607668997596}, evalInputDelta = -0.053805187862423054
New Minimum: 140.22814343842438 > 139.9057460299199
F(0.004035360700000001) = LineSearchPoint{point=PointSample{avg=139.9057460299199}, derivative=-93.10111770816087}, evalInputDelta = -0.3762025963669089
New Minimum: 139.9057460299199 > 137.6697825745626
F(0.028247524900000005) = LineSearchPoint{point=PointSample{avg=137.6697825745626}, derivative=-91.59641460527617}, evalInputDelta = -2.6121660517242162
New Minimum: 137.6697825745626 > 123.03810873107062
F(0.19773267430000002) = LineSearchPoint{point=PointSample{avg=123.03810873107062}, derivative=-81.06397159723132}, evalInputDelta = -17.243839895216183
New Minimum: 123.03810873107062 > 70.58904880147733
F(1.3841287201) = LineSearchPoint{point=PointSample{avg=70.58904880147733}, derivative=-7.360324314990135}, evalInputDelta = -69.69289982480947
F(9.688901040700001) = LineSearchPoint{point=PointSample{avg=2148.407483712688}, derivative=507.41704228120295}, evalInputDelta = 2008.1255350864014
F(0.7453000800538463) = LineSearchPoint{point=PointSample{avg=87.96523413946574}, derivative=-47.041803818435206}, evalInputDelta = -52.31671448682107
F(5.217100560376924) = LineSearchPoint{point=PointSample{avg=498.32916589651575}, derivative=230.47878334316684}, evalInputDelta = 358.04721727022894
F(0.40131542772130185) = LineSearchPoint{point=PointSample{avg=107.82259298457802}, derivative=-68.41368302661468}, evalInputDelta = -32.45935564170878
F(2.809207994049113) = LineSearchPoint{point=PointSample{avg=123.15065427996232}, derivative=81.11702940446428}, evalInputDelta = -17.13129434632448
123.15065427996232 <= 140.2819486262868
New Minimum: 70.58904880147733 > 70.15290768476362
F(1.5031037838176389) = LineSearchPoint{point=PointSample{avg=70.15290768476362}, derivative=0.028616402239335027}, evalInputDelta = -70.12904094152319
Right bracket at 1.5031037838176389
Converged to right
Fitness changed from 140.2819486262868 to 70.15290768476362
Iteration 1 complete. Error: 70.15290768476362 Total: 5.9894; Orientation: 0.0962; Line Search: 5.3802
F(0.0) = LineSearchPoint{point=PointSample{avg=70.15290768476362}, derivative=-0.004405679484984759}
New Minimum: 70.15290768476362 > 70.14960038564922
F(1.5031037838176389) = LineSearchPoint{point=PointSample{avg=70.14960038564922}, derivative=5.053033261679993E-6}, evalInputDelta = -0.0033072991143967556
70.14960038564922 <= 70.15290768476362
Converged to right
Fitness changed from 70.15290768476362 to 70.14960038564922
Iteration 2 complete. Error: 70.14960038564922 Total: 0.7610; Orientation: 0.0954; Line Search: 0.4953
F(0.0) = LineSearchPoint{point=PointSample{avg=70.14960038564922}, derivative=-7.553855516981576E-7}
New Minimum: 70.14960038564922 > 70.14959956545579
F(1.5031037838176389) = LineSearchPoint{point=PointSample{avg=70.14959956545579}, derivative=-3.3594750882265566E-7}, evalInputDelta = -8.20193434947214E-7
F(10.521726486723471) = LineSearchPoint{point=PointSample{avg=70.14960788393233}, derivative=2.180680750642179E-6}, evalInputDelta = 7.498283110862758E-6
F(0.8093635759018055) = LineSearchPoint{point=PointSample{avg=70.14959986566555}, derivative=-5.295342978548454E-7}, evalInputDelta = -5.19983672120361E-7
F(5.6655450313126385) = LineSearchPoint{point=PointSample{avg=70.14960058447492}, derivative=8.255732258370512E-7}, evalInputDelta = 1.9882570256868348E-7
F(0.43581115625481837) = LineSearchPoint{point=PointSample{avg=70.14960008294375}, derivative=-6.337733380939329E-7}, evalInputDelta = -3.0270547313193674E-7
New Minimum: 70.14959956545579 > 70.14959937971007
F(3.050678093783729) = LineSearchPoint{point=PointSample{avg=70.14959937971007}, derivative=9.589994371345713E-8}, evalInputDelta = -1.0059391541972218E-6
70.14959937971007 <= 70.14960038564922
New Minimum: 70.14959937971007 > 70.14959936323118
F(2.707009772100088) = LineSearchPoint{point=PointSample{avg=70.14959936323118}, derivative=-2.154166250523256E-17}, evalInputDelta = -1.0224180471141153E-6
Left bracket at 2.707009772100088
Converged to left
Fitness changed from 70.14960038564922 to 70.14959936323118
Iteration 3 complete. Error: 70.14959936323118 Total: 2.5041; Orientation: 0.0960; Line Search: 2.2383
F(0.0) = LineSearchPoint{point=PointSample{avg=70.14959936323118}, derivative=-6.079216870756877E-7}
New Minimum: 70.14959936323118 > 70.14959837989997
F(2.707009772100088) = LineSearchPoint{point=PointSample{avg=70.14959837989997}, derivative=-1.1858563555600598E-7}, evalInputDelta = -9.8333120490679E-7
F(18.94906840470062) = LineSearchPoint{point=PointSample{avg=70.14962029729963}, derivative=2.817430674497857E-6}, evalInputDelta = 2.0934068459155242E-5
F(1.4576206465154322) = LineSearchPoint{point=PointSample{avg=70.14959866914522}, derivative=-3.4443304395413417E-7}, evalInputDelta = -6.940859549331435E-7
F(10.203344525608026) = LineSearchPoint{point=PointSample{avg=70.14960257002568}, derivative=1.2364988150138693E-6}, evalInputDelta = 3.2067945028302347E-6
F(0.784872655816002) = LineSearchPoint{point=PointSample{avg=70.14959894176835}, derivative=-4.6604318693447854E-7}, evalInputDelta = -4.2146282908106514E-7
F(5.494108590712013) = LineSearchPoint{point=PointSample{avg=70.14959875147902}, derivative=3.8522781397647485E-7}, evalInputDelta = -6.117521564874551E-7
70.14959875147902 <= 70.14959936323118
New Minimum: 70.14959837989997 > 70.1495983410029
F(3.363026170686514) = LineSearchPoint{point=PointSample{avg=70.1495983410029}, derivative=-1.8412431630499557E-17}, evalInputDelta = -1.0222282753602485E-6
Left bracket at 3.363026170686514
Converged to left
Fitness changed from 70.14959936323118 to 70.1495983410029
Iteration 4 complete. Error: 70.1495983410029 Total: 2.4847; Orientation: 0.0970; Line Search: 2.2169
F(0.0) = LineSearchPoint{point=PointSample{avg=70.1495983410029}, derivative=-7.558955282765796E-7}
New Minimum: 70.1495983410029 > 70.14959737929834
F(3.363026170686514) = LineSearchPoint{point=PointSample{avg=70.14959737929834}, derivative=1.8396744416730713E-7}, evalInputDelta = -9.61704557767007E-7
70.14959737929834 <= 70.1495983410029
New Minimum: 70.14959737929834 > 70.14959731874785
F(2.70475220157778

...skipping 3075 bytes...

=2.8235772266911866E-6}, evalInputDelta = 2.094793241269599E-5
F(1.4552393931001029) = LineSearchPoint{point=PointSample{avg=70.14959458043478}, derivative=-3.449436629782049E-7}, evalInputDelta = -6.940987873349513E-7
F(10.18667575170072) = LineSearchPoint{point=PointSample{avg=70.14959848501576}, derivative=1.2393167806473653E-6}, evalInputDelta = 3.21048219120712E-6
F(0.7835904424385169) = LineSearchPoint{point=PointSample{avg=70.14959485304148}, derivative=-4.6680985085348604E-7}, evalInputDelta = -4.2149208923092374E-7
F(5.485133097069618) = LineSearchPoint{point=PointSample{avg=70.14959466367182}, derivative=3.8625346455824593E-7}, evalInputDelta = -6.108617469635647E-7
70.14959466367182 <= 70.14959527453357
New Minimum: 70.14959429132169 > 70.14959425254682
F(3.3563495631535907) = LineSearchPoint{point=PointSample{avg=70.14959425254682}, derivative=-1.0736941993792228E-16}, evalInputDelta = -1.021986747673509E-6
Left bracket at 3.3563495631535907
Converged to left
Fitness changed from 70.14959527453357 to 70.14959425254682
Iteration 8 complete. Error: 70.14959425254682 Total: 2.4852; Orientation: 0.0958; Line Search: 2.2203
F(0.0) = LineSearchPoint{point=PointSample{avg=70.14959425254682}, derivative=-7.569219352170707E-7}
New Minimum: 70.14959425254682 > 70.14959329077156
F(3.3563495631535907) = LineSearchPoint{point=PointSample{avg=70.14959329077156}, derivative=1.8381401645432395E-7}, evalInputDelta = -9.61775256769215E-7
70.14959329077156 <= 70.14959425254682
New Minimum: 70.14959329077156 > 70.14959323049803
F(2.7005395106815233) = LineSearchPoint{point=PointSample{avg=70.14959323049803}, derivative=-9.67156512855945E-17}, evalInputDelta = -1.0220487922651955E-6
Left bracket at 2.7005395106815233
Converged to left
Fitness changed from 70.14959425254682 to 70.14959323049803
Iteration 9 complete. Error: 70.14959323049803 Total: 1.2770; Orientation: 0.0965; Line Search: 1.0113
F(0.0) = LineSearchPoint{point=PointSample{avg=70.14959323049803}, derivative=-6.095148703474027E-7}
New Minimum: 70.14959323049803 > 70.14959224728172
F(2.7005395106815233) = LineSearchPoint{point=PointSample{avg=70.14959224728172}, derivative=-1.1864800600916292E-7}, evalInputDelta = -9.832163101464175E-7
F(18.903776574770664) = LineSearchPoint{point=PointSample{avg=70.14961418569649}, derivative=2.8265531866262606E-6}, evalInputDelta = 2.0955198465344438E-5
F(1.4541366595977434) = LineSearchPoint{point=PointSample{avg=70.14959253635367}, derivative=-3.4520194343398014E-7}, evalInputDelta = -6.94144361546023E-7
F(10.178956617184204) = LineSearchPoint{point=PointSample{avg=70.14959644277697}, derivative=1.2406756199284968E-6}, evalInputDelta = 3.2122789406230368E-6
F(0.7829966628603233) = LineSearchPoint{point=PointSample{avg=70.14959280896888}, derivative=-4.671925250972043E-7}, evalInputDelta = -4.21529151140021E-7
F(5.480976640022263) = LineSearchPoint{point=PointSample{avg=70.14959261999034}, derivative=3.8674154694409464E-7}, evalInputDelta = -6.105076835183354E-7
70.14959261999034 <= 70.14959323049803
New Minimum: 70.14959224728172 > 70.14959220855795
F(3.353290084898733) = LineSearchPoint{point=PointSample{avg=70.14959220855795}, derivative=-1.504324955669921E-16}, evalInputDelta = -1.0219400792266242E-6
Left bracket at 3.353290084898733
Converged to left
Fitness changed from 70.14959323049803 to 70.14959220855795
Iteration 10 complete. Error: 70.14959220855795 Total: 2.5594; Orientation: 0.0978; Line Search: 2.2200
F(0.0) = LineSearchPoint{point=PointSample{avg=70.14959220855795}, derivative=-7.574406635666491E-7}
New Minimum: 70.14959220855795 > 70.14959124667993
F(3.353290084898733) = LineSearchPoint{point=PointSample{avg=70.14959124667993}, derivative=1.8374857183530677E-7}, evalInputDelta = -9.618780154596607E-7
70.14959124667993 <= 70.14959220855795
New Minimum: 70.14959124667993 > 70.1495911865332
F(2.6986265582950835) = LineSearchPoint{point=PointSample{avg=70.1495911865332}, derivative=-1.1445209768462593E-16}, evalInputDelta = -1.0220247474990174E-6
Left bracket at 2.6986265582950835
Converged to left
Fitness changed from 70.14959220855795 to 70.1495911865332
Iteration 11 complete. Error: 70.1495911865332 Total: 1.2830; Orientation: 0.0981; Line Search: 1.0146
F(0.0) = LineSearchPoint{point=PointSample{avg=70.1495911865332}, derivative=-6.100390467631346E-7}
New Minimum: 70.1495911865332 > 70.14959020326027
F(2.6986265582950835) = LineSearchPoint{point=PointSample{avg=70.14959020326027}, derivative=-1.1868194993488064E-7}, evalInputDelta = -9.832729261916029E-7
F(18.890385908065586) = LineSearchPoint{point=PointSample{avg=70.14961214939835}, derivative=2.8294606394098985E-6}, evalInputDelta = 2.0962865150409016E-5
F(1.4531066083127373) = LineSearchPoint{point=PointSample{avg=70.14959049231064}, derivative=-3.454621485193169E-7}, evalInputDelta = -6.942225638795207E-7
F(10.171746258189161) = LineSearchPoint{point=PointSample{avg=70.14959440060258}, derivative=1.2419992433374872E-6}, evalInputDelta = 3.2140693804194598E-6
F(0.7824420198607047) = LineSearchPoint{point=PointSample{avg=70.1495907649481}, derivative=-4.675745631073965E-7}, evalInputDelta = -4.2158509927503474E-7
F(5.477094139024933) = LineSearchPoint{point=PointSample{avg=70.14959057631177}, derivative=3.8721233951591014E-7}, evalInputDelta = -6.102214342718071E-7
70.14959057631177 <= 70.1495911865332
New Minimum: 70.14959020326027 > 70.14959016458042
F(3.350450381492672) = LineSearchPoint{point=PointSample{avg=70.14959016458042}, derivative=-1.9151054948417148E-16}, evalInputDelta = -1.0219527837307396E-6
Left bracket at 3.350450381492672
Converged to left
Fitness changed from 70.1495911865332 to 70.14959016458042
Iteration 12 complete. Error: 70.14959016458042 Total: 2.4956; Orientation: 0.0972; Line Search: 2.2275
F(0.0) = LineSearchPoint{point=PointSample{avg=70.14959016458042}, derivative=-7.579642782350597E-7}
New Minimum: 70.14959016458042 > 70.14958920254874
F(3.350450381492672) = LineSearchPoint{point=PointSample{avg=70.14958920254874}, derivative=1.836942166033171E-7}, evalInputDelta = -9.620316774316962E-7
70.14958920254874 <= 70.14959016458042
New Minimum: 70.14958920254874 > 70.14958914251841
F(2.696860612515739) = LineSearchPoint{point=PointSample{avg=70.14958914251841}, derivative=-1.3119968605729716E-16}, evalInputDelta = -1.0220620083600807E-6
Left bracket at 2.696860612515739
Converged to left
Fitness changed from 70.14959016458042 to 70.14958914251841
Iteration 13 complete. Error: 70.14958914251841 Total: 1.2682; Orientation: 0.0979; Line Search: 1.0008
F(0.0) = LineSearchPoint{point=PointSample{avg=70.14958914251841}, derivative=-6.105595159508397E-7}
New Minimum: 70.14958914251841 > 70.14958815913253
F(2.696860612515739) = LineSearchPoint{point=PointSample{avg=70.14958815913253}, derivative=-1.1872242978109984E-7}, evalInputDelta = -9.833858740648793E-7
F(18.878024287610174) = LineSearchPoint{point=PointSample{avg=70.1496101135547}, derivative=2.8323000972901272E-6}, evalInputDelta = 2.0971036292394274E-5
F(1.4521557144315518) = LineSearchPoint{point=PointSample{avg=70.14958844818202}, derivative=-3.4572416191769747E-7}, evalInputDelta = -6.943363928257895E-7
F(10.165090001020863) = LineSearchPoint{point=PointSample{avg=70.14959235838921}, derivative=1.2432879651613514E-6}, evalInputDelta = 3.2158708052065776E-6
F(0.7819300000785279) = LineSearchPoint{point=PointSample{avg=70.14958872085664}, derivative=-4.6795586379596596E-7}, evalInputDelta = -4.2166176683622325E-7
F(5.473510000549695) = LineSearchPoint{point=PointSample{avg=70.1495885325136}, derivative=3.8766604996278274E-7}, evalInputDelta = -6.100048040025285E-7
70.1495885325136 <= 70.14958914251841
New Minimum: 70.14958815913253 > 70.14958812048935
F(3.3478441452549217) = LineSearchPoint{point=PointSample{avg=70.14958812048935}, derivative=-2.305645917041071E-16}, evalInputDelta = -1.022029053387996E-6
Left bracket at 3.3478441452549217
Converged to left
Fitness changed from 70.14958914251841 to 70.14958812048935
Iteration 14 complete. Error: 70.14958812048935 Total: 2.4910; Orientation: 0.0969; Line Search: 2.2257
Final threshold in iteration 14: 70.14958812048935 (> 0.0) after 30.895s (< 30.000s)

Returns

    70.14958812048935

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

    [0.006050359025376245, -0.001105742650657184, -0.005218997368123734, -0.011175351146265045, -0.006952186268925792, 0.001010455060498378, -0.006435619026909931, 0.002893461856515018, 0.010489458744608512, 0.009758074964691986, -0.0044019531274072975, 0.015422734174404169, -5.121650730744812E-4, -5.818874547660051E-4, -0.0014194485187658747, -0.00658331657203558, -1.80167131521226E-4, 0.007152989663766901, -0.005272594653747624, -0.001970871404778621, -0.00805560348168001, 0.004516476048096718, 0.005474513060679583, 0.006656785611087433, -0.0020448795299469217, -0.006419396878949065, -0.009202334188867147, 0.008116685634225091, -0.010588659517701804, 0.026950972858270278, 0.005429820188830407, 0.004753666850902104, 0.007793502110684448, 6.430868707886326E-4, -0.004662825454877945, -0.009346890366973589, 0.0013749184379928227, 0.0037047934403833635, -6.019736645040052E-4, 0.005714665484120274, 0.010399479833589362, -0.0017561869117056783, -0.002510508381606978, -0.0013687217750519838, 0.0011071279378749427, 0.006898857489883859, -0.007930717094905832, -0.008424445392065662, 0.008400921983702481, 0.008784130864576202, 0.009827464483741711, 7.496031566804121E-4, 0.004048887674059224, -0.002797795969182446, 0.009021726200204461, -0.0030665814092974988, -0.012735872407639869, 0.00576879897249153, 0.014134729480806463, -0.008955142178837784, 0.005881576956995857, 0.015198963683893577, 0.008348992442429282, 0.0048419554906349955, -0.00684593938044341, -0.007087070238177104, -0.0032135025006266578, 0.009203782172967204, 9.786835582726748E-4, -0.0025174367821949595, 0.009053538313504068, 3.572816611078509E-5, 0.009004232835409893, -2.4880081316137496E-4, -0.01235537610895048, 0.00863903414000392, 0.006270454419497434, -5.822543226033261E-4, -0.005778841797607753, -1.992171654130538E-4, -0.016768540052010054, -7.009150859978453E-4, -0.003612547901688421, -0.020293464325644044, -8.337550992040952E-4, 0.007953247352871335, 0.004353002193779688, -9.196471601799787E-4, 0.004157516920080783, 0.011492109859749973, 0.010858358476032145, -0.00864808545253547, -0.011983847414492576, -0.001023556383924745, -0.003576927468900793, -0.0041122636434127655, -0.01938401249438612, -0.005831855616150032, 0.006293173220770108, 0.005417124165239122, 0.007185506070345942, -0.016671357397704298, 0.0017028777131040595, 0.00798740726304087, -0.017543009006481373, 0.005674732957175316, 0.008428995398346389, 0.010590876627826472, -0.00864169567809472, 0.0044298234676612164, 0.004391010714753839, 0.0020809713186706875, -0.003539356949988839, -0.0012840388529551147, -0.0040888878283107544, -0.006507273931448409, 0.006800196369737086, -0.010402265286089944, 0.01857115424016722, -0.007808350127789371, -0.0073953867822940805, 0.0018552583042559822, 0.0024982120410387684, -0.004541429719514585, -0.006672027989921944, 2.8097451865373115E-4, 0.012135922925260952, 0.00603189170651295, 0.006583365023392246, 7.492656049527833E-4, 0.007999839146128182, 0.0011914613310929079, -0.0033812078115497976, 0.0014167637796317328, 0.001626907692855186, -0.00961549904184041, 0.013634332796228879, 4.955051306980528E-4, 0.014749765997245657, 0.00177990410116101, 0.015336226609396682, 0.022732369370977057, -0.0012945084068051794, 0.007067400960304339]

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

    [
    	[ [ 1.091930495080113, -1.1960476568697669, 1.355964155730866, 0.7680939121873535 ], [ 1.9718848750279334, -0.395939405451782, -0.7839949717471031, 1.7319468196324501 ], [ 1.2721117946045362, 0.8639193663490342, -0.4519029696450151, -0.35199339516653394 ], [ -1.8639257733229817, 0.9399064963011122, 0.3400670190665677, -1.6559465642089701 ], [ 1.3600316818851816, -1.899897374044622, -1.7839403891538714, 1.623849715906574 ], [ -0.3759758443908327, -0.27609282238510646, -1.3799304051017145, -1.92381700999356 ], [ 0.315863003573684, -1.2840373397774103, -1.9320369881704351, 1.1438909966112885 ], [ 0.20411825404817313, 0.36404455717077483, -0.11202191417535087, -0.15596374772339228 ], ... ],
    	[ [ 1.7558890515145091, -1.7599311050559032, 1.9359422943207572, -0.31998831103902287 ], [ 1.263902607559166, 0.007901642027159074, -1.1239483443855856, -1.8878645260017088 ], [ 1.079887233040397, 1.5240322045474926, -1.4198076223696667, 1.5759706687695865 ], [ 1.6198819830400273, 0.6039982190084416, 1.2759420239696504, 0.7720011099436064 ], [ -0.003930409183284622, -0.8721022703411795, -1.591924052347044, -1.3718142254570842 ], [ 0.12388438279679725, -0.20392815812038684, 1.2079557737024351, 1.8796352256245765 ], [ -0.4280232618132318, 0.05994986654639686, 1.8639662159421913, -1.8876912253006972 ], [ 0.5279986051199007, 1.6679223039636375, -0.31999483715208205, 0.9839123817830048 ], ... ],
    	[ [ -1.0518748890182534, 1.9958646262430555, 1.0519396385630717, -0.4159631352784845 ], [ -1.9559047204600883, 1.6600623685412315, -1.91188997627865, -1.4279245852551794 ], [ -0.9360264372705881, -0.5879892336973007, 0.39994497243658733, 1.0759586107102903 ], [ -0.011987081209981121, 1.7078511969769692, -1.7599446556189704, 0.3001752310968999 ], [ 0.5719991418437014, 0.3319997611979976, 0.9120630481076885, 1.99178767615485 ], [ 0.3841058409643241, -1.5279820102063697, 0.9559342959030231, -1.575866381965361 ], [ -1.9439941480151004, 0.660076833123982, -0.011949094579091825, 0.04393446723078929 ], [ 0.37184900968607076, 0.66799653098922, 1.7718484627821314, -0.7317882676824503 ], ... ],
    	[ [ 1.4639842372615421, 0.5720222345235011, -0.6600407141584334, 1.6719998002052852 ], [ -1.6519102790753264, -1.6879716627833492, -1.8800041162131442, -0.3439810791378997 ], [ 1.9239742302360519, -0.05211823740633116, -1.8358161585836603, 0.23214565675149545 ], [ -0.4001125422690827, -1.5918433939384666, -1.739756051504835, 0.4919203203622592 ], [ 1.3479555123223066, -0.336161788484504, 0.5758424203031547, -1.727841870995272 ], [ -1.3280334321106695, 1.0161598443605158, -0.9198745020209856, -0.8922616774203025 ], [ -1.851910999782966, 1.9596684000966844, 0.015737077273857182, -1.1997155420137835 ], [ 0.38811727026030696, 1.1921318743275868, -1.4678272680213427, 0.5477578322710076 ], ... ],
    	[ [ 0.7038962407789828, -1.0840673890094172, 1.5800286911429609, -0.8758762498278098 ], [ 0.8719144686044941, 0.1920298917476833, -0.795923447872608, 0.8599107078108176 ], [ 1.5399966636836355, -0.9399883864982808, 0.5321129134401533, -0.9799320367867267 ], [ -1.8759281779406454, -0.5921855663326187, 0.7239792040080059, 0.10795438479396184 ], [ 1.9398464842850407, 0.3401025327826483, -1.1679685449129549, 1.359889006130175 ], [ -0.33599396346422894, 0.17988241459386128, 1.7318432471288345, 0.9999888452883002 ], [ 1.0079463858344115, -0.8998911430960703, 1.828045413521985, 1.155820402989441 ], [ 1.4999222557594905, 1.3199600178352366, 0.060012465878131464, -1.9398021254982059 ], ... ],
    	[ [ -0.26799377901974486, 1.6198316383153433, 0.5559966343504689, -1.0758870855193627 ], [ 0.5279754677673804, -0.8639029796157531, -1.2038789478777434, 0.1519036179442408 ], [ 1.7481202841026358, 1.591953116863104, 0.39611030909897205, 1.5439530564513808 ], [ -1.996029273771696, 1.959945770026376, -0.6159321535358934, -1.6718622156465384 ], [ 0.6559892156231478, 0.3959024662146158, 0.8039845054381157, -0.5199522605157597 ], [ 0.8319542443270725, 1.1080061058999002, -1.9799330740820436, 0.23196046755072375 ], [ -0.1799572297698302, -0.3319704347410503, 1.8158644577143024, -0.8840185826290647 ], [ -0.8319135883581383, 1.9921567598226926, 1.7719516352843603, -1.3521414827052303 ], ... ],
    	[ [ 0.535998132242722, 1.0520388196987989, -0.004032607775504701, -1.1320753535726187 ], [ 1.9639895296101795, -0.627971311480254, -1.3117576857320579, -1.5158897631871526 ], [ 1.7358627651720584, 1.7758925164282455, -1.0919570919686172, -1.1878535782601167 ], [ -0.7839770161701148, -0.9800532036657217, -0.06812957583241132, -1.8240008736334985 ], [ -1.4518950188828377, 0.6919633623831772, -0.9879659081995179, -1.2920293516319517 ], [ -0.9798630858454348, 0.8839326053479142, 0.8759652362666827, 0.03997602941888135 ], [ 1.1640707133770398, 0.5602346400034857, 1.4680138353367858, 0.8397565405832778 ], [ -0.6758852795584274, 1.8478354142610396, 0.5278787238418872, -0.08393682698782666 ], ... ],
    	[ [ -0.8439173880603341, 1.6637923358090578, 0.556004002216071, -1.4918807225470456 ], [ 1.2799070341548884, -1.3797607994825358, -1.69571613891705, 1.5918031020525982 ], [ -1.9801213821352224, 0.8918364914331653, -1.4641359022204188, -1.5677332011313885 ], [ -0.25201864282315806, 0.8998779487571287, -0.5279539027935674, 1.467890763018031 ], [ -0.591885982723752, 1.14797514278881, -0.007884287133027143, 0.3439437120521823 ], [ -1.8559636630881509, 1.4680078035547184, -1.515962090988381, 1.1239362916128006 ], [ 0.6080328606027157, 1.8399451732063978, 0.06804985520419088, -0.7240058354245893 ], [ 0.42004025740720224, 0.011930312700252754, 0.40012582241076333, -0.659866579192147 ], ... ],
    	...
    ]

To produce the following output:

TrainingTester.java:633 executed in 0.03 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.02644021837951583, 0.01803470150779573, 0.021838038740038725, 0.03330619682180459 ], [ -0.010691400468353, 0.06492744676908076, -0.020075534396258553, -0.09164017018015251 ], [ 0.0014552631623022062, 0.028924892176756516, 0.06116979655826785, -0.07539345203131045 ], [ -0.025148802679692904, -0.0371020928109278, 0.03615316717524583, 0.019521640276851812 ], [ -0.008714416757355351, 0.010502135516463017, -0.005416920001374511, -0.06606230299549645 ], [ -0.013401936053719076, -0.05519492789796947, 0.06364574692141227, 0.019464296462723733 ], [ 0.041595414252765826, -0.03359345634612975, -0.0196497824180251, -0.03120721388453856 ], [ -0.025298994866186978, -0.021162078268039806, -0.039111762584639616, 0.003815108265584473 ], ... ],
    	[ [ 0.08915687684397515, 0.025768546464044282, -0.13716229328157356, -0.037018329212569596 ], [ -0.0652810075358076, 0.011073506291830936, -0.10938904744869446, 0.01728979931556806 ], [ 0.027268492320830548, -0.033024412552809385, 0.047014139309788414, -0.024486843241544945 ], [ 0.080779695283491, 0.1209605162529154, 0.1129210883894865, -0.05993135871558184 ], [ -0.11151306088716115, -0.01625827556133533, 0.09591224577787176, 0.055516865054424366 ], [ 0.03167772489671885, 0.027495127909095207, -0.026755075668161845, 0.024759399117287247 ], [ 0.014216602134301932, 0.035027303840784826, -0.0895247408270373, 0.024603070286215188 ], [ 0.05953623671188701, 0.04023557560509329, -0.03092017040989464, 0.008105616436769691 ], ... ],
    	[ [ -0.0398597637485124, -0.026854136193885554, 8.164130195097497E-4, 0.029475049683154893 ], [ 0.04135924732790543, -0.06690975464691572, -0.055041557587833294, -0.051921993972721146 ], [ 0.06643581013266847, -0.08363403620732471, -0.06435811991867058, 0.0763405400821689 ], [ -0.06623145824004933, -0.04172650715435675, 0.11710097365859537, 0.1014291967800614 ], [ 0.05513102269549132, 0.027116617093408128, 0.02539536350328837, -0.0380424607599581 ], [ -0.04255096350238514, -0.015461558219416244, -0.14041886100641093, -0.03836576822675736 ], [ 0.07975516114656263, -0.03965684713837805, -0.06930747481221394, -0.07960246035751663 ], [ -0.027269623177879697, 0.039776583497273366, -0.02912725028655755, 0.014046516858481389 ], ... ],
    	[ [ 0.036416039462279635, 0.08134292418150343, 0.10681560659781086, -0.12446722400021677 ], [ -0.029339430894828482, -0.010608461031285136, 0.08828870601658094, -0.049801049141240755 ], [ 0.03006849827947751, -0.05237270096244142, 0.04857587375311746, -0.026636861091490684 ], [ 0.09077917466166877, -0.050936292065951835, -0.0634144731143525, -0.1056299943931791 ], [ -0.03301339215579157, -0.008102080703217149, 0.050325386965196485, 0.09555354927361859 ], [ 0.0159026718738935, -0.06466011277301908, 0.060415265020428904, 0.03567274522206703 ], [ -0.017964085167072152, -0.020816199802459072, -0.06352096801357478, 0.07478365964812866 ], [ -0.021029217674277786, 0.006928524248136244, 0.026207921198869524, -0.06135318527902188 ], ... ],
    	[ [ -0.010176662375059332, 0.06590602922422543, 0.04028807842618472, -9.213704931596828E-4 ], [ 0.02283401737390988, 0.07541300454141267, 0.002448019807718049, -0.07967245637149625 ], [ -0.02727844996425374, 0.03697991581713091, 0.04978686168749233, -0.016623619434126404 ], [ -0.03961479957731845, -0.015916562539943394, -0.07370714710714385, 0.04199370171616988 ], [ -0.022937963076882468, 0.016251790911847818, 0.04849309108119794, -0.11161572254329283 ], [ -0.023100141389617367, 0.058319686201970006, 0.0018652056245907584, -0.011272358155887625 ], [ 0.03559862819463626, 0.11555904946522515, 0.0424260914724074, -0.011081618436766895 ], [ -0.08528215455415072, 0.12961341309529703, 0.021152599848345985, -0.06524823518096022 ], ... ],
    	[ [ 0.024446710954451962, -0.009429087394380973, -0.00311698651136853, -0.06520446449660378 ], [ -0.11559862102271926, 0.006999722787337345, -0.02521699950910898, -0.01199078216262375 ], [ -0.04327599379023177, -0.010724038745019216, 0.05396073369604478, -0.031973867029419706 ], [ 0.027725616347611, -0.02824981943639153, -0.1304587000931871, -0.06020451244731897 ], [ 0.0019119573549764217, 0.0029644040641142524, -0.0300390093791669, -0.015531903111382927 ], [ 0.05943170362901798, -0.010844930087487107, -0.04590522348373686, -0.002850139827370021 ], [ -0.01319525424658797, 0.003243492428559686, -0.05270802332262348, 0.04588914306645916 ], [ -0.026636530784066283, 0.11265022137045731, -0.02823004050607362, -0.04813063450739931 ], ... ],
    	[ [ 0.019076447357842245, 0.06437565901560588, 0.0425443792944908, -0.11201003011315576 ], [ 0.017963423206167367, -0.07585798021023034, -0.12433485660623596, -0.023540336345999134 ], [ 0.07876849798205628, -0.02342028641893477, -0.008821316667818236, -0.08943513465762495 ], [ 0.027580507868758364, -0.030803692522856564, 0.03161854707429321, -0.0561393419374833 ], [ 0.07655029291999166, -0.07409097466985787, -0.02525271772335558, -0.023593431373809155 ], [ -0.012645965532179919, -7.98904542181148E-4, -0.01773525274413745, 0.06074662202814664 ], [ -2.565793125628832E-4, -0.005401959054259463, 0.019371508795716943, 0.045444220890077026 ], [ -0.12293043906619504, 0.08793573273407254, 0.06619314195662214, 0.020431332693769687 ], ... ],
    	[ [ -0.04565445596606963, 0.08744910593765479, 0.11986650390050038, -0.047641155911313675 ], [ -0.004527535142132839, 0.04168481770816127, -0.0010246713204221714, -0.06664360787873837 ], [ -0.06283344838966547, -0.05678481675237053, -0.020317230633111704, 0.040896415276162196 ], [ 0.05333235660800337, -0.057338571781624395, 0.02081579504623003, -0.022640628460393126 ], [ 0.015446231457746807, -0.04443919959930422, 0.03102926688297451, 0.02107991283046412 ], [ 0.05705233016877682, -0.0852988492341712, -0.03260422373070365, 0.03398833423811531 ], [ 0.07495187627588956, -0.005882510976581593, 0.05160998440911358, -0.04914533107270911 ], [ 0.07709334798502913, 0.017914614877701084, -0.01832479782011172, 0.056149777235676726 ], ... ],
    	...
    ]

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 35.28 seconds (0.416 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: 12283425467883
Reset training subject: 12283598234241
Adding measurement 4c6e6b2b to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD
Non-optimal measurement 140.2819486262868 < 140.2819486262868. Total: 1
th(0)=140.2819486262868;dx=-93.35190322086805
Adding measurement 433dedde to history. Total: 1
New Minimum: 140.2819486262868 > 83.343288710638
WOLF (strong): th(2.154434690031884)=83.343288710638; dx=40.4721788114312 evalInputDelta=56.9386599156488
Adding measurement 2bfa3731 to history. Total: 2
New Minimum: 83.343288710638 > 75.77321355522233
END: th(1.077217345015942)=75.77321355522233; dx=-26.422946107443465 evalInputDelta=64.50873507106448
Fitness changed from 140.2819486262868 to 75.77321355522233
Iteration 1 complete. Error: 75.77321355522233 Total: 1.5282; Orientation: 0.1115; Line Search: 0.9042
Non-optimal measurement 75.77321355522233 < 75.77321355522233. Total: 3
LBFGS Accumulation History: 3 points
Non-optimal measurement 75.77321355522233 < 75.77321355522233. Total: 3
th(0)=75.77321355522233;dx=-7.481641053351125
Adding measurement 3e23e173 to history. Total: 3
New Minimum: 75.77321355522233 > 71.81303234496278
WOLF (strong): th(2.3207944168063896)=71.81303234496278; dx=4.068693147617407 evalInputDelta=3.960181210259549
Adding measurement 333cb6b9 to history. Total: 4
New Minimum: 71.81303234496278 > 70.44237906079155
END: th(1.1603972084031948)=70.44237906079155; dx=-1.7063485570252745 evalInputDelta=5.330834494430775
Fitness changed from 75.77321355522233 to 70.44237906079155
Iteration 2 complete. Error: 70.44237906079155 Total: 1.1308; Orientation: 0.0912; Line Search: 0.8704
Non-optimal measurement 70.44237906079155 < 70.44237906079155. Total: 5
Rejected: LBFGS Orientation magnitude: 9.383e-01, gradient 6.240e-01, dot -1.000; [45f9f67e-6b9d-438b-ad44-cf49a670599e = 1.000/1.000e+00, a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00, 2f149541-b9f3-4004-bb9a-f77d720b4be8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 70.44237906079155, 71.81303234496278, 75.77321355522233, 83.343288710638, 140.2819486262868
Rejected: LBFGS Orientation magnitude: 9.386e-01, gradient 6.240e-01, dot -1.000; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00, 45f9f67e-6b9d-438b-ad44-cf49a670599e = 1.000/1.000e+00, 2f149541-b9f3-4004-bb9a-f77d720b4be8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 70.44237906079155, 71.81303234496278, 75.77321355522233, 83.343288710638
LBFGS Accumulation History: 3 points
Removed measurement 333cb6b9 to history. Total: 4
Removed measurement 3e23e173 to history. Total: 3
Adding measurement feacc1c to history. Total: 3
th(0)=70.44237906079155;dx=-0.3893803310269362
Adding measurement 69e3e5de to history. Total: 4
New Minimum: 70.44237906079155 > 70.27811294264833
WOLF (strong): th(2.5000000000000004)=70.27811294264833; dx=0.25796691585491954 evalInputDelta=0.16426611814321745
Adding measurement 4e264ba8 to history. Total: 5
New Minimum: 70.27811294264833 > 70.15794998707376
END: th(1.2500000000000002)=70.15794998707376; dx=-0.06570631709291304 evalInputDelta=0.2844290737177886
Fitness changed from 70.44237906079155 to 70.15794998707376
Iteration 3 complete. Error: 70.15794998707376 Total: 7.7016; Orientation: 6.5134; Line Search: 1.0183
Non-optimal measurement 70.15794998707376 < 70.15794998707376. Total: 6
Rejected: LBFGS Orientation magnitude: 1.585e-01, gradient 1.054e-01, dot -1.000; [2f149541-b9f3-4004-bb9a-f77d720b4be8 = 1.000/1.000e+00, 45f9f67e-6b9d-438b-ad44-cf49a670599e = 1.000/1.000e+00, a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 70.15794998707376, 70.27811294264833, 70.44237906079155, 75.77321355522233, 83.343288710638, 140.2819486262868
Rejected: LBFGS Orientation magnitude: 1.585e-01, gradient 1.054e-01, dot -1.000; [2f149541-b9f3-4004-bb9a-f77d720b4be8 = 1.000/1.000e+00, a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00, 45f9f67e-6b9d-438b-ad44-cf49a670599e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 70.15794998707376, 70.27811294264833, 70.44237906079155, 75.77321355522233, 83.343288710638
Rejected: LBFGS Orientation magnitude: 1.585e-01, gradient 1.054e-01, dot -1.000; [2f149541-b9f3-4004-bb9a-f77d720b4be8 = 1.000/1.000e+00, a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00, 45f9f67e-6b9d-438b-ad44-cf49a670599e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 70.15794998707376, 70.27811294264833, 70.44237906079155, 75.77321355522233
LBFGS Accumulation History: 3 points
Removed measurement 4e264ba8 to history. Total: 5
Removed measurement 69e3e5de to history. Total: 4
Removed measurement feacc1c to history. Total: 3
Adding measurement 1b46181f to history. Total: 3
th(0)=70.15794998707376;dx=-0.01110041632437677
Adding measurement 7d30f3b4 to history. Total: 4
New Minimum: 70.15794998707376 > 70.15481128713992
WOLF (strong): th(2.6930433625398553)=70.15481128713992; dx=0.008769447115675774 evalInputDelta=0.003138699933842304
Adding measurement 4955d207 to history. Total: 5
New Minimum: 70.15481128713992 > 70.14969183662538
END: th(1.3465216812699277)=70.14969183662538; dx=-0.0011654842456279998 evalInputDelta=0.008258150448384072
Fitness changed from 70.15794998707376 to 70.14969183662538
Iteration 4 complete. Error: 70.14969183662538 Total: 12.5058; Orientation: 11.3916; Line Search: 0.9333
Non-optimal measurement 70.14969183662538 < 70.14969183662538. Total: 6
Rejected: LBFGS Orientation magnitude: 1.670e-02, gradient 1.109e-02, dot -1.000; [45f9f67e-6b9d-438b-ad44-cf49a670599e = 1.000/1.000e+00, a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00, 2f149541-b9f3-4004-bb9a-f77d720b4be8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 70.14969183662538, 70.15481128713992, 70.15794998707376, 75.77321355522233, 83.343288710638, 140.2819486262868
Rejected: LBFGS Orientation magnitude: 1.671e-02, gradient 1.109e-02, dot -1.000; [a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00, 2f149541-b9f3-4004-bb9a-f77d720b4be8 = 1.000/1.000e+00, 45f9f67e-6b9d-438b-ad44-cf49a670599e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 70.14969183662538, 70.15481128713992, 70.15794998707376, 75.77321355522233, 83.343288710638
Rejected: LBFGS Orientation magnitude: 1.670e-02, gradient 1.109e-02, dot -1.000; [2f149541-b9f3-4004-bb9a-f77d720b4be8 = 1.000/1.000e+00, a029a59b-dcc0-4442-8ffd-f34fcacc9f26 = 1.000/1.000e+00, 45f9f67e-6b9d-438b-ad44-cf49a670599e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 70.14969183662538, 70.15481128713992, 70.15794998707376, 75.77321355522233
LBFGS Accumulation History: 3 points
Removed measurement 4955d207 to history. Total: 5
Removed measurement 7d30f3b4 to history. Total: 4
Removed measurement 1b46181f to history. Total: 3
Adding measurement 73493de to history. Total: 3
th(0)=70.14969183662538;dx=-1.230476470096748E-4
Adding measurement 98b5bc3 to history. Total: 4
New Minimum: 70.14969183662538 > 70.14967782939817
WOLF (strong): th(2.9009930210079875)=70.14967782939817; dx=1.1339079694123558E-4 evalInputDelta=1.4007227207457618E-5
Adding measurement 6db4c2c8 to history. Total: 5
New Minimum: 70.14967782939817 > 70.1495990947273
END: th(1.4504965105039938)=70.1495990947273; dx=-4.82842497017705E-6 evalInputDelta=9.274189808650135E-5
Fitness changed from 70.14969183662538 to 70.1495990947273
Iteration 5 complete. Error: 70.1495990947273 Total: 12.4163; Orientation: 11.3148; Line Search: 0.9308
Final threshold in iteration 5: 70.1495990947273 (> 0.0) after 35.283s (< 30.000s)

Returns

    70.1495990947273

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

    [0.006063719080262562, -0.0013124474202335311, -0.005177759956835781, -0.011168477874440988, -0.006783381784930783, 8.486843356366569E-4, -0.006313691973027099, 0.002816529182567493, 0.010561932237301041, 0.009831026646163612, -0.004515169648277962, 0.015437387920229344, -5.364745760997585E-4, -7.261393732557308E-4, -0.0014876966209508098, -0.006650746919586569, -1.278143708976152E-4, 0.007137637107341716, -0.005325126639497645, -0.002024112055947785, -0.00788776754033591, 0.0046205202763547094, 0.005497873298450386, 0.006675392965700677, -0.0020526973642953526, -0.006443097940169793, -0.00928328269539239, 0.0080889517992971, -0.010519074637713934, 0.026958404373588818, 0.005262377137038513, 0.004887603819597919, 0.007685355186619558, 6.583884425754162E-4, -0.004650266665514399, -0.009301666686270301, 0.0014687969483300378, 0.00373980546567572, -5.590966165105877E-4, 0.005597735513151294, 0.010384816339653746, -0.0017680316928729328, -0.0024727966369322116, -0.0013291603258249692, 0.0010785004318731085, 0.006931345729439063, -0.007880078185458642, -0.008420076495221423, 0.008536651934370846, 0.008838761849903627, 0.009855167701625797, 8.215655872432837E-4, 0.004184224538952249, -0.0027472579394960442, 0.008961916648417136, -0.0031409030178414146, -0.012711145405163972, 0.005757048668542344, 0.013987895003089217, -0.008883331034191292, 0.00585823648861258, 0.015243047079203523, 0.00831915577017929, 0.004851196988047901, -0.00685609586173202, -0.007020367813608259, -0.0032286895044367765, 0.009182195320916823, 0.0010719767809312265, -0.002505861780503146, 0.009112288032182444, 3.0813667034212565E-5, 0.009061868578979672, -2.69556268323514E-4, -0.012315411069334498, 0.008712695431455782, 0.00621735575923846, -5.372712041154114E-4, -0.005755789821668694, -2.1425994525405521E-4, -0.016737421763126988, -7.017162752968454E-4, -0.003565730693282636, -0.02028952262672871, -8.516576753568002E-4, 0.007971434358045888, 0.0042780782246266014, -9.121148326852978E-4, 0.004167467074272171, 0.011519402392752674, 0.010820103478034688, -0.008636413321877466, -0.011946969170952318, -0.001061686322283958, -0.003599383410753423, -0.004082044693753156, -0.019351081387995225, -0.0059034034954805505, 0.00625722166841686, 0.005436731274662766, 0.007202710415406763, -0.016661388793511808, 0.0017720901606722895, 0.007966945072600162, -0.01760154614118229, 0.005662063101507399, 0.008520884734423506, 0.01053857072042191, -0.008703207706661248, 0.004330309280357656, 0.004410688538194341, 0.002131297393112289, -0.003532011571878968, -0.0013144416528645892, -0.004007091938357662, -0.006529772118373018, 0.006785065326529101, -0.010449205576618424, 0.01845976183992489, -0.00775282387981469, -0.007429352034761349, 0.0017532711154211174, 0.0024417788097314745, -0.0046373450583427275, -0.0067812772281123125, 2.1754640619090979E-4, 0.01219612091836006, 0.006027235361295425, 0.006680236301940005, 7.386735144992089E-4, 0.008018038545294101, 0.001235424875628523, -0.003385464036689566, 0.0013499580981927862, 0.0016130139171478732, -0.009531308291813178, 0.013572562298269452, 5.310166026878319E-4, 0.014643893075105881, 0.0018356746435688703, 0.015232263485735397, 0.022658888448639416, -0.0012593418125378115, 0.007038674080275338]

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

    [
    	[ [ 1.091943354269013, -1.196036952525, 1.3559750804579829, 0.7680726829551865 ], [ 1.971891160406152, -0.3959503555100866, -0.7839906245555429, 1.7319610607276474 ], [ 1.2720877229864558, 0.8639274550573055, -0.4519115307319546, -0.35199179210085074 ], [ -1.863933223363087, 0.9399422491490315, 0.34006220075876115, -1.6559651932163741 ], [ 1.3600329070389723, -1.8999238884008447, -1.7839506940686276, 1.6238940980999625 ], [ -0.375980017496974, -0.276072994390533, -1.3799416341378623, -1.9238687538790726 ], [ 0.31589276651366544, -1.2840382862202113, -1.9320419306316894, 1.1439164789559086 ], [ 0.20410753887923744, 0.3640337220041638, -0.11201700339778123, -0.1559559465916358 ], ... ],
    	[ [ 1.7559055199568772, -1.7599600764146957, 1.9359380750699233, -0.3199936402447338 ], [ 1.2639170638395394, 0.007903349990708472, -1.1239579707617526, -1.8878861381360654 ], [ 1.0799083730846875, 1.524048675506299, -1.4198414125937568, 1.5759997360540718 ], [ 1.6199090431592782, 0.6039851145846775, 1.2759478307290724, 0.7719926125458103 ], [ -0.003928913126526028, -0.8720992262178752, -1.5919418034748987, -1.3718701520137417 ], [ 0.12390283910627388, -0.20394384868859228, 1.2079708082553162, 1.8797092635422186 ], [ -0.42802211950364905, 0.05997854955372965, 1.8639975117753955, -1.887732778178591 ], [ 0.5280035734790453, 1.667911851899492, -0.3199835906691834, 0.9839260734319681 ], ... ],
    	[ [ -1.0518992302296672, 1.9958861996344581, 1.051959143900201, -0.41596786622407134 ], [ -1.9559427549821657, 1.6600643302560076, -1.911909583845973, -1.427943463222554 ], [ -0.9360520734605066, -0.5880022718316109, 0.39993168100847915, 1.0759664711206456 ], [ -0.011991361980750589, 1.7078621568381818, -1.75996570234812, 0.30013526447137406 ], [ 0.571987432124036, 0.331978947549572, 0.9120508386848746, 1.9918583757010306 ], [ 0.38406589659795515, -1.527973963424863, 0.9559684829640536, -1.5758984389710018 ], [ -1.9440022432992428, 0.6600640217749472, -0.011978836587375013, 0.04393763093521208 ], [ 0.3718585205222922, 0.667994521744264, 1.771854816961022, -0.7318322246958181 ], ... ],
    	[ [ 1.463994881934952, 0.5720193027439388, -0.6600481472906244, 1.6719958098874952 ], [ -1.651918907783869, -1.6879813116369293, -1.8800372010896105, -0.34399255568824755 ], [ 1.9239838611776983, -0.05206453937465209, -1.835856886115299, 0.23214240929096439 ], [ -0.4001026989138561, -1.5918956613938673, -1.7397994462755992, 0.49196319103915986 ], [ 1.347959018194435, -0.3361434927368084, 0.5758931330031412, -1.7278885148966863 ], [ -1.3280389036449738, 1.0161472579310735, -0.9199162324001056, -0.8922314604337496 ], [ -1.8519057206710463, 1.9597069454002405, 0.01573959149508029, -1.1997702625555768 ], [ 0.3881052152741318, 1.1921236900763776, -1.4678470082498767, 0.5477763623722897 ], ... ],
    	[ [ 0.7039156391241593, -1.0840610472746108, 1.5800104319056991, -0.8759015314739305 ], [ 0.8719272664564846, 0.19202603170185004, -0.7959361738152829, 0.8599319534840588 ], [ 1.5399992632794401, -0.939999077618104, 0.532100480621153, -0.9799543015038121 ], [ -1.8759367987245565, -0.5921517607400223, 0.7240126413585367, 0.10796401263690175 ], [ 1.9398683532925476, 0.34008590660899884, -1.1679911118694335, 1.3599047004075184 ], [ -0.3359822898749735, 0.1798944753090819, 1.7318456907809683, 0.9999699005538827 ], [ 1.0079768171154402, -0.8998930994127697, 1.8280491501206255, 1.1558546518501722 ], [ 1.4999392343675826, 1.3199992910689806, 0.060032414448074396, -1.9398236033089287 ], ... ],
    	[ [ -0.2679853207731764, 1.6198516270045957, 0.5559926994002178, -1.075914110051488 ], [ 0.5279622317733476, -0.8639046619709524, -1.2038816382896849, 0.15193311508263915 ], [ 1.7481090759915208, 1.5919563278066364, 0.3961180269507691, 1.5439890925613762 ], [ -1.9960332379570267, 1.959964222655733, -0.6159435474473347, -1.6718835145409003 ], [ 0.6559886189880947, 0.39591109926938434, 0.8039801312674885, -0.519978875002355 ], [ 0.8319804785011301, 1.1080044144986116, -1.9799418625686018, 0.2319758206603751 ], [ -0.17996314770827793, -0.3319738677079621, 1.815906876421797, -0.884010629082305 ], [ -0.8319239559641578, 1.9921729002104993, 1.771971639219674, -1.3521287750605855 ], ... ],
    	[ [ 0.5359951669040601, 1.0520206032392105, -0.004041438855746105, -1.1320690541770488 ], [ 1.9640020520379913, -0.627968219889893, -1.3117786956172002, -1.5158925368756073 ], [ 1.7359019005659986, 1.7759424001838777, -1.0919617058865505, -1.1878649500594898 ], [ -0.7839586865807231, -0.9800836399039206, -0.06814897662443878, -1.8240286445984357 ], [ -1.4518898431341984, 0.6919791219453091, -0.9879468694104612, -1.291995463230598 ], [ -0.979869974772163, 0.8839550913927375, 0.8759896499224862, 0.03997683512916865 ], [ 1.1640713751938445, 0.5602208164365564, 1.468021018666427, 0.8398047507842359 ], [ -0.6758898642494358, 1.8478493060191257, 0.5278897411270619, -0.08395159224437809 ], ... ],
    	[ [ -0.8439423835083515, 1.6638285633836316, 0.5560193098479675, -1.4918903686627552 ], [ 1.2798978499315063, -1.3798042090382292, -1.6957730840590843, 1.5918379968085825 ], [ -1.9801070145643151, 0.8918489390827282, -1.4641353682640805, -1.567811266918554 ], [ -0.25200192008866, 0.8998664993530329, -0.5279495450549148, 1.4679393448465219 ], [ -0.5919153535158981, 1.147988614288903, -0.007862553966383159, 0.34394184022694835 ], [ -1.855979945637898, 1.468009647386955, -1.515960342162217, 1.1239555041796598 ], [ 0.6080166831068711, 1.8399500249271696, 0.06803198034910507, -0.7240294716162203 ], [ 0.4200274743219847, 0.01192282463142998, 0.40010506175233057, -0.6598645857378497 ], ... ],
    	...
    ]

To produce the following output:

TrainingTester.java:633 executed in 0.03 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.02571109778283338, 0.017533803505405936, 0.021817156882554943, 0.033105235499223507 ], [ -0.009940595238447193, 0.06510256508520434, -0.020010950526892703, -0.09114883740507247 ], [ 0.0011703047707390776, 0.02932093440483997, 0.06166619864462692, -0.07509544081597878 ], [ -0.02559644800571696, -0.03672271545841128, 0.03629341829727988, 0.018834110802654055 ], [ -0.007706852011454931, 0.010627556171704501, -0.005656904445044468, -0.06531415554609428 ], [ -0.01377543778201908, -0.05536287076881436, 0.06382178001575665, 0.019730419369419674 ], [ 0.04254884529260614, -0.03341894607088771, -0.019892338282253955, -0.031036452812048358 ], [ -0.025357749311556915, -0.021434613660166676, -0.03868618685457821, 0.0040071035486555365 ], ... ],
    	[ [ 0.08953835258516803, 0.026177685016627508, -0.13744754733364564, -0.03707825809083364 ], [ -0.06671718677630918, 0.01177316937638803, -0.1098224953817825, 0.016564837512943496 ], [ 0.026655807590567675, -0.032958783888502374, 0.04680229806909822, -0.025511899589834613 ], [ 0.08109553632789303, 0.12139136258071691, 0.1130804731386223, -0.059829495728395216 ], [ -0.11293035663467067, -0.016018794441136533, 0.09601255333870731, 0.05442633708568768 ], [ 0.0326169711447118, 0.02617644388112276, -0.02703951420777661, 0.025423269189663124 ], [ 0.01362234772695611, 0.035159959447067686, -0.08938644116094402, 0.02434999311103062 ], [ 0.05992594791286118, 0.04017541038836584, -0.03147013258580867, 0.008084805962690794 ], ... ],
    	[ [ -0.040771020538772414, -0.02697494371338262, 0.0014528426671810543, 0.029302607816237593 ], [ 0.0410000375088612, -0.0662628417047103, -0.054663235732376754, -0.05244314869647147 ], [ 0.06628480478305357, -0.08364392308133778, -0.06395971590483868, 0.07631209110749364 ], [ -0.06687650597661374, -0.04133936838760694, 0.11738684411089968, 0.10059489289193298 ], [ 0.0565527256515522, 0.02652368908551324, 0.02534917321333623, -0.037333536232878765 ], [ -0.04164489965457198, -0.015110918590042917, -0.14039574954336856, -0.03791785655003 ], [ 0.07924944953727284, -0.039215035117563704, -0.06957807807525203, -0.07967438147972566 ], [ -0.02835078436535401, 0.03971889523895152, -0.029125474051174608, 0.013094380789924219 ], ... ],
    	[ [ 0.03749430965213156, 0.08120847600099751, 0.10640859526535318, -0.12411625177206322 ], [ -0.02979171850406736, -0.010156475930693395, 0.08859820426968759, -0.04986304382391163 ], [ 0.030849980208251266, -0.05265630349846994, 0.04846186840120242, -0.02581852511840042 ], [ 0.09081188608693833, -0.05028528010109168, -0.06348015858707844, -0.10527620415083846 ], [ -0.03350388433625571, -0.008501463645771, 0.0506967754545199, 0.09561949635389543 ], [ 0.015590752214371343, -0.06455733615882446, 0.06047716270882755, 0.035690262234723165 ], [ -0.018029655178593777, -0.020684340000852654, -0.06316890274083602, 0.07408354229205566 ], [ -0.02045382247367118, 0.007665668377939959, 0.026222641359957957, -0.06098569062935835 ], ... ],
    	[ [ -0.010762586942927206, 0.06603014334146193, 0.039906624802549785, -0.0015966422379872865 ], [ 0.022754352217319463, 0.07536211810475282, 0.002390998982733184, -0.07988836819707795 ], [ -0.027171626470944114, 0.03649433305446802, 0.04980119442296924, -0.016674658467751985 ], [ -0.03947786462367026, -0.015397298787460215, -0.07385592988020259, 0.04155651238351017 ], [ -0.022461439328833547, 0.016098778180880954, 0.04859366087771614, -0.11173102644431762 ], [ -0.023395724439686582, 0.057689359001198474, 0.001989124554178168, -0.011018408164416868 ], [ 0.03598315841168491, 0.11558834306504398, 0.04182178758887622, -0.011157365225764004 ], [ -0.08631004067793864, 0.12994743426390626, 0.020687458847039923, -0.0659849983787777 ], ... ],
    	[ [ 0.0243544386871537, -0.008937819454000557, -0.002822885695673369, -0.06538717298779005 ], [ -0.11563229766877957, 0.00737640449834948, -0.02503329767419338, -0.012747329073057154 ], [ -0.042517164542493734, -0.010960978136811204, 0.054211205214140065, -0.031240289285438035 ], [ 0.027368271918614955, -0.027367559739002345, -0.13028458338056062, -0.060490949270992314 ], [ 0.0016227935331039123, 0.0033476487410139554, -0.030481507492361618, -0.015701427938993748 ], [ 0.059637088409781325, -0.009923289629016235, -0.04602254679136459, -0.003039809137476226 ], [ -0.013767518590030154, 0.003030589375506262, -0.052403754998619975, 0.045548141985566594 ], [ -0.027065711120407777, 0.11287833721160631, -0.0282777943209236, -0.04836376300329927 ], ... ],
    	[ [ 0.018584449508818195, 0.06511859529497582, 0.042322088729874, -0.112228575586704 ], [ 0.01705433575257629, -0.07555361077242331, -0.12402330697619467, -0.024223215201189696 ], [ 0.07844508821115206, -0.022949348547970632, -0.009412738422815, -0.08936440314570875 ], [ 0.027586947452139084, -0.030504548588211944, 0.0315609978826269, -0.056493374173442926 ], [ 0.07548998114263392, -0.07370681496026053, -0.025183512211149096, -0.024070978229110227 ], [ -0.013494912963397507, -5.529357310479785E-4, -0.017734556863201814, 0.0596909145085101 ], [ 4.7782363790037515E-4, -0.005128821547266745, 0.01946209713094371, 0.04517145812027557 ], [ -0.12371847390077544, 0.08825446926573101, 0.06611477609764062, 0.019848508993964765 ], ... ],
    	[ [ -0.04610415327148611, 0.08743656217939444, 0.1199271809246125, -0.04787360976452172 ], [ -0.003933797556129318, 0.0414949599258588, -8.943451471960257E-4, -0.06631298404594119 ], [ -0.06359755876906387, -0.05658588938649489, -0.01989677339842048, 0.040448866591031925 ], [ 0.05350299650639639, -0.05772177209348876, 0.021130724462543292, -0.022678099501957323 ], [ 0.015693260937098632, -0.04456381190783352, 0.03139727123429472, 0.021013340919747686 ], [ 0.056784472259108765, -0.08417939177540042, -0.03244526160571794, 0.03389270194799532 ], [ 0.07391914782586463, -0.0051933363487417705, 0.05195132566430668, -0.04958152702798339 ], [ 0.07704262694286375, 0.018300912790925567, -0.0183738315236537, 0.05561465627628534 ], ... ],
    	...
    ]

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

    return TestUtil.compare(title + " vs Iteration", runs);
Logging
Plotting range=[1.0, 1.8460248509828447], [27.0, 1.8795157061448422]; valueStats=DoubleSummaryStatistics{count=46, sum=3238.734126, min=70.149544, average=70.407264, max=75.773214}
Plotting 27 points for GD
Plotting 14 points for CjGD
Plotting 5 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, 1.8460248509828447], [33.755, 1.8795157061448422]; valueStats=DoubleSummaryStatistics{count=46, sum=3238.734126, min=70.149544, average=70.407264, max=75.773214}
Plotting 27 points for GD
Plotting 14 points for CjGD
Plotting 5 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": 8.953765001724907 }, "CjGD": { "type": "NonConverged", "value": 0.4223660587620043 }, "GD": { "type": "NonConverged", "value": 0.1301016884716549 } }, "model":{ "LBFGS": { "type": "Converged", "value": 0.0 }, "CjGD": { "type": "Converged", "value": 0.0 }, "GD": { "type": "Converged", "value": 0.0 } }, "complete":{ "LBFGS": { "type": "NonConverged", "value": 70.1495990947273 }, "CjGD": { "type": "NonConverged", "value": 70.14958812048935 }, "GD": { "type": "NonConverged", "value": 70.14954378945944 } }}

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

    throwException(exceptions.addRef());

Results

detailsresult
{"input":{ "LBFGS": { "type": "NonConverged", "value": 8.953765001724907 }, "CjGD": { "type": "NonConverged", "value": 0.4223660587620043 }, "GD": { "type": "NonConverged", "value": 0.1301016884716549 } }, "model":{ "LBFGS": { "type": "Converged", "value": 0.0 }, "CjGD": { "type": "Converged", "value": 0.0 }, "GD": { "type": "Converged", "value": 0.0 } }, "complete":{ "LBFGS": { "type": "NonConverged", "value": 70.1495990947273 }, "CjGD": { "type": "NonConverged", "value": 70.14958812048935 }, "GD": { "type": "NonConverged", "value": 70.14954378945944 } }}OK
  {
    "result": "OK",
    "performance": {
      "execution_time": "225.756",
      "gc_time": "2.943"
    },
    "created_on": 1586746725352,
    "file_name": "trainingTest",
    "report": {
      "simpleName": "Double",
      "canonicalName": "com.simiacryptus.mindseye.layers.cudnn.conv.ConvolutionLayerTest.Double",
      "link": "https://github.com/SimiaCryptus/mindseye-cudnn/tree/59d5b3318556370acb2d83ee6ec123ce0fc6974f/src/test/java/com/simiacryptus/mindseye/layers/cudnn/conv/ConvolutionLayerTest.java",
      "javaDoc": ""
    },
    "training_analysis": {
      "input": {
        "LBFGS": {
          "type": "NonConverged",
          "value": 8.953765001724907
        },
        "CjGD": {
          "type": "NonConverged",
          "value": 0.4223660587620043
        },
        "GD": {
          "type": "NonConverged",
          "value": 0.1301016884716549
        }
      },
      "model": {
        "LBFGS": {
          "type": "Converged",
          "value": 0.0
        },
        "CjGD": {
          "type": "Converged",
          "value": 0.0
        },
        "GD": {
          "type": "Converged",
          "value": 0.0
        }
      },
      "complete": {
        "LBFGS": {
          "type": "NonConverged",
          "value": 70.1495990947273
        },
        "CjGD": {
          "type": "NonConverged",
          "value": 70.14958812048935
        },
        "GD": {
          "type": "NonConverged",
          "value": 70.14954378945944
        }
      }
    },
    "archive": "s3://code.simiacrypt.us/tests/com/simiacryptus/mindseye/layers/cudnn/conv/ConvolutionLayer/Double/trainingTest/202004135845",
    "id": "6a316d4a-1fd9-48e7-8671-9afaa491ebca",
    "report_type": "Components",
    "display_name": "Comparative Training",
    "target": {
      "simpleName": "ConvolutionLayer",
      "canonicalName": "com.simiacryptus.mindseye.layers.cudnn.conv.ConvolutionLayer",
      "link": "https://github.com/SimiaCryptus/mindseye-cudnn/tree/59d5b3318556370acb2d83ee6ec123ce0fc6974f/src/main/java/com/simiacryptus/mindseye/layers/cudnn/conv/ConvolutionLayer.java",
      "javaDoc": ""
    }
  }