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 7026119429791196160

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.00 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.7983481071312135, 0.8685890724724616, -0.062398705265378496 ]
    [ 0.6359017190777516, -0.593209437708212, 0.4886899383731713 ]
    [ 0.15713369942404132, -0.08964690231864791, -0.13663579688570282 ]
    [ -0.4321093696209941, -0.11797786795748944, -0.29950561757425787 ]
    [ -0.13833495165677823, 0.5614633675056697, -0.3553720883947724 ]
    [ -0.4730335198601494, 0.5067696301922178, -0.3743099413264399 ]
    [ 0.24228250835015075, -0.15111706466502084, -0.8048077287660746 ]
    [ 0.07895673870863673, -0.07103240958100332, 0.26606774255302135 ]
    [ -0.04673601592603527, 0.5566974933155222, 0.7160820822402116 ]
    [ -0.5618778759853917, -0.8744042403754286, -0.8589890980933763 ]

Gradient Descent

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

TrainingTester.java:480 executed in 2.49 seconds (0.177 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: 4096849224822
BACKPROP_AGG_SIZE = 3
THREADS = 64
SINGLE_THREADED = false
Initialized CoreSettings = {
"backpropAggregationSize" : 3,
"jvmThreads" : 64,
"singleThreaded" : false
}
Reset training subject: 4096884283667
Constructing line search parameters: GD
th(0)=4.011522110355427;dx=-8.91287124817455E21
New Minimum: 4.011522110355427 > 3.787343580008534
Armijo: th(2.154434690031884)=3.787343580008534; dx=1.2805541675753276E33 evalInputDelta=0.22417853034689328
Armijo: th(1.077217345015942)=3.810881969326071; dx=6.402770837832073E32 evalInputDelta=0.20064014102935612
Armijo: th(0.3590724483386473)=3.8834468253658843; dx=2.1342569458846057E32 evalInputDelta=0.12807528498954301
Armijo: th(0.08976811208466183)=3.95112613749225; dx=5.335642364043048E31 evalInputDelta=0.06039597286317733
Armijo: th(0.017953622416932366)=3.9937947822459363; dx=1.0671284720955797E31 evalInputDelta=0.01772732810949096
Armijo: th(0.002992270402822061)=4.008180536645851; dx=1.7785474460652405E30 evalInputDelta=0.0033415737095765508
Armijo: th(4.2746720040315154E-4)=4.011033164832936; dx=2.540781989411447E29 evalInputDelta=4.889455224912354E-4
Armijo: th(5.343340005039394E-5)=4.011460773027974; dx=3.1759767068880745E28 evalInputDelta=6.133732745361442E-5
Armijo: th(5.9370444500437714E-6)=4.011515291987863; dx=3.528855085101196E27 evalInputDelta=6.818367563887762E-6
Armijo: th(5.937044450043771E-7)=4.01152142848367; dx=3.5287748692599615E26 evalInputDelta=6.818717572798505E-7
Armijo: th(5.397313136403428E-8)=4.011522048366764; dx=3.2071668928501317E25 evalInputDelta=6.198866309148343E-8
Armijo: th(4.4977609470028565E-9)=4.0115221051897025; dx=2.6644689453976154E24 evalInputDelta=5.165724736855282E-9
Armijo: th(3.4598161130791205E-10)=3.9548503198179596; dx=1.967343105209084E23 evalInputDelta=0.056671790537467626
New Minimum: 3.787343580008534 > 3.297710816692873
Armijo: th(2.4712972236279432E-11)=3.297710816692873; dx=6.331911305709195E21 evalInputDelta=0.7138112936625545
Armijo: th(1.6475314824186289E-12)=4.011522110353535; dx=-7.933610509476459E21 evalInputDelta=1.892708212380967E-12
Armijo: th(1.029707176511643E-13)=4.011522110355308; dx=-8.851667452005921E21 evalInputDelta=1.1901590823981678E-13
Armijo: th(6.057101038303783E-15)=4.01152211035542; dx=-8.909271024870513E21 evalInputDelta=7.105427357601002E-15
MIN ALPHA (3.3650561323909904E-16): th(2.4712972236279432E-11)=3.297710816692873
Fitness changed from 4.011522110355427 to 3.297710816692873
Iteration 1 complete. Error: 3.297710816692873 Total: 0.1609; Orientation: 0.0033; Line Search: 0.1125
th(0)=3.297710816692873;dx=-3.0843040851856716E22
New Minimum: 3.297710816692873 > 3.29771081669287
Armijo: th(2.154434690031884E-15)=3.29771081669287; dx=-3.0842792954004083E22 evalInputDelta=2.6645352591003757E-15
Armijo: th(1.077217345015942E-15)=3.2977108166928715; dx=-3.08429169029304E22 evalInputDelta=1.3322676295501878E-15
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=3.29771081669287
Fitness changed from 3.297710816692873 to 3.29771081669287
Iteration 2 complete. Error: 3.29771081669287 Total: 0.0212; Orientation: 0.0013; Line Search: 0.0161
th(0)=3.29771081669287;dx=-3.0842546530997074E22
New Minimum: 3.29771081669287 > 3.297710816692868
Armijo: th(2.154434690031884E-15)=3.297710816692868; dx=-3.0842301582823827E22 evalInputDelta=2.220446049250313E-15
Armijo: th(1.077217345015942E-15)=3.297710816692869; dx=-3.084242405691045E22 evalInputDelta=1.3322676295501878E-15
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=3.297710816692868
Fitness changed from 3.29771081669287 to 3.297710816692868
Iteration 3 complete. Error: 3.297710816692868 Total: 0.0203; Orientation: 0.0012; Line Search: 0.0164
th(0)=3.297710816692868;dx=-3.0842058109472557E22
New Minimum: 3.297710816692868 > 3.2977108166928653
Armijo: th(2.154434690031884E-15)=3.2977108166928653; dx=-3.0841816110931552E22 evalInputDelta=2.6645352591003757E-15
Armijo: th(1.077217345015942E-15)=3.2977108166928666; dx=-3.0841937110202057E22 evalInputDelta=1.3322676295501878E-15
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=3.2977108166928653
Fitness changed from 3.297710816692868 to 3.2977108166928653
Iteration 4 complete. Error: 3.2977108166928653 Total: 0.0193; Orientation: 0.0011; Line Search: 0.0156
th(0)=3.2977108166928653;dx=-3.084157558718918E22
New Minimum: 3.2977108166928653 > 3.297710816692863
Armijo: th(2.154434690031884E-15)=3.297710816692863; dx=-3.0841336538233854E22 evalInputDelta=2.220446049250313E-15
Armijo: th(1.077217345015942E-15)=3.297710816692864; dx=-3.0841456062711512E22 evalInputDelta=1.3322676295501878E-15
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=3.297710816692863
Fitness changed from 3.2977108166928653 to 3.297710816692863
Iteration 5 complete. Error: 3.297710816692863 Total: 0.0177; Orientation: 0.0010; Line Search: 0.0141
th(0)=3.297710816692863;dx=-3.0841098964054084E22
New Minimum: 3.297710816692863 > 3.2977108166928604
Armijo: th(2.154434690031884E-15)=3.2977108166928604; dx=-3.0840862864638447E22 evalInputDelta=2.6645352591003757E-15
Armijo: th(1.077217345015942E-15)=3.2977108166928617; dx=-3.0840980914346264E22 evalInputDelta=1.3322676295501878E-15
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=3.2977108166928604
Fitness changed from 3.297710816692863 to 3.2977108166928604
Iteration 6 complete. Error: 3.2977108166928604 Total: 0.0165; Orientation: 0.0010; Line Search: 0.0131
th(0)=3.2977108166928604;dx=-3.084062823997559E22
New Minimum: 3.2977108166928604 > 3.297710816692858
Armijo: th(2.154434690031884E-15)=3.297710816692858; dx=-3.0840395090054204E22 evalInputDelta=2.220446049250313E-15
Armijo: th(1.077217345015942E-15)=3.2977108166928586; dx=-3.0840511665014896E22 evalInputDelta=1.7763568394002505E-15
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=3.297710816692858
Fitness changed from 3.2977108166928604 to 3.297710816692858
Iteration 7 complete. Error: 3.297710816692858 Total: 0.0159; Orientation: 0.0009; Line Search: 0.0129
th(0)=3.297710816692858;dx=-3.0840163414863084E22
New Minimum: 3.297710816692858 > 3.297710816692855
Armijo: th(2.154434690031884E-15)=3.297710816692855; dx=-3.0839933214391087E22 evalInputDelta=3.1086244689504383E-15
Armijo: th(1.077217345015942E-15)=3.297710816692857; dx=-3.0840048314627085E22 evalInputDelta=1.3322676295501878E-15
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=3.297710816692855
Fitness changed from 3.297710816692858 to 3.297710816692855
Iteration 8 complete. Error: 3.297710816692855 Total: 0.0158; Orientation: 0.0010; Line Search: 0.0127
th(0)=3.297710816692855;dx=-3.0839704488627132E22
New Minimum: 3.297710816692855 > 3.2977108166928533
Armijo: th(2.154434690031884E-15)=3.2977108166928533; dx=-3.083947723756021E22 evalInputDelta=1.7763568394002505E-15
Armijo: th(1.077217345015942E-15)=3.2977108166928537; dx=-3.083959086309367E22 evalInputDelta=1.3322676295501878E-15
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=3.2977108166928533
Fitness changed from 3.297710816692855 to 3.2977108166928533
Iteration 9 complete. Error: 3.2977108166928533 Total: 0.0166; Orientation: 0.0011; Line Search: 0.0132
th(0)=3.2977108166928533;dx=-3.0839251461179397E22
New Minimum: 3.2977108166928533 > 3.29771081669285
Armijo: th(2.154434690031884E-15)=3.29771081669285; dx=-3.0839027159473815E22 evalInputDelta=3.1086244689504383E-15
Armijo: th(1.077217345015942E-15)=3.2977108166928515; dx=-3.08391393103266E22 evalInputDelta=1.7763568394002505E-15
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=3.29771081669285
Fitness changed from 3.2977108166928533 to 3.29771081669285
Iteration 10 complete. Error: 3.29771081669285 Total: 0.0167; Orientation: 0.0011; Line Search: 0.0133
th(0)=3.29771081669285;dx=-3.0838804332432683E22
New Minimum: 3.29771081669285 > 3.297710816692848
Armijo: th(2.154434690031884E-15)=3.297710816692848; dx=-3.083858298004526E22 evalInputDelta=2.220446049250313E-15
Armijo: th(1.077217345015942E-15)=3.297710816692849; dx=-3.0838693656238968E22 evalInputDelta=1.3322676295501878E-15
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884

...skipping 131652 bytes...

70535449364 > 1.237847053386266
Armijo: th(2.154434690031884E-15)=1.237847053386266; dx=-2.1384929958294397E19 evalInputDelta=1.5867041014416827E-10
Armijo: th(1.077217345015942E-15)=1.2378470534656014; dx=-2.1385031792587055E19 evalInputDelta=7.933498302747921E-11
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=1.237847053386266
Fitness changed from 1.2378470535449364 to 1.237847053386266
Iteration 237 complete. Error: 1.237847053386266 Total: 0.0085; Orientation: 0.0005; Line Search: 0.0070
th(0)=1.237847053386266;dx=-2.1384726292048216E19
New Minimum: 1.237847053386266 > 1.2378470532275958
Armijo: th(2.154434690031884E-15)=1.2378470532275958; dx=-2.138452262814116E19 evalInputDelta=1.5867018809956335E-10
Armijo: th(1.077217345015942E-15)=1.237847053306931; dx=-2.138462446009469E19 evalInputDelta=7.933498302747921E-11
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=1.2378470532275958
Fitness changed from 1.237847053386266 to 1.2378470532275958
Iteration 238 complete. Error: 1.2378470532275958 Total: 0.0084; Orientation: 0.0005; Line Search: 0.0068
th(0)=1.2378470532275958;dx=-2.1384318966573195E19
New Minimum: 1.2378470532275958 > 1.2378470530689256
Armijo: th(2.154434690031884E-15)=1.2378470530689256; dx=-2.1384115307344294E19 evalInputDelta=1.5867018809956335E-10
Armijo: th(1.077217345015942E-15)=1.2378470531482608; dx=-2.1384217136958743E19 evalInputDelta=7.933498302747921E-11
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=1.2378470530689256
Fitness changed from 1.2378470532275958 to 1.2378470530689256
Iteration 239 complete. Error: 1.2378470530689256 Total: 0.0062; Orientation: 0.0004; Line Search: 0.0048
th(0)=1.2378470530689256;dx=-2.138391165045443E19
New Minimum: 1.2378470530689256 > 1.2378470529102552
Armijo: th(2.154434690031884E-15)=1.2378470529102552; dx=-2.1383707995903586E19 evalInputDelta=1.5867041014416827E-10
Armijo: th(1.077217345015942E-15)=1.2378470529895904; dx=-2.1383809823179006E19 evalInputDelta=7.933520507208414E-11
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=1.2378470529102552
Fitness changed from 1.2378470530689256 to 1.2378470529102552
Iteration 240 complete. Error: 1.2378470529102552 Total: 0.0072; Orientation: 0.0003; Line Search: 0.0061
th(0)=1.2378470529102552;dx=-2.138350434369173E19
New Minimum: 1.2378470529102552 > 1.2378470527515848
Armijo: th(2.154434690031884E-15)=1.2378470527515848; dx=-2.1383300693818843E19 evalInputDelta=1.5867041014416827E-10
Armijo: th(1.077217345015942E-15)=1.23784705283092; dx=-2.1383402518755287E19 evalInputDelta=7.933520507208414E-11
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=1.2378470527515848
Fitness changed from 1.2378470529102552 to 1.2378470527515848
Iteration 241 complete. Error: 1.2378470527515848 Total: 0.0083; Orientation: 0.0004; Line Search: 0.0068
th(0)=1.2378470527515848;dx=-2.1383097046284894E19
New Minimum: 1.2378470527515848 > 1.2378470525929146
Armijo: th(2.154434690031884E-15)=1.2378470525929146; dx=-2.138289340108986E19 evalInputDelta=1.5867018809956335E-10
Armijo: th(1.077217345015942E-15)=1.2378470526722498; dx=-2.1382995223687377E19 evalInputDelta=7.933498302747921E-11
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=1.2378470525929146
Fitness changed from 1.2378470527515848 to 1.2378470525929146
Iteration 242 complete. Error: 1.2378470525929146 Total: 0.0094; Orientation: 0.0004; Line Search: 0.0075
th(0)=1.2378470525929146;dx=-2.138268975823371E19
New Minimum: 1.2378470525929146 > 1.2378470524342444
Armijo: th(2.154434690031884E-15)=1.2378470524342444; dx=-2.1382486117716427E19 evalInputDelta=1.5867018809956335E-10
Armijo: th(1.077217345015942E-15)=1.2378470525135794; dx=-2.138258793797507E19 evalInputDelta=7.933520507208414E-11
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=1.2378470524342444
Fitness changed from 1.2378470525929146 to 1.2378470524342444
Iteration 243 complete. Error: 1.2378470524342444 Total: 0.0082; Orientation: 0.0005; Line Search: 0.0068
th(0)=1.2378470524342444;dx=-2.1382282479537983E19
New Minimum: 1.2378470524342444 > 1.237847052275574
Armijo: th(2.154434690031884E-15)=1.237847052275574; dx=-2.1382078843698356E19 evalInputDelta=1.5867041014416827E-10
Armijo: th(1.077217345015942E-15)=1.237847052354909; dx=-2.138218066161817E19 evalInputDelta=7.933542711668906E-11
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=1.237847052275574
Fitness changed from 1.2378470524342444 to 1.237847052275574
Iteration 244 complete. Error: 1.237847052275574 Total: 0.0089; Orientation: 0.0004; Line Search: 0.0074
th(0)=1.237847052275574;dx=-2.138187521019752E19
New Minimum: 1.237847052275574 > 1.2378470521169036
Armijo: th(2.154434690031884E-15)=1.2378470521169036; dx=-2.138167157903544E19 evalInputDelta=1.5867041014416827E-10
Armijo: th(1.077217345015942E-15)=1.2378470521962388; dx=-2.1381773394616484E19 evalInputDelta=7.933520507208414E-11
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=1.2378470521169036
Fitness changed from 1.237847052275574 to 1.2378470521169036
Iteration 245 complete. Error: 1.2378470521169036 Total: 0.0075; Orientation: 0.0005; Line Search: 0.0060
th(0)=1.2378470521169036;dx=-2.1381467950212096E19
New Minimum: 1.2378470521169036 > 1.2378470519582332
Armijo: th(2.154434690031884E-15)=1.2378470519582332; dx=-2.138126432372747E19 evalInputDelta=1.5867041014416827E-10
Armijo: th(1.077217345015942E-15)=1.2378470520375686; dx=-2.1381366136969785E19 evalInputDelta=7.933498302747921E-11
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=1.2378470519582332
Fitness changed from 1.2378470521169036 to 1.2378470519582332
Iteration 246 complete. Error: 1.2378470519582332 Total: 0.0061; Orientation: 0.0004; Line Search: 0.0049
th(0)=1.2378470519582332;dx=-2.138106069958153E19
New Minimum: 1.2378470519582332 > 1.237847051799563
Armijo: th(2.154434690031884E-15)=1.237847051799563; dx=-2.138085707777425E19 evalInputDelta=1.5867018809956335E-10
Armijo: th(1.077217345015942E-15)=1.2378470518788982; dx=-2.138095888867789E19 evalInputDelta=7.933498302747921E-11
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=1.237847051799563
Fitness changed from 1.2378470519582332 to 1.237847051799563
Iteration 247 complete. Error: 1.237847051799563 Total: 0.0060; Orientation: 0.0003; Line Search: 0.0048
th(0)=1.237847051799563;dx=-2.1380653458305606E19
New Minimum: 1.237847051799563 > 1.2378470516408926
Armijo: th(2.154434690031884E-15)=1.2378470516408926; dx=-2.1380449841175577E19 evalInputDelta=1.5867041014416827E-10
Armijo: th(1.077217345015942E-15)=1.237847051720228; dx=-2.1380551649740595E19 evalInputDelta=7.933498302747921E-11
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=1.2378470516408926
Fitness changed from 1.237847051799563 to 1.2378470516408926
Iteration 248 complete. Error: 1.2378470516408926 Total: 0.0059; Orientation: 0.0004; Line Search: 0.0047
th(0)=1.2378470516408926;dx=-2.1380246226384134E19
New Minimum: 1.2378470516408926 > 1.2378470514822224
Armijo: th(2.154434690031884E-15)=1.2378470514822224; dx=-2.138004261393125E19 evalInputDelta=1.5867018809956335E-10
Armijo: th(1.077217345015942E-15)=1.2378470515615576; dx=-2.138014442015769E19 evalInputDelta=7.933498302747921E-11
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=1.2378470514822224
Fitness changed from 1.2378470516408926 to 1.2378470514822224
Iteration 249 complete. Error: 1.2378470514822224 Total: 0.0060; Orientation: 0.0004; Line Search: 0.0047
th(0)=1.2378470514822224;dx=-2.13798390038169E19
New Minimum: 1.2378470514822224 > 1.237847051323552
Armijo: th(2.154434690031884E-15)=1.237847051323552; dx=-2.137963539604106E19 evalInputDelta=1.5867041014416827E-10
Armijo: th(1.077217345015942E-15)=1.2378470514028872; dx=-2.137973719992898E19 evalInputDelta=7.933520507208414E-11
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=1.237847051323552
Fitness changed from 1.2378470514822224 to 1.237847051323552
Iteration 250 complete. Error: 1.237847051323552 Total: 0.0057; Orientation: 0.0004; Line Search: 0.0046
Final threshold in iteration 251: 1.237847051323552 (> 0.0) after 2.486s (< 30.000s)

Returns

    1.237847051323552

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

    [ -3.7414034574921443E-4, 0.10368285087260043, -0.9271330042938799 ]

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

    [ 6.466987841292329E-4, -0.03292626020134684, 0.7322625313646965 ]

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.07 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: 4099357784964
Reset training subject: 4099359369349
Constructing line search parameters: GD
F(0.0) = LineSearchPoint{point=PointSample{avg=4.011522110355427}, derivative=-8.912871248174551E21}
New Minimum: 4.011522110355427 > 3.2764302621112167
F(1.0E-10) = LineSearchPoint{point=PointSample{avg=3.2764302621112167}, derivative=5.07465218163614E22}, evalInputDelta = -0.7350918482442106
3.2764302621112167 <= 4.011522110355427
Converged to right
Fitness changed from 4.011522110355427 to 3.2764302621112167
Iteration 1 complete. Error: 3.2764302621112167 Total: 0.0108; Orientation: 0.0007; Line Search: 0.0061
F(0.0) = LineSearchPoint{point=PointSample{avg=3.2764302621112167}, derivative=-7.376713377333204E23}
New Minimum: 3.2764302621112167 > 3.2220443187938512
F(1.0E-10) = LineSearchPoint{point=PointSample{avg=3.2220443187938512}, derivative=3.706984025343395E24}, evalInputDelta = -0.05438594331736546
3.2220443187938512 <= 3.2764302621112167
Converged to right
Fitness changed from 3.2764302621112167 to 3.2220443187938512
Iteration 2 complete. Error: 3.2220443187938512 Total: 0.0042; Orientation: 0.0004; Line Search: 0.0028
F(0.0) = LineSearchPoint{point=PointSample{avg=3.2220443187938512}, derivative=-6.78954092020147E25}
New Minimum: 3.2220443187938512 > 3.0967673949939636
F(1.0E-10) = LineSearchPoint{point=PointSample{avg=3.0967673949939636}, derivative=2.4266256537266874E26}, evalInputDelta = -0.12527692379988764
3.0967673949939636 <= 3.2220443187938512
Converged to right
Fitness changed from 3.2220443187938512 to 3.0967673949939636
Iteration 3 complete. Error: 3.0967673949939636 Total: 0.0042; Orientation: 0.0004; Line Search: 0.0029
F(0.0) = LineSearchPoint{point=PointSample{avg=3.0967673949939636}, derivative=-6.446246740944566E27}
New Minimum: 3.0967673949939636 > 3.096767394878738
F(1.0E-10) = LineSearchPoint{point=PointSample{avg=3.096767394878738}, derivative=1.1881391493895594E28}, evalInputDelta = -1.152256068337465E-10
3.096767394878738 <= 3.0967673949939636
Converged to right
Fitness changed from 3.0967673949939636 to 3.096767394878738
Iteration 4 complete. Error: 3.096767394878738 Total: 0.0042; Orientation: 0.0004; Line Search: 0.0030
F(0.0) = LineSearchPoint{point=PointSample{avg=3.096767394878738}, derivative=-6.343468642107002E29}
New Minimum: 3.096767394878738 > 0.2912741367010601
F(1.0E-10) = LineSearchPoint{point=PointSample{avg=0.2912741367010601}, derivative=-5.5699767980935744E16}, evalInputDelta = -2.8054932581776777
F(7.000000000000001E-10) = LineSearchPoint{point=PointSample{avg=3.096767394072158}, derivative=3.416182809397651E30}, evalInputDelta = -8.065801360146452E-10
3.096767394072158 <= 3.096767394878738
New Minimum: 0.2912741367010601 > 0.2912741366899687
F(1.0962586148688091E-10) = LineSearchPoint{point=PointSample{avg=0.2912741366899687}, derivative=-128.01671382566835}, evalInputDelta = -2.8054932581887693
Left bracket at 1.0962586148688091E-10
F(4.0481293074344046E-10) = LineSearchPoint{point=PointSample{avg=3.0967673944122893}, derivative=1.7080914046988253E30}, evalInputDelta = -4.664486574768034E-10
3.0967673944122893 > 3.096767394072158
Fitness changed from 3.096767394878738 to 0.2912741366899687
Iteration 5 complete. Error: 0.2912741366899687 Total: 0.0104; Orientation: 0.0004; Line Search: 0.0091
F(0.0) = LineSearchPoint{point=PointSample{avg=0.2912741366899687}, derivative=-7.795748859006625E7}
New Minimum: 0.2912741366899687 > 0.29127413588338885
F(7.000000000000001E-10) = LineSearchPoint{point=PointSample{avg=0.29127413588338885}, derivative=-7.795748859056403E7}, evalInputDelta = -8.06579858458889E-10
New Minimum: 0.29127413588338885 > 0.2912741310439103
F(4.900000000000001E-9) = LineSearchPoint{point=PointSample{avg=0.2912741310439103}, derivative=-7.795748859355065E7}, evalInputDelta = -5.64605839858956E-9
New Minimum: 0.2912741310439103 > 0.29127409716757097
F(3.430000000000001E-8) = LineSearchPoint{point=PointSample{avg=0.29127409716757097}, derivative=-7.795748861445703E7}, evalInputDelta = -3.952239774340782E-8
New Minimum: 0.29127409716757097 > 0.2912738600337298
F(2.4010000000000004E-7) = LineSearchPoint{point=PointSample{avg=0.2912738600337298}, derivative=-7.795748876080163E7}, evalInputDelta = -2.766562389178162E-7
New Minimum: 0.2912738600337298 > 0.291272200123013
F(1.6807000000000003E-6) = LineSearchPoint{point=PointSample{avg=0.291272200123013}, derivative=-7.795748978521383E7}, evalInputDelta = -1.936566955684782E-6
New Minimum: 0.291272200123013 > 0.2912605820301878
F(1.1764900000000001E-5) = LineSearchPoint{point=PointSample{avg=0.2912605820301878}, derivative=-7.795749695609936E7}, evalInputDelta = -1.3554659780923295E-5
New Minimum: 0.2912605820301878 > 0.2911793181402749
F(8.235430000000001E-5) = LineSearchPoint{point=PointSample{avg=0.2911793181402749}, derivative=-7.795754715230057E7}, evalInputDelta = -9.4818549693787E-5
New Minimum: 0.2911793181402749 > 0.29061352316529904
F(5.764801000000001E-4) = LineSearchPoint{point=PointSample{avg=0.29061352316529904}, derivative=-7.79578985258284E7}, evalInputDelta = -6.606135246696732E-4
New Minimum: 0.29061352316529904 > 0.28679507814108957
F(0.004035360700000001) = LineSearchPoint{point=PointSample{avg=0.28679507814108957}, derivative=-7.79603581459513E7}, evalInputDelta = -0.0044790585488791446
New Minimum: 0.28679507814108957 > 0.26521456956988265
F(0.028247524900000005) = LineSearchPoint{point=PointSample{avg=0.26521456956988265}, derivative=-7.797757565801431E7}, evalInputDelta = -0.026059567120086058
New Minimum: 0.26521456956988265 > 0.19491470325086985
F(0.19773267430000002) = LineSearchPoint{point=PointSample{avg=0.19491470325086985}, derivative=-7.809809997696911E7}, evalInputDelta = -0.09635943343909886
New Minimum: 0.19491470325086985 > 0.06840852826407678
F(1.3841287201) = LineSearchPoint{point=PointSample{avg=0.06840852826407678}, derivative=-7.894177346693437E7}, evalInputDelta = -0.22286560842589193
New Minimum: 0.06840852826407678 > 0.026848478367499325
F(9.688901040700001) = LineSearchPoint{point=PointSample{avg=0.026848478367499325}, derivative=-8.484748938497947E7}, evalInputDelta = -0.2644256583224694
New Minimum: 0.026848478367499325 > 0.0
F(67.8223072849) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-1.2618750085880737E8}, evalInputDelta = -0.2912741366899687
F(474.7561509943) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-4.155675811856379E8}, evalInputDelta = -0.2912741366899687
F(3323.2930569601003) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-2.441228143473452E9}, evalInputDelta = -0.2912741366899687
F(23263.0513987207) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-1.662085207948815E10}, evalInputDelta = -0.2912741366899687
F(162841.3597910449) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-1.1587821963159102E11}, evalInputDelta = -0.2912741366899687
F(1139889.5185373144) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-8.106797924963112E11}, evalInputDelta = -0.2912741366899687
F(7979226.6297612) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-5.674290802549353E12}, evalInputDelta = -0.2912741366899687
F(5.58545864083284E7) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-3.971956787292064E13}, evalInputDelta = -0.2912741366899687
F(3.909821048582988E8) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-2.7803650736551966E14}, evalInputDelta = -0.2912741366899687
F(2.7368747340080914E9) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-1.9462550838137125E15}, evalInputDelta = -0.2912741366899687
F(1.915812313805664E10) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-1.3623785118951064E16}, evalInputDelta = -0.2912741366899687
0.0 <= 0.2912741366899687
F(1.0E10) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-7.111231665111564E15}, evalInputDelta = -0.2912741366899687
Right bracket at 1.0E10
Converged to right
Fitness changed from 0.2912741366899687 to 0.0
Iteration 6 complete. Error: 0.0 Total: 0.0337; Orientation: 0.0004; Line Search: 0.0325
F(0.0) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-3.871231042741087E9}
F(1.0E10) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-1.43447895444439194E18}, evalInputDelta = 0.0
0.0 <= 0.0
Converged to right
Fitness changed from 0.0 to 0.0
Static Iteration Total: 0.0032; Orientation: 0.0003; Line Search: 0.0022
Iteration 7 failed. Error: 0.0
Previous Error: 0.0 -> 0.0
Optimization terminated 7
Final threshold in iteration 7: 0.0 (> 0.0) after 0.071s (< 30.000s)

Returns

    0.0

Training Converged

Limited-Memory BFGS

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

TrainingTester.java:509 executed in 9.14 seconds (0.763 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: 4099434157207
Reset training subject: 4099435108856
Adding measurement 53748911 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD
Non-optimal measurement 4.011522110355427 < 4.011522110355427. Total: 1
th(0)=4.011522110355427;dx=-8.91287124817455E21
Adding measurement 1f0934a to history. Total: 1
New Minimum: 4.011522110355427 > 3.787343580008534
Armijo: th(2.154434690031884)=3.787343580008534; dx=1.2805541675753276E33 evalInputDelta=0.22417853034689328
Non-optimal measurement 3.810881969326071 < 3.787343580008534. Total: 2
Armijo: th(1.077217345015942)=3.810881969326071; dx=6.402770837832073E32 evalInputDelta=0.20064014102935612
Non-optimal measurement 3.8834468253658843 < 3.787343580008534. Total: 2
Armijo: th(0.3590724483386473)=3.8834468253658843; dx=2.1342569458846057E32 evalInputDelta=0.12807528498954301
Non-optimal measurement 3.95112613749225 < 3.787343580008534. Total: 2
Armijo: th(0.08976811208466183)=3.95112613749225; dx=5.335642364043048E31 evalInputDelta=0.06039597286317733
Non-optimal measurement 3.9937947822459363 < 3.787343580008534. Total: 2
Armijo: th(0.017953622416932366)=3.9937947822459363; dx=1.06712847209558E31 evalInputDelta=0.01772732810949096
Non-optimal measurement 4.008180536645851 < 3.787343580008534. Total: 2
Armijo: th(0.002992270402822061)=4.008180536645851; dx=1.7785474460652405E30 evalInputDelta=0.0033415737095765508
Non-optimal measurement 4.011033164832936 < 3.787343580008534. Total: 2
Armijo: th(4.2746720040315154E-4)=4.011033164832936; dx=2.540781989411447E29 evalInputDelta=4.889455224912354E-4
Non-optimal measurement 4.011460773027974 < 3.787343580008534. Total: 2
Armijo: th(5.343340005039394E-5)=4.011460773027974; dx=3.1759767068880745E28 evalInputDelta=6.133732745361442E-5
Non-optimal measurement 4.011515291987863 < 3.787343580008534. Total: 2
Armijo: th(5.9370444500437714E-6)=4.011515291987863; dx=3.528855085101196E27 evalInputDelta=6.818367563887762E-6
Non-optimal measurement 4.01152142848367 < 3.787343580008534. Total: 2
Armijo: th(5.937044450043771E-7)=4.01152142848367; dx=3.5287748692599615E26 evalInputDelta=6.818717572798505E-7
Non-optimal measurement 4.011522048366764 < 3.787343580008534. Total: 2
Armijo: th(5.397313136403428E-8)=4.011522048366764; dx=3.2071668928501313E25 evalInputDelta=6.198866309148343E-8
Non-optimal measurement 4.0115221051897025 < 3.787343580008534. Total: 2
Armijo: th(4.4977609470028565E-9)=4.0115221051897025; dx=2.6644689453976154E24 evalInputDelta=5.165724736855282E-9
Non-optimal measurement 3.9548503198179596 < 3.787343580008534. Total: 2
Armijo: th(3.4598161130791205E-10)=3.9548503198179596; dx=1.9673431052090837E23 evalInputDelta=0.056671790537467626
Adding measurement dfe4cb4 to history. Total: 2
New Minimum: 3.787343580008534 > 3.297710816692873
Armijo: th(2.4712972236279432E-11)=3.297710816692873; dx=6.331911305709195E21 evalInputDelta=0.7138112936625545
Non-optimal measurement 4.011522110353535 < 3.297710816692873. Total: 3
Armijo: th(1.6475314824186289E-12)=4.011522110353535; dx=-7.933610509476459E21 evalInputDelta=1.892708212380967E-12
Non-optimal measurement 4.011522110355308 < 3.297710816692873. Total: 3
Armijo: th(1.029707176511643E-13)=4.011522110355308; dx=-8.851667452005921E21 evalInputDelta=1.1901590823981678E-13
Non-optimal measurement 4.01152211035542 < 3.297710816692873. Total: 3
Armijo: th(6.057101038303783E-15)=4.01152211035542; dx=-8.909271024870513E21 evalInputDelta=7.105427357601002E-15
Non-optimal measurement 3.297710816692873 < 3.297710816692873. Total: 3
MIN ALPHA (3.3650561323909904E-16): th(2.4712972236279432E-11)=3.297710816692873
Fitness changed from 4.011522110355427 to 3.297710816692873
Iteration 1 complete. Error: 3.297710816692873 Total: 0.0580; Orientation: 0.0027; Line Search: 0.0530
Non-optimal measurement 3.297710816692873 < 3.297710816692873. Total: 3
LBFGS Accumulation History: 3 points
Non-optimal measurement 3.297710816692873 < 3.297710816692873. Total: 3
th(0)=3.297710816692873;dx=-3.0843040851856716E22
Adding measurement 3a4085c2 to history. Total: 3
New Minimum: 3.297710816692873 > 3.29771081669287
Armijo: th(2.154434690031884E-15)=3.29771081669287; dx=-3.0842792954004083E22 evalInputDelta=2.6645352591003757E-15
Non-optimal measurement 3.2977108166928715 < 3.29771081669287. Total: 4
Armijo: th(1.077217345015942E-15)=3.2977108166928715; dx=-3.0842916902930406E22 evalInputDelta=1.3322676295501878E-15
Non-optimal measurement 3.29771081669287 < 3.29771081669287. Total: 4
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=3.29771081669287
Fitness changed from 3.297710816692873 to 3.29771081669287
Iteration 2 complete. Error: 3.29771081669287 Total: 0.0072; Orientation: 0.0008; Line Search: 0.0057
Non-optimal measurement 3.29771081669287 < 3.29771081669287. Total: 4
Rejected: LBFGS Orientation magnitude: 6.330e+02, gradient 1.756e+11, dot -0.359; [4bf557c1-03bc-4000-baef-a5a73dd5a0c3 = 1.000/1.000e+00, ed3e7404-6ad2-4409-bce6-0f6867636f62 = 1.000/1.000e+00, b7dcca4e-4e8a-4325-824d-28d3f8b44570 = 1.000/1.000e+00, 56c0ae7f-7817-4a06-b2b1-4477efd39952 = 1.000/1.000e+00, e67db731-740c-4982-994a-8cf3bcc0467a = 1.000/1.000e+00, f04a90c0-ba09-48e4-a236-695fafba94f8 = 1.000/1.000e+00, 280a736f-35fd-4c66-aba7-bc6a7c69700e = 1.000/1.000e+00, 2f53d455-ed61-401d-9b7d-070a742cdbd7 = 1.000/1.000e+00, fac3f59f-ed95-4fc4-b131-f71b9af1ebe5 = 1.000/1.000e+00, ee9fb945-d1c5-4921-a2d6-569e276de538 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 3.29771081669287, 3.297710816692873, 3.787343580008534, 4.011522110355427
LBFGS Accumulation History: 3 points
Removed measurement 3a4085c2 to history. Total: 3
Adding measurement 63bfbbe4 to history. Total: 3
th(0)=3.29771081669287;dx=-3.0842546530997074E22
Adding measurement 1b3a38b9 to history. Total: 4
New Minimum: 3.29771081669287 > 3.297710816692868
Armijo: th(2.154434690031884E-15)=3.297710816692868; dx=-3.0842301582823827E22 evalInputDelta=2.220446049250313E-15
Non-optimal measurement 3.297710816692869 < 3.297710816692868. Total: 5
Armijo: th(1.077217345015942E-15)=3.297710816692869; dx=-3.084242405691045E22 evalInputDelta=1.3322676295501878E-15
Non-optimal measurement 3.297710816692868 < 3.297710816692868. Total: 5
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=3.297710816692868
Fitness changed from 3.29771081669287 to 3.297710816692868
Iteration 3 complete. Error: 3.297710816692868 Total: 0.0254; Orientation: 0.0186; Line Search: 0.0060
Non-optimal measurement 3.297710816692868 < 3.297710816692868. Total: 5
Rejected: LBFGS Orientation magnitude: 6.406e+02, gradient 1.756e+11, dot -0.359; [e67db731-740c-4982-994a-8cf3bcc0467a = 1.000/1.000e+00, ed3e7404-6ad2-4409-bce6-0f6867636f62 = 1.000/1.000e+00, 4bf557c1-03bc-4000-baef-a5a73dd5a0c3 = 1.000/1.000e+00, 280a736f-35fd-4c66-aba7-bc6a7c69700e = 1.000/1.000e+00, 56c0ae7f-7817-4a06-b2b1-4477efd39952 = 1.000/1.000e+00, fac3f59f-ed95-4fc4-b131-f71b9af1ebe5 = 1.000/1.000e+00, ee9fb945-d1c5-4921-a2d6-569e276de538 = 1.000/1.000e+00, f04a90c0-ba09-48e4-a236-695fafba94f8 = 1.000/1.000e+00, 2f53d455-ed61-401d-9b7d-070a742cdbd7 = 1.000/1.000e+00, b7dcca4e-4e8a-4325-824d-28d3f8b44570 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 3.297710816692868, 3.29771081669287, 3.297710816692873, 3.787343580008534, 4.011522110355427
Rejected: LBFGS Orientation magnitude: 6.406e+02, gradient 1.756e+11, dot -0.359; [fac3f59f-ed95-4fc4-b131-f71b9af1ebe5 = 1.000/1.000e+00, f04a90c0-ba09-48e4-a236-695fafba94f8 = 1.000/1.000e+00, 2f53d455-ed61-401d-9b7d-070a742cdbd7 = 1.000/1.000e+00, ee9fb945-d1c5-4921-a2d6-569e276de538 = 1.000/1.000e+00, ed3e7404-6ad2-4409-bce6-0f6867636f62 = 1.000/1.000e+00, 280a736f-35fd-4c66-aba7-bc6a7c69700e = 1.000/1.000e+00, b7dcca4e-4e8a-4325-824d-28d3f8b44570 = 1.000/1.000e+00, e67db731-740c-4982-994a-8cf3bcc0467a = 1.000/1.000e+00, 56c0ae7f-7817-4a06-b2b1-4477efd39952 = 1.000/1.000e+00, 4bf557c1-03bc-4000-baef-a5a73dd5a0c3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 3.297710816692868, 3.29771081669287, 3.297710816692873, 3.787343580008534
LBFGS Accumulation History: 3 points
Removed me

...skipping 621137 bytes...

surement 1.237847051799563 < 1.237847051799563. Total: 5
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=1.237847051799563
Fitness changed from 1.2378470519582332 to 1.237847051799563
Iteration 247 complete. Error: 1.237847051799563 Total: 0.0295; Orientation: 0.0244; Line Search: 0.0045
Non-optimal measurement 1.237847051799563 < 1.237847051799563. Total: 5
Rejected: LBFGS Orientation magnitude: 1.286e+00, gradient 4.624e+09, dot -0.952; [2f53d455-ed61-401d-9b7d-070a742cdbd7 = 1.000/1.000e+00, fac3f59f-ed95-4fc4-b131-f71b9af1ebe5 = 1.000/1.000e+00, f04a90c0-ba09-48e4-a236-695fafba94f8 = 1.000/1.000e+00, b7dcca4e-4e8a-4325-824d-28d3f8b44570 = 1.000/1.000e+00, 4bf557c1-03bc-4000-baef-a5a73dd5a0c3 = 1.000/1.000e+00, e67db731-740c-4982-994a-8cf3bcc0467a = 1.000/1.000e+00, ee9fb945-d1c5-4921-a2d6-569e276de538 = 1.000/1.000e+00, 56c0ae7f-7817-4a06-b2b1-4477efd39952 = 1.000/1.000e+00, ed3e7404-6ad2-4409-bce6-0f6867636f62 = 1.000/1.000e+00, 280a736f-35fd-4c66-aba7-bc6a7c69700e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.237847051799563, 1.2378470519582332, 1.2378470589397277, 1.2378470590983979, 1.2378470592570683
Rejected: LBFGS Orientation magnitude: 1.286e+00, gradient 4.624e+09, dot -0.952; [ed3e7404-6ad2-4409-bce6-0f6867636f62 = 1.000/1.000e+00, 4bf557c1-03bc-4000-baef-a5a73dd5a0c3 = 1.000/1.000e+00, b7dcca4e-4e8a-4325-824d-28d3f8b44570 = 1.000/1.000e+00, fac3f59f-ed95-4fc4-b131-f71b9af1ebe5 = 1.000/1.000e+00, 280a736f-35fd-4c66-aba7-bc6a7c69700e = 1.000/1.000e+00, 56c0ae7f-7817-4a06-b2b1-4477efd39952 = 1.000/1.000e+00, e67db731-740c-4982-994a-8cf3bcc0467a = 1.000/1.000e+00, f04a90c0-ba09-48e4-a236-695fafba94f8 = 1.000/1.000e+00, ee9fb945-d1c5-4921-a2d6-569e276de538 = 1.000/1.000e+00, 2f53d455-ed61-401d-9b7d-070a742cdbd7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.237847051799563, 1.2378470519582332, 1.2378470589397277, 1.2378470590983979
LBFGS Accumulation History: 3 points
Removed measurement 1f872576 to history. Total: 4
Removed measurement 59d885ae to history. Total: 3
Adding measurement ae9969a to history. Total: 3
th(0)=1.237847051799563;dx=-2.1380653458305606E19
Adding measurement 4060871b to history. Total: 4
New Minimum: 1.237847051799563 > 1.2378470516408926
Armijo: th(2.154434690031884E-15)=1.2378470516408926; dx=-2.1380449841175577E19 evalInputDelta=1.5867041014416827E-10
Non-optimal measurement 1.237847051720228 < 1.2378470516408926. Total: 5
Armijo: th(1.077217345015942E-15)=1.237847051720228; dx=-2.1380551649740595E19 evalInputDelta=7.933498302747921E-11
Non-optimal measurement 1.2378470516408926 < 1.2378470516408926. Total: 5
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=1.2378470516408926
Fitness changed from 1.237847051799563 to 1.2378470516408926
Iteration 248 complete. Error: 1.2378470516408926 Total: 0.0297; Orientation: 0.0243; Line Search: 0.0047
Non-optimal measurement 1.2378470516408926 < 1.2378470516408926. Total: 5
Rejected: LBFGS Orientation magnitude: 1.286e+00, gradient 4.624e+09, dot -0.952; [280a736f-35fd-4c66-aba7-bc6a7c69700e = 1.000/1.000e+00, 2f53d455-ed61-401d-9b7d-070a742cdbd7 = 1.000/1.000e+00, b7dcca4e-4e8a-4325-824d-28d3f8b44570 = 1.000/1.000e+00, 56c0ae7f-7817-4a06-b2b1-4477efd39952 = 1.000/1.000e+00, 4bf557c1-03bc-4000-baef-a5a73dd5a0c3 = 1.000/1.000e+00, ee9fb945-d1c5-4921-a2d6-569e276de538 = 1.000/1.000e+00, ed3e7404-6ad2-4409-bce6-0f6867636f62 = 1.000/1.000e+00, fac3f59f-ed95-4fc4-b131-f71b9af1ebe5 = 1.000/1.000e+00, f04a90c0-ba09-48e4-a236-695fafba94f8 = 1.000/1.000e+00, e67db731-740c-4982-994a-8cf3bcc0467a = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.2378470516408926, 1.237847051799563, 1.2378470589397277, 1.2378470590983979, 1.2378470592570683
Rejected: LBFGS Orientation magnitude: 1.286e+00, gradient 4.624e+09, dot -0.952; [e67db731-740c-4982-994a-8cf3bcc0467a = 1.000/1.000e+00, b7dcca4e-4e8a-4325-824d-28d3f8b44570 = 1.000/1.000e+00, f04a90c0-ba09-48e4-a236-695fafba94f8 = 1.000/1.000e+00, ee9fb945-d1c5-4921-a2d6-569e276de538 = 1.000/1.000e+00, ed3e7404-6ad2-4409-bce6-0f6867636f62 = 1.000/1.000e+00, 2f53d455-ed61-401d-9b7d-070a742cdbd7 = 1.000/1.000e+00, fac3f59f-ed95-4fc4-b131-f71b9af1ebe5 = 1.000/1.000e+00, 280a736f-35fd-4c66-aba7-bc6a7c69700e = 1.000/1.000e+00, 56c0ae7f-7817-4a06-b2b1-4477efd39952 = 1.000/1.000e+00, 4bf557c1-03bc-4000-baef-a5a73dd5a0c3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.2378470516408926, 1.237847051799563, 1.2378470589397277, 1.2378470590983979
LBFGS Accumulation History: 3 points
Removed measurement 4060871b to history. Total: 4
Removed measurement ae9969a to history. Total: 3
Adding measurement 401a3f98 to history. Total: 3
th(0)=1.2378470516408926;dx=-2.1380246226384134E19
Adding measurement cd95443 to history. Total: 4
New Minimum: 1.2378470516408926 > 1.2378470514822224
Armijo: th(2.154434690031884E-15)=1.2378470514822224; dx=-2.138004261393125E19 evalInputDelta=1.5867018809956335E-10
Non-optimal measurement 1.2378470515615576 < 1.2378470514822224. Total: 5
Armijo: th(1.077217345015942E-15)=1.2378470515615576; dx=-2.138014442015769E19 evalInputDelta=7.933498302747921E-11
Non-optimal measurement 1.2378470514822224 < 1.2378470514822224. Total: 5
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=1.2378470514822224
Fitness changed from 1.2378470516408926 to 1.2378470514822224
Iteration 249 complete. Error: 1.2378470514822224 Total: 0.0291; Orientation: 0.0239; Line Search: 0.0046
Non-optimal measurement 1.2378470514822224 < 1.2378470514822224. Total: 5
Rejected: LBFGS Orientation magnitude: 1.286e+00, gradient 4.624e+09, dot -0.952; [ee9fb945-d1c5-4921-a2d6-569e276de538 = 1.000/1.000e+00, b7dcca4e-4e8a-4325-824d-28d3f8b44570 = 1.000/1.000e+00, e67db731-740c-4982-994a-8cf3bcc0467a = 1.000/1.000e+00, f04a90c0-ba09-48e4-a236-695fafba94f8 = 1.000/1.000e+00, 56c0ae7f-7817-4a06-b2b1-4477efd39952 = 1.000/1.000e+00, ed3e7404-6ad2-4409-bce6-0f6867636f62 = 1.000/1.000e+00, 2f53d455-ed61-401d-9b7d-070a742cdbd7 = 1.000/1.000e+00, 4bf557c1-03bc-4000-baef-a5a73dd5a0c3 = 1.000/1.000e+00, fac3f59f-ed95-4fc4-b131-f71b9af1ebe5 = 1.000/1.000e+00, 280a736f-35fd-4c66-aba7-bc6a7c69700e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.2378470514822224, 1.2378470516408926, 1.2378470589397277, 1.2378470590983979, 1.2378470592570683
Rejected: LBFGS Orientation magnitude: 1.286e+00, gradient 4.624e+09, dot -0.952; [fac3f59f-ed95-4fc4-b131-f71b9af1ebe5 = 1.000/1.000e+00, 2f53d455-ed61-401d-9b7d-070a742cdbd7 = 1.000/1.000e+00, 280a736f-35fd-4c66-aba7-bc6a7c69700e = 1.000/1.000e+00, b7dcca4e-4e8a-4325-824d-28d3f8b44570 = 1.000/1.000e+00, ed3e7404-6ad2-4409-bce6-0f6867636f62 = 1.000/1.000e+00, 56c0ae7f-7817-4a06-b2b1-4477efd39952 = 1.000/1.000e+00, e67db731-740c-4982-994a-8cf3bcc0467a = 1.000/1.000e+00, ee9fb945-d1c5-4921-a2d6-569e276de538 = 1.000/1.000e+00, f04a90c0-ba09-48e4-a236-695fafba94f8 = 1.000/1.000e+00, 4bf557c1-03bc-4000-baef-a5a73dd5a0c3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.2378470514822224, 1.2378470516408926, 1.2378470589397277, 1.2378470590983979
LBFGS Accumulation History: 3 points
Removed measurement cd95443 to history. Total: 4
Removed measurement 401a3f98 to history. Total: 3
Adding measurement 5f6beff3 to history. Total: 3
th(0)=1.2378470514822224;dx=-2.13798390038169E19
Adding measurement 1ea66670 to history. Total: 4
New Minimum: 1.2378470514822224 > 1.237847051323552
Armijo: th(2.154434690031884E-15)=1.237847051323552; dx=-2.137963539604106E19 evalInputDelta=1.5867041014416827E-10
Non-optimal measurement 1.2378470514028872 < 1.237847051323552. Total: 5
Armijo: th(1.077217345015942E-15)=1.2378470514028872; dx=-2.137973719992898E19 evalInputDelta=7.933520507208414E-11
Non-optimal measurement 1.237847051323552 < 1.237847051323552. Total: 5
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=1.237847051323552
Fitness changed from 1.2378470514822224 to 1.237847051323552
Iteration 250 complete. Error: 1.237847051323552 Total: 0.0368; Orientation: 0.0311; Line Search: 0.0051
Final threshold in iteration 251: 1.237847051323552 (> 0.0) after 9.141s (< 30.000s)

Returns

    1.237847051323552

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

    [ -3.7414034574921443E-4, 0.10368285087260043, -0.9271330042938799 ]

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

    [ 6.466987841292329E-4, -0.03292626020134684, 0.7322625313646965 ]

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

    return TestUtil.compare(title + " vs Iteration", runs);
Logging
Plotting range=[1.0, -0.5356980762768779], [250.0, 0.5182125687672502]; valueStats=DoubleSummaryStatistics{count=505, sum=982.083654, min=0.291274, average=1.944720, max=3.297711}
Plotting 250 points for GD
Plotting 6 points for CjGD
Plotting 250 points for LBFGS

Returns

Result

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

    return TestUtil.compareTime(title + " vs Time", runs);
Logging
Plotting range=[0.0, -0.5356980762768779], [9.083, 0.5182125687672502]; valueStats=DoubleSummaryStatistics{count=505, sum=982.083654, min=0.291274, average=1.944720, max=3.297711}
Plotting 250 points for GD
Plotting 6 points for CjGD
Plotting 250 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": 1.237847051323552 }, "CjGD": { "type": "Converged", "value": 0.0 }, "GD": { "type": "NonConverged", "value": 1.237847051323552 } }, "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": 1.237847051323552 }, "CjGD": { "type": "Converged", "value": 0.0 }, "GD": { "type": "NonConverged", "value": 1.237847051323552 } }, "model":null, "complete":null}OK
  {
    "result": "OK",
    "performance": {
      "execution_time": "12.919",
      "gc_time": "1.639"
    },
    "created_on": 1586738684654,
    "file_name": "trainingTest",
    "report": {
      "simpleName": "NNTest",
      "canonicalName": "com.simiacryptus.mindseye.layers.java.ProductInputsLayerTest.NNTest",
      "link": "https://github.com/SimiaCryptus/mindseye-java/tree/93db34cedee48c0202777a2b25deddf1dfaf5731/src/test/java/com/simiacryptus/mindseye/layers/java/ProductInputsLayerTest.java",
      "javaDoc": ""
    },
    "training_analysis": {
      "input": {
        "LBFGS": {
          "type": "NonConverged",
          "value": 1.237847051323552
        },
        "CjGD": {
          "type": "Converged",
          "value": 0.0
        },
        "GD": {
          "type": "NonConverged",
          "value": 1.237847051323552
        }
      }
    },
    "archive": "s3://code.simiacrypt.us/tests/com/simiacryptus/mindseye/layers/java/ProductInputsLayer/NNTest/trainingTest/202004134444",
    "id": "bd31c26b-2cfe-48f3-964f-6cbcbb54fdb6",
    "report_type": "Components",
    "display_name": "Comparative Training",
    "target": {
      "simpleName": "ProductInputsLayer",
      "canonicalName": "com.simiacryptus.mindseye.layers.java.ProductInputsLayer",
      "link": "https://github.com/SimiaCryptus/mindseye-java/tree/93db34cedee48c0202777a2b25deddf1dfaf5731/src/main/java/com/simiacryptus/mindseye/layers/java/ProductInputsLayer.java",
      "javaDoc": ""
    }
  }