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 3749190997348665344

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.02 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.836, -1.04, 0.548 ], [ -0.216, 0.884, -0.292 ], [ -0.532, 0.084, -1.44 ], [ 0.84, 0.948, 0.132 ], [ 0.364, 1.024, -0.18 ], [ -1.328, -1.168, 1.652 ], [ 1.82, 0.396, -0.896 ], [ -1.208, -1.272, 1.592 ], ... ],
    	[ [ 0.104, -1.864, 1.704 ], [ 1.992, 1.424, -0.54 ], [ 1.492, 1.376, -1.04 ], [ -0.476, 1.448, -0.644 ], [ 1.896, -0.756, 0.54 ], [ -0.74, -0.608, -0.288 ], [ -0.296, 1.236, -0.396 ], [ 1.016, -1.128, 1.696 ], ... ],
    	[ [ -0.612, -1.72, -0.008 ], [ -0.376, 0.632, 0.52 ], [ -0.428, -1.116, -0.732 ], [ -0.888, 0.652, -0.42 ], [ 1.8, 0.6, -0.072 ], [ -1.66, 0.116, -1.676 ], [ -0.2, -0.732, 1.808 ], [ 1.568, 0.676, 0.928 ], ... ],
    	[ [ 1.512, 1.24, 0.204 ], [ 0.568, -0.48, 0.888 ], [ 1.904, 1.48, 0.056 ], [ 1.96, -1.192, -1.992 ], [ -1.096, -1.012, -0.476 ], [ -0.58, 1.232, -1.012 ], [ -0.504, 1.616, -0.104 ], [ 1.848, -0.484, -0.944 ], ... ],
    	[ [ 0.18, 1.228, 0.348 ], [ 0.7, 1.936, 0.288 ], [ -1.716, -1.292, 1.816 ], [ 0.212, 1.568, -1.368 ], [ -0.628, -1.724, -1.232 ], [ 1.608, -0.792, 0.0 ], [ 0.516, -0.936, -0.548 ], [ -0.46, 0.144, -1.408 ], ... ],
    	[ [ 0.696, -0.192, 1.104 ], [ 1.976, -0.676, 1.468 ], [ 1.748, -0.976, 0.82 ], [ -0.492, 0.756, 0.952 ], [ 0.824, 0.516, 1.048 ], [ 1.804, -0.016, -0.88 ], [ 0.428, -1.0, -1.028 ], [ 0.34, -0.724, -1.112 ], ... ],
    	[ [ 1.416, -1.4, -1.928 ], [ -1.556, 1.664, 0.828 ], [ 0.456, -0.952, -1.016 ], [ -0.068, 1.172, 1.836 ], [ 0.012, 0.78, 0.836 ], [ 1.184, -0.328, 1.108 ], [ -1.836, -0.704, 0.048 ], [ -1.504, 1.204, -0.76 ], ... ],
    	[ [ -1.264, -1.98, -0.576 ], [ 1.488, -0.56, -0.9 ], [ 1.284, 0.112, 0.868 ], [ 0.932, -0.808, -0.524 ], [ -1.876, 1.58, -0.984 ], [ -1.968, -0.388, -0.972 ], [ -1.504, 0.136, -1.872 ], [ 0.984, 1.208, 0.58 ], ... ],
    	...
    ]
    [
    	[ [ 1.104, 1.9, 0.44 ], [ 1.644, -0.3, -0.38 ], [ 0.58, 0.988, 0.328 ], [ -1.68, 1.524, -1.216 ], [ -1.488, 1.136, 1.048 ], [ -0.904, 1.532, 1.12 ], [ -1.44, 0.444, 0.852 ], [ -1.572, -1.076, -0.564 ], ... ],
    	[ [ -1.984, 0.004, -1.616 ], [ 0.064, -0.424, -1.252 ], [ 0.048, 0.12, 0.768 ], [ 1.932, -1.86, 0.028 ], [ -0.116, 1.56, 1.136 ], [ -1.36, -1.024, -0.472 ], [ 1.56, 0.464, 0.128 ], [ -0.496, 1.684, 0.34 ], ... ],
    	[ [ -0.208, 1.752, 1.072 ], [ -0.34, 0.412, -0.3 ], [ -1.728, 0.612, 1.788 ], [ 0.132, 0.4, 1.544 ], [ -1.616, 0.556, -1.156 ], [ -1.432, 1.316, -1.152 ], [ -1.228, -0.228, 0.064 ], [ 1.548, -1.792, 1.936 ], ... ],
    	[ [ -1.888, -0.444, 1.884 ], [ 1.444, 1.004, -0.612 ], [ -0.296, 0.844, -1.396 ], [ -0.06, 1.56, 0.192 ], [ 1.844, 1.86, -1.7 ], [ -1.296, -0.512, -0.436 ], [ 0.212, 1.712, 1.972 ], [ -0.428, -0.704, -1.616 ], ... ],
    	[ [ 1.784, -1.564, 1.244 ], [ 1.74, -1.98, 0.056 ], [ 0.392, 1.436, -0.796 ], [ -0.324, 1.352, -1.536 ], [ 0.596, -1.884, 1.344 ], [ -1.612, 0.28, 1.72 ], [ -1.9, -1.736, 1.288 ], [ 0.948, 0.728, 0.028 ], ... ],
    	[ [ -0.076, -1.112, 0.472 ], [ -1.784, 0.02, -1.652 ], [ 1.92, 0.192, -1.356 ], [ -0.316, 0.092, -1.904 ], [ 0.132, -1.068, -0.172 ], [ -0.98, -1.036, -0.192 ], [ -0.224, -1.572, 1.644 ], [ 0.056, 0.14, 0.812 ], ... ],
    	[ [ 0.372, -1.396, 0.288 ], [ -0.616, 1.984, -1.408 ], [ -0.592, -1.52, 0.272 ], [ 1.544, -1.908, 0.7 ], [ 0.144, 1.368, -1.952 ], [ 0.06, -1.156, 1.824 ], [ -1.792, -1.548, -1.628 ], [ 0.48, 0.512, 0.056 ], ... ],
    	[ [ -1.948, 1.508, 0.832 ], [ -1.416, -0.08, 0.792 ], [ -0.76, -0.004, -1.584 ], [ 0.124, -0.92, -1.512 ], [ -0.008, -0.78, 1.196 ], [ -0.872, -0.24, -1.696 ], [ -0.248, 0.292, -1.196 ], [ -0.724, 0.712, -1.04 ], ... ],
    	...
    ]
    [
    	[ [ -1.596, 0.968, -0.692 ], [ -0.776, 1.86, -0.476 ], [ -1.632, 0.492, 0.556 ], [ -1.368, -0.792, 0.724 ], [ 0.404, 1.088, -1.216 ], [ 0.936, 0.212, 1.824 ], [ 0.052, 1.504, -0.8 ], [ 0.364, 1.068, -1.244 ], ... ],
    	[ [ -0.428, 1.808, 0.816 ], [ 0.748, -0.788, -0.108 ], [ -1.872, -0.136, 0.268 ], [ 1.604, 1.6, 1.912 ], [ 0.16, 0.2, 1.52 ], [ -0.932, -0.208, 0.912 ], [ -0.332, -0.228, 1.956 ], [ -0.192, -0.74, 0.364 ], ... ],
    	[ [ -0.36, 0.612, -1.568 ], [ -1.628, -0.796, 1.756 ], [ 1.9, 0.84, 1.06 ], [ 0.336, 0.736, 0.572 ], [ -0.132, 0.984, 0.744 ], [ 1.192, 0.772, -0.68 ], [ -0.932, -1.056, -0.82 ], [ 0.044, -0.268, 1.652 ], ... ],
    	[ [ -0.24, -1.2, 1.384 ], [ -1.444, -1.088, 0.124 ], [ -1.7, -0.368, -0.308 ], [ 1.168, -1.956, 1.004 ], [ -0.808, 0.364, 1.876 ], [ -1.608, -0.54, 1.16 ], [ 1.252, -0.54, 1.48 ], [ -0.124, 0.352, 1.308 ], ... ],
    	[ [ -0.732, 1.024, -0.724 ], [ 0.076, 0.476, 1.052 ], [ 0.592, -1.96, 0.504 ], [ -0.984, -1.636, 1.852 ], [ -1.224, 0.28, 0.204 ], [ -0.816, -1.208, -1.44 ], [ 0.972, -1.204, -0.872 ], [ -0.376, 1.432, -1.868 ], ... ],
    	[ [ -1.364, 0.824, -0.896 ], [ 1.82, 0.588, 0.696 ], [ 1.04, -0.78, 1.664 ], [ -1.136, 1.492, -0.712 ], [ -0.572, -1.116, -0.66 ], [ 0.844, -1.392, 1.652 ], [ 1.876, 1.036, 0.672 ], [ 0.132, 1.176, 1.832 ], ... ],
    	[ [ -0.888, -1.46, 1.536 ], [ -0.264, 1.952, -0.272 ], [ 1.896, 0.292, -0.748 ], [ 1.276, -1.684, 0.112 ], [ -1.096, -0.86, -1.484 ], [ -0.34, -1.024, -1.988 ], [ -0.4, -0.076, -1.948 ], [ -0.488, 1.764, 0.256 ], ... ],
    	[ [ -0.932, 0.192, 0.556 ], [ 1.6, -0.876, 1.672 ], [ 0.172, -1.836, 0.808 ], [ -0.028, -0.316, -1.092 ], [ -0.868, -0.384, -0.86 ], [ 0.352, -1.312, -0.128 ], [ 1.664, -1.276, 0.328 ], [ 0.388, 1.568, -1.452 ], ... ],
    	...
    ]
    [
    	[ [ 1.96, 0.564, 0.7 ], [ 1.224, 0.564, 1.988 ], [ -1.248, -1.992, 0.228 ], [ -0.144, 0.696, 1.784 ], [ -0.26, 0.468, -0.088 ], [ -0.984, -0.976, -1.804 ], [ 1.176, 0.048, 1.972 ], [ 1.472, 1.244, 1.828 ], ... ],
    	[ [ 1.564, -0.392, 1.364 ], [ 0.344, -0.82, -0.588 ], [ -1.116, -0.796, 1.14 ], [ 2.0, -0.492, -0.872 ], [ -0.356, -0.004, 1.788 ], [ 1.264, 0.132, -1.588 ], [ -1.548, 0.912, 0.7 ], [ -0.296, -0.268, 0.004 ], ... ],
    	[ [ -0.588, -0.276, -0.072 ], [ -0.124, 0.252, -0.44 ], [ 0.288, 0.568, -0.968 ], [ 1.708, -0.76, -1.536 ], [ 1.868, -0.5, -0.444 ], [ -1.94, 0.324, 1.484 ], [ 1.752, 0.032, 0.548 ], [ -0.704, 0.024, -1.324 ], ... ],
    	[ [ 0.192, 0.376, 1.288 ], [ 0.232, 0.928, 1.68 ], [ -0.304, 1.276, 0.348 ], [ 0.744, -1.86, 0.916 ], [ -1.58, 0.636, 0.416 ], [ -1.5, 0.824, -1.252 ], [ -1.148, 0.784, -0.008 ], [ -1.968, 1.892, -1.308 ], ... ],
    	[ [ 0.244, 1.856, -1.452 ], [ -1.704, 0.252, -1.288 ], [ 1.48, -1.172, -1.66 ], [ -0.616, -1.912, -0.876 ], [ -1.652, 1.76, -0.252 ], [ -0.024, 1.072, 0.944 ], [ -0.56, -0.312, -1.544 ], [ 1.044, -0.888, -0.456 ], ... ],
    	[ [ -0.04, -0.192, -1.284 ], [ -0.54, -0.316, 0.008 ], [ 0.16, 0.468, -1.192 ], [ -1.996, -1.044, 1.972 ], [ -1.436, -1.252, 1.904 ], [ 0.832, -0.292, 0.096 ], [ 0.98, 0.128, -1.768 ], [ 0.684, 0.76, 0.92 ], ... ],
    	[ [ 1.728, 1.804, -1.416 ], [ -1.128, 0.424, 1.4 ], [ -0.624, 1.932, -1.06 ], [ -1.556, 0.868, 0.868 ], [ -0.08, 0.728, 1.316 ], [ 1.076, 0.564, -1.936 ], [ -0.468, 1.692, 0.144 ], [ 1.292, -1.348, 1.844 ], ... ],
    	[ [ -1.268, -1.908, -1.1 ], [ -1.588, -1.704, 0.752 ], [ -0.204, 1.0, -0.02 ], [ -1.48, 0.912, -0.852 ], [ -1.196, -0.168, -1.224 ], [ 0.616, -1.396, 1.292 ], [ -1.852, -0.008, 1.532 ], [ -0.42, 0.72, 0.664 ], ... ],
    	...
    ]
    [
    	[ [ -0.08, -0.752, 1.028 ], [ 1.032, 1.192, -1.644 ], [ -1.168, -0.876, 0.252 ], [ 0.604, -0.74, -1.396 ], [ 0.624, 1.324, -0.208 ], [ -1.6, -1.304, 1.916 ], [ -1.076, 0.708, 0.42 ], [ -1.728, -0.568, -1.532 ], ... ],
    	[ [ -0.892, 1.924, 0.528 ], [ -0.136, -0.448, 0.296 ], [ 0.836, -0.972, 1.22 ], [ -0.668, -1.956, 1.06 ], [ 0.548, 0.34, -0.856 ], [ -0.404, -1.192, -1.048 ], [ 0.26, -0.132, -1.868 ], [ -0.072, -1.412, 0.6 ], ... ],
    	[ [ 0.528, 0.656, -1.572 ], [ -1.152, -1.336, -1.012 ], [ -1.18, 0.596, 1.548 ], [ 0.196, -1.828, 0.988 ], [ -1.828, 0.948, 1.008 ], [ 0.4, 1.944, -1.544 ], [ -0.588, 1.848, 1.68 ], [ -1.728, -1.748, -1.316 ], ... ],
    	[ [ -0.456, -1.456, 1.656 ], [ 0.636, 0.468, 1.328 ], [ -1.568, 0.28, 0.804 ], [ 1.916, -0.708, 0.752 ], [ 0.176, -0.668, 0.12 ], [ -0.244, 1.42, -1.104 ], [ -1.212, -1.896, -1.344 ], [ 0.072, 0.792, 0.296 ], ... ],
    	[ [ -0.04, -0.344, 0.868 ], [ 1.232, -0.496, 0.696 ], [ 0.752, -1.896, 0.128 ], [ 1.444, -0.388, -0.004 ], [ 1.112, 1.76, 0.74 ], [ -0.708, 1.032, 1.044 ], [ 1.072, 0.916, -1.94 ], [ -1.388, -1.212, -1.516 ], ... ],
    	[ [ 0.796, -1.012, 1.12 ], [ -1.656, 0.276, -1.784 ], [ 1.624, 0.828, 1.62 ], [ 0.928, 1.736, 0.972 ], [ -1.804, 1.8, 0.316 ], [ 0.212, 0.124, 0.488 ], [ -1.748, -0.38, -1.708 ], [ -1.176, -1.68, 1.08 ], ... ],
    	[ [ -0.84, 0.808, -0.944 ], [ -0.312, -1.404, -0.428 ], [ 1.432, -0.54, 0.844 ], [ 1.476, -0.548, -1.168 ], [ 1.312, 0.536, 1.2 ], [ 1.048, -0.52, 0.532 ], [ 1.844, -0.284, -1.032 ], [ -1.784, 1.284, -1.744 ], ... ],
    	[ [ -1.512, -1.216, -0.816 ], [ 1.512, -1.064, 1.332 ], [ 0.064, -0.252, -1.452 ], [ -0.552, 0.212, 1.192 ], [ -1.496, 0.7, 1.292 ], [ 0.704, -1.916, 0.504 ], [ 0.324, 0.556, -0.824 ], [ -0.444, 1.728, 1.784 ], ... ],
    	...
    ]

Gradient Descent

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

TrainingTester.java:480 executed in 43.48 seconds (13.163 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: 2013349822459
BACKPROP_AGG_SIZE = 3
THREADS = 64
SINGLE_THREADED = false
Initialized CoreSettings = {
"backpropAggregationSize" : 3,
"jvmThreads" : 64,
"singleThreaded" : false
}
Reset training subject: 2014650395242
Constructing line search parameters: GD
th(0)=101178.64036767246;dx=-1.2525098047000002E26
New Minimum: 101178.64036767246 > 1183.4822937287386
Armijo: th(2.154434690031884)=1183.4822937287386; dx=-1.2525098047130752E14 evalInputDelta=99995.15807394372
Armijo: th(1.077217345015942)=1842.4819831017223; dx=-1.2525098047154694E14 evalInputDelta=99336.15838457074
Armijo: th(0.3590724483386473)=2685.99009560757; dx=-1.2525098047229288E14 evalInputDelta=98492.65027206489
Armijo: th(0.08976811208466183)=3364.881049975504; dx=-1.2525098047431036E14 evalInputDelta=97813.75931769695
Armijo: th(0.017953622416932366)=3779.1454126606063; dx=-1.252509804796602E14 evalInputDelta=97399.49495501185
Armijo: th(0.002992270402822061)=3984.5620138520726; dx=-1.2525098049358625E14 evalInputDelta=97194.07835382038
Armijo: th(4.2746720040315154E-4)=4070.8227452685524; dx=-1.2525098052897553E14 evalInputDelta=97107.8176224039
Armijo: th(5.343340005039394E-5)=4101.227335986843; dx=-1.2525098060347131E14 evalInputDelta=97077.41303168562
Armijo: th(5.9370444500437714E-6)=4108.941013645182; dx=-1.252509806801839E14 evalInputDelta=97069.69935402728
Armijo: th(5.937044450043771E-7)=4110.121541630115; dx=-1.2525098070307208E14 evalInputDelta=97068.51882604235
Armijo: th(5.397313136403428E-8)=4110.248091367053; dx=-1.2525098070590511E14 evalInputDelta=97068.3922763054
Armijo: th(4.4977609470028565E-9)=4111.455803547341; dx=-4.9501252511133614E18 evalInputDelta=97067.18456412511
Armijo: th(3.4598161130791205E-10)=4299.646223676811; dx=-1.0649880125488866E22 evalInputDelta=96878.99414399565
Armijo: th(2.4712972236279432E-11)=28184.62429138434; dx=-1.5507870571673177E25 evalInputDelta=72994.01607628811
Armijo: th(1.6475314824186289E-12)=94350.57814349649; dx=-1.1254870503198404E26 evalInputDelta=6828.06222417597
Armijo: th(1.029707176511643E-13)=100651.11796218736; dx=-1.2409242795081726E26 evalInputDelta=527.5224054850987
Armijo: th(6.057101038303783E-15)=101089.21759566305; dx=-1.2505442557076823E26 evalInputDelta=89.42277200940589
MIN ALPHA (3.3650561323909904E-16): th(2.154434690031884)=1183.4822937287386
Fitness changed from 101178.64036767246 to 1183.4822937287386
Iteration 1 complete. Error: 1183.4822937287386 Total: 22.8463; Orientation: 0.0503; Line Search: 19.5403
th(0)=1183.4822937287386;dx=-368.5677256093357
New Minimum: 1183.4822937287386 > 1183.4822937287383
WOLFE (weak): th(2.154434690031884E-15)=1183.4822937287383; dx=-368.56772560933564 evalInputDelta=2.2737367544323206E-13
New Minimum: 1183.4822937287383 > 1183.4822937287377
WOLFE (weak): th(4.308869380063768E-15)=1183.4822937287377; dx=-368.5677256093355 evalInputDelta=9.094947017729282E-13
New Minimum: 1183.4822937287377 > 1183.4822937287365
WOLFE (weak): th(1.2926608140191303E-14)=1183.4822937287365; dx=-368.5677256093354 evalInputDelta=2.0463630789890885E-12
New Minimum: 1183.4822937287365 > 1183.4822937287286
WOLFE (weak): th(5.1706432560765214E-14)=1183.4822937287286; dx=-368.56772560933473 evalInputDelta=1.000444171950221E-11
New Minimum: 1183.4822937287286 > 1183.4822937286858
WOLFE (weak): th(2.5853216280382605E-13)=1183.4822937286858; dx=-368.56772560933086 evalInputDelta=5.275069270282984E-11
New Minimum: 1183.4822937286858 > 1183.482293728418
WOLFE (weak): th(1.5511929768229563E-12)=1183.482293728418; dx=-368.56772560930665 evalInputDelta=3.205968823749572E-10
New Minimum: 1183.482293728418 > 1183.482293726479
WOLFE (weak): th(1.0858350837760695E-11)=1183.482293726479; dx=-368.56772560913265 evalInputDelta=2.2596395865548402E-9
New Minimum: 1183.482293726479 > 1183.4822937106396
WOLFE (weak): th(8.686680670208556E-11)=1183.4822937106396; dx=-368.5677256077114 evalInputDelta=1.8098944565281272E-8
New Minimum: 1183.4822937106396 > 1183.4822935658297
WOLFE (weak): th(7.8180126031877E-10)=1183.4822935658297; dx=-368.5677255947171 evalInputDelta=1.6290891835524235E-7
New Minimum: 1183.4822935658297 > 1183.4822920996307
WOLFE (weak): th(7.818012603187701E-9)=1183.4822920996307; dx=-368.56772546314977 evalInputDelta=1.6291078281938098E-6
New Minimum: 1183.4822920996307 > 1183.4822758085108
WOLFE (weak): th(8.599813863506471E-8)=1183.4822758085108; dx=-368.5677240012907 evalInputDelta=1.7920227719514514E-5
New Minimum: 1183.4822758085108 > 1183.4820786860037
WOLFE (weak): th(1.0319776636207765E-6)=1183.4820786860037; dx=-368.5677063127974 evalInputDelta=2.1504273490791093E-4
New Minimum: 1183.4820786860037 > 1183.4794981747052
WOLFE (weak): th(1.3415709627070094E-5)=1183.4794981747052; dx=-368.5674747546375 evalInputDelta=0.0027955540333550744
New Minimum: 1183.4794981747052 > 1183.4431562784937
WOLFE (weak): th(1.878199347789813E-4)=1183.4431562784937; dx=-368.5642137027053 evalInputDelta=0.0391374502448798
New Minimum: 1183.4431562784937 > 1182.8953424976003
WOLFE (weak): th(0.0028172990216847197)=1182.8953424976003; dx=-368.5150631804943 evalInputDelta=0.5869512311383005
New Minimum: 1182.8953424976003 > 1174.1129527738947
WOLFE (weak): th(0.045076784346955515)=1174.1129527738947; dx=-367.72875925507935 evalInputDelta=9.369340954843892
New Minimum: 1174.1129527738947 > 1030.6491836011514
WOLFE (weak): th(0.7663053338982437)=1030.6491836011514; dx=-355.3161089167358 evalInputDelta=152.83311012758713
New Minimum: 1030.6491836011514 > 93.93395560629997
END: th(13.793496010168386)=93.93395560629997; dx=-295.2544373409832 evalInputDelta=1089.5483381224385
Fitness changed from 1183.4822937287386 to 93.93395560629997
Iteration 2 complete. Error: 93.93395560629997 Total: 20.6193; Orientation: 0.0223; Line Search: 19.9528
Final threshold in iteration 2: 93.93395560629997 (> 0.0) after 43.466s (< 30.000s)

Returns

    93.93395560629997

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

    [
    	[ [ 2.811537270384409E10, -1.44, 1.0393177323443483 ], [ 2.8115372705132088E10, 2.0, 1.6113177323443484 ], [ 3.5655894119471954E10, -0.3537140906897893, 0.284 ], [ 3.565589411966795E10, 2.3422859093102106, 1.672 ], [ 1.8013708046685522, -1.592, 4.642806756898834E10 ], [ 0.44537080466855206, -1.52, 4.642806757040835E10 ], [ 1.379372027560025, 0.796, 5.375314551753565E10 ], [ 0.20337202756002506, 0.752, 5.375314551579165E10 ], ... ],
    	[ [ 2.8115372703944088E10, -1.936, 2.2473177323443485 ], [ 2.811537270654009E10, -0.804, -0.9246822676556516 ], [ 3.565589411907195E10, 2.7542859093102106, -1.98 ], [ 3.565589411930395E10, 1.894285909310211, 1.62 ], [ -0.4026291953314479, 1.356, 4.6428067570648346E10 ], [ -0.3866291953314479, -1.044, 4.642806757047634E10 ], [ 0.2513720275600251, -0.68, 5.375314551592765E10 ], [ 2.023372027560025, -1.916, 5.3753145516395645E10 ], ... ],
    	[ [ 2.94080335176315E10, -1.976, 4.319641553478384E10 ], [ 2.94080335185835E10, -0.188, 4.319641553391584E10 ], [ 2.7541098376373836, 0.064, 0.044 ], [ 0.3941098376373835, -0.68, 1.632 ], [ 1.608, 2.5206885873554424E10, -0.932 ], [ -0.428, 2.5206885871634422E10, -1.5 ], [ 1.1825598961046466, 2.8977146581342365E10, 4.545857195961581E10 ], [ 1.6985598961046464, 2.8977146580670364E10, 4.545857195959581E10 ], ... ],
    	[ [ 2.94080335187235E10, 0.244, 4.319641553407984E10 ], [ 2.94080335200435E10, -0.636, 4.319641553545984E10 ], [ -0.1218901623626164, 0.384, -0.076 ], [ 2.3981098376373837, -0.632, -0.18 ], [ 1.908, 2.5206885873278423E10, -0.5 ], [ 0.328, 2.5206885871830425E10, 1.588 ], [ 0.7785598961046465, 2.8977146579662365E10, 4.54585719591918E10 ], [ 2.1545598961046464, 2.8977146580382366E10, 4.545857196136381E10 ], ... ],
    	[ [ 9.565690023739206E10, 6.1832275603854935E10, -0.6946654258790609 ], [ 9.565690023648807E10, 6.1832275605130936E10, 1.5773345741209392 ], [ -0.784, 1.5081042814159758E9, 1.6355410097099865 ], [ -1.764, 1.5081042845759757E9, 1.3155410097099867 ], [ 2.3754656053026677, -1.192, -1.416 ], [ 1.2034656053026676, 1.0, 0.464 ], [ 2.2190677307078484E10, 1.016, 1.988 ], [ 2.219067730609048E10, -1.1, 0.632 ], ... ],
    	[ [ 9.565690023988406E10, 6.183227560325494E10, 2.501334574120939 ], [ 9.565690023821606E10, 6.183227560484293E10, 2.6573345741209393 ], [ -0.776, 1.5081042818759758E9, 2.0835410097099865 ], [ -0.756, 1.5081042830639758E9, -0.06845899029001346 ], [ 1.0714656053026677, -0.108, -0.216 ], [ 1.6954656053026675, 1.972, 0.492 ], [ 2.219067730687448E10, -1.496, -1.912 ], [ 2.2190677306710484E10, 1.472, 0.884 ], ... ],
    	[ [ 2.262156424295957E9, 0.232, -0.208 ], [ 2.262156423319957E9, 0.7, -0.496 ], [ 7.608882391842489, 0.204, 3.1347024741108604E10 ], [ 4.924882391842488, -1.768, 3.1347024740164604E10 ], [ -1.824, 2.8825256260855516, -0.164 ], [ -1.78, -0.5774743739144486, -0.9 ], [ 1.632, 4.965971960454486E10, -1.8 ], [ 0.568, 4.965971960520886E10, -1.524 ], ... ],
    	[ [ 2.262156423711957E9, 1.536, 0.392 ], [ 2.262156424639957E9, 1.312, 0.9 ], [ 7.128882391842489, 1.056, 3.1347024738760605E10 ], [ 5.556882391842489, 0.196, 3.1347024738460606E10 ], [ 0.28, 0.32652562608555136, 1.04 ], [ -0.772, 1.7305256260855513, -0.884 ], [ 0.896, 4.965971960522887E10, 0.448 ], [ -1.34, 4.9659719606856865E10, -0.34 ], ... ],
    	...
    ]

To produce the following output:

TrainingTester.java:633 executed in 1.44 seconds (0.808 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

    [
    	[ [ 2.811537270486509E10, -0.5449999999999999, 0.9933177323443484 ], [ 3.565589411937895E10, 1.6592859093102108, 0.399 ], [ 0.3643708046685521, -0.7, 4.642806757013034E10 ], [ 0.964372027560025, -0.262, 5.375314551641265E10 ], [ -0.442, 0.921, 0.6495773744003913 ], [ 4.578173716185764E10, 4.2011476454951706E10, -0.732 ], [ 4.524312849074123E10, 8.994764830883604E10, 0.859 ], [ -0.8029999999999999, -0.6880000000000001, 0.10499999999999998 ], ... ],
    	[ [ 2.94080335187455E10, -0.639, 4.319641553455984E10 ], [ 1.3561098376373835, -0.21600000000000005, 0.355 ], [ 0.854, 2.5206885872574425E10, -0.33599999999999997 ], [ 1.4535598961046465, 2.8977146580514366E10, 4.54585719599418E10 ], [ 1.027665347142838E11, -1.0030000000000001, -0.529 ], [ 7.217356211236019E9, 0.653, 0.9938404064517103 ], [ 1.0341134348524108, 0.073, 6.398671029405962E10 ], [ 1.374747311261909, -0.768, 1.371 ], ... ],
    	[ [ 9.565690023799506E10, 6.1832275604270935E10, 1.510334574120939 ], [ -1.02, 1.5081042827329757E9, 1.2415410097099866 ], [ 1.5864656053026676, 0.418, -0.16899999999999998 ], [ 2.2190677306688484E10, -0.027000000000000024, 0.398 ], [ 3.587133758892453E10, 0.337, 3.673311146521379E10 ], [ 1.4571958904718902, 0.128, 4.179603298666414E10 ], [ 0.033, 1.0944528225423343E11, 1.0233564777125965E10 ], [ 5.493808459537576E10, 1.6535082322572394, 0.659 ], ... ],
    	[ [ 2.2621564239919567E9, 0.9450000000000001, 0.14700000000000002 ], [ 6.304882391842488, -0.078, 3.1347024739623604E10 ], [ -1.024, 1.0905256260855514, -0.227 ], [ 0.43899999999999995, 4.965971960545986E10, -0.804 ], [ -0.353, 8.725460494642694E10, -0.415 ], [ -0.091, 0.4944839061404428, -0.421 ], [ -0.23100000000000004, -0.8150000000000001, -1.214 ], [ -0.255, 0.7552769266745722, 0.838 ], ... ],
    	[ [ -0.153, 2.1544346897326775E9, 0.119 ], [ 1.216, -0.262, 0.013000000000000012 ], [ -0.44799999999999995, 0.31800000000000006, -0.06499999999999995 ], [ 0.18900000000000003, -0.982, 1.7558642723043266E10 ], [ 0.24900000000000003, 1.8159392587802339, -0.324 ], [ -1.162, 1.2509555452435384, -0.40099999999999997 ], [ 0.8099999999999999, 0.258, 0.04999999999999999 ], [ 1.539244277854981, 2.8223094439326378E10, 0.6859999999999999 ], ... ],
    	[ [ 0.6336944248914405, 1.2114122359823873, 1.8488887550025503 ], [ 0.8180000000000001, 6.689519712568128E10, 3.500956371302725E10 ], [ 1.027665347149828E11, 0.525, 0.6970000000000001 ], [ -0.49800000000000005, 0.122, 8.14376312829526E10 ], [ 0.987, 0.039000000000000035, 0.9748784919719968 ], [ 0.327, 4.7289841446447624E10, 1.414036717953705 ], [ 1.1360000000000001, 0.15099999999999997, 1.1785500673609612 ], [ 4.4273632879998665E10, 7.863686618296724E9, 1.26241702074423 ], ... ],
    	[ [ 2.014396435172309E10, 1.585, 1.9480196967510781 ], [ 0.789246241563256, -0.6940000000000001, -0.07599999999999998 ], [ 0.6941273683097133, 0.9326149146803708, 1.0302454914624413 ], [ 6.366354509040777E10, 0.6277460587940527, 5.375314551659065E10 ], [ -0.44399999999999995, 0.4820696896419398, 0.353 ], [ 2.132890343122821E10, 0.9039999999999999, 1.3465274754268326 ], [ 0.13999999999999996, 0.923, -0.5740000000000001 ], [ 0.172, 0.7010000000000001, 2.789992923530952E10 ], ... ],
    	[ [ 9.425651768864438E10, -0.05000000000000002, -0.07399999999999998 ], [ -1.06, 0.756, 0.142 ], [ 1.0379768642245073, -0.22399999999999998, -0.265 ], [ 1.8046965976484746, 6.215544080720379E10, -0.815 ], [ 1.35, 0.36300000000000004, 0.589 ], [ 0.5429999999999999, 0.719, 0.8430000000000001 ], [ 0.117, 8.434611811477426E10, 1.3695474646630732 ], [ 0.21799999999999997, 0.9760261995825021, 7.562065762032928E10 ], ... ],
    	...
    ]

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.04 seconds (7.576 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: 2058270695631
Reset training subject: 2058932486343
Constructing line search parameters: GD
F(0.0) = LineSearchPoint{point=PointSample{avg=101178.64036767246}, derivative=-1.2525098047000002E26}
New Minimum: 101178.64036767246 > 6247.825539963182
F(1.0E-10) = LineSearchPoint{point=PointSample{avg=6247.825539963182}, derivative=-4.005470501348674E23}, evalInputDelta = -94930.81482770928
New Minimum: 6247.825539963182 > 4156.193904962935
F(7.000000000000001E-10) = LineSearchPoint{point=PointSample{avg=4156.193904962935}, derivative=-1.263440125298703E21}, evalInputDelta = -97022.44646270953
New Minimum: 4156.193904962935 > 4111.306193927643
F(4.900000000000001E-9) = LineSearchPoint{point=PointSample{avg=4111.306193927643}, derivative=-4.1501252510767667E18}, evalInputDelta = -97067.33417374482
New Minimum: 4111.306193927643 > 4110.2544234076095
F(3.430000000000001E-8) = LineSearchPoint{point=PointSample{avg=4110.2544234076095}, derivative=-1.252509808340482E14}, evalInputDelta = -97068.38594426485
New Minimum: 4110.2544234076095 > 4110.204277467737
F(2.4010000000000004E-7) = LineSearchPoint{point=PointSample{avg=4110.204277467737}, derivative=-1.2525098070491453E14}, evalInputDelta = -97068.43609020472
New Minimum: 4110.204277467737 > 4109.871158982464
F(1.6807000000000003E-6) = LineSearchPoint{point=PointSample{avg=4109.871158982464}, derivative=-1.2525098069770928E14}, evalInputDelta = -97068.76920868999
New Minimum: 4109.871158982464 > 4107.771068852937
F(1.1764900000000001E-5) = LineSearchPoint{point=PointSample{avg=4107.771068852937}, derivative=-1.2525098066224675E14}, evalInputDelta = -97070.86929881953
New Minimum: 4107.771068852937 > 4097.650029993333
F(8.235430000000001E-5) = LineSearchPoint{point=PointSample{avg=4097.650029993333}, derivative=-1.2525098058534488E14}, evalInputDelta = -97080.99033767912
New Minimum: 4097.650029993333 > 4062.6296748813706
F(5.764801000000001E-4) = LineSearchPoint{point=PointSample{avg=4062.6296748813706}, derivative=-1.2525098052152208E14}, evalInputDelta = -97116.01069279108
New Minimum: 4062.6296748813706 > 3961.767583223094
F(0.004035360700000001) = LineSearchPoint{point=PointSample{avg=3961.767583223094}, derivative=-1.2525098049037453E14}, evalInputDelta = -97216.87278444937
New Minimum: 3961.767583223094 > 3691.6708522529348
F(0.028247524900000005) = LineSearchPoint{point=PointSample{avg=3691.6708522529348}, derivative=-1.2525098047767625E14}, evalInputDelta = -97486.96951541952
New Minimum: 3691.6708522529348 > 3025.4412716022516
F(0.19773267430000002) = LineSearchPoint{point=PointSample{avg=3025.4412716022516}, derivative=-1.2525098047297192E14}, evalInputDelta = -98153.19909607021
New Minimum: 3025.4412716022516 > 1612.1626885589242
F(1.3841287201) = LineSearchPoint{point=PointSample{avg=1612.1626885589242}, derivative=-1.2525098047144384E14}, evalInputDelta = -99566.47767911354
New Minimum: 1612.1626885589242 > 136.43003077859817
F(9.688901040700001) = LineSearchPoint{point=PointSample{avg=136.43003077859817}, derivative=-1.2525098047115194E14}, evalInputDelta = -101042.21033689386
New Minimum: 136.43003077859817 > 3.0212937622249987
F(67.8223072849) = LineSearchPoint{point=PointSample{avg=3.0212937622249987}, derivative=-1.2525098047114705E14}, evalInputDelta = -101175.61907391023
New Minimum: 3.0212937622249987 > 0.06298916687590947
F(474.7561509943) = LineSearchPoint{point=PointSample{avg=0.06298916687590947}, derivative=-1.2525098047114703E14}, evalInputDelta = -101178.57737850558
New Minimum: 0.06298916687590947 > 7.303844208834313E-4
F(3323.2930569601003) = LineSearchPoint{point=PointSample{avg=7.303844208834313E-4}, derivative=-1.2525098047114703E14}, evalInputDelta = -101178.63963728804
New Minimum: 7.303844208834313E-4 > 3.04413958234994E-15
F(23263.0513987207) = LineSearchPoint{point=PointSample{avg=3.04413958234994E-15}, derivative=-1.2525098047114703E14}, evalInputDelta = -101178.64036767246
New Minimum: 3.04413958234994E-15 > 1.1891119786572335E-15
F(162841.3597910449) = LineSearchPoint{point=PointSample{avg=1.1891119786572335E-15}, derivative=-1.2525098047114703E14}, evalInputDelta = -101178.64036767246
New Minimum: 1.1891119786572335E-15 > 1.1325725682811133E-16
F(1139889.5185373144) = LineSearchPoint{point=PointSample{avg=1.1325725682811133E-16}, derivative=-1.2525098047114703E14}, evalInputDelta = -101178.64036767246
New Minimum: 1.1325725682811133E-16 > 1.0216765443803804E-16
F(7979226.6297612) = LineSearchPoint{point=PointSample{avg=1.0216765443803804E-16}, derivative=-1.2525098047114703E14}, evalInputDelta = -101178.64036767246
New Minimum: 1.0216765443803804E-16 > 1.0216764982312736E-16
F(5.58545864083284E7) = LineSearchPoint{point=PointSample{avg=1.0216764982312736E-16}, derivative=-1.2525098047114703E14}, evalInputDelta = -101178.64036767246
New Minimum: 1.0216764982312736E-16 > 1.0216761751880418E-16
F(3.909821048582988E8) = LineSearchPoint{point=PointSample{avg=1.0216761751880418E-16}, derivative=-1.2525098047114703E14}, evalInputDelta = -101178.64036767246
New Minimum: 1.0216761751880418E-16 > 1.0216739139110432E-16
F(2.7368747340080914E9) = LineSearchPoint{point=PointSample{avg=1.0216739139110432E-16}, derivative=-1.2525098047114703E14}, evalInputDelta = -101178.64036767246
New Minimum: 1.0216739139110432E-16 > 1.0216580862274136E-16
F(1.915812313805664E10) = LineSearchPoint{point=PointSample{avg=1.0216580862274136E-16}, derivative=-1.2525098047114703E14}, evalInputDelta = -101178.64036767246
1.0216580862274136E-16 <= 101178.64036767246
F(1.0E10) = LineSearchPoint{point=PointSample{avg=1.021666913048795E-16}, derivative=-1.2525098047114703E14}, evalInputDelta = -101178.64036767246
1.021666913048795E-16 > 1.0216580862274136E-16
Fitness changed from 101178.64036767246 to 1.0216580862274136E-16
Iteration 1 complete. Error: 1.0216580862274136E-16 Total: 30.0348; Orientation: 0.0209; Line Search: 27.1983
Final threshold in iteration 1: 1.0216580862274136E-16 (> 0.0) after 30.035s (< 30.000s)

Returns

    1.0216580862274136E-16

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 44.55 seconds (13.107 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: 2088312780516
Reset training subject: 2089862861297
Adding measurement 5cc550c3 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD
Non-optimal measurement 101178.64036767246 < 101178.64036767246. Total: 1
th(0)=101178.64036767246;dx=-1.2525098047000002E26
Adding measurement 5d053428 to history. Total: 1
New Minimum: 101178.64036767246 > 1183.4822937287386
Armijo: th(2.154434690031884)=1183.4822937287386; dx=-1.2525098047130752E14 evalInputDelta=99995.15807394372
Non-optimal measurement 1842.4819831017223 < 1183.4822937287386. Total: 2
Armijo: th(1.077217345015942)=1842.4819831017223; dx=-1.2525098047154694E14 evalInputDelta=99336.15838457074
Non-optimal measurement 2685.99009560757 < 1183.4822937287386. Total: 2
Armijo: th(0.3590724483386473)=2685.99009560757; dx=-1.2525098047229288E14 evalInputDelta=98492.65027206489
Non-optimal measurement 3364.881049975504 < 1183.4822937287386. Total: 2
Armijo: th(0.08976811208466183)=3364.881049975504; dx=-1.2525098047431036E14 evalInputDelta=97813.75931769695
Non-optimal measurement 3779.1454126606063 < 1183.4822937287386. Total: 2
Armijo: th(0.017953622416932366)=3779.1454126606063; dx=-1.252509804796602E14 evalInputDelta=97399.49495501185
Non-optimal measurement 3984.5620138520726 < 1183.4822937287386. Total: 2
Armijo: th(0.002992270402822061)=3984.5620138520726; dx=-1.2525098049358625E14 evalInputDelta=97194.07835382038
Non-optimal measurement 4070.8227452685524 < 1183.4822937287386. Total: 2
Armijo: th(4.2746720040315154E-4)=4070.8227452685524; dx=-1.2525098052897553E14 evalInputDelta=97107.8176224039
Non-optimal measurement 4101.227335986843 < 1183.4822937287386. Total: 2
Armijo: th(5.343340005039394E-5)=4101.227335986843; dx=-1.2525098060347131E14 evalInputDelta=97077.41303168562
Non-optimal measurement 4108.941013645182 < 1183.4822937287386. Total: 2
Armijo: th(5.9370444500437714E-6)=4108.941013645182; dx=-1.252509806801839E14 evalInputDelta=97069.69935402728
Non-optimal measurement 4110.121541630115 < 1183.4822937287386. Total: 2
Armijo: th(5.937044450043771E-7)=4110.121541630115; dx=-1.2525098070307208E14 evalInputDelta=97068.51882604235
Non-optimal measurement 4110.248091367053 < 1183.4822937287386. Total: 2
Armijo: th(5.397313136403428E-8)=4110.248091367053; dx=-1.2525098070590511E14 evalInputDelta=97068.3922763054
Non-optimal measurement 4111.455803547341 < 1183.4822937287386. Total: 2
Armijo: th(4.4977609470028565E-9)=4111.455803547341; dx=-4.9501252511133614E18 evalInputDelta=97067.18456412511
Non-optimal measurement 4299.646223676811 < 1183.4822937287386. Total: 2
Armijo: th(3.4598161130791205E-10)=4299.646223676811; dx=-1.0649880125488864E22 evalInputDelta=96878.99414399565
Non-optimal measurement 28184.62429138434 < 1183.4822937287386. Total: 2
Armijo: th(2.4712972236279432E-11)=28184.62429138434; dx=-1.5507870571673177E25 evalInputDelta=72994.01607628811
Non-optimal measurement 94350.57814349649 < 1183.4822937287386. Total: 2
Armijo: th(1.6475314824186289E-12)=94350.57814349649; dx=-1.1254870503198404E26 evalInputDelta=6828.06222417597
Non-optimal measurement 100651.11796218736 < 1183.4822937287386. Total: 2
Armijo: th(1.029707176511643E-13)=100651.11796218736; dx=-1.2409242795081726E26 evalInputDelta=527.5224054850987
Non-optimal measurement 101089.21759566305 < 1183.4822937287386. Total: 2
Armijo: th(6.057101038303783E-15)=101089.21759566305; dx=-1.2505442557076823E26 evalInputDelta=89.42277200940589
Non-optimal measurement 1183.4822937287386 < 1183.4822937287386. Total: 2
MIN ALPHA (3.3650561323909904E-16): th(2.154434690031884)=1183.4822937287386
Fitness changed from 101178.64036767246 to 1183.4822937287386
Iteration 1 complete. Error: 1183.4822937287386 Total: 22.5872; Orientation: 0.0361; Line Search: 19.7011
Non-optimal measurement 1183.4822937287386 < 1183.4822937287386. Total: 2
LBFGS Accumulation History: 2 points
Non-optimal measurement 1183.4822937287386 < 1183.4822937287386. Total: 2
th(0)=1183.4822937287386;dx=-368.5677256093357
Adding measurement 1b6eef33 to history. Total: 2
New Minimum: 1183.4822937287386 > 1183.4822937287383
WOLFE (weak): th(2.154434690031884E-15)=1183.4822937287383; dx=-368.56772560933564 evalInputDelta=2.2737367544323206E-13
Adding measurement 755f920f to history. Total: 3
New Minimum: 1183.4822937287383 > 1183.4822937287377
WOLFE (weak): th(4.308869380063768E-15)=1183.4822937287377; dx=-368.5677256093355 evalInputDelta=9.094947017729282E-13
Adding measurement 1ebce29c to history. Total: 4
New Minimum: 1183.4822937287377 > 1183.4822937287365
WOLFE (weak): th(1.2926608140191303E-14)=1183.4822937287365; dx=-368.5677256093354 evalInputDelta=2.0463630789890885E-12
Adding measurement 23a9f472 to history. Total: 5
New Minimum: 1183.4822937287365 > 1183.4822937287286
WOLFE (weak): th(5.1706432560765214E-14)=1183.4822937287286; dx=-368.56772560933473 evalInputDelta=1.000444171950221E-11
Adding measurement 617db900 to history. Total: 6
New Minimum: 1183.4822937287286 > 1183.4822937286858
WOLFE (weak): th(2.5853216280382605E-13)=1183.4822937286858; dx=-368.56772560933086 evalInputDelta=5.275069270282984E-11
Adding measurement 54407a4c to history. Total: 7
New Minimum: 1183.4822937286858 > 1183.482293728418
WOLFE (weak): th(1.5511929768229563E-12)=1183.482293728418; dx=-368.56772560930665 evalInputDelta=3.205968823749572E-10
Adding measurement 175e1ca7 to history. Total: 8
New Minimum: 1183.482293728418 > 1183.482293726479
WOLFE (weak): th(1.0858350837760695E-11)=1183.482293726479; dx=-368.56772560913265 evalInputDelta=2.2596395865548402E-9
Adding measurement 708e5293 to history. Total: 9
New Minimum: 1183.482293726479 > 1183.4822937106396
WOLFE (weak): th(8.686680670208556E-11)=1183.4822937106396; dx=-368.5677256077114 evalInputDelta=1.8098944565281272E-8
Adding measurement 77407434 to history. Total: 10
New Minimum: 1183.4822937106396 > 1183.4822935658297
WOLFE (weak): th(7.8180126031877E-10)=1183.4822935658297; dx=-368.5677255947171 evalInputDelta=1.6290891835524235E-7
Adding measurement 304734d8 to history. Total: 11
New Minimum: 1183.4822935658297 > 1183.4822920996307
WOLFE (weak): th(7.818012603187701E-9)=1183.4822920996307; dx=-368.56772546314977 evalInputDelta=1.6291078281938098E-6
Adding measurement 6903389 to history. Total: 12
New Minimum: 1183.4822920996307 > 1183.4822758085108
WOLFE (weak): th(8.599813863506471E-8)=1183.4822758085108; dx=-368.5677240012907 evalInputDelta=1.7920227719514514E-5
Adding measurement 1e373743 to history. Total: 13
New Minimum: 1183.4822758085108 > 1183.4820786860037
WOLFE (weak): th(1.0319776636207765E-6)=1183.4820786860037; dx=-368.5677063127974 evalInputDelta=2.1504273490791093E-4
Adding measurement 26881c40 to history. Total: 14
New Minimum: 1183.4820786860037 > 1183.4794981747052
WOLFE (weak): th(1.3415709627070094E-5)=1183.4794981747052; dx=-368.5674747546375 evalInputDelta=0.0027955540333550744
Adding measurement 48009ab0 to history. Total: 15
New Minimum: 1183.4794981747052 > 1183.4431562784937
WOLFE (weak): th(1.878199347789813E-4)=1183.4431562784937; dx=-368.5642137027053 evalInputDelta=0.0391374502448798
Adding measurement 6492b486 to history. Total: 16
New Minimum: 1183.4431562784937 > 1182.8953424976003
WOLFE (weak): th(0.0028172990216847197)=1182.8953424976003; dx=-368.5150631804943 evalInputDelta=0.5869512311383005
Adding measurement 8685eec to history. Total: 17
New Minimum: 1182.8953424976003 > 1174.1129527738947
WOLFE (weak): th(0.045076784346955515)=1174.1129527738947; dx=-367.72875925507935 evalInputDelta=9.369340954843892
Adding measurement 18ff675e to history. Total: 18
New Minimum: 1174.1129527738947 > 1030.6491836011514
WOLFE (weak): th(0.7663053338982437)=1030.6491836011514; dx=-355.3161089167358 evalInputDelta=152.83311012758713
Adding measurement 2b06430f to history. Total: 19
New Minimum: 1030.6491836011514 > 93.93395560629997
END: th(13.793496010168386)=93.93395560629997; dx=-295.2544373409832 evalInputDelta=1089.5483381224385
Fitness changed from 1183.4822937287386 to 93.93395560629997
Iteration 2 complete. Error: 93.93395560629997 Total: 21.9589; Orientation: 0.0219; Line Search: 21.2312
Final threshold in iteration 2: 93.93395560629997 (> 0.0) after 44.547s (< 30.000s)

Returns

    93.93395560629997

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

    [
    	[ [ 2.811537270384409E10, -1.44, 1.0393177323443483 ], [ 2.8115372705132088E10, 2.0, 1.6113177323443484 ], [ 3.5655894119471954E10, -0.3537140906897893, 0.284 ], [ 3.565589411966795E10, 2.3422859093102106, 1.672 ], [ 1.8013708046685522, -1.592, 4.642806756898834E10 ], [ 0.44537080466855206, -1.52, 4.642806757040835E10 ], [ 1.379372027560025, 0.796, 5.375314551753565E10 ], [ 0.20337202756002506, 0.752, 5.375314551579165E10 ], ... ],
    	[ [ 2.8115372703944088E10, -1.936, 2.2473177323443485 ], [ 2.811537270654009E10, -0.804, -0.9246822676556516 ], [ 3.565589411907195E10, 2.7542859093102106, -1.98 ], [ 3.565589411930395E10, 1.894285909310211, 1.62 ], [ -0.4026291953314479, 1.356, 4.6428067570648346E10 ], [ -0.3866291953314479, -1.044, 4.642806757047634E10 ], [ 0.2513720275600251, -0.68, 5.375314551592765E10 ], [ 2.023372027560025, -1.916, 5.3753145516395645E10 ], ... ],
    	[ [ 2.94080335176315E10, -1.976, 4.319641553478384E10 ], [ 2.94080335185835E10, -0.188, 4.319641553391584E10 ], [ 2.7541098376373836, 0.064, 0.044 ], [ 0.3941098376373835, -0.68, 1.632 ], [ 1.608, 2.5206885873554424E10, -0.932 ], [ -0.428, 2.5206885871634422E10, -1.5 ], [ 1.1825598961046466, 2.8977146581342365E10, 4.545857195961581E10 ], [ 1.6985598961046464, 2.8977146580670364E10, 4.545857195959581E10 ], ... ],
    	[ [ 2.94080335187235E10, 0.244, 4.319641553407984E10 ], [ 2.94080335200435E10, -0.636, 4.319641553545984E10 ], [ -0.1218901623626164, 0.384, -0.076 ], [ 2.3981098376373837, -0.632, -0.18 ], [ 1.908, 2.5206885873278423E10, -0.5 ], [ 0.328, 2.5206885871830425E10, 1.588 ], [ 0.7785598961046465, 2.8977146579662365E10, 4.54585719591918E10 ], [ 2.1545598961046464, 2.8977146580382366E10, 4.545857196136381E10 ], ... ],
    	[ [ 9.565690023739206E10, 6.1832275603854935E10, -0.6946654258790609 ], [ 9.565690023648807E10, 6.1832275605130936E10, 1.5773345741209392 ], [ -0.784, 1.5081042814159758E9, 1.6355410097099865 ], [ -1.764, 1.5081042845759757E9, 1.3155410097099867 ], [ 2.3754656053026677, -1.192, -1.416 ], [ 1.2034656053026676, 1.0, 0.464 ], [ 2.2190677307078484E10, 1.016, 1.988 ], [ 2.219067730609048E10, -1.1, 0.632 ], ... ],
    	[ [ 9.565690023988406E10, 6.183227560325494E10, 2.501334574120939 ], [ 9.565690023821606E10, 6.183227560484293E10, 2.6573345741209393 ], [ -0.776, 1.5081042818759758E9, 2.0835410097099865 ], [ -0.756, 1.5081042830639758E9, -0.06845899029001346 ], [ 1.0714656053026677, -0.108, -0.216 ], [ 1.6954656053026675, 1.972, 0.492 ], [ 2.219067730687448E10, -1.496, -1.912 ], [ 2.2190677306710484E10, 1.472, 0.884 ], ... ],
    	[ [ 2.262156424295957E9, 0.232, -0.208 ], [ 2.262156423319957E9, 0.7, -0.496 ], [ 7.608882391842489, 0.204, 3.1347024741108604E10 ], [ 4.924882391842488, -1.768, 3.1347024740164604E10 ], [ -1.824, 2.8825256260855516, -0.164 ], [ -1.78, -0.5774743739144486, -0.9 ], [ 1.632, 4.965971960454486E10, -1.8 ], [ 0.568, 4.965971960520886E10, -1.524 ], ... ],
    	[ [ 2.262156423711957E9, 1.536, 0.392 ], [ 2.262156424639957E9, 1.312, 0.9 ], [ 7.128882391842489, 1.056, 3.1347024738760605E10 ], [ 5.556882391842489, 0.196, 3.1347024738460606E10 ], [ 0.28, 0.32652562608555136, 1.04 ], [ -0.772, 1.7305256260855513, -0.884 ], [ 0.896, 4.965971960522887E10, 0.448 ], [ -1.34, 4.9659719606856865E10, -0.34 ], ... ],
    	...
    ]

To produce the following output:

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

    [
    	[ [ 2.811537270486509E10, -0.5449999999999999, 0.9933177323443484 ], [ 3.565589411937895E10, 1.6592859093102108, 0.399 ], [ 0.3643708046685521, -0.7, 4.642806757013034E10 ], [ 0.964372027560025, -0.262, 5.375314551641265E10 ], [ -0.442, 0.921, 0.6495773744003913 ], [ 4.578173716185764E10, 4.2011476454951706E10, -0.732 ], [ 4.524312849074123E10, 8.994764830883604E10, 0.859 ], [ -0.8029999999999999, -0.6880000000000001, 0.10499999999999998 ], ... ],
    	[ [ 2.94080335187455E10, -0.639, 4.319641553455984E10 ], [ 1.3561098376373835, -0.21600000000000005, 0.355 ], [ 0.854, 2.5206885872574425E10, -0.33599999999999997 ], [ 1.4535598961046465, 2.8977146580514366E10, 4.54585719599418E10 ], [ 1.027665347142838E11, -1.0030000000000001, -0.529 ], [ 7.217356211236019E9, 0.653, 0.9938404064517103 ], [ 1.0341134348524108, 0.073, 6.398671029405962E10 ], [ 1.374747311261909, -0.768, 1.371 ], ... ],
    	[ [ 9.565690023799506E10, 6.1832275604270935E10, 1.510334574120939 ], [ -1.02, 1.5081042827329757E9, 1.2415410097099866 ], [ 1.5864656053026676, 0.418, -0.16899999999999998 ], [ 2.2190677306688484E10, -0.027000000000000024, 0.398 ], [ 3.587133758892453E10, 0.337, 3.673311146521379E10 ], [ 1.4571958904718902, 0.128, 4.179603298666414E10 ], [ 0.033, 1.0944528225423343E11, 1.0233564777125965E10 ], [ 5.493808459537576E10, 1.6535082322572394, 0.659 ], ... ],
    	[ [ 2.2621564239919567E9, 0.9450000000000001, 0.14700000000000002 ], [ 6.304882391842488, -0.078, 3.1347024739623604E10 ], [ -1.024, 1.0905256260855514, -0.227 ], [ 0.43899999999999995, 4.965971960545986E10, -0.804 ], [ -0.353, 8.725460494642694E10, -0.415 ], [ -0.091, 0.4944839061404428, -0.421 ], [ -0.23100000000000004, -0.8150000000000001, -1.214 ], [ -0.255, 0.7552769266745722, 0.838 ], ... ],
    	[ [ -0.153, 2.1544346897326775E9, 0.119 ], [ 1.216, -0.262, 0.013000000000000012 ], [ -0.44799999999999995, 0.31800000000000006, -0.06499999999999995 ], [ 0.18900000000000003, -0.982, 1.7558642723043266E10 ], [ 0.24900000000000003, 1.8159392587802339, -0.324 ], [ -1.162, 1.2509555452435384, -0.40099999999999997 ], [ 0.8099999999999999, 0.258, 0.04999999999999999 ], [ 1.539244277854981, 2.8223094439326378E10, 0.6859999999999999 ], ... ],
    	[ [ 0.6336944248914405, 1.2114122359823873, 1.8488887550025503 ], [ 0.8180000000000001, 6.689519712568128E10, 3.500956371302725E10 ], [ 1.027665347149828E11, 0.525, 0.6970000000000001 ], [ -0.49800000000000005, 0.122, 8.14376312829526E10 ], [ 0.987, 0.039000000000000035, 0.9748784919719968 ], [ 0.327, 4.7289841446447624E10, 1.414036717953705 ], [ 1.1360000000000001, 0.15099999999999997, 1.1785500673609612 ], [ 4.4273632879998665E10, 7.863686618296724E9, 1.26241702074423 ], ... ],
    	[ [ 2.014396435172309E10, 1.585, 1.9480196967510781 ], [ 0.789246241563256, -0.6940000000000001, -0.07599999999999998 ], [ 0.6941273683097133, 0.9326149146803708, 1.0302454914624413 ], [ 6.366354509040777E10, 0.6277460587940527, 5.375314551659065E10 ], [ -0.44399999999999995, 0.4820696896419398, 0.353 ], [ 2.132890343122821E10, 0.9039999999999999, 1.3465274754268326 ], [ 0.13999999999999996, 0.923, -0.5740000000000001 ], [ 0.172, 0.7010000000000001, 2.789992923530952E10 ], ... ],
    	[ [ 9.425651768864438E10, -0.05000000000000002, -0.07399999999999998 ], [ -1.06, 0.756, 0.142 ], [ 1.0379768642245073, -0.22399999999999998, -0.265 ], [ 1.8046965976484746, 6.215544080720379E10, -0.815 ], [ 1.35, 0.36300000000000004, 0.589 ], [ 0.5429999999999999, 0.719, 0.8430000000000001 ], [ 0.117, 8.434611811477426E10, 1.3695474646630732 ], [ 0.21799999999999997, 0.9760261995825021, 7.562065762032928E10 ], ... ],
    	...
    ]

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

    return TestUtil.compare(title + " vs Iteration", runs);
Logging
Plotting range=[1.0, -15.990694423290744], [2.0, 3.073161764763262]; valueStats=DoubleSummaryStatistics{count=5, sum=2554.832499, min=0.000000, average=510.966500, max=1183.482294}
Plotting 2 points for GD
Only 1 points for CjGD
Plotting 2 points for LBFGS

Returns

Result

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

    return TestUtil.compareTime(title + " vs Time", runs);
Logging
Plotting range=[0.0, -15.990694423290744], [21.959, 3.073161764763262]; valueStats=DoubleSummaryStatistics{count=5, sum=2554.832499, min=0.000000, average=510.966500, max=1183.482294}
Plotting 2 points for GD
Only 1 points for CjGD
Plotting 2 points for LBFGS

Returns

Result

Results

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

    return grid(inputLearning, modelLearning, completeLearning);

Returns

Result

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

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

Returns

    {"input":{ "LBFGS": { "type": "NonConverged", "value": 93.93395560629997 }, "CjGD": { "type": "Converged", "value": 1.0216580862274136E-16 }, "GD": { "type": "NonConverged", "value": 93.93395560629997 } }, "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": 93.93395560629997 }, "CjGD": { "type": "Converged", "value": 1.0216580862274136E-16 }, "GD": { "type": "NonConverged", "value": 93.93395560629997 } }, "model":null, "complete":null}OK
  {
    "result": "OK",
    "performance": {
      "execution_time": "122.114",
      "gc_time": "35.738"
    },
    "created_on": 1586736600582,
    "file_name": "trainingTest",
    "report": {
      "simpleName": "Basic",
      "canonicalName": "com.simiacryptus.mindseye.layers.java.AvgPoolingLayerTest.Basic",
      "link": "https://github.com/SimiaCryptus/mindseye-java/tree/93db34cedee48c0202777a2b25deddf1dfaf5731/src/test/java/com/simiacryptus/mindseye/layers/java/AvgPoolingLayerTest.java",
      "javaDoc": ""
    },
    "training_analysis": {
      "input": {
        "LBFGS": {
          "type": "NonConverged",
          "value": 93.93395560629997
        },
        "CjGD": {
          "type": "Converged",
          "value": 1.0216580862274136E-16
        },
        "GD": {
          "type": "NonConverged",
          "value": 93.93395560629997
        }
      }
    },
    "archive": "s3://code.simiacrypt.us/tests/com/simiacryptus/mindseye/layers/java/AvgPoolingLayer/Basic/trainingTest/202004131000",
    "id": "387590d9-6747-4388-a3a7-970cdccd809c",
    "report_type": "Components",
    "display_name": "Comparative Training",
    "target": {
      "simpleName": "AvgPoolingLayer",
      "canonicalName": "com.simiacryptus.mindseye.layers.java.AvgPoolingLayer",
      "link": "https://github.com/SimiaCryptus/mindseye-java/tree/93db34cedee48c0202777a2b25deddf1dfaf5731/src/main/java/com/simiacryptus/mindseye/layers/java/AvgPoolingLayer.java",
      "javaDoc": ""
    }
  }