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 2900436625053479936

Training Characteristics

Input Learning

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

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

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

Returns

    [
    	[ [ -1.616, 0.636 ], [ -0.608, 1.108 ], [ -0.852, 1.524 ], [ -1.72, 0.08 ] ],
    	[ [ 0.048, 1.048 ], [ 0.496, -1.688 ], [ 1.356, 0.788 ], [ 0.3, -0.128 ] ],
    	[ [ 1.556, 1.512 ], [ 1.912, 1.556 ], [ -0.176, -1.028 ], [ 1.032, 1.208 ] ],
    	[ [ 1.764, -0.068 ], [ -0.712, -0.804 ], [ 0.7, -0.768 ], [ 0.028, -0.384 ] ]
    ]
    [
    	[ [ -0.636, 1.324 ], [ -1.34, 1.42 ], [ -1.228, 1.612 ], [ -1.524, -1.492 ], [ 1.704, -0.892 ], [ 0.488, 1.66 ], [ -0.012, 1.132 ], [ 1.956, -1.116 ] ],
    	[ [ 0.996, -1.484 ], [ 1.368, 1.552 ], [ -1.248, 0.672 ], [ 0.656, 0.972 ], [ -1.16, 1.352 ], [ 1.98, 1.916 ], [ -0.892, -1.552 ], [ -0.032, 0.82 ] ],
    	[ [ 0.812, 0.688 ], [ 1.972, -0.368 ], [ 0.248, 1.66 ], [ -0.408, -1.54 ], [ -1.664, -0.488 ], [ -1.58, 1.628 ], [ -2.0, 0.644 ], [ 1.62, -1.256 ] ],
    	[ [ -0.888, 1.144 ], [ -1.256, 1.628 ], [ 0.016, 0.092 ], [ 1.288, 0.56 ], [ -1.656, -0.472 ], [ 0.392, 0.82 ], [ -0.124, -1.16 ], [ -0.856, -1.764 ] ],
    	[ [ -1.976, -1.76 ], [ 1.012, -1.424 ], [ 1.652, -1.808 ], [ 0.688, -0.312 ], [ -0.684, -1.456 ], [ 1.776, 1.82 ], [ -1.1, 1.144 ], [ -0.316, 1.64 ] ],
    	[ [ 1.876, 0.344 ], [ -0.804, -1.104 ], [ 0.048, -0.628 ], [ -0.968, -1.572 ], [ -1.176, 0.072 ], [ -1.476, 1.156 ], [ 0.184, 0.52 ], [ 1.168, 0.66 ] ],
    	[ [ 1.836, 0.52 ], [ -1.516, 1.288 ], [ 1.256, -0.968 ], [ 0.148, -1.808 ], [ -0.556, -0.504 ], [ -1.564, -0.384 ], [ -0.784, -0.464 ], [ 1.24, -0.848 ] ],
    	[ [ 1.444, -1.176 ], [ 1.596, -0.924 ], [ -0.808, -1.552 ], [ -1.832, -0.876 ], [ 0.012, -0.26 ], [ 0.692, -1.724 ], [ -1.536, -1.156 ], [ -1.856, -1.34 ] ]
    ]
    [
    	[ [ 1.512, -0.608 ], [ -0.068, 0.788 ], [ 1.208, -0.768 ], [ 0.028, 1.912 ] ],
    	[ [ -0.384, 0.08 ], [ 1.764, 0.3 ], [ -0.712, -1.028 ], [ 0.636, 1.108 ] ],
    	[ [ -0.852, 0.496 ], [ -1.72, 0.048 ], [ 0.7, -0.804 ], [ -1.616, 1.356 ] ],
    	[ [ -1.688, 1.556 ], [ 1.556, 1.048 ], [ -0.128, 1.524 ], [ 1.032, -0.176 ] ]
    ]
    [
    	[ [ -0.628, -1.54 ], [ 1.288, -0.312 ], [ -0.856, -0.26 ], [ -1.724, -1.58 ], [ 0.56, 1.288 ], [ -0.316, -1.808 ], [ -1.16, -1.248 ], [ -1.256, -1.552 ] ],
    	[ [ -1.16, -1.1 ], [ 0.016, -0.488 ], [ 1.876, -1.976 ], [ -0.876, -1.492 ], [ 0.184, -1.536 ], [ 1.98, 0.392 ], [ 1.66, 0.344 ], [ -0.012, 0.82 ] ],
    	[ [ -0.636, 1.256 ], [ 1.352, -1.564 ], [ 1.956, -0.892 ], [ 0.072, 0.644 ], [ 1.82, 1.972 ], [ 1.62, 1.324 ], [ 1.652, 0.688 ], [ -1.76, -1.656 ] ],
    	[ [ -0.408, -1.228 ], [ -0.472, -0.784 ], [ 0.048, 1.836 ], [ -1.552, 1.168 ], [ 1.596, 1.156 ], [ 1.552, -0.684 ], [ 0.82, -0.124 ], [ 0.656, -0.888 ] ],
    	[ [ 1.42, 1.612 ], [ 1.144, 0.996 ], [ 0.52, 1.628 ], [ 0.688, -0.968 ], [ -1.484, -1.524 ], [ -0.368, -1.664 ], [ 0.692, -1.456 ], [ -1.424, 1.64 ] ],
    	[ [ 1.444, -0.556 ], [ -1.176, -1.572 ], [ -1.34, 1.628 ], [ -1.832, -2.0 ], [ -0.032, 1.704 ], [ 0.092, -0.384 ], [ 1.916, -0.808 ], [ 1.776, -0.464 ] ],
    	[ [ 0.972, -1.34 ], [ 0.488, 1.66 ], [ -1.104, 0.012 ], [ 0.52, 0.812 ], [ -1.156, 1.368 ], [ -0.848, -1.516 ], [ -1.856, 1.132 ], [ 1.144, -1.808 ] ],
    	[ [ 0.248, -1.116 ], [ -1.764, -0.804 ], [ -1.476, -0.892 ], [ 0.148, 1.24 ], [ -0.968, -0.924 ], [ -1.256, 0.672 ], [ -1.176, 0.66 ], [ 1.012, -0.504 ] ]
    ]
    [
    	[ [ -1.688, 1.764 ], [ -1.616, -0.768 ], [ -0.852, 1.356 ], [ 1.912, 1.048 ] ],
    	[ [ 0.7, 1.108 ], [ -0.384, -0.128 ], [ 0.08, 0.788 ], [ -0.712, 0.3 ] ],
    	[ [ 1.208, -1.028 ], [ -0.608, 0.028 ], [ 0.636, 1.556 ], [ -0.804, 1.512 ] ],
    	[ [ 0.048, -0.176 ], [ 0.496, 1.556 ], [ 1.524, -1.72 ], [ -0.068, 1.032 ] ]
    ]
    [
    	[ [ 1.596, -1.424 ], [ 0.692, -1.476 ], [ 1.776, 1.612 ], [ -1.808, 0.072 ], [ -1.228, -1.564 ], [ 1.288, 0.148 ], [ -0.628, 0.184 ], [ -1.1, 1.64 ] ],
    	[ [ -1.256, 0.092 ], [ 1.168, 1.972 ], [ -0.012, -0.784 ], [ -0.924, -0.636 ], [ -0.804, -1.552 ], [ 1.628, 0.048 ], [ 1.288, -1.976 ], [ 1.144, -0.368 ] ],
    	[ [ -0.312, -1.856 ], [ 1.62, -1.16 ], [ 1.256, 1.652 ], [ -1.176, -0.848 ], [ 0.688, 1.012 ], [ -1.524, 1.82 ], [ -0.384, 1.628 ], [ -2.0, 1.352 ] ],
    	[ [ -0.684, 1.42 ], [ -1.156, 1.916 ], [ -1.484, -1.104 ], [ 0.688, -1.34 ], [ 0.996, 1.66 ], [ 0.52, -0.488 ], [ -0.968, -1.808 ], [ -1.656, -1.536 ] ],
    	[ [ -0.888, -1.16 ], [ -1.54, 0.56 ], [ 1.98, 0.016 ], [ 0.66, -0.808 ], [ 1.144, 0.812 ], [ 1.704, -1.764 ], [ 0.52, 0.344 ], [ 1.24, -0.892 ] ],
    	[ [ -0.124, 1.324 ], [ 0.972, -1.552 ], [ -1.492, 1.132 ], [ -0.876, -0.032 ], [ 0.392, -0.26 ], [ 0.656, -1.572 ], [ -1.724, -1.76 ], [ 1.444, 1.156 ] ],
    	[ [ -0.464, -1.248 ], [ -1.516, 1.956 ], [ -0.504, 0.82 ], [ 0.012, 0.82 ], [ -1.58, -1.832 ], [ -0.472, -1.34 ], [ -1.256, 1.836 ], [ -0.892, 0.248 ] ],
    	[ [ 1.876, -0.316 ], [ 0.672, 0.488 ], [ 1.552, -1.456 ], [ 1.368, -0.856 ], [ -1.176, -0.408 ], [ -1.116, -0.556 ], [ 1.66, -1.664 ], [ 0.644, -0.968 ] ]
    ]
    [
    	[ [ 1.048, 1.512 ], [ 0.08, 0.028 ], [ 0.7, 1.556 ], [ -1.72, -0.068 ] ],
    	[ [ -0.852, -0.128 ], [ 1.764, 1.556 ], [ -0.804, -1.688 ], [ 1.108, 1.032 ] ],
    	[ [ 1.524, 0.3 ], [ 1.912, -0.176 ], [ -0.712, -0.768 ], [ 0.636, 1.208 ] ],
    	[ [ -1.616, 0.788 ], [ 1.356, 0.048 ], [ 0.496, -0.608 ], [ -1.028, -0.384 ] ]
    ]
    [
    	[ [ 0.82, -1.552 ], [ 0.972, 0.392 ], [ -1.1, 1.628 ], [ -0.556, -1.176 ], [ 1.24, 1.288 ], [ -1.176, -1.58 ], [ 0.644, -0.848 ], [ -0.968, 1.256 ] ],
    	[ [ 1.628, -1.16 ], [ -0.384, 1.836 ], [ -1.256, 0.072 ], [ 1.288, 1.776 ], [ 1.132, -1.524 ], [ -1.664, -0.968 ], [ -1.104, -0.012 ], [ -1.724, -1.856 ] ],
    	[ [ -1.476, 0.692 ], [ 0.52, -0.892 ], [ 1.98, -1.492 ], [ -1.456, -1.34 ], [ 0.344, -0.032 ], [ 1.596, 1.352 ], [ -1.484, -1.572 ], [ -1.256, -0.636 ] ],
    	[ [ 1.972, -1.116 ], [ -0.892, -0.684 ], [ -2.0, 0.148 ], [ -0.784, 0.688 ], [ -1.808, 1.012 ], [ -0.924, 0.56 ], [ -0.316, -1.564 ], [ -1.228, 1.876 ] ],
    	[ [ 1.368, -1.976 ], [ -0.876, 0.996 ], [ -0.888, -1.76 ], [ 1.552, 0.812 ], [ -0.804, 1.916 ], [ 1.156, 0.048 ], [ 1.42, 1.324 ], [ 1.82, 0.184 ] ],
    	[ [ -1.536, 0.488 ], [ 1.168, 0.016 ], [ -1.516, -0.808 ], [ -0.472, -0.124 ], [ 1.704, 1.64 ], [ 1.612, -0.488 ], [ -0.856, 0.672 ], [ -0.312, 0.012 ] ],
    	[ [ -1.552, -1.764 ], [ -1.248, -1.832 ], [ 1.62, -0.504 ], [ -1.54, 0.82 ], [ 0.688, 1.444 ], [ -1.656, -0.368 ], [ 1.956, -0.408 ], [ 1.144, -0.26 ] ],
    	[ [ -1.16, 0.092 ], [ -1.156, 0.52 ], [ 0.66, 1.144 ], [ 1.652, 0.656 ], [ -0.628, -0.464 ], [ 1.66, -1.808 ], [ 0.248, 1.66 ], [ -1.34, -1.424 ] ]
    ]
    [
    	[ [ -0.852, 1.208 ], [ 0.028, 1.512 ], [ 1.108, 0.048 ], [ -0.068, 0.7 ] ],
    	[ [ -1.72, -0.608 ], [ 1.912, 0.08 ], [ -0.804, 1.048 ], [ -0.384, 1.556 ] ],
    	[ [ -1.688, -0.712 ], [ 1.556, 1.032 ], [ 0.3, 1.524 ], [ -0.128, -0.768 ] ],
    	[ [ 0.788, 1.356 ], [ -1.028, 1.764 ], [ 0.496, -0.176 ], [ -1.616, 0.636 ] ]
    ]
    [
    	[ [ -0.472, -2.0 ], [ 0.148, -1.16 ], [ -1.656, -0.968 ], [ 1.916, 0.56 ], [ 0.092, -1.492 ], [ -1.764, 1.66 ], [ 1.98, 1.156 ], [ -1.552, -1.976 ] ],
    	[ [ 0.52, -0.488 ], [ -1.256, 0.812 ], [ 1.552, 0.072 ], [ -1.104, 1.324 ], [ 1.776, -1.832 ], [ 0.972, -0.124 ], [ 1.42, 0.016 ], [ 0.66, -0.856 ] ],
    	[ [ -0.888, 1.836 ], [ -1.476, -1.572 ], [ -0.684, -1.552 ], [ 0.656, 1.368 ], [ 0.248, 1.012 ], [ -0.504, -0.368 ], [ -0.924, -0.628 ], [ 1.144, -1.16 ] ],
    	[ [ -1.536, 1.956 ], [ -0.848, -1.34 ], [ 1.612, -0.408 ], [ 0.996, 0.692 ], [ -0.636, -1.524 ], [ -1.424, 1.24 ], [ 1.972, -0.804 ], [ 1.628, -0.012 ] ],
    	[ [ 1.82, 0.82 ], [ -1.856, -1.76 ], [ -1.808, -1.248 ], [ 1.288, -0.26 ], [ 1.652, 0.644 ], [ -0.464, 1.352 ], [ -1.484, 1.64 ], [ -1.54, 0.392 ] ],
    	[ [ -1.664, -1.808 ], [ 0.52, 1.596 ], [ 1.132, 0.488 ], [ 1.66, -0.968 ], [ 0.688, -1.228 ], [ -1.516, 1.628 ], [ -0.312, -1.564 ], [ 0.82, 1.444 ] ],
    	[ [ 0.184, -0.556 ], [ -0.892, -0.032 ], [ -1.456, 1.288 ], [ 1.168, 0.688 ], [ -0.384, -1.34 ], [ -1.116, -1.1 ], [ -1.256, -0.876 ], [ -1.156, -1.176 ] ],
    	[ [ 1.876, 1.62 ], [ -0.784, -1.176 ], [ 0.012, 1.144 ], [ 0.048, 1.256 ], [ 0.672, -0.808 ], [ -0.892, 1.704 ], [ -1.724, 0.344 ], [ -1.58, -0.316 ] ]
    ]

Gradient Descent

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

TrainingTester.java:480 executed in 0.36 seconds (0.000 gc):

    IterativeTrainer iterativeTrainer = new IterativeTrainer(trainable.addRef());
    try {
      iterativeTrainer.setLineSearchFactory(label -> new ArmijoWolfeSearch());
      iterativeTrainer.setOrientation(new GradientDescent());
      iterativeTrainer.setMonitor(TrainingTester.getMonitor(history));
      iterativeTrainer.setTimeout(30, TimeUnit.SECONDS);
      iterativeTrainer.setMaxIterations(250);
      iterativeTrainer.setTerminateThreshold(0);
      return iterativeTrainer.run();
    } finally {
      iterativeTrainer.freeRef();
    }
Logging
Reset training subject: 4855892195596
BACKPROP_AGG_SIZE = 3
THREADS = 64
SINGLE_THREADED = false
Initialized CoreSettings = {
"backpropAggregationSize" : 3,
"jvmThreads" : 64,
"singleThreaded" : false
}
Reset training subject: 4855932960527
Constructing line search parameters: GD
th(0)=468.1470590825651;dx=-1.7470719999999998E23
New Minimum: 468.1470590825651 > 446.1636241631215
Armijo: th(2.154434690031884)=446.1636241631215; dx=-1.7470720000190387E11 evalInputDelta=21.983434919443596
Armijo: th(1.077217345015942)=446.1636241631215; dx=-1.7470720000190387E11 evalInputDelta=21.983434919443596
Armijo: th(0.3590724483386473)=446.2652979907642; dx=-1.747072000019793E11 evalInputDelta=21.881761091800854
Armijo: th(0.08976811208466183)=446.77646325239505; dx=-1.7470720000452728E11 evalInputDelta=21.370595830170032
Armijo: th(0.017953622416932366)=447.25868772940294; dx=-1.747072000120218E11 evalInputDelta=20.888371353162142
Armijo: th(0.002992270402822061)=447.48247104853107; dx=-1.7470720001981152E11 evalInputDelta=20.66458803403401
Armijo: th(4.2746720040315154E-4)=447.5357908474226; dx=-1.7470720002242688E11 evalInputDelta=20.61126823514246
Armijo: th(5.343340005039394E-5)=447.54416036031364; dx=-1.747072000228726E11 evalInputDelta=20.60289872225144
Armijo: th(5.9370444500437714E-6)=447.54523519086695; dx=-1.7470720002293054E11 evalInputDelta=20.60182389169813
Armijo: th(5.937044450043771E-7)=447.5453562818202; dx=-1.747072000229371E11 evalInputDelta=20.601702800744874
Armijo: th(5.397313136403428E-8)=447.5453685151738; dx=-1.7470720002293777E11 evalInputDelta=20.6016905673913
Armijo: th(4.4977609470028565E-9)=447.5453696365824; dx=-1.7470720002293784E11 evalInputDelta=20.601689445982686
Armijo: th(3.4598161130791205E-10)=447.5459009665886; dx=-1.7471032061957068E11 evalInputDelta=20.60115811597649
Armijo: th(2.4712972236279432E-11)=448.27482869542916; dx=-1.8624000017452096E20 evalInputDelta=19.872230387135914
Armijo: th(1.6475314824186289E-12)=468.1470590825278; dx=-1.7470719999999998E23 evalInputDelta=3.728928277269006E-11
Armijo: th(1.029707176511643E-13)=468.14705908256275; dx=-1.7470719999999998E23 evalInputDelta=2.3305801732931286E-12
Armijo: th(6.057101038303783E-15)=468.1470590825649; dx=-1.7470719999999998E23 evalInputDelta=1.7053025658242404E-13
MIN ALPHA (3.3650561323909904E-16): th(2.154434690031884)=446.1636241631215
Fitness changed from 468.1470590825651 to 446.1636241631215
Iteration 1 complete. Error: 446.1636241631215 Total: 0.2299; Orientation: 0.0072; Line Search: 0.1711
th(0)=446.1636241631215;dx=-0.6417248000000001
WOLFE (weak): th(2.154434690031884E-15)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
WOLFE (weak): th(4.308869380063768E-15)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
WOLFE (weak): th(1.2926608140191303E-14)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
WOLFE (weak): th(5.1706432560765214E-14)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
WOLFE (weak): th(2.5853216280382605E-13)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
WOLFE (weak): th(1.5511929768229563E-12)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
WOLFE (weak): th(1.0858350837760695E-11)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
WOLFE (weak): th(8.686680670208556E-11)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
WOLFE (weak): th(7.8180126031877E-10)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
WOLFE (weak): th(7.818012603187701E-9)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
Armijo: th(8.599813863506471E-8)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
Armijo: th(4.6908075619126206E-8)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
WOLFE (weak): th(2.7363044111156953E-8)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
WOLFE (weak): th(3.713555986514158E-8)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
WOLFE (weak): th(4.2021817742133894E-8)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
Armijo: th(4.446494668063005E-8)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
WOLFE (weak): th(4.324338221138198E-8)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
WOLFE (weak): th(4.3854164446006015E-8)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
WOLFE (weak): th(4.415955556331804E-8)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
mu ~= nu (4.415955556331804E-8): th(0.0)=446.1636241631215
Fitness changed from 446.1636241631215 to 446.1636241631215
Static Iteration Total: 0.1167; Orientation: 0.0012; Line Search: 0.1128
Iteration 2 failed. Error: 446.1636241631215
Previous Error: 0.0 -> 446.1636241631215
Optimization terminated 2
Final threshold in iteration 2: 446.1636241631215 (> 0.0) after 0.348s (< 30.000s)

Returns

    446.1636241631215

This training apply resulted in the following configuration:

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

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

Returns

    

And regressed input:

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

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

Returns

    [
    	[ [ -0.068, 1.208 ], [ -0.176, -0.712 ], [ -0.852, 1.048 ], [ 0.788, 0.496 ] ],
    	[ [ -0.608, -1.028 ], [ 0.028, 1.524 ], [ -1.688, 1.912 ], [ -0.768, 0.3 ] ],
    	[ [ 0.7, 1.512 ], [ -1.72, 1.7784600755379225 ], [ 1.356, 0.048 ], [ 0.08, 1.5525114211117033 ] ],
    	[ [ -0.128, -0.804 ], [ -0.384, 1.764 ], [ -1.616, 0.636 ], [ 1.5680648342641785, 1.556 ] ]
    ]

To produce the following output:

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

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

Returns

    [
    	[ [ 0.0, 1.208 ], [ 0.0, 0.0 ], [ -0.176, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ -0.852, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ] ],
    	[ [ -0.068, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, -0.712 ], [ 0.0, 1.048 ], [ 0.0, 0.0 ], [ 0.788, 0.0 ], [ 0.0, 0.496 ] ],
    	[ [ 0.0, -1.028 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 1.524 ], [ 0.0, 1.912 ], [ -1.688, 0.0 ], [ -0.768, 0.0 ], [ 0.0, 0.0 ] ],
    	[ [ -0.608, 0.0 ], [ 0.0, 0.0 ], [ 0.028, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.3 ], [ 0.0, 0.0 ] ],
    	[ [ 0.0, 1.512 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 1.7784600755379225 ], [ 1.356, 0.0 ], [ 0.0, 0.048 ], [ 0.0, 0.0 ], [ 0.08, 1.5525114211117033 ] ],
    	[ [ 0.0, 0.0 ], [ 0.7, 0.0 ], [ -1.72, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ] ],
    	[ [ 0.0, 0.0 ], [ 0.0, -0.804 ], [ -0.384, 1.764 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ -1.616, 0.0 ], [ 0.0, 0.0 ], [ 1.5680648342641785, 1.556 ] ],
    	[ [ -0.128, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.636 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ] ]
    ]

Conjugate Gradient Descent

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

TrainingTester.java:452 executed in 0.32 seconds (0.000 gc):

    IterativeTrainer iterativeTrainer = new IterativeTrainer(trainable.addRef());
    try {
      iterativeTrainer.setLineSearchFactory(label -> new QuadraticSearch());
      iterativeTrainer.setOrientation(new GradientDescent());
      iterativeTrainer.setMonitor(TrainingTester.getMonitor(history));
      iterativeTrainer.setTimeout(30, TimeUnit.SECONDS);
      iterativeTrainer.setMaxIterations(250);
      iterativeTrainer.setTerminateThreshold(0);
      return iterativeTrainer.run();
    } finally {
      iterativeTrainer.freeRef();
    }
Logging
Reset training subject: 4856259574072
Reset training subject: 4856262191689
Constructing line search parameters: GD
F(0.0) = LineSearchPoint{point=PointSample{avg=468.1470590825651}, derivative=-1.7470719999999998E23}
New Minimum: 468.1470590825651 > 448.0195944824022
F(1.0E-10) = LineSearchPoint{point=PointSample{avg=448.0195944824022}, derivative=-9.408000017478278E19}, evalInputDelta = -20.127464600162853
New Minimum: 448.0195944824022 > 447.5453697226626
F(7.000000000000001E-10) = LineSearchPoint{point=PointSample{avg=447.5453697226626}, derivative=-1.7470720002293784E11}, evalInputDelta = -20.60168935990248
New Minimum: 447.5453697226626 > 447.5453696274652
F(4.900000000000001E-9) = LineSearchPoint{point=PointSample{avg=447.5453696274652}, derivative=-1.747072000229378E11}, evalInputDelta = -20.60168945509986
New Minimum: 447.5453696274652 > 447.5453689610846
F(3.430000000000001E-8) = LineSearchPoint{point=PointSample{avg=447.5453689610846}, derivative=-1.747072000229378E11}, evalInputDelta = -20.601690121480488
New Minimum: 447.5453689610846 > 447.5453642964496
F(2.4010000000000004E-7) = LineSearchPoint{point=PointSample{avg=447.5453642964496}, derivative=-1.7470720002293753E11}, evalInputDelta = -20.6016947861155
New Minimum: 447.5453642964496 > 447.5453316454573
F(1.6807000000000003E-6) = LineSearchPoint{point=PointSample{avg=447.5453316454573}, derivative=-1.7470720002293576E11}, evalInputDelta = -20.601727437107797
New Minimum: 447.5453316454573 > 447.54510315965
F(1.1764900000000001E-5) = LineSearchPoint{point=PointSample{avg=447.54510315965}, derivative=-1.7470720002292343E11}, evalInputDelta = -20.601955922915067
New Minimum: 447.54510315965 > 447.5435072337761
F(8.235430000000001E-5) = LineSearchPoint{point=PointSample{avg=447.5435072337761}, derivative=-1.7470720002283743E11}, evalInputDelta = -20.60355184878898
New Minimum: 447.5435072337761 > 447.53250232991684
F(5.764801000000001E-4) = LineSearchPoint{point=PointSample{avg=447.53250232991684}, derivative=-1.7470720002225452E11}, evalInputDelta = -20.61455675264824
New Minimum: 447.53250232991684 > 447.4625589270918
F(0.004035360700000001) = LineSearchPoint{point=PointSample{avg=447.4625589270918}, derivative=-1.747072000189257E11}, evalInputDelta = -20.6845001554733
New Minimum: 447.4625589270918 > 447.15144665820753
F(0.028247524900000005) = LineSearchPoint{point=PointSample{avg=447.15144665820753}, derivative=-1.747072000095592E11}, evalInputDelta = -20.995612424357546
New Minimum: 447.15144665820753 > 446.4471026767512
F(0.19773267430000002) = LineSearchPoint{point=PointSample{avg=446.4471026767512}, derivative=-1.7470720000255417E11}, evalInputDelta = -21.699956405813907
New Minimum: 446.4471026767512 > 446.1636241631215
F(1.3841287201) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-1.7470720000190387E11}, evalInputDelta = -21.983434919443596
F(9.688901040700001) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-1.7470720000190387E11}, evalInputDelta = -21.983434919443596
F(67.8223072849) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-1.7470720000190387E11}, evalInputDelta = -21.983434919443596
F(474.7561509943) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-1.7470720000190387E11}, evalInputDelta = -21.983434919443596
F(3323.2930569601003) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-1.7470720000190387E11}, evalInputDelta = -21.983434919443596
F(23263.0513987207) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-1.7470720000190387E11}, evalInputDelta = -21.983434919443596
F(162841.3597910449) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-1.7470720000190387E11}, evalInputDelta = -21.983434919443596
F(1139889.5185373144) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-1.7470720000190387E11}, evalInputDelta = -21.983434919443596
F(7979226.6297612) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-1.7470720000190387E11}, evalInputDelta = -21.983434919443596
F(5.58545864083284E7) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-1.7470720000190387E11}, evalInputDelta = -21.983434919443596
F(3.909821048582988E8) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-1.7470720000190387E11}, evalInputDelta = -21.983434919443596
F(2.7368747340080914E9) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-1.7470720000190387E11}, evalInputDelta = -21.983434919443596
F(1.915812313805664E10) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-1.7470720000190387E11}, evalInputDelta = -21.983434919443596
446.1636241631215 <= 468.1470590825651
F(1.0E10) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-1.7470720000190387E11}, evalInputDelta = -21.983434919443596
Right bracket at 1.0E10
Converged to right
Fitness changed from 468.1470590825651 to 446.1636241631215
Iteration 1 complete. Error: 446.1636241631215 Total: 0.1263; Orientation: 0.0010; Line Search: 0.1182
F(0.0) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-0.6417248000000001}
F(1.0E10) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-0.6417248000000001}, evalInputDelta = 0.0
446.1636241631215 <= 446.1636241631215
F(5.0E9) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-0.6417248000000001}, evalInputDelta = 0.0
Right bracket at 5.0E9
F(2.5E9) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-0.6417248000000001}, evalInputDelta = 0.0
Right bracket at 2.5E9
F(1.25E9) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-0.6417248000000001}, evalInputDelta = 0.0
Right bracket at 1.25E9
F(6.25E8) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-0.6417248000000001}, evalInputDelta = 0.0
Right bracket at 6.25E8
F(3.125E8) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-0.6417248000000001}, evalInputDelta = 0.0
Right bracket at 3.125E8
F(1.5625E8) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-0.6417248000000001}, evalInputDelta = 0.0
Right bracket at 1.5625E8
F(7.8125E7) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-0.6417248000000001}, evalInputDelta = 0.0
Right bracket at 7.8125E7
F(3.90625E7) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-0.6417248000000001}, evalInputDelta = 0.0
Right bracket at 3.90625E7
F(1.953125E7) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-0.6417248000000001}, evalInputDelta = 0.0
Right bracket at 1.953125E7
F(9765625.0) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-0.6417248000000001}, evalInputDelta = 0.0
Right bracket at 9765625.0
F(4882812.5) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-0.6417248000000001}, evalInputDelta = 0.0
Right bracket at 4882812.5
F(2441406.25) = LineSearchPoint{point=PointSample{avg=446.1636241631215}, derivative=-0.6417248000000001}, evalInputDelta = 0.0
Loops = 12
Fitness changed from 446.1636241631215 to 446.1636241631215
Static Iteration Total: 0.1924; Orientation: 0.0017; Line Search: 0.1875
Iteration 2 failed. Error: 446.1636241631215
Previous Error: 0.0 -> 446.1636241631215
Optimization terminated 2
Final threshold in iteration 2: 446.1636241631215 (> 0.0) after 0.319s (< 30.000s)

Returns

    446.1636241631215

This training apply resulted in the following configuration:

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

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

Returns

    

And regressed input:

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

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

Returns

    [
    	[ [ -0.068, 1.208 ], [ -0.176, -0.712 ], [ -0.852, 1.048 ], [ 0.788, 0.496 ] ],
    	[ [ -0.608, -1.028 ], [ 0.028, 1.524 ], [ -1.688, 1.912 ], [ -0.768, 0.3 ] ],
    	[ [ 0.7, 1.512 ], [ -1.72, 1.53874085769512 ], [ 1.356, 0.048 ], [ 0.08, 1.36640549877616 ] ],
    	[ [ -0.128, -0.804 ], [ -0.384, 1.764 ], [ -1.616, 0.636 ], [ 1.56375112083256, 1.556 ] ]
    ]

To produce the following output:

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

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

Returns

    [
    	[ [ 0.0, 1.208 ], [ 0.0, 0.0 ], [ -0.176, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ -0.852, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ] ],
    	[ [ -0.068, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, -0.712 ], [ 0.0, 1.048 ], [ 0.0, 0.0 ], [ 0.788, 0.0 ], [ 0.0, 0.496 ] ],
    	[ [ 0.0, -1.028 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 1.524 ], [ 0.0, 1.912 ], [ -1.688, 0.0 ], [ -0.768, 0.0 ], [ 0.0, 0.0 ] ],
    	[ [ -0.608, 0.0 ], [ 0.0, 0.0 ], [ 0.028, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.3 ], [ 0.0, 0.0 ] ],
    	[ [ 0.0, 1.512 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 1.53874085769512 ], [ 1.356, 0.0 ], [ 0.0, 0.048 ], [ 0.0, 0.0 ], [ 0.08, 1.36640549877616 ] ],
    	[ [ 0.0, 0.0 ], [ 0.7, 0.0 ], [ -1.72, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ] ],
    	[ [ 0.0, 0.0 ], [ 0.0, -0.804 ], [ -0.384, 1.764 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ -1.616, 0.0 ], [ 0.0, 0.0 ], [ 1.56375112083256, 1.556 ] ],
    	[ [ -0.128, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.636 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ] ]
    ]

Limited-Memory BFGS

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

TrainingTester.java:509 executed in 0.37 seconds (0.000 gc):

    IterativeTrainer iterativeTrainer = new IterativeTrainer(trainable.addRef());
    try {
      iterativeTrainer.setLineSearchFactory(label -> new ArmijoWolfeSearch());
      iterativeTrainer.setOrientation(new LBFGS());
      iterativeTrainer.setMonitor(TrainingTester.getMonitor(history));
      iterativeTrainer.setTimeout(30, TimeUnit.SECONDS);
      iterativeTrainer.setIterationsPerSample(100);
      iterativeTrainer.setMaxIterations(250);
      iterativeTrainer.setTerminateThreshold(0);
      return iterativeTrainer.run();
    } finally {
      iterativeTrainer.freeRef();
    }
Logging
Reset training subject: 4856594023598
Reset training subject: 4856596802795
Adding measurement 55d4d062 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD
Non-optimal measurement 468.1470590825651 < 468.1470590825651. Total: 1
th(0)=468.1470590825651;dx=-1.7470719999999998E23
Adding measurement 4bf0d513 to history. Total: 1
New Minimum: 468.1470590825651 > 446.1636241631215
Armijo: th(2.154434690031884)=446.1636241631215; dx=-1.7470720000190387E11 evalInputDelta=21.983434919443596
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
Armijo: th(1.077217345015942)=446.1636241631215; dx=-1.7470720000190387E11 evalInputDelta=21.983434919443596
Non-optimal measurement 446.2652979907642 < 446.1636241631215. Total: 2
Armijo: th(0.3590724483386473)=446.2652979907642; dx=-1.747072000019793E11 evalInputDelta=21.881761091800854
Non-optimal measurement 446.77646325239505 < 446.1636241631215. Total: 2
Armijo: th(0.08976811208466183)=446.77646325239505; dx=-1.747072000045273E11 evalInputDelta=21.370595830170032
Non-optimal measurement 447.25868772940294 < 446.1636241631215. Total: 2
Armijo: th(0.017953622416932366)=447.25868772940294; dx=-1.747072000120218E11 evalInputDelta=20.888371353162142
Non-optimal measurement 447.48247104853107 < 446.1636241631215. Total: 2
Armijo: th(0.002992270402822061)=447.48247104853107; dx=-1.7470720001981152E11 evalInputDelta=20.66458803403401
Non-optimal measurement 447.5357908474226 < 446.1636241631215. Total: 2
Armijo: th(4.2746720040315154E-4)=447.5357908474226; dx=-1.7470720002242688E11 evalInputDelta=20.61126823514246
Non-optimal measurement 447.54416036031364 < 446.1636241631215. Total: 2
Armijo: th(5.343340005039394E-5)=447.54416036031364; dx=-1.747072000228726E11 evalInputDelta=20.60289872225144
Non-optimal measurement 447.54523519086695 < 446.1636241631215. Total: 2
Armijo: th(5.9370444500437714E-6)=447.54523519086695; dx=-1.7470720002293057E11 evalInputDelta=20.60182389169813
Non-optimal measurement 447.5453562818202 < 446.1636241631215. Total: 2
Armijo: th(5.937044450043771E-7)=447.5453562818202; dx=-1.747072000229371E11 evalInputDelta=20.601702800744874
Non-optimal measurement 447.5453685151738 < 446.1636241631215. Total: 2
Armijo: th(5.397313136403428E-8)=447.5453685151738; dx=-1.7470720002293777E11 evalInputDelta=20.6016905673913
Non-optimal measurement 447.5453696365824 < 446.1636241631215. Total: 2
Armijo: th(4.4977609470028565E-9)=447.5453696365824; dx=-1.7470720002293784E11 evalInputDelta=20.601689445982686
Non-optimal measurement 447.5459009665886 < 446.1636241631215. Total: 2
Armijo: th(3.4598161130791205E-10)=447.5459009665886; dx=-1.7471032061957065E11 evalInputDelta=20.60115811597649
Non-optimal measurement 448.27482869542916 < 446.1636241631215. Total: 2
Armijo: th(2.4712972236279432E-11)=448.27482869542916; dx=-1.8624000017452096E20 evalInputDelta=19.872230387135914
Non-optimal measurement 468.1470590825278 < 446.1636241631215. Total: 2
Armijo: th(1.6475314824186289E-12)=468.1470590825278; dx=-1.7470719999999998E23 evalInputDelta=3.728928277269006E-11
Non-optimal measurement 468.14705908256275 < 446.1636241631215. Total: 2
Armijo: th(1.029707176511643E-13)=468.14705908256275; dx=-1.7470719999999998E23 evalInputDelta=2.3305801732931286E-12
Non-optimal measurement 468.1470590825649 < 446.1636241631215. Total: 2
Armijo: th(6.057101038303783E-15)=468.1470590825649; dx=-1.7470719999999998E23 evalInputDelta=1.7053025658242404E-13
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
MIN ALPHA (3.3650561323909904E-16): th(2.154434690031884)=446.1636241631215
Fitness changed from 468.1470590825651 to 446.1636241631215
Iteration 1 complete. Error: 446.1636241631215 Total: 0.2493; Orientation: 0.0045; Line Search: 0.2374
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
LBFGS Accumulation History: 2 points
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
th(0)=446.1636241631215;dx=-0.6417248000000001
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
WOLFE (weak): th(2.154434690031884E-15)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
WOLFE (weak): th(4.308869380063768E-15)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
WOLFE (weak): th(1.2926608140191303E-14)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
WOLFE (weak): th(5.1706432560765214E-14)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
WOLFE (weak): th(2.5853216280382605E-13)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
WOLFE (weak): th(1.5511929768229563E-12)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
WOLFE (weak): th(1.0858350837760695E-11)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
WOLFE (weak): th(8.686680670208556E-11)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
WOLFE (weak): th(7.8180126031877E-10)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
WOLFE (weak): th(7.818012603187701E-9)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
Armijo: th(8.599813863506471E-8)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
Armijo: th(4.6908075619126206E-8)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
WOLFE (weak): th(2.7363044111156953E-8)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
WOLFE (weak): th(3.713555986514158E-8)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
WOLFE (weak): th(4.2021817742133894E-8)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
Armijo: th(4.446494668063005E-8)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
WOLFE (weak): th(4.324338221138198E-8)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
WOLFE (weak): th(4.3854164446006015E-8)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
WOLFE (weak): th(4.415955556331804E-8)=446.1636241631215; dx=-0.6417248000000001 evalInputDelta=0.0
Non-optimal measurement 446.1636241631215 < 446.1636241631215. Total: 2
mu ~= nu (4.415955556331804E-8): th(0.0)=446.1636241631215
Fitness changed from 446.1636241631215 to 446.1636241631215
Static Iteration Total: 0.1228; Orientation: 0.0023; Line Search: 0.1182
Iteration 2 failed. Error: 446.1636241631215
Previous Error: 0.0 -> 446.1636241631215
Optimization terminated 2
Final threshold in iteration 2: 446.1636241631215 (> 0.0) after 0.373s (< 30.000s)

Returns

    446.1636241631215

This training apply resulted in the following configuration:

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

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

Returns

    

And regressed input:

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

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

Returns

    [
    	[ [ -0.068, 1.208 ], [ -0.176, -0.712 ], [ -0.852, 1.048 ], [ 0.788, 0.496 ] ],
    	[ [ -0.608, -1.028 ], [ 0.028, 1.524 ], [ -1.688, 1.912 ], [ -0.768, 0.3 ] ],
    	[ [ 0.7, 1.512 ], [ -1.72, 1.7784600755379225 ], [ 1.356, 0.048 ], [ 0.08, 1.5525114211117033 ] ],
    	[ [ -0.128, -0.804 ], [ -0.384, 1.764 ], [ -1.616, 0.636 ], [ 1.5680648342641785, 1.556 ] ]
    ]

To produce the following output:

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

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

Returns

    [
    	[ [ 0.0, 1.208 ], [ 0.0, 0.0 ], [ -0.176, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ -0.852, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ] ],
    	[ [ -0.068, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, -0.712 ], [ 0.0, 1.048 ], [ 0.0, 0.0 ], [ 0.788, 0.0 ], [ 0.0, 0.496 ] ],
    	[ [ 0.0, -1.028 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 1.524 ], [ 0.0, 1.912 ], [ -1.688, 0.0 ], [ -0.768, 0.0 ], [ 0.0, 0.0 ] ],
    	[ [ -0.608, 0.0 ], [ 0.0, 0.0 ], [ 0.028, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.3 ], [ 0.0, 0.0 ] ],
    	[ [ 0.0, 1.512 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 1.7784600755379225 ], [ 1.356, 0.0 ], [ 0.0, 0.048 ], [ 0.0, 0.0 ], [ 0.08, 1.5525114211117033 ] ],
    	[ [ 0.0, 0.0 ], [ 0.7, 0.0 ], [ -1.72, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ] ],
    	[ [ 0.0, 0.0 ], [ 0.0, -0.804 ], [ -0.384, 1.764 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ -1.616, 0.0 ], [ 0.0, 0.0 ], [ 1.5680648342641785, 1.556 ] ],
    	[ [ -0.128, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, 0.636 ], [ 0.0, 0.0 ], [ 0.0, 0.0 ] ]
    ]

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

    return TestUtil.compare(title + " vs Iteration", runs);
Logging
Plotting range=[0.0, 1.6494941592485497], [2.0, 3.6494941592485497]; valueStats=DoubleSummaryStatistics{count=3, sum=1338.490872, min=446.163624, average=446.163624, max=446.163624}
Only 1 points for GD
Only 1 points for CjGD
Only 1 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=[-1.0, 1.6494941592485497], [1.0, 3.6494941592485497]; valueStats=DoubleSummaryStatistics{count=3, sum=1338.490872, min=446.163624, average=446.163624, max=446.163624}
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": 446.1636241631215 }, "CjGD": { "type": "NonConverged", "value": 446.1636241631215 }, "GD": { "type": "NonConverged", "value": 446.1636241631215 } }, "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": 446.1636241631215 }, "CjGD": { "type": "NonConverged", "value": 446.1636241631215 }, "GD": { "type": "NonConverged", "value": 446.1636241631215 } }, "model":null, "complete":null}OK
  {
    "result": "OK",
    "performance": {
      "execution_time": "1.712",
      "gc_time": "0.213"
    },
    "created_on": 1586739443688,
    "file_name": "trainingTest",
    "report": {
      "simpleName": "Basic",
      "canonicalName": "com.simiacryptus.mindseye.layers.java.PhotoUnpoolingLayerTest.Basic",
      "link": "https://github.com/SimiaCryptus/mindseye-java/tree/93db34cedee48c0202777a2b25deddf1dfaf5731/src/test/java/com/simiacryptus/mindseye/layers/java/PhotoUnpoolingLayerTest.java",
      "javaDoc": ""
    },
    "training_analysis": {
      "input": {
        "LBFGS": {
          "type": "NonConverged",
          "value": 446.1636241631215
        },
        "CjGD": {
          "type": "NonConverged",
          "value": 446.1636241631215
        },
        "GD": {
          "type": "NonConverged",
          "value": 446.1636241631215
        }
      }
    },
    "archive": "s3://code.simiacrypt.us/tests/com/simiacryptus/mindseye/layers/java/PhotoUnpoolingLayer/Basic/trainingTest/202004135723",
    "id": "1faf7e1a-60b2-47ee-b6e2-d7be3b490ddd",
    "report_type": "Components",
    "display_name": "Comparative Training",
    "target": {
      "simpleName": "PhotoUnpoolingLayer",
      "canonicalName": "com.simiacryptus.mindseye.layers.java.PhotoUnpoolingLayer",
      "link": "https://github.com/SimiaCryptus/mindseye-java/tree/93db34cedee48c0202777a2b25deddf1dfaf5731/src/main/java/com/simiacryptus/mindseye/layers/java/PhotoUnpoolingLayer.java",
      "javaDoc": ""
    }
  }