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

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

Test Modules

Using Seed 3369331472239831040

Training Characteristics

Input Learning

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

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

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

Returns

    [
    	[ [ 0.416, -0.616, 0.584 ], [ 0.916, -0.088, 1.116 ], [ 1.4, 0.404, -0.712 ], [ -1.756, 1.536, -0.992 ], [ -1.672, 0.74, -0.272 ], [ 1.456, -1.968, 1.552 ], [ -0.752, 1.012, 1.592 ], [ 0.56, 1.28, 1.3 ], ... ],
    	[ [ -1.412, 0.584, 1.096 ], [ 1.768, -1.5, -1.244 ], [ 0.468, 0.6, -1.88 ], [ -1.996, 1.264, 0.316 ], [ 1.112, 1.444, -1.088 ], [ 0.74, 0.808, -0.928 ], [ 0.572, -1.572, -0.516 ], [ 1.244, -0.644, 0.136 ], ... ],
    	[ [ 1.764, -0.148, 1.98 ], [ -0.356, 0.3, -1.696 ], [ -1.48, 1.116, -1.28 ], [ 0.008, -0.436, -1.62 ], [ 0.528, -0.02, -0.512 ], [ 1.928, -0.94, -0.36 ], [ 0.352, -0.624, -1.0 ], [ 0.216, 1.24, -1.24 ], ... ],
    	[ [ -0.852, 1.452, 0.012 ], [ -0.076, 0.104, 1.26 ], [ -0.244, 1.848, -0.7 ], [ 1.336, -0.116, 1.324 ], [ -0.212, 1.268, 0.752 ], [ -0.584, 1.672, -0.188 ], [ 1.824, 0.884, -0.664 ], [ -1.02, -1.06, 0.032 ], ... ],
    	[ [ 1.244, -0.592, 0.184 ], [ 0.116, -1.968, 1.548 ], [ -0.248, 1.828, -0.968 ], [ -1.548, 0.084, 1.492 ], [ 1.464, 0.448, 0.996 ], [ 0.252, 1.588, 1.948 ], [ 0.324, 1.248, -0.184 ], [ -0.336, 0.656, 0.352 ], ... ],
    	[ [ 1.6, 1.0, 0.884 ], [ 0.448, -1.152, 1.128 ], [ -1.868, -1.492, 0.844 ], [ -1.236, 0.128, -1.452 ], [ -0.608, -1.532, -0.908 ], [ 1.104, 0.996, 0.58 ], [ -0.972, 0.888, -1.764 ], [ -0.42, 0.808, -0.916 ], ... ],
    	[ [ -1.324, -1.92, -1.236 ], [ -0.78, -1.732, -1.656 ], [ -1.552, 0.54, 0.148 ], [ 1.292, 1.936, -0.316 ], [ 0.328, 1.24, 1.208 ], [ -0.828, -1.616, 0.112 ], [ -0.2, 0.28, -0.252 ], [ -1.144, -1.024, -1.808 ], ... ],
    	[ [ -0.588, -0.868, -1.684 ], [ -0.328, -0.224, -1.844 ], [ -0.436, -1.84, 0.6 ], [ -1.464, 0.428, 1.536 ], [ 0.056, -1.168, -0.392 ], [ -1.844, -1.76, 0.796 ], [ 1.724, -0.88, -0.776 ], [ -1.988, 1.892, -0.7 ], ... ],
    	...
    ]
    [
    	[ [ -0.58, 1.62, 0.972 ], [ -1.5, 1.324, -0.564 ], [ -0.72, -0.232, -1.452 ], [ 1.144, -0.732, -1.404 ], [ -1.12, 0.168, -0.224 ], [ -0.176, 0.412, -0.788 ], [ -0.28, 1.708, 0.416 ], [ 1.664, 0.12, 0.208 ], ... ],
    	[ [ 1.82, -1.872, -0.072 ], [ 0.044, -0.656, -0.076 ], [ 1.016, -0.62, -0.792 ], [ 1.944, -1.696, -1.864 ], [ 1.888, -1.076, 1.688 ], [ -0.948, -0.832, 0.2 ], [ 0.68, 0.228, 1.824 ], [ -1.328, -1.276, 0.3 ], ... ],
    	[ [ 1.24, 0.56, 0.508 ], [ -0.564, 0.884, -0.768 ], [ 1.16, 1.312, -0.3 ], [ -1.316, -0.988, -0.008 ], [ 1.756, -1.756, -0.828 ], [ 1.22, 1.688, 1.488 ], [ -1.172, -1.924, 0.04 ], [ -1.552, 0.776, -1.288 ], ... ],
    	[ [ -1.052, 1.2, 1.256 ], [ 1.848, 1.484, -1.492 ], [ -1.224, -1.512, -1.988 ], [ -1.348, -1.996, 0.76 ], [ -0.88, 1.696, 1.104 ], [ -1.716, -0.844, 0.908 ], [ 0.652, 0.972, 0.968 ], [ 1.352, -0.328, -0.572 ], ... ],
    	[ [ 1.156, 1.428, 0.216 ], [ 0.64, 0.652, 0.788 ], [ -0.892, -0.744, -1.236 ], [ -0.044, 1.94, -0.924 ], [ 0.872, 1.352, -0.196 ], [ -1.34, -1.736, 0.104 ], [ 1.484, -0.176, 0.876 ], [ 0.788, 0.552, 0.328 ], ... ],
    	[ [ 1.028, 0.46, 0.824 ], [ 0.5, 0.056, -1.052 ], [ -0.496, 0.964, 1.06 ], [ -0.752, -0.264, -0.6 ], [ 0.936, 0.028, -0.536 ], [ 1.74, -0.072, -1.072 ], [ -0.396, -0.448, 1.268 ], [ -0.02, -1.008, -0.34 ], ... ],
    	[ [ 1.48, 1.128, -1.84 ], [ -0.328, -1.508, -0.1 ], [ -1.84, -1.268, 0.216 ], [ 1.248, 1.224, 1.06 ], [ -1.64, -1.232, -1.72 ], [ -0.976, -0.512, -0.392 ], [ -1.644, -0.784, 0.668 ], [ 0.048, -0.768, -0.772 ], ... ],
    	[ [ -1.412, -0.356, -1.328 ], [ 0.184, 0.672, -1.752 ], [ -0.476, -1.752, -1.176 ], [ 0.124, -1.276, -1.732 ], [ -0.62, -0.708, -1.192 ], [ -1.432, 1.9, -0.916 ], [ -0.032, 0.896, 1.512 ], [ -0.52, -0.024, -1.74 ], ... ],
    	...
    ]
    [
    	[ [ 0.24, 0.172, 1.956 ], [ -0.696, -1.848, -1.188 ], [ 1.448, 1.232, 0.104 ], [ 0.284, -0.772, 1.16 ], [ 1.224, -0.94, -1.624 ], [ 1.988, 0.144, 0.104 ], [ -0.304, 0.852, -0.48 ], [ -1.592, 1.624, -0.012 ], ... ],
    	[ [ 1.644, 1.036, 0.912 ], [ -1.392, -1.992, -1.388 ], [ 1.8, -0.172, 1.68 ], [ -0.036, -0.824, 1.532 ], [ 1.896, -0.852, 1.764 ], [ -1.48, -1.236, -1.64 ], [ 1.58, -0.624, 1.832 ], [ -1.676, 1.72, -1.732 ], ... ],
    	[ [ 1.928, 1.06, 0.008 ], [ 0.248, -1.904, -1.804 ], [ 0.716, -0.736, 0.304 ], [ -0.656, -1.848, -1.684 ], [ 1.0, 1.324, -0.724 ], [ -1.104, 1.916, -0.996 ], [ 0.808, 1.724, -1.6 ], [ -1.364, -0.656, -0.868 ], ... ],
    	[ [ 0.588, 1.644, -1.272 ], [ -1.02, 1.504, -1.98 ], [ 1.78, -1.86, 0.556 ], [ 1.62, -0.468, 1.736 ], [ 1.396, 0.128, -0.088 ], [ -1.748, -1.1, 0.796 ], [ 1.968, -0.984, 0.648 ], [ -1.372, -1.356, -0.944 ], ... ],
    	[ [ 2.0, -1.376, -0.28 ], [ -0.58, -1.868, 0.896 ], [ -0.128, 1.552, 1.948 ], [ -1.016, 1.624, -1.896 ], [ 1.052, -0.596, -0.296 ], [ 1.308, -0.668, 0.332 ], [ -1.412, -1.548, 0.356 ], [ -0.424, -1.804, -0.74 ], ... ],
    	[ [ 0.808, 1.268, -1.584 ], [ -1.844, -1.792, -1.44 ], [ -0.62, 0.628, 0.024 ], [ -0.108, -1.356, -1.744 ], [ -1.84, 0.7, 0.864 ], [ -1.312, 1.708, -0.664 ], [ -1.836, 0.164, 1.3 ], [ 1.82, 1.712, -1.652 ], ... ],
    	[ [ -0.552, 1.08, -1.784 ], [ 1.556, -1.876, 0.56 ], [ -0.664, -0.512, -0.344 ], [ -0.044, 1.564, 0.728 ], [ -0.38, 0.356, 1.844 ], [ -0.192, -0.652, 1.492 ], [ 1.984, 1.268, -0.7 ], [ -1.068, -0.768, -0.528 ], ... ],
    	[ [ 1.896, 0.028, -0.16 ], [ -1.976, 1.384, 0.708 ], [ -0.412, -1.004, 0.468 ], [ 1.216, -1.972, -1.16 ], [ 1.376, -1.768, -1.928 ], [ -1.728, 0.368, -0.972 ], [ 1.88, 0.68, 1.784 ], [ -1.72, -1.348, 0.432 ], ... ],
    	...
    ]
    [
    	[ [ -0.12, -1.312, 0.732 ], [ 1.924, 1.004, -0.5 ], [ -0.108, 1.968, 0.136 ], [ 0.216, 0.012, 1.916 ], [ 1.392, -0.872, -1.92 ], [ -1.916, -1.852, -1.932 ], [ -1.74, -0.38, -0.864 ], [ -0.648, -0.896, 1.732 ], ... ],
    	[ [ -0.256, -0.056, 0.644 ], [ 0.496, -0.468, -1.964 ], [ -1.776, -0.74, -1.484 ], [ 2.0, -0.704, -0.996 ], [ -0.208, -1.84, -0.308 ], [ -0.54, 0.276, -0.232 ], [ 1.528, 1.208, 1.244 ], [ 0.184, -0.276, 0.864 ], ... ],
    	[ [ -1.096, 0.968, 0.32 ], [ -1.164, 0.708, 0.4 ], [ 1.932, 1.768, 1.86 ], [ 0.444, -0.968, -0.664 ], [ -1.116, 0.224, 0.772 ], [ 0.052, 0.024, 0.912 ], [ 1.464, -0.36, 1.488 ], [ -0.76, 0.468, -0.276 ], ... ],
    	[ [ 0.424, 0.728, 1.776 ], [ 1.816, -0.928, 1.524 ], [ -0.308, -0.1, -1.096 ], [ 0.34, -1.808, 1.872 ], [ -1.86, 0.928, 1.22 ], [ -1.752, -0.808, 1.408 ], [ 1.888, 1.572, -1.232 ], [ -1.056, -1.948, -1.98 ], ... ],
    	[ [ -1.056, 1.42, -1.028 ], [ 1.992, -0.124, -0.016 ], [ -0.7, 1.968, 1.116 ], [ 1.332, 0.66, -1.08 ], [ 0.336, 0.744, -1.9 ], [ -1.892, 1.42, -1.412 ], [ 0.884, 1.176, -0.996 ], [ -1.784, 1.864, -1.072 ], ... ],
    	[ [ 1.616, -1.1, 0.044 ], [ 0.0, 0.524, 0.672 ], [ 1.94, 0.352, 0.808 ], [ 0.696, 1.804, 1.304 ], [ 1.928, -1.936, 0.576 ], [ 1.188, -0.648, -0.42 ], [ 0.66, -0.968, -0.092 ], [ -1.072, -0.112, 1.912 ], ... ],
    	[ [ -0.168, -1.66, -0.948 ], [ 1.372, 1.8, 1.192 ], [ 0.984, 0.332, -1.72 ], [ -0.744, -0.184, -1.108 ], [ 1.836, 1.596, -0.584 ], [ -0.484, -0.256, -1.668 ], [ 1.792, -1.0, 1.152 ], [ -0.872, -1.716, 0.624 ], ... ],
    	[ [ 0.952, -0.992, -0.012 ], [ -1.708, 0.34, -0.708 ], [ 0.184, 1.044, 0.14 ], [ 0.38, -1.936, -1.928 ], [ 0.976, 1.492, -1.52 ], [ -0.348, -1.792, 1.824 ], [ 0.168, 1.148, 1.312 ], [ -1.576, 0.356, -1.256 ], ... ],
    	...
    ]
    [
    	[ [ 1.156, 0.832, -1.588 ], [ -0.448, -0.044, -0.232 ], [ -0.948, -1.34, 1.22 ], [ -1.572, 1.46, 0.928 ], [ 1.36, 1.308, 1.56 ], [ 0.576, -1.58, -0.432 ], [ -1.968, -1.324, 0.42 ], [ -1.048, 0.856, 1.444 ], ... ],
    	[ [ -1.368, 1.58, -1.712 ], [ 0.728, -1.952, 0.944 ], [ 1.524, -0.448, 0.7 ], [ 0.344, -1.992, 0.956 ], [ 1.58, 1.204, -0.568 ], [ 0.656, -1.964, 1.524 ], [ 1.996, -1.576, 0.664 ], [ 0.96, 0.6, -0.232 ], ... ],
    	[ [ -0.908, 0.18, -0.048 ], [ -1.428, -0.204, 1.332 ], [ 1.592, 1.408, 0.308 ], [ 1.388, 0.188, -0.964 ], [ 0.444, -1.252, 0.72 ], [ -0.144, 0.804, 0.412 ], [ -0.24, -1.724, -0.972 ], [ 1.236, -0.872, 0.596 ], ... ],
    	[ [ 0.904, 0.184, 1.82 ], [ -0.076, -0.136, 0.272 ], [ -0.432, -0.392, 1.212 ], [ -0.056, -0.096, 0.024 ], [ 0.376, 0.208, -0.728 ], [ -1.732, -1.468, 1.856 ], [ -1.048, -0.46, -0.736 ], [ 0.168, -1.952, 1.988 ], ... ],
    	[ [ -1.4, 0.004, -1.548 ], [ -1.208, -0.744, -1.46 ], [ 0.684, 0.36, -1.272 ], [ -0.672, 1.712, -0.408 ], [ -0.82, 0.084, 1.988 ], [ -1.556, -0.188, 1.76 ], [ 0.492, 0.6, 0.64 ], [ 1.212, 0.824, -0.268 ], ... ],
    	[ [ -1.48, -1.544, 0.6 ], [ 0.288, 1.472, -1.868 ], [ -1.28, -1.568, -1.072 ], [ 1.98, -0.888, -1.424 ], [ -1.108, -0.82, -1.788 ], [ -1.952, 0.748, -1.52 ], [ 1.096, 1.176, -1.912 ], [ 0.396, -1.86, -0.6 ], ... ],
    	[ [ 1.412, 1.184, -1.32 ], [ -0.464, 1.12, -0.064 ], [ 0.856, -1.872, 1.388 ], [ 0.432, -1.672, 1.2 ], [ 1.968, -0.432, -0.328 ], [ -1.844, 1.46, 0.632 ], [ -1.848, 1.292, -1.492 ], [ -1.576, -1.128, -1.888 ], ... ],
    	[ [ -0.836, 0.164, -0.536 ], [ -1.984, -0.588, 0.616 ], [ -0.096, 0.924, -1.112 ], [ -1.612, -1.548, 0.484 ], [ -0.216, 0.78, -0.056 ], [ 1.324, -0.408, -1.04 ], [ 0.848, 0.276, 0.8 ], [ 1.436, 0.192, -0.352 ], ... ],
    	...
    ]

Gradient Descent

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

TrainingTester.java:480 executed in 4.79 seconds (0.137 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: 8983069537068
Reset training subject: 8983256585515
Constructing line search parameters: GD
th(0)=2.673204313073893;dx=-9.350014867149846E-6
New Minimum: 2.673204313073893 > 2.673204304304964
WOLFE (weak): th(2.154434690031884)=2.673204304304964; dx=-9.350014851748509E-6 evalInputDelta=8.768929138369685E-9
New Minimum: 2.673204304304964 > 2.673204295611379
WOLFE (weak): th(4.308869380063768)=2.673204295611379; dx=-9.35001483634717E-6 evalInputDelta=1.746251410139621E-8
New Minimum: 2.673204295611379 > 2.6732042615904787
WOLFE (weak): th(12.926608140191302)=2.6732042615904787; dx=-9.350014774741816E-6 evalInputDelta=5.148341442051674E-8
New Minimum: 2.6732042615904787 > 2.673204123414524
WOLFE (weak): th(51.70643256076521)=2.673204123414524; dx=-9.350014497517726E-6 evalInputDelta=1.8965936909864922E-7
New Minimum: 2.673204123414524 > 2.673203798758053
WOLFE (weak): th(258.53216280382605)=2.673203798758053; dx=-9.35001301898924E-6 evalInputDelta=5.143158401388348E-7
Armijo: th(1551.1929768229563)=2.6732175014665325; dx=-9.35000377818621E-6 evalInputDelta=-1.3188392639307267E-5
Armijo: th(904.8625698133912)=2.673207259635693; dx=-9.350008398587725E-6 evalInputDelta=-2.946561799888059E-6
Armijo: th(581.6973663086087)=2.6732046815777233; dx=-9.350010708788482E-6 evalInputDelta=-3.685038301171062E-7
WOLFE (weak): th(420.1147645562174)=2.6732040282631004; dx=-9.350011863888861E-6 evalInputDelta=2.848107927277965E-7
WOLFE (weak): th(500.906065432413)=2.6732043019442147; dx=-9.350011286338673E-6 evalInputDelta=1.1129678512133978E-8
Armijo: th(541.3017158705109)=2.67320447851692; dx=-9.350010997563578E-6 evalInputDelta=-1.654430268338558E-7
Armijo: th(521.1038906514619)=2.673204386919555; dx=-9.350011141951125E-6 evalInputDelta=-7.384566202972564E-8
Armijo: th(511.0049780419375)=2.673204343604132; dx=-9.350011214144898E-6 evalInputDelta=-3.053023878152317E-8
Armijo: th(505.9555217371752)=2.673204322567235; dx=-9.350011250241785E-6 evalInputDelta=-9.493341668331823E-9
mu ~= nu (500.906065432413): th(258.53216280382605)=2.673203798758053
Fitness changed from 2.673204313073893 to 2.673203798758053
Iteration 1 complete. Error: 2.673203798758053 Total: 2.1376; Orientation: 0.0396; Line Search: 1.8032
th(0)=2.673203798758053;dx=-9.350013068237312E-6
Armijo: th(1084.6087657293613)=2.6732134667755; dx=-9.350013278693707E-6 evalInputDelta=-9.668017447062027E-6
Armijo: th(542.3043828646806)=2.673206245847551; dx=-9.35001317346551E-6 evalInputDelta=-2.4470894981476476E-6
Armijo: th(180.7681276215602)=2.673204084028058; dx=-9.350013103313377E-6 evalInputDelta=-2.852700049515988E-7
Armijo: th(45.19203190539005)=2.6732038203480704; dx=-9.350013077006327E-6 evalInputDelta=-2.1590017329486955E-8
Armijo: th(9.03840638107801)=2.673203800423924; dx=-9.350013069991114E-6 evalInputDelta=-1.6658709967032337E-9
Armijo: th(1.5064010635130016)=2.67320379894361; dx=-9.350013068529611E-6 evalInputDelta=-1.8555690317612061E-10
Armijo: th(0.2152001519304288)=2.673203798782306; dx=-9.350013068279068E-6 evalInputDelta=-2.425304401754147E-11
Armijo: th(0.0269000189913036)=2.673203798761043; dx=-9.35001306824253E-6 evalInputDelta=-2.9900526499204716E-12
Armijo: th(0.0029888909990337335)=2.6732037987583843; dx=-9.350013068237892E-6 evalInputDelta=-3.312905505481467E-13
Armijo: th(2.988890999033733E-4)=2.673203798758086; dx=-9.35001306823737E-6 evalInputDelta=-3.2862601528904634E-14
Armijo: th(2.717173635485212E-5)=2.673203798758056; dx=-9.350013068237316E-6 evalInputDelta=-3.1086244689504383E-15
Armijo: th(2.2643113629043436E-6)=2.6732037987580535; dx=-9.35001306823731E-6 evalInputDelta=-4.440892098500626E-16
WOLFE (weak): th(1.7417779714648796E-7)=2.673203798758053; dx=-9.35001306823731E-6 evalInputDelta=0.0
Armijo: th(1.2192445800254157E-6)=2.6732037987580535; dx=-9.35001306823731E-6 evalInputDelta=-4.440892098500626E-16
Armijo: th(6.967111885859518E-7)=2.6732037987580535; dx=-9.35001306823731E-6 evalInputDelta=-4.440892098500626E-16
WOLFE (weak): th(4.354444928662199E-7)=2.673203798758053; dx=-9.35001306823731E-6 evalInputDelta=0.0
WOLFE (weak): th(5.660778407260859E-7)=2.673203798758053; dx=-9.35001306823731E-6 evalInputDelta=0.0
WOLFE (weak): th(6.313945146560189E-7)=2.673203798758053; dx=-9.350013068237312E-6 evalInputDelta=0.0
WOLFE (weak): th(6.640528516209854E-7)=2.673203798758053; dx=-9.35001306823731E-6 evalInputDelta=0.0
WOLFE (weak): th(6.803820201034685E-7)=2.673203798758053; dx=-9.35001306823731E-6 evalInputDelta=0.0
WOLFE (weak): th(6.885466043447101E-7)=2.673203798758053; dx=-9.350013068237312E-6 evalInputDelta=0.0
WOLFE (weak): th(6.92628896465331E-7)=2.673203798758053; dx=-9.350013068237312E-6 evalInputDelta=0.0
mu ~= nu (6.92628896465331E-7): th(0.0)=2.673203798758053
Fitness changed from 2.673203798758053 to 2.673203798758053
Static Iteration Total: 2.6459; Orientation: 0.0450; Line Search: 2.5506
Iteration 2 failed. Error: 2.673203798758053
Previous Error: 0.0 -> 2.673203798758053
Optimization terminated 2
Final threshold in iteration 2: 2.673203798758053 (> 0.0) after 4.784s (< 30.000s)

Returns

    2.673203798758053

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

    [
    	[ [ -1.9280452131465229, 1.9544971150095793, -1.6245136213445 ], [ 1.4119294674914242, 1.0635677623192412, -1.6451375627665157 ], [ -1.4373039471457199, 0.7446492607840686, -0.6519764891638081 ], [ 1.25332384093019, 0.8681247882844031, -1.536602239111685 ], [ -1.3320325534654966, -1.530978182888583, 0.14302882161268848 ], [ 0.5930055403786688, 1.5079294674914243, -0.3918173388880476 ], [ -1.3392856322849385, 0.48702339603510575, -0.18864745225820767 ], [ -1.0346490311818963, 1.9256240562231017, -1.6736728864213466 ], ... ],
    	[ [ -1.2634610592934472, 0.9442676618274154, -1.4766528778357904 ], [ 1.8665748816215988, 1.8244629826203944, -0.10891692261148404 ], [ 0.6231102052764297, 1.5558607435087095, 0.6345459452078241 ], [ 0.8877522319570547, -0.1720723410344366, 0.2646203243702939 ], [ -1.8146110521388172, 1.1672277594573892, 0.2440578728275493 ], [ 0.8123942586376796, -1.4520904262930456, 1.2196346777760951 ], [ -1.651122864957456, -1.4154068035176197, -0.9209639442838679 ], [ -0.3354990383365265, 1.5151716951557008, 1.5682821300343028 ], ... ],
    	[ [ -1.7843056408704947, -1.047678082396757, 0.2654178842749576 ], [ -1.548110320077516, -0.2913091431211304, -0.2528481986287693 ], [ 1.6720994689223503, 0.09241234389628868, 0.7494070331197921 ], [ 1.9764141524221497, -0.12753159180202295, 1.5972044782233696 ], [ 1.0764231950514542, 0.1403653222239049, -1.8837142529139752 ], [ -1.142994459621331, 0.7685335151289701, -0.48743754845725534 ], [ -0.5211176689820457, -0.4244756423014207, -0.19203074493963557 ], [ -1.7234520166641427, -0.07213383091370773, 0.8918969140259279 ], ... ],
    	[ [ -1.899081268862655, -1.0091013922492975, -1.4670957370695423 ], [ 0.5996545715605651, -0.6071608440005353, -1.8762604277239716 ], [ -5.027701893344431E-4, 0.32008138366374117, 1.1758987225517887 ], [ 1.1166800057237043, -1.028660111939234, -1.7874194631986462 ], [ -1.1281392564912904, 0.2335860771800227, -1.9117576575346373 ], [ -1.5198679776121533, 0.8640651069309929, -0.8207758575943326 ], [ -0.3993453136383487, -0.29639606716354044, -1.9077992536294384 ], [ 1.4536113965420754, -0.006985416992026538, 0.10051723839622177 ], ... ],
    	[ [ 1.4361193627068203, 1.402692435802558, 1.3613057556715809 ], [ -1.9173780967060174, 0.46700531077649665, -0.4519511698017553 ], [ 0.5151373331643434, -0.02883553894774285, -0.3931918185423432 ], [ -0.43628936413774644, -0.0968771350425439, 1.7150252045609666 ], [ -0.039115630854012436, 1.9085841538530754, -0.2879963829482782 ], [ 0.5590360557161322, -1.9195659537933802, 1.41176308311222 ], [ 0.032403301266984104, 1.1038480838276832, 1.5307575427335511 ], [ -1.7844937275600299, 1.5322188316291707, -0.09194936127589437 ], ... ],
    	[ [ 1.3964123438962885, 1.0113416965866269, -1.6087125591892006 ], [ 0.1834556337158645, 1.7395840390519894, -1.7603526625428785 ], [ 1.1803779819049312, 0.7079819147413908, 0.7365226639738045 ], [ 0.6729983062752253, 1.9768988373528749, 1.1837269125950018 ], [ 0.03234542843943482, 0.4081718099567869, 1.2485931964823802 ], [ -0.852041596094801, -0.29616819290506513, 0.5720723410344366 ], [ 1.160363513698044, -0.07224595951708447, -1.241663843792042 ], [ -1.3125714941720492, 1.1439276589655634, 1.8319348930690071 ], ... ],
    	[ [ 1.2240180852586091, 1.5558643605604314, -0.7008174536891336 ], [ -1.6928409645253255, -0.2774178842749576, -0.07936520742281875 ], [ -0.3489784124907551, 1.4598914884483452, 0.9295191617231688 ], [ 0.4566601119392341, 1.9749365867937818, -1.4720958518706284 ], [ -1.8806311755254592, -0.7479059566552324, 1.812365322223905 ], [ -1.590549562259546, -1.9963327687584085, -1.1997124443881144 ], [ -0.10826404477569362, 0.6533780967060174, -0.41240149274112314 ], [ -1.9482676618274155, -0.480426812103176, 1.872085000715463 ], ... ],
    	[ [ 1.984446705887646, -1.4958209559397695, -1.4159240419138415 ], [ -0.3679891488448345, 0.07605063872410563, -0.03679575137880271 ], [ 1.4244141524221496, 1.2950505239230194, -0.803596698733016 ], [ 0.7000162767327482, 0.6680705325085757, -1.823511698017553 ], [ -1.4049277737666495, 1.1842260657326142, -0.18019532079297884 ], [ -0.44701073635407934, -1.9668316922938487, -0.011938510120728881 ], [ -1.4843363858101302, -0.14410489449993308, -1.4132641595767796 ], [ -1.4034122290952025, -1.1548154155611003, 0.18679009619904768 ], ... ],
    	...
    ]

To produce the following output:

TrainingTester.java:633 executed in 0.02 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.8665748816215988, 1.8244629826203944, -0.10891692261148404 ], [ 0.6231102052764297, 1.5558607435087095, 0.6345459452078241 ], [ 0.8877522319570547, -0.1720723410344366, 0.2646203243702939 ], [ -1.8146110521388172, 1.1672277594573892, 0.2440578728275493 ], [ 0.8123942586376796, -1.4520904262930456, 1.2196346777760951 ], [ -1.651122864957456, -1.4154068035176197, -0.9209639442838679 ], [ -0.3354990383365265, 1.5151716951557008, 1.5682821300343028 ], [ -1.435294674914243, -1.8612099038009524, 1.720405109792845 ], ... ],
    	[ [ -1.548110320077516, -0.2913091431211304, -0.2528481986287693 ], [ 1.6720994689223503, 0.09241234389628868, 0.7494070331197921 ], [ 1.9764141524221497, -0.12753159180202295, 1.5972044782233696 ], [ 1.0764231950514542, 0.1403653222239049, -1.8837142529139752 ], [ -1.142994459621331, 0.7685335151289701, -0.48743754845725534 ], [ -0.5211176689820457, -0.4244756423014207, -0.19203074493963557 ], [ -1.7234520166641427, -0.07213383091370773, 0.8918969140259279 ], [ 0.2514049949917589, 1.4086872398271477, 0.6118299985690739 ], ... ],
    	[ [ 0.5996545715605651, -0.6071608440005353, -1.8762604277239716 ], [ -5.027701893344431E-4, 0.32008138366374117, 1.1758987225517887 ], [ 1.1166800057237043, -1.028660111939234, -1.7874194631986462 ], [ -1.1281392564912904, 0.2335860771800227, -1.9117576575346373 ], [ -1.5198679776121533, 0.8640651069309929, -0.8207758575943326 ], [ -0.3993453136383487, -0.29639606716354044, -1.9077992536294384 ], [ 1.4536113965420754, -0.006985416992026538, 0.10051723839622177 ], [ -0.2036093584140423, 1.5124069183187059, -1.5326673460426778 ], ... ],
    	[ [ -1.9173780967060174, 0.46700531077649665, -0.4519511698017553 ], [ 0.5151373331643434, -0.02883553894774285, -0.3931918185423432 ], [ -0.43628936413774644, -0.0968771350425439, 1.7150252045609666 ], [ -0.039115630854012436, 1.9085841538530754, -0.2879963829482782 ], [ 0.5590360557161322, -1.9195659537933802, 1.41176308311222 ], [ 0.032403301266984104, 1.1038480838276832, 1.5307575427335511 ], [ -1.7844937275600299, 1.5322188316291707, -0.09194936127589437 ], [ -1.651274781129773, -1.9961157456550986, 0.32368531650020077 ], ... ],
    	[ [ 0.1834556337158645, 1.7395840390519894, -1.7603526625428785 ], [ 1.1803779819049312, 0.7079819147413908, 0.7365226639738045 ], [ 0.6729983062752253, 1.9768988373528749, 1.1837269125950018 ], [ 0.03234542843943482, 0.4081718099567869, 1.2485931964823802 ], [ -0.852041596094801, -0.29616819290506513, 0.5720723410344366 ], [ 1.160363513698044, -0.07224595951708447, -1.241663843792042 ], [ -1.3125714941720492, 1.1439276589655634, 1.8319348930690071 ], [ -0.01130914312113037, -0.34405787282754924, 1.6770127744821124 ], ... ],
    	[ [ -1.6928409645253255, -0.2774178842749576, -0.07936520742281875 ], [ -0.3489784124907551, 1.4598914884483452, 0.9295191617231688 ], [ 0.4566601119392341, 1.9749365867937818, -1.4720958518706284 ], [ -1.8806311755254592, -0.7479059566552324, 1.812365322223905 ], [ -1.590549562259546, -1.9963327687584085, -1.1997124443881144 ], [ -0.10826404477569362, 0.6533780967060174, -0.41240149274112314 ], [ -1.9482676618274155, -0.480426812103176, 1.872085000715463 ], [ 0.40248264680269213, 0.6033236113280177, 1.6915388259054664 ], ... ],
    	[ [ -0.3679891488448345, 0.07605063872410563, -0.03679575137880271 ], [ 1.4244141524221496, 1.2950505239230194, -0.803596698733016 ], [ 0.7000162767327482, 0.6680705325085757, -1.823511698017553 ], [ -1.4049277737666495, 1.1842260657326142, -0.18019532079297884 ], [ -0.44701073635407934, -1.9668316922938487, -0.011938510120728881 ], [ -1.4843363858101302, -0.14410489449993308, -1.4132641595767796 ], [ -1.4034122290952025, -1.1548154155611003, 0.18679009619904768 ], [ 1.9160651069309929, 1.6082278742584755, -0.4473001004918258 ], ... ],
    	[ [ -0.2576945887316776, 0.769515544671447, 0.04037436485320946 ], [ 0.2720452131465229, -1.3308461605007362, -0.1397721257415247 ], [ -1.435851700879405, 1.9685317066031092, 0.6284250035773151 ], [ 1.035636486301956, -0.25141403762106346, 0.1250326682665826 ], [ 1.4408861776718485, 0.8884033012669841, -0.8330254341631389 ], [ -1.8328699009391003, -1.7798046792070212, -0.012781283171915394 ], [ 0.2389239271127554, -1.7126655375168167, 1.7675388259054665 ], [ -0.9521229797585422, -1.7478408497242395, 1.2586237118198436 ], ... ],
    	...
    ]

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.90 seconds (0.313 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: 8987916788886
Reset training subject: 8987968736937
Constructing line search parameters: GD
F(0.0) = LineSearchPoint{point=PointSample{avg=2.673204313073893}, derivative=-9.350014867149846E-6}
F(1.0E-10) = LineSearchPoint{point=PointSample{avg=2.673204313073893}, derivative=-9.350014867149846E-6}, evalInputDelta = 0.0
F(7.000000000000001E-10) = LineSearchPoint{point=PointSample{avg=2.673204313073893}, derivative=-9.350014867149846E-6}, evalInputDelta = 0.0
F(4.900000000000001E-9) = LineSearchPoint{point=PointSample{avg=2.673204313073893}, derivative=-9.350014867149846E-6}, evalInputDelta = 0.0
New Minimum: 2.673204313073893 > 2.6732043130738927
F(3.430000000000001E-8) = LineSearchPoint{point=PointSample{avg=2.6732043130738927}, derivative=-9.350014867149846E-6}, evalInputDelta = -4.440892098500626E-16
New Minimum: 2.6732043130738927 > 2.6732043130738914
F(2.4010000000000004E-7) = LineSearchPoint{point=PointSample{avg=2.6732043130738914}, derivative=-9.350014867149844E-6}, evalInputDelta = -1.7763568394002505E-15
New Minimum: 2.6732043130738914 > 2.673204313073886
F(1.6807000000000003E-6) = LineSearchPoint{point=PointSample{avg=2.673204313073886}, derivative=-9.350014867149834E-6}, evalInputDelta = -7.105427357601002E-15
New Minimum: 2.673204313073886 > 2.6732043130738448
F(1.1764900000000001E-5) = LineSearchPoint{point=PointSample{avg=2.6732043130738448}, derivative=-9.350014867149761E-6}, evalInputDelta = -4.8405723873656825E-14
New Minimum: 2.6732043130738448 > 2.673204313073556
F(8.235430000000001E-5) = LineSearchPoint{point=PointSample{avg=2.673204313073556}, derivative=-9.350014867149258E-6}, evalInputDelta = -3.3706371027619753E-13
New Minimum: 2.673204313073556 > 2.673204313071536
F(5.764801000000001E-4) = LineSearchPoint{point=PointSample{avg=2.673204313071536}, derivative=-9.350014867145726E-6}, evalInputDelta = -2.3572255258841324E-12
New Minimum: 2.673204313071536 > 2.673204313057398
F(0.004035360700000001) = LineSearchPoint{point=PointSample{avg=2.673204313057398}, derivative=-9.350014867121E-6}, evalInputDelta = -1.6495249610670726E-11
New Minimum: 2.673204313057398 > 2.6732043129584326
F(0.028247524900000005) = LineSearchPoint{point=PointSample{avg=2.6732043129584326}, derivative=-9.350014866947915E-6}, evalInputDelta = -1.1546053002575718E-10
New Minimum: 2.6732043129584326 > 2.6732043122659457
F(0.19773267430000002) = LineSearchPoint{point=PointSample{avg=2.6732043122659457}, derivative=-9.350014865736321E-6}, evalInputDelta = -8.079474866917735E-10
New Minimum: 2.6732043122659457 > 2.6732043074315914
F(1.3841287201) = LineSearchPoint{point=PointSample{avg=2.6732043074315914}, derivative=-9.35001485725517E-6}, evalInputDelta = -5.6423017369411355E-9
New Minimum: 2.6732043074315914 > 2.6732042742308453
F(9.688901040700001) = LineSearchPoint{point=PointSample{avg=2.6732042742308453}, derivative=-9.350014797887108E-6}, evalInputDelta = -3.884304788925874E-8
New Minimum: 2.6732042742308453 > 2.673204073172552
F(67.8223072849) = LineSearchPoint{point=PointSample{avg=2.673204073172552}, derivative=-9.350014382310688E-6}, evalInputDelta = -2.399013410148143E-7
F(474.7561509943) = LineSearchPoint{point=PointSample{avg=2.6732042017642472}, derivative=-9.35001147327573E-6}, evalInputDelta = -1.1130964594485704E-7
F(3323.2930569601003) = LineSearchPoint{point=PointSample{avg=2.6732803658935786}, derivative=-9.349991110031026E-6}, evalInputDelta = 7.605281968547928E-5
New Minimum: 2.673204073172552 > 2.6732037985107864
F(255.63792745846925) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013039679168E-6}, evalInputDelta = -5.145631067904333E-7
F(1789.4654922092848) = LineSearchPoint{point=PointSample{avg=2.673222987862167}, derivative=-9.350002074855098E-6}, evalInputDelta = 1.8674788273997933E-5
F(137.65119170840651) = LineSearchPoint{point=PointSample{avg=2.6732039041864804}, derivative=-9.350013883127173E-6}, evalInputDelta = -4.0888741281719376E-7
F(963.5583419588456) = LineSearchPoint{point=PointSample{avg=2.673207909795562}, derivative=-9.350007978991135E-6}, evalInputDelta = 3.596721668941427E-6
F(74.11987245837274) = LineSearchPoint{point=PointSample{avg=2.673204054685206}, derivative=-9.350014337291483E-6}, evalInputDelta = -2.5838868733529807E-7
F(518.8391072086092) = LineSearchPoint{point=PointSample{avg=2.6732043770616305}, derivative=-9.35001115814131E-6}, evalInputDelta = 6.398773733096164E-8
F(39.9107005545084) = LineSearchPoint{point=PointSample{avg=2.673204162860407}, derivative=-9.350014581841497E-6}, evalInputDelta = -1.5021348609423057E-7
F(279.3749038815588) = LineSearchPoint{point=PointSample{avg=2.6732038045541615}, derivative=-9.350012869991404E-6}, evalInputDelta = -5.085197316567758E-7
F(1955.6243271709116) = LineSearchPoint{point=PointSample{avg=2.6732273591944606}, derivative=-9.350000887040746E-6}, evalInputDelta = 2.3046120567471462E-5
F(150.43264055160859) = LineSearchPoint{point=PointSample{avg=2.673203881825051}, derivative=-9.350013791756838E-6}, evalInputDelta = -4.312488419699889E-7
F(1053.0284838612602) = LineSearchPoint{point=PointSample{avg=2.673209008427715}, derivative=-9.350007339398793E-6}, evalInputDelta = 4.695353821748682E-6
F(81.00219106625079) = LineSearchPoint{point=PointSample{avg=2.673204035217441}, derivative=-9.350014288092074E-6}, evalInputDelta = -2.778564520689031E-7
F(567.0153374637555) = LineSearchPoint{point=PointSample{avg=2.673204604710034}, derivative=-9.350010813745433E-6}, evalInputDelta = 2.9163614101435087E-7
F(43.61656442028888) = LineSearchPoint{point=PointSample{avg=2.6732041502243757}, derivative=-9.350014555349507E-6}, evalInputDelta = -1.6284951742662201E-7
F(305.31595094202214) = LineSearchPoint{point=PointSample{avg=2.6732038216180056}, derivative=-9.350012684547469E-6}, evalInputDelta = -4.914558875412922E-7
F(2137.211656594155) = LineSearchPoint{point=PointSample{avg=2.6732326489285723}, derivative=-9.34999958893321E-6}, evalInputDelta = 2.8335854679095718E-5
F(164.40089666108886) = LineSearchPoint{point=PointSample{avg=2.6732038604198594}, derivative=-9.350013691902413E-6}, evalInputDelta = -4.5265403381122837E-7
F(1150.806276627622) = LineSearchPoint{point=PointSample{avg=2.6732103576687285}, derivative=-9.350006640417811E-6}, evalInputDelta = 6.044594835330486E-6
F(88.52355974058631) = LineSearchPoint{point=PointSample{avg=2.6732040148212888}, derivative=-9.350014234324306E-6}, evalInputDelta = -2.9825260439153567E-7
F(619.6649181841042) = LineSearchPoint{point=PointSample{avg=2.673204896580695}, derivative=-9.350010437371057E-6}, evalInputDelta = 5.835068019877099E-7
F(47.66653216800801) = LineSearchPoint{point=PointSample{avg=2.6732041366699755}, derivative=-9.350014526397633E-6}, evalInputDelta = -1.7640391769546682E-7
F(333.66572517605607) = LineSearchPoint{point=PointSample{avg=2.673203852758168}, derivative=-9.350012481884345E-6}, evalInputDelta = -4.603157250926415E-7
F(2335.6600762323924) = LineSearchPoint{point=PointSample{avg=2.673239041936903}, derivative=-9.349998170291337E-6}, evalInputDelta = 3.472886300981415E-5
F(179.66615971018402) = LineSearchPoint{point=PointSample{avg=2.673203840649017}, derivative=-9.350013582776114E-6}, evalInputDelta = -4.7242487610787975E-7
F(1257.663117971288) = LineSearchPoint{point=PointSample{avg=2.6732120096653293}, derivative=-9.350005876533726E-6}, evalInputDelta = 7.69659143617929E-6
F(96.74331676702216) = LineSearchPoint{point=PointSample{avg=2.6732039935814114}, derivative=-9.35001417556399E-6}, evalInputDelta = -3.194924818039624E-7
F(677.2032173691551) = LineSearchPoint{point=PointSample{avg=2.6732052670094424}, derivative=-9.35001002604886E-6}, evalInputDelta = 9.53935549219409E-7
F(52.092555182242705) = LineSearchPoint{point=PointSample{avg=2.6732041221614744}, derivative=-9.350014494757462E-6}, evalInputDelta = -1.9091241876267873E-7
F(364.64788627569897) = LineSearchPoint{point=PointSample{avg=2.6732039017092304}, derivative=-9.35001226040316E-6}, evalInputDelta = -4.113646627779133E-7
F(2552.5352039298928) = LineSearchPoint{point=PointSample{avg=2.673246759612277}, derivative=-9.349996619923046E-6}, evalInputDelta = 4.244653838370027E-5
F(196.34

...skipping 2074 bytes...

oint{point=PointSample{avg=2.6732037985116803}, derivative=-9.350013067374013E-6}, evalInputDelta = 8.93951579428176E-13
F(0.001073294841555873) = LineSearchPoint{point=PointSample{avg=2.6732037985108557}, derivative=-9.350013067372571E-6}, evalInputDelta = 6.927791673660977E-14
F(8.256114165814408E-5) = LineSearchPoint{point=PointSample{avg=2.6732037985107917}, derivative=-9.350013067372461E-6}, evalInputDelta = 5.329070518200751E-15
F(6.3508570506264676E-6) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
F(4.4455999354385276E-5) = LineSearchPoint{point=PointSample{avg=2.6732037985107895}, derivative=-9.350013067372458E-6}, evalInputDelta = 3.1086244689504383E-15
F(3.4196922580296365E-6) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
F(2.3937845806207456E-5) = LineSearchPoint{point=PointSample{avg=2.673203798510788}, derivative=-9.350013067372454E-6}, evalInputDelta = 1.7763568394002505E-15
F(1.8413727543236506E-6) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
F(1.2889609280265554E-5) = LineSearchPoint{point=PointSample{avg=2.6732037985107873}, derivative=-9.350013067372453E-6}, evalInputDelta = 8.881784197001252E-16
F(9.915084061742734E-7) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
F(6.9405588432199134E-6) = LineSearchPoint{point=PointSample{avg=2.673203798510787}, derivative=-9.350013067372453E-6}, evalInputDelta = 4.440892098500626E-16
F(5.338891417861471E-7) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
F(3.73722399250303E-6) = LineSearchPoint{point=PointSample{avg=2.673203798510787}, derivative=-9.350013067372453E-6}, evalInputDelta = 4.440892098500626E-16
F(2.874787686540792E-7) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
F(2.0123513805785547E-6) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
F(1.4086459664049883E-5) = LineSearchPoint{point=PointSample{avg=2.6732037985107877}, derivative=-9.350013067372453E-6}, evalInputDelta = 1.3322676295501878E-15
F(1.0835738203115294E-6) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
F(7.585016742180705E-6) = LineSearchPoint{point=PointSample{avg=2.6732037985107873}, derivative=-9.350013067372453E-6}, evalInputDelta = 8.881784197001252E-16
F(5.834628263215927E-7) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
F(4.084239784251149E-6) = LineSearchPoint{point=PointSample{avg=2.673203798510787}, derivative=-9.350013067372453E-6}, evalInputDelta = 4.440892098500626E-16
F(3.141722910962422E-7) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
F(2.1992060376736955E-6) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
F(1.539444226371587E-5) = LineSearchPoint{point=PointSample{avg=2.6732037985107877}, derivative=-9.350013067372454E-6}, evalInputDelta = 1.3322676295501878E-15
F(1.1841878664396822E-6) = LineSearchPoint{point=PointSample{avg=2.673203798510787}, derivative=-9.350013067372453E-6}, evalInputDelta = 4.440892098500626E-16
F(9.109137434151401E-8) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
F(6.37639620390598E-7) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
F(4.463477342734186E-6) = LineSearchPoint{point=PointSample{avg=2.673203798510787}, derivative=-9.350013067372453E-6}, evalInputDelta = 4.440892098500626E-16
F(3.4334441097955275E-7) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
F(2.4034108768568693E-6) = LineSearchPoint{point=PointSample{avg=2.673203798510787}, derivative=-9.350013067372453E-6}, evalInputDelta = 4.440892098500626E-16
F(1.8487775975822072E-7) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
F(1.294144318307545E-6) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
F(9.059010228152815E-6) = LineSearchPoint{point=PointSample{avg=2.6732037985107873}, derivative=-9.350013067372453E-6}, evalInputDelta = 8.881784197001252E-16
F(6.968469406271397E-7) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372451E-6}, evalInputDelta = 0.0
F(4.877928584389978E-6) = LineSearchPoint{point=PointSample{avg=2.673203798510787}, derivative=-9.350013067372453E-6}, evalInputDelta = 4.440892098500626E-16
F(3.75225275722306E-7) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
F(2.6265769300561417E-6) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
F(1.838603851039299E-5) = LineSearchPoint{point=PointSample{avg=2.6732037985107877}, derivative=-9.350013067372454E-6}, evalInputDelta = 1.3322676295501878E-15
F(1.4143106546456147E-6) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372451E-6}, evalInputDelta = 0.0
F(9.900174582519302E-6) = LineSearchPoint{point=PointSample{avg=2.673203798510787}, derivative=-9.350013067372453E-6}, evalInputDelta = 4.440892098500626E-16
F(7.615518909630232E-7) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
F(5.330863236741162E-6) = LineSearchPoint{point=PointSample{avg=2.6732037985107873}, derivative=-9.350013067372453E-6}, evalInputDelta = 8.881784197001252E-16
F(4.1006640282624325E-7) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
F(2.8704648197837027E-6) = LineSearchPoint{point=PointSample{avg=2.673203798510787}, derivative=-9.350013067372453E-6}, evalInputDelta = 4.440892098500626E-16
F(2.208049861372079E-7) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372451E-6}, evalInputDelta = 0.0
F(1.5456349029604554E-6) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
F(1.0819444320723188E-5) = LineSearchPoint{point=PointSample{avg=2.6732037985107873}, derivative=-9.350013067372453E-6}, evalInputDelta = 8.881784197001252E-16
F(8.322649477479376E-7) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
F(5.825854634235563E-6) = LineSearchPoint{point=PointSample{avg=2.673203798510787}, derivative=-9.350013067372453E-6}, evalInputDelta = 4.440892098500626E-16
F(4.481426641719664E-7) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
Loops = 52
F(2.240713320859832E-7) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372453E-6}, evalInputDelta = 0.0
Right bracket at 2.240713320859832E-7
F(1.120356660429916E-7) = LineSearchPoint{point=PointSample{avg=2.6732037985107864}, derivative=-9.350013067372451E-6}, evalInputDelta = 0.0
Right bracket at 1.120356660429916E-7
F(6.18355487179917E8) = LineSearchPoint{point=PointSample{avg=3103332.511911638}, derivative=-9.419168907256568E-6}, evalInputDelta = 3103329.8387078396
3103332.511911638 > 2.6732037985107864
Fitness changed from 2.6732037985107864 to 2.6732037985107864
Static Iteration Total: 5.5611; Orientation: 0.0461; Line Search: 5.4692
Iteration 2 failed. Error: 2.6732037985107864
Previous Error: 0.0 -> 2.6732037985107864
Optimization terminated 2
Final threshold in iteration 2: 2.6732037985107864 (> 0.0) after 10.903s (< 30.000s)

Returns

    2.6732037985107864

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

    [
    	[ [ -1.9280447069909818, 1.9545139396197637, -1.6245078714175538 ], [ 1.4119302570940682, 1.0635726011662137, -1.645124827893103 ], [ -1.4372893496199162, 0.7446419923904992, -0.6519767523646894 ], [ 1.2533090206959483, 0.8681233912951098, -1.536595497119878 ], [ -1.332032189033507, -1.5309896220038106, 0.14303969383371012 ], [ 0.5929942834794361, 1.5079302570940682, -0.3918193837564334 ], [ -1.339293629542487, 0.4870343289947923, -0.1886402041108599 ], [ -1.0346641551094626, 1.9256058751160676, -1.6736541586663278 ], ... ],
    	[ [ -1.2634670926674965, 0.9442646653866125, -1.4766455689497777 ], [ 1.8665908356442527, 1.824457799587654, -0.10890665777711166 ], [ 0.6231201664174775, 1.555862302467776, 0.6345622231700241 ], [ 0.8877550056894196, -0.17207153118557092, 0.2646133799162708 ], [ -1.814626601237038, 1.1672364045940302, 0.24405722494845675 ], [ 0.8123898449613617, -1.4520894139819636, 1.2196387675128668 ], [ -1.6511326843749523, -1.4154134442783182, -0.9209531530477328 ], [ -0.33550464653992124, 1.5151809679252128, 1.5682789716237266 ], ... ],
    	[ [ -1.7843022192590372, -1.0476816862242093, 0.2654020112371904 ], [ -1.5481090850579957, -0.29131687717779753, -0.25283870315081924 ], [ 1.67209835538016, 0.09240772775775435, 0.7493912815593547 ], [ 1.9764095160373936, -0.12753683557342818, 1.5971909942397562 ], [ 1.0764184574355902, 0.14036123248713325, -1.8837174518169948 ], [ -1.1430057165205638, 0.7685275424935857, -0.4874438450321859 ], [ -0.521105156817071, -0.42447031754512893, -0.19203040075386765 ], [ -1.7234581512693001, -0.07213233269330624, 0.8918980680605614 ], ... ],
    	[ [ -1.899091553943249, -1.0090890623003175, -1.4671058601803633 ], [ 0.5996584385888988, -0.607170238247377, -1.8762575122680554 ], [ -4.971417397180306E-4, 0.3200804725837673, 1.1758998563402006 ], [ 1.116672393144367, -1.0286527220683348, -1.7874259622357933 ], [ -1.128137697532224, 0.23356832124364285, -1.9117603705283372 ], [ -1.519869455586333, 0.8640643780670139, -0.8207671719652483 ], [ -0.399352642770583, -0.2963916332410009, -1.9078015009600406 ], [ 1.4535933571585926, -0.006996775122367571, 0.10051144797683223 ], ... ],
    	[ [ 1.436118026456192, 1.4027070738208052, 1.3612911378995556 ], [ -1.9173626690851264, 0.4670164461983996, -0.45195171644973964 ], [ 0.5151469906120666, -0.028826185193344355, -0.39317847628228125 ], [ -0.43628612474228373, -0.09686731562504765, 1.7150361172744315 ], [ -0.039125531256395264, 1.9085776143234852, -0.2879964234407214 ], [ 0.5590468469522673, -1.9195708128865743, 1.411765735367255 ], [ 0.032398786359557986, 1.103849784510301, 1.530771451887819 ], [ -1.7844882003415217, 1.5322163818363521, -0.09194992817010034 ], ... ],
    	[ [ 1.3964077277577542, 1.0113490662113045, -1.6087045821778738 ], [ 0.18346172782857867, 1.7395886956829671, -1.7603487145296584 ], [ 1.1803737504446081, 0.7079821172036073, 0.73651681281575 ], [ 0.672987130360879, 1.976888774980719, 1.1837299697744696 ], [ 0.032341561411101234, 0.40816988656573094, 1.2485865557216818 ], [ -0.8520411304317033, -0.29616631000645244, 0.5720715311855709 ], [ 1.1603594442074938, -0.07224320603094118, -1.2416452172681316 ], [ -1.3125650963660105, 1.143928468814429, 1.8319356219329863 ], ... ],
    	[ [ 1.2240178827963928, 1.5558658790270545, -0.7008083023969516 ], [ -1.6928315500322622, -0.27740201123719044, -0.079372313846615 ], [ -0.34896745928484696, 1.4598927032216436, 0.9295021548969897 ], [ 0.45665272206833485, 1.9749484915721072, -1.4720947788208816 ], [ -1.8806241095941063, -0.7479070094587578, 1.8123612324871332 ], [ -1.5905657997293028, -1.9963290434536263, -1.1997156635373554 ], [ -0.10826108882733393, 0.6533626690851264, -0.4123969980799187 ], [ -1.9482646653866125, -0.48042203399486855, 1.872084049143046 ], ... ],
    	[ [ 1.9844417050709005, -1.4958229603157118, -1.4159248922551504 ], [ -0.36798927032216433, 0.07605007182989966, -0.03678684304128033 ], [ 1.4244095160373935, 1.2950611531893814, -0.803601213640442 ], [ 0.7000160945167534, 0.6680697429059317, -1.8235171644973962 ], [ -1.4049173874549472, 1.184223534954909, -0.18019313420104152 ], [ -0.4470218110373174, -1.9668447713530293, -0.011939198492264701 ], [ -1.4843326200129048, -0.14410372021907786, -1.413250007467852 ], [ -1.403418809117236, -1.1548286768362759, 0.18680364092132604 ], ... ],
    	...
    ]

To produce the following output:

TrainingTester.java:633 executed in 0.01 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.8665908356442527, 1.824457799587654, -0.10890665777711166 ], [ 0.6231201664174775, 1.555862302467776, 0.6345622231700241 ], [ 0.8877550056894196, -0.17207153118557092, 0.2646133799162708 ], [ -1.814626601237038, 1.1672364045940302, 0.24405722494845675 ], [ 0.8123898449613617, -1.4520894139819636, 1.2196387675128668 ], [ -1.6511326843749523, -1.4154134442783182, -0.9209531530477328 ], [ -0.33550464653992124, 1.5151809679252128, 1.5682789716237266 ], [ -1.4353025709406833, -1.861196359078674, 1.7204005746391973 ], ... ],
    	[ [ -1.5481090850579957, -0.29131687717779753, -0.25283870315081924 ], [ 1.67209835538016, 0.09240772775775435, 0.7493912815593547 ], [ 1.9764095160373936, -0.12753683557342818, 1.5971909942397562 ], [ 1.0764184574355902, 0.14036123248713325, -1.8837174518169948 ], [ -1.1430057165205638, 0.7685275424935857, -0.4874438450321859 ], [ -0.521105156817071, -0.42447031754512893, -0.19203040075386765 ], [ -1.7234581512693001, -0.07213233269330624, 0.8918980680605614 ], [ 0.25141165599867904, 1.4086795462629238, 0.6118319017139083 ], ... ],
    	[ [ 0.5996584385888988, -0.607170238247377, -1.8762575122680554 ], [ -4.971417397180306E-4, 0.3200804725837673, 1.1758998563402006 ], [ 1.116672393144367, -1.0286527220683348, -1.7874259622357933 ], [ -1.128137697532224, 0.23356832124364285, -1.9117603705283372 ], [ -1.519869455586333, 0.8640643780670139, -0.8207671719652483 ], [ -0.399352642770583, -0.2963916332410009, -1.9078015009600406 ], [ 1.4535933571585926, -0.006996775122367571, 0.10051144797683223 ], [ -0.2036137315979169, 1.5124023629188366, -1.5326598751868918 ], ... ],
    	[ [ -1.9173626690851264, 0.4670164461983996, -0.45195171644973964 ], [ 0.5151469906120666, -0.028826185193344355, -0.39317847628228125 ], [ -0.43628612474228373, -0.09686731562504765, 1.7150361172744315 ], [ -0.039125531256395264, 1.9085776143234852, -0.2879964234407214 ], [ 0.5590468469522673, -1.9195708128865743, 1.411765735367255 ], [ 0.032398786359557986, 1.103849784510301, 1.530771451887819 ], [ -1.7844882003415217, 1.5322163818363521, -0.09194992817010034 ], [ -1.6512828998646512, -1.9961144498969134, 0.32368883934276643 ], ... ],
    	[ [ 0.18346172782857867, 1.7395886956829671, -1.7603487145296584 ], [ 1.1803737504446081, 0.7079821172036073, 0.73651681281575 ], [ 0.672987130360879, 1.976888774980719, 1.1837299697744696 ], [ 0.032341561411101234, 0.40816988656573094, 1.2485865557216818 ], [ -0.8520411304317033, -0.29616631000645244, 0.5720715311855709 ], [ 1.1603594442074938, -0.07224320603094118, -1.2416452172681316 ], [ -1.3125650963660105, 1.143928468814429, 1.8319356219329863 ], [ -0.011316877177797526, -0.3440572249484567, 1.677001436597993 ], ... ],
    	[ [ -1.6928315500322622, -0.27740201123719044, -0.079372313846615 ], [ -0.34896745928484696, 1.4598927032216436, 0.9295021548969897 ], [ 0.45665272206833485, 1.9749484915721072, -1.4720947788208816 ], [ -1.8806241095941063, -0.7479070094587578, 1.8123612324871332 ], [ -1.5905657997293028, -1.9963290434536263, -1.1997156635373554 ], [ -0.10826108882733393, 0.6533626690851264, -0.4123969980799187 ], [ -1.9482646653866125, -0.48042203399486855, 1.872084049143046 ], [ 0.40249963338264955, 0.6033311834149117, 1.6915439886919852 ], ... ],
    	[ [ -0.36798927032216433, 0.07605007182989966, -0.03678684304128033 ], [ 1.4244095160373935, 1.2950611531893814, -0.803601213640442 ], [ 0.7000160945167534, 0.6680697429059317, -1.8235171644973962 ], [ -1.4049173874549472, 1.184223534954909, -0.18019313420104152 ], [ -0.4470218110373174, -1.9668447713530293, -0.011939198492264701 ], [ -1.4843326200129048, -0.14410372021907786, -1.413250007467852 ], [ -1.403418809117236, -1.1548286768362759, 0.18680364092132604 ], [ 1.9160643780670137, 1.6082253232345485, -0.44730793577960115 ], ... ],
    	[ [ -0.2576756180219993, 0.7694985783377112, 0.04037017388532961 ], [ 0.2720447069909819, -1.3308590775901437, -0.13977467676545155 ], [ -1.4358533610695796, 1.9685257542139465, 0.6284202457152293 ], [ 1.0356405557925061, -0.2514205973968754, 0.12502110767402516 ], [ 1.440876257023244, 0.888398786359558, -0.833013954555468 ], [ -1.8328601625064906, -1.7798068657989585, -0.012772536804166148 ], [ 0.23893597361463226, -1.7126580869072525, 1.7675439886919853 ], [ -0.9521216030154706, -1.747842631391744, 1.258639119194513 ], ... ],
    	...
    ]

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 10.37 seconds (0.139 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: 8998861568620
Reset training subject: 8998904329551
Adding measurement 67577b8b to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD
Non-optimal measurement 2.673204313073893 < 2.673204313073893. Total: 1
th(0)=2.673204313073893;dx=-9.350014867149846E-6
Adding measurement 29c9e402 to history. Total: 1
New Minimum: 2.673204313073893 > 2.673204304304964
WOLFE (weak): th(2.154434690031884)=2.673204304304964; dx=-9.350014851748509E-6 evalInputDelta=8.768929138369685E-9
Adding measurement 43257036 to history. Total: 2
New Minimum: 2.673204304304964 > 2.673204295611379
WOLFE (weak): th(4.308869380063768)=2.673204295611379; dx=-9.35001483634717E-6 evalInputDelta=1.746251410139621E-8
Adding measurement 38751a06 to history. Total: 3
New Minimum: 2.673204295611379 > 2.6732042615904787
WOLFE (weak): th(12.926608140191302)=2.6732042615904787; dx=-9.350014774741816E-6 evalInputDelta=5.148341442051674E-8
Adding measurement 11eb6a43 to history. Total: 4
New Minimum: 2.6732042615904787 > 2.673204123414524
WOLFE (weak): th(51.70643256076521)=2.673204123414524; dx=-9.350014497517726E-6 evalInputDelta=1.8965936909864922E-7
Adding measurement 39314d2e to history. Total: 5
New Minimum: 2.673204123414524 > 2.673203798758053
WOLFE (weak): th(258.53216280382605)=2.673203798758053; dx=-9.35001301898924E-6 evalInputDelta=5.143158401388348E-7
Non-optimal measurement 2.6732175014665325 < 2.673203798758053. Total: 6
Armijo: th(1551.1929768229563)=2.6732175014665325; dx=-9.35000377818621E-6 evalInputDelta=-1.3188392639307267E-5
Non-optimal measurement 2.673207259635693 < 2.673203798758053. Total: 6
Armijo: th(904.8625698133912)=2.673207259635693; dx=-9.350008398587725E-6 evalInputDelta=-2.946561799888059E-6
Non-optimal measurement 2.6732046815777233 < 2.673203798758053. Total: 6
Armijo: th(581.6973663086087)=2.6732046815777233; dx=-9.350010708788482E-6 evalInputDelta=-3.685038301171062E-7
Non-optimal measurement 2.6732040282631004 < 2.673203798758053. Total: 6
WOLFE (weak): th(420.1147645562174)=2.6732040282631004; dx=-9.350011863888861E-6 evalInputDelta=2.848107927277965E-7
Non-optimal measurement 2.6732043019442147 < 2.673203798758053. Total: 6
WOLFE (weak): th(500.906065432413)=2.6732043019442147; dx=-9.350011286338673E-6 evalInputDelta=1.1129678512133978E-8
Non-optimal measurement 2.67320447851692 < 2.673203798758053. Total: 6
Armijo: th(541.3017158705109)=2.67320447851692; dx=-9.350010997563578E-6 evalInputDelta=-1.654430268338558E-7
Non-optimal measurement 2.673204386919555 < 2.673203798758053. Total: 6
Armijo: th(521.1038906514619)=2.673204386919555; dx=-9.350011141951125E-6 evalInputDelta=-7.384566202972564E-8
Non-optimal measurement 2.673204343604132 < 2.673203798758053. Total: 6
Armijo: th(511.0049780419375)=2.673204343604132; dx=-9.350011214144898E-6 evalInputDelta=-3.053023878152317E-8
Non-optimal measurement 2.673204322567235 < 2.673203798758053. Total: 6
Armijo: th(505.9555217371752)=2.673204322567235; dx=-9.350011250241785E-6 evalInputDelta=-9.493341668331823E-9
Non-optimal measurement 2.673203798758053 < 2.673203798758053. Total: 6
mu ~= nu (500.906065432413): th(258.53216280382605)=2.673203798758053
Fitness changed from 2.673204313073893 to 2.673203798758053
Iteration 1 complete. Error: 2.673203798758053 Total: 1.7492; Orientation: 0.0887; Line Search: 1.5375
Non-optimal measurement 2.673203798758053 < 2.673203798758053. Total: 6
Rejected: LBFGS Orientation magnitude: 7.999e+06, gradient 3.058e-03, dot -1.000; [89649f96-bed7-4978-836b-4d063a95ef94 = 1.000/1.000e+00, 81eefe97-169c-4d28-a174-9c641fc446d3 = 1.000/1.000e+00, 05d3f077-6018-4b9a-a961-7988e6d600b7 = 1.000/1.000e+00, 713ae556-7286-4dde-8f4d-d5284b6436e6 = 1.000/1.000e+00, 8546a83f-4c01-4a55-a365-b63d8b3a6750 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.673203798758053, 2.673204123414524, 2.6732042615904787, 2.673204295611379, 2.673204304304964, 2.673204313073893
Rejected: LBFGS Orientation magnitude: 7.999e+06, gradient 3.058e-03, dot -1.000; [89649f96-bed7-4978-836b-4d063a95ef94 = 1.000/1.000e+00, 81eefe97-169c-4d28-a174-9c641fc446d3 = 1.000/1.000e+00, 8546a83f-4c01-4a55-a365-b63d8b3a6750 = 1.000/1.000e+00, 713ae556-7286-4dde-8f4d-d5284b6436e6 = 1.000/1.000e+00, 05d3f077-6018-4b9a-a961-7988e6d600b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.673203798758053, 2.673204123414524, 2.6732042615904787, 2.673204295611379, 2.673204304304964
Rejected: LBFGS Orientation magnitude: 7.999e+06, gradient 3.058e-03, dot -1.000; [713ae556-7286-4dde-8f4d-d5284b6436e6 = 1.000/1.000e+00, 81eefe97-169c-4d28-a174-9c641fc446d3 = 1.000/1.000e+00, 8546a83f-4c01-4a55-a365-b63d8b3a6750 = 1.000/1.000e+00, 89649f96-bed7-4978-836b-4d063a95ef94 = 1.000/1.000e+00, 05d3f077-6018-4b9a-a961-7988e6d600b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.673203798758053, 2.673204123414524, 2.6732042615904787, 2.673204295611379
LBFGS Accumulation History: 3 points
Removed measurement 39314d2e to history. Total: 5
Removed measurement 11eb6a43 to history. Total: 4
Removed measurement 38751a06 to history. Total: 3
Adding measurement 1320b9bb to history. Total: 3
th(0)=2.673203798758053;dx=-9.350013068237312E-6
Non-optimal measurement 2.6732134667755 < 2.673203798758053. Total: 4
Armijo: th(1084.6087657293613)=2.6732134667755; dx=-9.350013278693707E-6 evalInputDelta=-9.668017447062027E-6
Non-optimal measurement 2.673206245847551 < 2.673203798758053. Total: 4
Armijo: th(542.3043828646806)=2.673206245847551; dx=-9.35001317346551E-6 evalInputDelta=-2.4470894981476476E-6
Non-optimal measurement 2.673204084028058 < 2.673203798758053. Total: 4
Armijo: th(180.7681276215602)=2.673204084028058; dx=-9.350013103313377E-6 evalInputDelta=-2.852700049515988E-7
Non-optimal measurement 2.6732038203480704 < 2.673203798758053. Total: 4
Armijo: th(45.19203190539005)=2.6732038203480704; dx=-9.350013077006327E-6 evalInputDelta=-2.1590017329486955E-8
Non-optimal measurement 2.673203800423924 < 2.673203798758053. Total: 4
Armijo: th(9.03840638107801)=2.673203800423924; dx=-9.350013069991114E-6 evalInputDelta=-1.6658709967032337E-9
Non-optimal measurement 2.67320379894361 < 2.673203798758053. Total: 4
Armijo: th(1.5064010635130016)=2.67320379894361; dx=-9.350013068529611E-6 evalInputDelta=-1.8555690317612061E-10
Non-optimal measurement 2.673203798782306 < 2.673203798758053. Total: 4
Armijo: th(0.2152001519304288)=2.673203798782306; dx=-9.350013068279068E-6 evalInputDelta=-2.425304401754147E-11
Non-optimal measurement 2.673203798761043 < 2.673203798758053. Total: 4
Armijo: th(0.0269000189913036)=2.673203798761043; dx=-9.35001306824253E-6 evalInputDelta=-2.9900526499204716E-12
Non-optimal measurement 2.6732037987583843 < 2.673203798758053. Total: 4
Armijo: th(0.0029888909990337335)=2.6732037987583843; dx=-9.350013068237892E-6 evalInputDelta=-3.312905505481467E-13
Non-optimal measurement 2.673203798758086 < 2.673203798758053. Total: 4
Armijo: th(2.988890999033733E-4)=2.673203798758086; dx=-9.35001306823737E-6 evalInputDelta=-3.2862601528904634E-14
Non-optimal measurement 2.673203798758056 < 2.673203798758053. Total: 4
Armijo: th(2.717173635485212E-5)=2.673203798758056; dx=-9.350013068237316E-6 evalInputDelta=-3.1086244689504383E-15
Non-optimal measurement 2.6732037987580535 < 2.673203798758053. Total: 4
Armijo: th(2.2643113629043436E-6)=2.6732037987580535; dx=-9.35001306823731E-6 evalInputDelta=-4.440892098500626E-16
Non-optimal measurement 2.673203798758053 < 2.673203798758053. Total: 4
WOLFE (weak): th(1.7417779714648796E-7)=2.673203798758053; dx=-9.35001306823731E-6 evalInputDelta=0.0
Non-optimal measurement 2.6732037987580535 < 2.673203798758053. Total: 4
Armijo: th(1.2192445800254157E-6)=2.6732037987580535; dx=-9.35001306823731E-6 evalInputDelta=-4.440892098500626E-16
Non-optimal measurement 2.6732037987580535 < 2.673203798758053. Total: 4
Armijo: th(6.967111885859518E-7)=2.6732037987580535; dx=-9.35001306823731E-6 evalInputDelta=-4.440892098500626E-16
Non-optimal measurement 2.673203798758053 < 2.673203798758053. Total: 4
WOLFE (weak): th(4.354444928662199E-7)=2.673203798758053; dx=-9.35001306823731E-6 evalInputDelta=0.0
Non-optimal measurement 2.673203798758053 < 2.673203798758053. Total: 4
WOLFE (weak): th(5.660778407260859E-7)=2.673203798758053; dx=-9.35001306823731E-6 evalInputDelta=0.0
Non-optimal measurement 2.673203798758053 < 2.673203798758053. Total: 4
WOLFE (weak): th(6.313945146560189E-7)=2.673203798758053; dx=-9.350013068237312E-6 evalInputDelta=0.0
Non-optimal measurement 2.673203798758053 < 2.673203798758053. Total: 4
WOLFE (weak): th(6.640528516209854E-7)=2.673203798758053; dx=-9.35001306823731E-6 evalInputDelta=0.0
Non-optimal measurement 2.673203798758053 < 2.673203798758053. Total: 4
WOLFE (weak): th(6.803820201034685E-7)=2.673203798758053; dx=-9.35001306823731E-6 evalInputDelta=0.0
Non-optimal measurement 2.673203798758053 < 2.673203798758053. Total: 4
WOLFE (weak): th(6.885466043447101E-7)=2.673203798758053; dx=-9.350013068237312E-6 evalInputDelta=0.0
Non-optimal measurement 2.673203798758053 < 2.673203798758053. Total: 4
WOLFE (weak): th(6.92628896465331E-7)=2.673203798758053; dx=-9.350013068237312E-6 evalInputDelta=0.0
Non-optimal measurement 2.673203798758053 < 2.673203798758053. Total: 4
mu ~= nu (6.92628896465331E-7): th(0.0)=2.673203798758053
Fitness changed from 2.673203798758053 to 2.673203798758053
Static Iteration Total: 8.6242; Orientation: 6.2519; Line Search: 2.3278
Iteration 2 failed. Error: 2.673203798758053
Previous Error: 0.0 -> 2.673203798758053
Optimization terminated 2
Final threshold in iteration 2: 2.673203798758053 (> 0.0) after 10.374s (< 30.000s)

Returns

    2.673203798758053

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

    [
    	[ [ -1.9280452131465229, 1.9544971150095793, -1.6245136213445 ], [ 1.4119294674914242, 1.0635677623192412, -1.6451375627665157 ], [ -1.4373039471457199, 0.7446492607840686, -0.6519764891638081 ], [ 1.25332384093019, 0.8681247882844031, -1.536602239111685 ], [ -1.3320325534654966, -1.530978182888583, 0.14302882161268848 ], [ 0.5930055403786688, 1.5079294674914243, -0.3918173388880476 ], [ -1.3392856322849385, 0.48702339603510575, -0.18864745225820767 ], [ -1.0346490311818963, 1.9256240562231017, -1.6736728864213466 ], ... ],
    	[ [ -1.2634610592934472, 0.9442676618274154, -1.4766528778357904 ], [ 1.8665748816215988, 1.8244629826203944, -0.10891692261148404 ], [ 0.6231102052764297, 1.5558607435087095, 0.6345459452078241 ], [ 0.8877522319570547, -0.1720723410344366, 0.2646203243702939 ], [ -1.8146110521388172, 1.1672277594573892, 0.2440578728275493 ], [ 0.8123942586376796, -1.4520904262930456, 1.2196346777760951 ], [ -1.651122864957456, -1.4154068035176197, -0.9209639442838679 ], [ -0.3354990383365265, 1.5151716951557008, 1.5682821300343028 ], ... ],
    	[ [ -1.7843056408704947, -1.047678082396757, 0.2654178842749576 ], [ -1.548110320077516, -0.2913091431211304, -0.2528481986287693 ], [ 1.6720994689223503, 0.09241234389628868, 0.7494070331197921 ], [ 1.9764141524221497, -0.12753159180202295, 1.5972044782233696 ], [ 1.0764231950514542, 0.1403653222239049, -1.8837142529139752 ], [ -1.142994459621331, 0.7685335151289701, -0.48743754845725534 ], [ -0.5211176689820457, -0.4244756423014207, -0.19203074493963557 ], [ -1.7234520166641427, -0.07213383091370773, 0.8918969140259279 ], ... ],
    	[ [ -1.899081268862655, -1.0091013922492975, -1.4670957370695423 ], [ 0.5996545715605651, -0.6071608440005353, -1.8762604277239716 ], [ -5.027701893344431E-4, 0.32008138366374117, 1.1758987225517887 ], [ 1.1166800057237043, -1.028660111939234, -1.7874194631986462 ], [ -1.1281392564912904, 0.2335860771800227, -1.9117576575346373 ], [ -1.5198679776121533, 0.8640651069309929, -0.8207758575943326 ], [ -0.3993453136383487, -0.29639606716354044, -1.9077992536294384 ], [ 1.4536113965420754, -0.006985416992026538, 0.10051723839622177 ], ... ],
    	[ [ 1.4361193627068203, 1.402692435802558, 1.3613057556715809 ], [ -1.9173780967060174, 0.46700531077649665, -0.4519511698017553 ], [ 0.5151373331643434, -0.02883553894774285, -0.3931918185423432 ], [ -0.43628936413774644, -0.0968771350425439, 1.7150252045609666 ], [ -0.039115630854012436, 1.9085841538530754, -0.2879963829482782 ], [ 0.5590360557161322, -1.9195659537933802, 1.41176308311222 ], [ 0.032403301266984104, 1.1038480838276832, 1.5307575427335511 ], [ -1.7844937275600299, 1.5322188316291707, -0.09194936127589437 ], ... ],
    	[ [ 1.3964123438962885, 1.0113416965866269, -1.6087125591892006 ], [ 0.1834556337158645, 1.7395840390519894, -1.7603526625428785 ], [ 1.1803779819049312, 0.7079819147413908, 0.7365226639738045 ], [ 0.6729983062752253, 1.9768988373528749, 1.1837269125950018 ], [ 0.03234542843943482, 0.4081718099567869, 1.2485931964823802 ], [ -0.852041596094801, -0.29616819290506513, 0.5720723410344366 ], [ 1.160363513698044, -0.07224595951708447, -1.241663843792042 ], [ -1.3125714941720492, 1.1439276589655634, 1.8319348930690071 ], ... ],
    	[ [ 1.2240180852586091, 1.5558643605604314, -0.7008174536891336 ], [ -1.6928409645253255, -0.2774178842749576, -0.07936520742281875 ], [ -0.3489784124907551, 1.4598914884483452, 0.9295191617231688 ], [ 0.4566601119392341, 1.9749365867937818, -1.4720958518706284 ], [ -1.8806311755254592, -0.7479059566552324, 1.812365322223905 ], [ -1.590549562259546, -1.9963327687584085, -1.1997124443881144 ], [ -0.10826404477569362, 0.6533780967060174, -0.41240149274112314 ], [ -1.9482676618274155, -0.480426812103176, 1.872085000715463 ], ... ],
    	[ [ 1.984446705887646, -1.4958209559397695, -1.4159240419138415 ], [ -0.3679891488448345, 0.07605063872410563, -0.03679575137880271 ], [ 1.4244141524221496, 1.2950505239230194, -0.803596698733016 ], [ 0.7000162767327482, 0.6680705325085757, -1.823511698017553 ], [ -1.4049277737666495, 1.1842260657326142, -0.18019532079297884 ], [ -0.44701073635407934, -1.9668316922938487, -0.011938510120728881 ], [ -1.4843363858101302, -0.14410489449993308, -1.4132641595767796 ], [ -1.4034122290952025, -1.1548154155611003, 0.18679009619904768 ], ... ],
    	...
    ]

To produce the following output:

TrainingTester.java:633 executed in 0.02 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.8665748816215988, 1.8244629826203944, -0.10891692261148404 ], [ 0.6231102052764297, 1.5558607435087095, 0.6345459452078241 ], [ 0.8877522319570547, -0.1720723410344366, 0.2646203243702939 ], [ -1.8146110521388172, 1.1672277594573892, 0.2440578728275493 ], [ 0.8123942586376796, -1.4520904262930456, 1.2196346777760951 ], [ -1.651122864957456, -1.4154068035176197, -0.9209639442838679 ], [ -0.3354990383365265, 1.5151716951557008, 1.5682821300343028 ], [ -1.435294674914243, -1.8612099038009524, 1.720405109792845 ], ... ],
    	[ [ -1.548110320077516, -0.2913091431211304, -0.2528481986287693 ], [ 1.6720994689223503, 0.09241234389628868, 0.7494070331197921 ], [ 1.9764141524221497, -0.12753159180202295, 1.5972044782233696 ], [ 1.0764231950514542, 0.1403653222239049, -1.8837142529139752 ], [ -1.142994459621331, 0.7685335151289701, -0.48743754845725534 ], [ -0.5211176689820457, -0.4244756423014207, -0.19203074493963557 ], [ -1.7234520166641427, -0.07213383091370773, 0.8918969140259279 ], [ 0.2514049949917589, 1.4086872398271477, 0.6118299985690739 ], ... ],
    	[ [ 0.5996545715605651, -0.6071608440005353, -1.8762604277239716 ], [ -5.027701893344431E-4, 0.32008138366374117, 1.1758987225517887 ], [ 1.1166800057237043, -1.028660111939234, -1.7874194631986462 ], [ -1.1281392564912904, 0.2335860771800227, -1.9117576575346373 ], [ -1.5198679776121533, 0.8640651069309929, -0.8207758575943326 ], [ -0.3993453136383487, -0.29639606716354044, -1.9077992536294384 ], [ 1.4536113965420754, -0.006985416992026538, 0.10051723839622177 ], [ -0.2036093584140423, 1.5124069183187059, -1.5326673460426778 ], ... ],
    	[ [ -1.9173780967060174, 0.46700531077649665, -0.4519511698017553 ], [ 0.5151373331643434, -0.02883553894774285, -0.3931918185423432 ], [ -0.43628936413774644, -0.0968771350425439, 1.7150252045609666 ], [ -0.039115630854012436, 1.9085841538530754, -0.2879963829482782 ], [ 0.5590360557161322, -1.9195659537933802, 1.41176308311222 ], [ 0.032403301266984104, 1.1038480838276832, 1.5307575427335511 ], [ -1.7844937275600299, 1.5322188316291707, -0.09194936127589437 ], [ -1.651274781129773, -1.9961157456550986, 0.32368531650020077 ], ... ],
    	[ [ 0.1834556337158645, 1.7395840390519894, -1.7603526625428785 ], [ 1.1803779819049312, 0.7079819147413908, 0.7365226639738045 ], [ 0.6729983062752253, 1.9768988373528749, 1.1837269125950018 ], [ 0.03234542843943482, 0.4081718099567869, 1.2485931964823802 ], [ -0.852041596094801, -0.29616819290506513, 0.5720723410344366 ], [ 1.160363513698044, -0.07224595951708447, -1.241663843792042 ], [ -1.3125714941720492, 1.1439276589655634, 1.8319348930690071 ], [ -0.01130914312113037, -0.34405787282754924, 1.6770127744821124 ], ... ],
    	[ [ -1.6928409645253255, -0.2774178842749576, -0.07936520742281875 ], [ -0.3489784124907551, 1.4598914884483452, 0.9295191617231688 ], [ 0.4566601119392341, 1.9749365867937818, -1.4720958518706284 ], [ -1.8806311755254592, -0.7479059566552324, 1.812365322223905 ], [ -1.590549562259546, -1.9963327687584085, -1.1997124443881144 ], [ -0.10826404477569362, 0.6533780967060174, -0.41240149274112314 ], [ -1.9482676618274155, -0.480426812103176, 1.872085000715463 ], [ 0.40248264680269213, 0.6033236113280177, 1.6915388259054664 ], ... ],
    	[ [ -0.3679891488448345, 0.07605063872410563, -0.03679575137880271 ], [ 1.4244141524221496, 1.2950505239230194, -0.803596698733016 ], [ 0.7000162767327482, 0.6680705325085757, -1.823511698017553 ], [ -1.4049277737666495, 1.1842260657326142, -0.18019532079297884 ], [ -0.44701073635407934, -1.9668316922938487, -0.011938510120728881 ], [ -1.4843363858101302, -0.14410489449993308, -1.4132641595767796 ], [ -1.4034122290952025, -1.1548154155611003, 0.18679009619904768 ], [ 1.9160651069309929, 1.6082278742584755, -0.4473001004918258 ], ... ],
    	[ [ -0.2576945887316776, 0.769515544671447, 0.04037436485320946 ], [ 0.2720452131465229, -1.3308461605007362, -0.1397721257415247 ], [ -1.435851700879405, 1.9685317066031092, 0.6284250035773151 ], [ 1.035636486301956, -0.25141403762106346, 0.1250326682665826 ], [ 1.4408861776718485, 0.8884033012669841, -0.8330254341631389 ], [ -1.8328699009391003, -1.7798046792070212, -0.012781283171915394 ], [ 0.2389239271127554, -1.7126655375168167, 1.7675388259054665 ], [ -0.9521229797585422, -1.7478408497242395, 1.2586237118198436 ], ... ],
    	...
    ]

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

    return TestUtil.compare(title + " vs Iteration", runs);
Logging
Plotting range=[0.0, 0.42703206956638784], [2.0, 0.4270320696065593]; valueStats=DoubleSummaryStatistics{count=3, sum=8.019611, min=2.673204, average=2.673204, max=2.673204}
Only 1 points for GD
Only 1 points for CjGD
Only 1 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=[-1.0, 0.42703206956638784], [1.0, 0.4270320696065593]; valueStats=DoubleSummaryStatistics{count=3, sum=8.019611, min=2.673204, average=2.673204, max=2.673204}
Only 1 points for GD
Only 1 points for CjGD
Only 1 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": 2.673203798758053 }, "CjGD": { "type": "NonConverged", "value": 2.6732037985107864 }, "GD": { "type": "NonConverged", "value": 2.673203798758053 } }, "model":null, "complete":null}

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

    throwException(exceptions.addRef());

Results

detailsresult
{"input":{ "LBFGS": { "type": "NonConverged", "value": 2.673203798758053 }, "CjGD": { "type": "NonConverged", "value": 2.6732037985107864 }, "GD": { "type": "NonConverged", "value": 2.673203798758053 } }, "model":null, "complete":null}OK
  {
    "result": "OK",
    "performance": {
      "execution_time": "27.211",
      "gc_time": "0.833"
    },
    "created_on": 1586743614513,
    "file_name": "trainingTest",
    "report": {
      "simpleName": "Basic",
      "canonicalName": "com.simiacryptus.mindseye.layers.cudnn.ImgModulusCropLayerTest.Basic",
      "link": "https://github.com/SimiaCryptus/mindseye-cudnn/tree/59d5b3318556370acb2d83ee6ec123ce0fc6974f/src/test/java/com/simiacryptus/mindseye/layers/cudnn/ImgModulusCropLayerTest.java",
      "javaDoc": ""
    },
    "training_analysis": {
      "input": {
        "LBFGS": {
          "type": "NonConverged",
          "value": 2.673203798758053
        },
        "CjGD": {
          "type": "NonConverged",
          "value": 2.6732037985107864
        },
        "GD": {
          "type": "NonConverged",
          "value": 2.673203798758053
        }
      }
    },
    "archive": "s3://code.simiacrypt.us/tests/com/simiacryptus/mindseye/layers/cudnn/ImgModulusCropLayer/Basic/trainingTest/202004130654",
    "id": "16ba98f8-92a8-4d72-95cc-af8baa3bfe34",
    "report_type": "Components",
    "display_name": "Comparative Training",
    "target": {
      "simpleName": "ImgModulusCropLayer",
      "canonicalName": "com.simiacryptus.mindseye.layers.cudnn.ImgModulusCropLayer",
      "link": "https://github.com/SimiaCryptus/mindseye-cudnn/tree/59d5b3318556370acb2d83ee6ec123ce0fc6974f/src/main/java/com/simiacryptus/mindseye/layers/cudnn/ImgModulusCropLayer.java",
      "javaDoc": ""
    }
  }