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

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

Test Modules

Using Seed 787094855830950912

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.03 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.6524909755319812 ], [ 0.3983849674146309 ], [ -0.8710970970091196 ], [ -0.4109025050460049 ], [ 0.4182427756951623 ], [ 0.042822515491306 ], [ 0.4919911504468344 ], [ -0.4811317959295054 ], ... ],
    	[ [ 0.32397914491889157 ], [ 0.02682815157617857 ], [ -0.4951840816506523 ], [ -0.7237412385410424 ], [ -0.6232895825218103 ], [ -0.4510418432533836 ], [ 0.8208987329336315 ], [ 0.13053550162508265 ], ... ],
    	[ [ -0.5136058502993168 ], [ -0.16275171922478804 ], [ -0.6989253102064339 ], [ -0.3576945045050792 ], [ 0.9501515259622089 ], [ 0.35247651389737733 ], [ -0.5692612494209686 ], [ 0.21252501026311554 ], ... ],
    	[ [ 0.8008739687095394 ], [ 0.3327619358809819 ], [ -0.8765279172164042 ], [ 0.733669462721557 ], [ -0.635454487497723 ], [ -0.291907201447998 ], [ -0.8591423786718078 ], [ -0.7973632469098901 ], ... ],
    	[ [ -0.5430187063894178 ], [ -0.3231973644301722 ], [ -0.05497360816524788 ], [ 0.5165834287373754 ], [ 0.7229656558661082 ], [ 0.33036529649411994 ], [ 0.2646835738547051 ], [ -0.28627690890745194 ], ... ],
    	[ [ 0.8171455259009817 ], [ -0.20205111575342727 ], [ 0.43593045026770283 ], [ 0.7114228036698196 ], [ -0.5676291064250605 ], [ -0.948701946584745 ], [ -0.8119152517321007 ], [ -0.6521217469638545 ], ... ],
    	[ [ -0.7737185508728373 ], [ 0.18583968422658215 ], [ -0.3590746890772387 ], [ -0.515118058113341 ], [ -0.5403357086187313 ], [ 0.7455383358363454 ], [ 0.5409721271475969 ], [ -0.33255387702904127 ], ... ],
    	[ [ 0.28435212863971127 ], [ 0.7987935237708057 ], [ -3.0316550647713214E-4 ], [ -0.17883495282652917 ], [ 0.22612210057967563 ], [ -0.8674365443897243 ], [ -0.8024950393690087 ], [ 0.011425763051056137 ], ... ],
    	...
    ]
    [
    	[ [ 0.655800866951556 ], [ -0.8812092725437366 ], [ -0.9719632581877098 ], [ -0.05656971349789286 ], [ -0.10047517805339856 ], [ -0.742972023142759 ], [ -0.987833307089093 ], [ 0.7050985947670037 ], ... ],
    	[ [ -0.40089109052446403 ], [ 0.4801918564139642 ], [ -0.9169668588284374 ], [ -0.48215949543036896 ], [ -0.21331644750097478 ], [ -0.6140879598484275 ], [ -0.861504885319222 ], [ 0.48583509829033567 ], ... ],
    	[ [ -0.5593272081787777 ], [ -0.4871811470714722 ], [ 0.35090718796592535 ], [ -0.9682917408121632 ], [ 0.8310388293072322 ], [ 0.04274677738468613 ], [ -0.46193087021866774 ], [ -0.1752976203505734 ], ... ],
    	[ [ -0.4037000024710291 ], [ -0.6393290255751678 ], [ 0.01923184745372364 ], [ -0.6890665371477893 ], [ 0.03898402963412395 ], [ 0.03972304260107684 ], [ -0.7528300080204429 ], [ -0.5099730405716447 ], ... ],
    	[ [ -0.6482609219737072 ], [ 0.28357983274690723 ], [ 0.641245292316641 ], [ -0.5168414894571232 ], [ -0.31234536977274363 ], [ -0.6227098202418875 ], [ -0.6842658245383229 ], [ 0.29536872920108426 ], ... ],
    	[ [ 0.5005847540964918 ], [ -0.3638778420136628 ], [ 0.8780770503829323 ], [ -0.939958639499856 ], [ 0.37422366076583247 ], [ -0.4692311001596865 ], [ -0.15225555842241678 ], [ 0.5814232337138836 ], ... ],
    	[ [ 0.8412586422742399 ], [ 0.7089238994713001 ], [ 0.0032797028115694182 ], [ 0.9758246813197686 ], [ 0.3528359029746486 ], [ -0.7019981892284715 ], [ -0.4001356297786034 ], [ -0.7483872019636664 ], ... ],
    	[ [ 0.7546111941664713 ], [ -0.4199539194720472 ], [ -0.21598110571665985 ], [ 0.08031715984713217 ], [ -0.5519678904977028 ], [ 0.9227462420546282 ], [ 0.5054287894822933 ], [ 0.6871472384792154 ], ... ],
    	...
    ]
    [
    	[ [ 0.2582839760363489 ], [ -0.9222537041664696 ], [ -0.33051627238965464 ], [ 0.6092085318520581 ], [ 0.1412915026456989 ], [ -0.2993278006011697 ], [ -0.29070799053293284 ], [ 0.5460367736563791 ], ... ],
    	[ [ 0.6784372498713638 ], [ -0.6147707436028482 ], [ 0.038792565915287236 ], [ -0.04149376179578823 ], [ -0.14326883439088478 ], [ -0.8953731648678707 ], [ 0.6011805274623205 ], [ -0.9546855288554061 ], ... ],
    	[ [ -0.40887986645827157 ], [ -0.6507173316646031 ], [ 0.6319977560244081 ], [ -0.1204088973580999 ], [ -0.28415941311493853 ], [ 0.7246101694307283 ], [ -0.21258621069634565 ], [ -0.3759393099632393 ], ... ],
    	[ [ -0.1129861104883978 ], [ -0.5723949118394829 ], [ 0.7163941312363653 ], [ 0.16413378661883926 ], [ -0.8128263985773199 ], [ 0.31153488194045464 ], [ 0.15610682835117373 ], [ 0.6270567469986452 ], ... ],
    	[ [ -0.9887143410864241 ], [ 0.7517047658943568 ], [ -0.840576959473782 ], [ -0.6835888059091282 ], [ -0.7050643342307983 ], [ -0.10879817084342114 ], [ -0.7814581785398584 ], [ 0.1860869691377478 ], ... ],
    	[ [ -0.82795181983224 ], [ 0.6884898661137635 ], [ 0.1469003553300825 ], [ 0.6822520564667727 ], [ -0.6393273990912751 ], [ 0.7133450503232528 ], [ 0.957177609726034 ], [ 0.03218717439779417 ], ... ],
    	[ [ -0.5246620306937879 ], [ 0.12574595483742068 ], [ 0.8430882547953045 ], [ -0.5203278524168797 ], [ -0.3220094592195686 ], [ -0.909923838440206 ], [ -0.16246551184410918 ], [ 0.512609673389431 ], ... ],
    	[ [ -0.7500847599681582 ], [ 0.030890095207781076 ], [ 0.2694780742835836 ], [ -0.8683472864815842 ], [ -0.8915530732999775 ], [ -0.030071213107118133 ], [ 0.12814511773963178 ], [ 0.8524537206104152 ], ... ],
    	...
    ]
    [
    	[ [ -0.5981497715706796 ], [ 0.7272915626176324 ], [ -0.7494748551748414 ], [ -0.7807337956753388 ], [ -0.2636525699993397 ], [ -0.21103906902054193 ], [ 0.6503235386897772 ], [ -0.6894354279252566 ], ... ],
    	[ [ 0.7753197170296331 ], [ 0.20187333590014545 ], [ -0.3499499692610786 ], [ 0.3742006199452732 ], [ 0.4344294289298498 ], [ -0.9982140343727486 ], [ 0.1712107782828698 ], [ -0.3475878100455567 ], ... ],
    	[ [ -0.008719602296376472 ], [ -0.721092758849784 ], [ -0.14249843403096896 ], [ -0.2106852523046645 ], [ -0.14399961811518347 ], [ -0.7295637094776766 ], [ -0.44871647178105256 ], [ 0.0852455892547257 ], ... ],
    	[ [ 0.7668183036291252 ], [ -0.8251353303246769 ], [ 0.6720411397024177 ], [ 0.8980167716601233 ], [ 0.30466216045422456 ], [ -0.46307370871142384 ], [ 0.5075319352447678 ], [ -0.8071047548212877 ], ... ],
    	[ [ -0.7446584516458148 ], [ 0.7327176833554614 ], [ -0.04063629146313619 ], [ 0.7512100664599057 ], [ 0.01580533404547424 ], [ 0.1634572171829196 ], [ -0.4538687668582366 ], [ -0.042140656282416256 ], ... ],
    	[ [ 0.16013341697161065 ], [ -0.166973693037769 ], [ -0.10633742077288 ], [ -0.973556932597905 ], [ -0.628847138121055 ], [ -0.4113311529933943 ], [ -0.0992101623188304 ], [ 0.05444629883873997 ], ... ],
    	[ [ -0.9476769677014336 ], [ 0.1987670611914354 ], [ -0.5149548449360142 ], [ 0.41173678644685996 ], [ -0.15934008590401993 ], [ 0.47973537787893883 ], [ 0.4056501776056387 ], [ 0.057484084226846255 ], ... ],
    	[ [ -0.14462110956623087 ], [ -0.9913266518207711 ], [ 0.4146081092232343 ], [ 0.18134910503341017 ], [ 0.0978063818946191 ], [ -0.8267506209684015 ], [ 0.9084007434604122 ], [ 0.6867400563933181 ], ... ],
    	...
    ]
    [
    	[ [ 0.3737736891146677 ], [ -0.11745389901830738 ], [ -0.04480579480651148 ], [ 0.2634437724537637 ], [ 0.3919651907277155 ], [ 0.33686150560040096 ], [ 0.7557298902328087 ], [ 0.3839086673386485 ], ... ],
    	[ [ 0.49842177670348997 ], [ -0.0029477790579839347 ], [ 0.8889298920555846 ], [ -0.5366763804421542 ], [ -0.5751651936559936 ], [ -0.2610584348113385 ], [ 0.42108684430434273 ], [ 0.20980185481087887 ], ... ],
    	[ [ 0.1956481128247487 ], [ 0.8759168882090651 ], [ -0.3001933500066165 ], [ -0.2923567087455181 ], [ 0.6880551981191396 ], [ -0.0724772314227895 ], [ 0.5057213501005537 ], [ 0.5444336432278638 ], ... ],
    	[ [ 0.36216240839022706 ], [ 0.058638631072959635 ], [ -0.30131399222979427 ], [ 0.28722819802612776 ], [ 0.1609161869600675 ], [ -0.08759135754933944 ], [ 0.854418416699293 ], [ 0.7462425871497254 ], ... ],
    	[ [ -0.09303440015284226 ], [ 0.5559507366646061 ], [ -0.2753008261276497 ], [ -0.6955055004077777 ], [ 0.3144057921597492 ], [ 0.4830906032355162 ], [ -0.69218156460221 ], [ -0.36772045055812996 ], ... ],
    	[ [ -0.30989386219629766 ], [ -0.7364215610361413 ], [ -0.7291833550666911 ], [ 0.7592493948269041 ], [ 0.11776600412473859 ], [ -0.04354290672132688 ], [ 0.7790820853729246 ], [ -0.781168323285252 ], ... ],
    	[ [ 0.11612374030921946 ], [ 0.49111180693076806 ], [ 0.9269599312460357 ], [ 0.8154177532623947 ], [ 0.802578072330703 ], [ -0.32695874470362774 ], [ -0.1497532782373232 ], [ 0.07895039914225421 ], ... ],
    	[ [ 0.23919383523819904 ], [ -0.8611054720923275 ], [ -0.9699068873854126 ], [ 0.2862845025662759 ], [ -0.4140228746555388 ], [ -0.4141996490968809 ], [ 0.6788490884605611 ], [ -0.8276886649589457 ], ... ],
    	...
    ]

Gradient Descent

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

TrainingTester.java:480 executed in 3.75 seconds (0.027 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: 3238424759677
BACKPROP_AGG_SIZE = 3
THREADS = 64
SINGLE_THREADED = false
Initialized CoreSettings = {
"backpropAggregationSize" : 3,
"jvmThreads" : 64,
"singleThreaded" : false
}
Reset training subject: 3238500731789
Low gradient: 4.790880049563577E-7
Constructing line search parameters: GD
th(0)=3.154411004473905E-5;dx=-2.2952531649306305E-13
New Minimum: 3.154411004473905E-5 > 3.154410955024176E-5
WOLFE (weak): th(2.154434690031884)=3.154410955024176E-5; dx=-2.295253135130107E-13 evalInputDelta=4.944972925059743E-13
New Minimum: 3.154410955024176E-5 > 3.1544109055744485E-5
WOLFE (weak): th(4.308869380063768)=3.1544109055744485E-5; dx=-2.295253105329583E-13 evalInputDelta=9.889945646831579E-13
New Minimum: 3.1544109055744485E-5 > 3.15441070777554E-5
WOLFE (weak): th(12.926608140191302)=3.15441070777554E-5; dx=-2.295252986127488E-13 evalInputDelta=2.9669836466156285E-12
New Minimum: 3.15441070777554E-5 > 3.1544098176805635E-5
WOLFE (weak): th(51.70643256076521)=3.1544098176805635E-5; dx=-2.295252449718061E-13 evalInputDelta=1.1867933414168915E-11
New Minimum: 3.1544098176805635E-5 > 3.154405070510887E-5
WOLFE (weak): th(258.53216280382605)=3.154405070510887E-5; dx=-2.2952495888677825E-13 evalInputDelta=5.933963018086566E-11
New Minimum: 3.154405070510887E-5 > 3.154375400834433E-5
WOLFE (weak): th(1551.1929768229563)=3.154375400834433E-5; dx=-2.2952317085535437E-13 evalInputDelta=3.5603639472265225E-10
New Minimum: 3.154375400834433E-5 > 3.1541617859869714E-5
WOLFE (weak): th(10858.350837760694)=3.1541617859869714E-5; dx=-2.295102970291021E-13 evalInputDelta=2.492184869335324E-9
New Minimum: 3.1541617859869714E-5 > 3.152417713220957E-5
WOLFE (weak): th(86866.80670208555)=3.152417713220957E-5; dx=-2.2940516078137563E-13 evalInputDelta=1.9932912529482382E-8
New Minimum: 3.152417713220957E-5 > 3.136508958352046E-5
WOLFE (weak): th(781801.26031877)=3.136508958352046E-5; dx=-2.28443915087876E-13 evalInputDelta=1.790204612185886E-7
New Minimum: 3.136508958352046E-5 > 2.9791950276719957E-5
WOLFE (weak): th(7818012.6031877)=2.9791950276719957E-5; dx=-2.187113024411927E-13 evalInputDelta=1.7521597680190926E-6
New Minimum: 2.9791950276719957E-5 > 1.692027799470016E-5
END: th(8.599813863506469E7)=1.692027799470016E-5; dx=-1.1057116192248934E-13 evalInputDelta=1.462383205003889E-5
Fitness changed from 3.154411004473905E-5 to 1.692027799470016E-5
Iteration 1 complete. Error: 1.692027799470016E-5 Total: 1.0356; Orientation: 0.0192; Line Search: 0.9010
Low gradient: 2.3079509563709858E-7
th(0)=1.692027799470016E-5;dx=-5.326637617013748E-14
New Minimum: 1.692027799470016E-5 > 1.319867026767439E-5
END: th(1.0E8)=1.319867026767439E-5; dx=-2.1165778370377666E-14 evalInputDelta=3.721607727025771E-6
Fitness changed from 1.692027799470016E-5 to 1.319867026767439E-5
Iteration 2 complete. Error: 1.319867026767439E-5 Total: 0.2261; Orientation: 0.0492; Line Search: 0.1636
Low gradient: 9.170809419476861E-8
th(0)=1.319867026767439E-5;dx=-8.410374540836552E-15
New Minimum: 1.319867026767439E-5 > 1.2611055394487183E-5
END: th(1.0E8)=1.2611055394487183E-5; dx=-3.34192292290782E-15 evalInputDelta=5.876148731872063E-7
Fitness changed from 1.319867026767439E-5 to 1.2611055394487183E-5
Iteration 3 complete. Error: 1.2611055394487183E-5 Total: 0.1766; Orientation: 0.0632; Line Search: 0.0554
Low gradient: 3.644087201082035E-8
th(0)=1.2611055394487183E-5;dx=-1.3279371529089902E-15
New Minimum: 1.2611055394487183E-5 > 1.2518275267048345E-5
END: th(1.0E8)=1.2518275267048345E-5; dx=-5.276653958678612E-16 evalInputDelta=9.278012743883824E-8
Fitness changed from 1.2611055394487183E-5 to 1.2518275267048345E-5
Iteration 4 complete. Error: 1.2518275267048345E-5 Total: 0.1861; Orientation: 0.0257; Line Search: 0.1505
Low gradient: 1.4480043060198506E-8
th(0)=1.2518275267048345E-5;dx=-2.0967164702520292E-16
New Minimum: 1.2518275267048345E-5 > 1.2503625957712627E-5
END: th(1.0E8)=1.2503625957712627E-5; dx=-8.331453968846267E-17 evalInputDelta=1.4649309335717985E-8
Fitness changed from 1.2518275267048345E-5 to 1.2503625957712627E-5
Iteration 5 complete. Error: 1.2503625957712627E-5 Total: 0.0456; Orientation: 0.0052; Line Search: 0.0287
Low gradient: 5.753749442739607E-9
th(0)=1.2503625957712627E-5;dx=-3.310563264982634E-17
New Minimum: 1.2503625957712627E-5 > 1.2501312937996723E-5
END: th(1.0E8)=1.2501312937996723E-5; dx=-1.3154761668772902E-17 evalInputDelta=2.313019715903636E-9
Fitness changed from 1.2503625957712627E-5 to 1.2501312937996723E-5
Iteration 6 complete. Error: 1.2501312937996723E-5 Total: 0.0358; Orientation: 0.0032; Line Search: 0.0244
Low gradient: 2.2862937984503817E-9
th(0)=1.2501312937996723E-5;dx=-5.227139332832674E-18
New Minimum: 1.2501312937996723E-5 > 1.2500947728956237E-5
END: th(1.0E8)=1.2500947728956237E-5; dx=-2.077041476905385E-18 evalInputDelta=3.6520904048598524E-10
Fitness changed from 1.2501312937996723E-5 to 1.2500947728956237E-5
Iteration 7 complete. Error: 1.2500947728956237E-5 Total: 0.1718; Orientation: 0.0032; Line Search: 0.1594
Low gradient: 9.084753142020396E-10
th(0)=1.2500947728956237E-5;dx=-8.253273965144946E-19
New Minimum: 1.2500947728956237E-5 > 1.2500890065097016E-5
END: th(1.0E8)=1.2500890065097016E-5; dx=-3.2794978772030683E-19 evalInputDelta=5.766385922054173E-11
Fitness changed from 1.2500947728956237E-5 to 1.2500890065097016E-5
Iteration 8 complete. Error: 1.2500890065097016E-5 Total: 0.2031; Orientation: 0.0033; Line Search: 0.1920
Low gradient: 3.609892119175103E-10
th(0)=1.2500890065097016E-5;dx=-1.3031321112082516E-19
New Minimum: 1.2500890065097016E-5 > 1.25008809603918E-5
END: th(1.0E8)=1.25008809603918E-5; dx=-5.1780893382079395E-20 evalInputDelta=9.104705216752412E-12
Fitness changed from 1.2500890065097016E-5 to 1.25008809603918E-5
Iteration 9 complete. Error: 1.25008809603918E-5 Total: 0.0471; Orientation: 0.0033; Line Search: 0.0357
Low gradient: 1.4344166438389814E-10
th(0)=1.25008809603918E-5;dx=-2.057551108122287E-20
New Minimum: 1.25008809603918E-5 > 1.2500879522824856E-5
END: th(1.0E8)=1.2500879522824856E-5; dx=-8.175827580449562E-21 evalInputDelta=1.4375669437401845E-12
Fitness changed from 1.25008809603918E-5 to 1.2500879522824856E-5
Iteration 10 complete. Error: 1.2500879522824856E-5 Total: 0.2136; Orientation: 0.0033; Line Search: 0.1697
Zero gradient: 5.699757888034747E-11
th(0)=1.2500879522824856E-5;dx=-3.2487239982214323E-21
New Minimum: 1.2500879522824856E-5 > 1.250087929584345E-5
END: th(1.0E8)=1.250087929584345E-5; dx=-1.2909038886604886E-21 evalInputDelta=2.2698140601502912E-13
Fitness changed from 1.2500879522824856E-5 to 1.250087929584345E-5
Iteration 11 complete. Error: 1.250087929584345E-5 Total: 0.0629; Orientation: 0.0047; Line Search: 0.0491
Zero gradient: 2.2648398651641445E-11
th(0)=1.250087929584345E-5;dx=-5.12949961483674E-22
New Minimum: 1.250087929584345E-5 > 1.2500879260004744E-5
END: th(1.0E8)=1.2500879260004744E-5; dx=-2.0382436314381808E-22 evalInputDelta=3.583870599919124E-14
Fitness changed from 1.250087929584345E-5 to 1.2500879260004744E-5
Iteration 12 complete. Error: 1.2500879260004744E-5 Total: 0.2472; Orientation: 0.1057; Line Search: 0.1304
Zero gradient: 8.999504392291589E-12
th(0)=1.2500879260004744E-5;dx=-8.099107930687561E-23
New Minimum: 1.2500879260004744E-5 > 1.2500879254346073E-5
END: th(1.0E8)=1.2500879254346073E-5; dx=-3.21823889260173E-23 evalInputDelta=5.658671366768134E-15
Fitness changed from 1.2500879260004744E-5 to 1.2500879254346073E-5
Iteration 13 complete. Error: 1.2500879254346073E-5 Total: 0.0667; Orientation: 0.0032; Line Search: 0.0390
Zero gradient: 3.576017914229001E-12
th(0)=1.2500879254346073E-5;dx=-1.2787904122886733E-23
New Minimum: 1.2500879254346073E-5 > 1.2500879253452558E-5
END: th(1.0E8)=1.2500879253452558E-5; dx=-5.081365843663582E-24 evalInputDelta=8.935147272678273E-16
Fitness changed from 1.2500879254346073E-5 to 1.2500879253452558E-5
Iteration 14 complete. Error: 1.2500879253452558E-5 Total: 0.2207; Orientation: 0.0034; Line Search: 0.0481
Zero gradient: 1.4209564844305705E-12
th(0)=1.2500879253452558E-5;dx=-2.019117330645286E-24
New Minimum: 1.2500879253452558E-5 > 1.2500879253311446E-5
END: th(1.0E8)=1.2500879253311446E-5; dx=-8.023108196390597E-25 evalInputDelta=1.4111230088077742E-16
Fitness changed from 1.2500879253452558E-5 to 1.2500879253311446E-5
Iteration 15 complete. Error: 1.2500879253311446E-5 Total: 0.0507; Orientation: 0.0039; Line Search: 0.0292
Zero gradient: 5.646272974788353E-13
th(0)=1.2500879253311446E-5;dx=-3.188039850582532E-25
New Minimum: 1.2500879253311446E-5 > 1.2500879253289033E-5
END: th(1.0E8)=1.2500879253289033E-5; dx=-1.2667906053476998E-25 evalInputDelta=2.2412491784348787E-17
Fitness changed from 1.2500879253311446E-5 to 1.2500879253289033E-5
Iteration 16 complete. Error: 1.2500879253289033E-5 Total: 0.0342; Orientation: 0.0035; Line Search: 0.0221
Zero gradient: 2.243587249508043E-13
th(0)=1.2500879253289033E-5;dx=-5.033683746155066E-26
New Minimum: 1.2500879253289033E-5 > 1.250087925328533E-5
END: th(1.0E8)=1.250087925328533E-5; dx=-2.0001705056382416E-26 evalInputDelta=3.703228045395801E-18
Fitness changed from 1.2500879253289033E-5 to 1.250087925328533E-5
Iteration 17 complete. Error: 1.250087925328533E-5 Total: 0.1926; Orientation: 0.0034; Line Search: 0.1825
Zero gradient: 8.915055592675631E-14
th(0)=1.250087925328533E-5;dx=-7.947821622049704E-27
New Minimum: 1.250087925328533E-5 > 1.2500879253285094E-5
END: th(1.0E8)=1.2500879253285094E-5; dx=-3.1581241877961217E-27 evalInputDelta=2.354751593366955E-19
Fitness changed from 1.250087925328533E-5 to 1.2500879253285094E-5
Iteration 18 complete. Error: 1.2500879253285094E-5 Total: 0.1572; Orientation: 0.0037; Line Search: 0.1452
Zero gradient: 3.542461575215247E-14
th(0)=1.2500879253285094E-5;dx=-1.2549034011876492E-27
New Minimum: 1.2500879253285094E-5 > 1.250087925328509E-5
END: th(1.0E8)=1.250087925328509E-5; dx=-4.9864490838760255E-28 evalInputDelta=5.082197683525802E-21
Fitness changed from 1.2500879253285094E-5 to 1.250087925328509E-5
Iteration 19 complete. Error: 1.250087925328509E-5 Total: 0.2659; Orientation: 0.0034; Line Search: 0.2556
Zero gradient: 1.4076226313260825E-14
th(0)=1.250087925328509E-5;dx=-1.9814014722213646E-28
END: th(1.0E8)=1.250087925328509E-5; dx=-7.873241515723803E-29 evalInputDelta=0.0
Fitness changed from 1.250087925328509E-5 to 1.250087925328509E-5
Static Iteration Total: 0.0966; Orientation: 0.0041; Line Search: 0.0840
Iteration 20 failed. Error: 1.250087925328509E-5
Previous Error: 0.0 -> 1.250087925328509E-5
Optimization terminated 20
Final threshold in iteration 20: 1.250087925328509E-5 (> 0.0) after 3.737s (< 30.000s)

Returns

    1.250087925328509E-5

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.6524909748136521 ], [ 0.3983849625410734 ], [ -0.782967385038444 ], [ 4.87135460055255E-9 ], [ 0.41824278938112963 ], [ 0.04282252753459027 ], [ 0.4919911564132889 ], [ -0.7723372548153262 ], ... ],
    	[ [ 0.3239791574279788 ], [ 0.026828172391334133 ], [ -0.33260840269642267 ], [ -0.39002501545958546 ], [ -0.366193047074302 ], [ 2.4339913338688824E-8 ], [ 0.8208987154116585 ], [ -0.8620506285385265 ], ... ],
    	[ [ 1.3427101650621823E-8 ], [ 2.2756472415484153E-8 ], [ -0.5082332485444891 ], [ -0.02831983838041152 ], [ -0.7112254465832557 ], [ -0.7560625376987475 ], [ 2.6251534880647553E-9 ], [ -0.7459194930325039 ], ... ],
    	[ [ 0.8008739659717122 ], [ -0.6006182779140217 ], [ -0.2500213807822589 ], [ -0.6391529673982723 ], [ -0.2548173936748279 ], [ 5.5030289090551964E-9 ], [ 5.54330715219402E-10 ], [ -0.2698241226323346 ], ... ],
    	[ [ -0.8685167684846917 ], [ -0.1805903514242373 ], [ 7.880759626514618E-9 ], [ -0.4424380521132065 ], [ -0.6302347514219349 ], [ -0.6394926265285732 ], [ -0.2626424196099362 ], [ -0.9043464507842942 ], ... ],
    	[ [ -0.8723866280149402 ], [ -0.8113426003639113 ], [ -0.35162442653541204 ], [ 0.711422784588961 ], [ -0.5156939908225759 ], [ 1.676511000790256E-8 ], [ 2.4102441325508718E-8 ], [ 1.6279866400962542E-8 ], ... ],
    	[ [ -0.6730890742265239 ], [ 0.18583969774451842 ], [ 2.834761113710164E-8 ], [ -0.6045353408424179 ], [ -0.9143511157324296 ], [ 0.7455383362998486 ], [ -0.7553992796252627 ], [ 1.8994031425303228E-8 ], ... ],
    	[ [ 0.28435214687900234 ], [ -0.6959664466262401 ], [ -0.9335735426173968 ], [ -0.9969752920295614 ], [ 0.226122111419785 ], [ -0.5262287986476555 ], [ -0.6299783105779808 ], [ -0.18631765031531633 ], ... ],
    	...
    ]

To produce the following output:

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

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

Returns

    [
    	[ [ 0.008008929993623484 ], [ 0.0048899331924322775 ], [ 0.0 ], [ 5.979291588068837E-11 ], [ 0.005133675943100865 ], [ 5.256204888849162E-4 ], [ 0.006038892308543005 ], [ 0.0 ], ... ],
    	[ [ 0.003976647174276768 ], [ 3.2929950425815717E-4 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 2.987576372778092E-10 ], [ 0.010076032615569995 ], [ 0.0 ], ... ],
    	[ [ 1.6480950892509799E-10 ], [ 2.7932186269624265E-10 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 3.22221629416892E-11 ], [ 0.0 ], ... ],
    	[ [ 0.009830240991478669 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 6.754633395212308E-11 ], [ 6.80407248970049E-12 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 9.67315328205967E-11 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.008732282127379478 ], [ 0.0 ], [ 2.05781531962239E-10 ], [ 2.958428127018103E-10 ], [ 1.9982546172089068E-10 ], ... ],
    	[ [ 0.0 ], [ 0.002281069297084252 ], [ 3.4794969102576185E-10 ], [ 0.0 ], [ 0.0 ], [ 0.009151029781972514 ], [ 0.0 ], [ 2.3314018715030225E-10 ], ... ],
    	[ [ 0.003490249713478217 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.002775511432765178 ], [ 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 3.56 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: 3242183786068
Reset training subject: 3242356837560
Low gradient: 4.790880049563577E-7
Constructing line search parameters: GD
F(0.0) = LineSearchPoint{point=PointSample{avg=3.154411004473905E-5}, derivative=-2.2952531649306305E-13}
F(1.0E-10) = LineSearchPoint{point=PointSample{avg=3.154411004473905E-5}, derivative=-2.2952531649306305E-13}, evalInputDelta = 0.0
F(7.000000000000001E-10) = LineSearchPoint{point=PointSample{avg=3.154411004473905E-5}, derivative=-2.2952531649306305E-13}, evalInputDelta = 0.0
F(4.900000000000001E-9) = LineSearchPoint{point=PointSample{avg=3.154411004473905E-5}, derivative=-2.2952531649306305E-13}, evalInputDelta = 0.0
New Minimum: 3.154411004473905E-5 > 3.154411004473904E-5
F(3.430000000000001E-8) = LineSearchPoint{point=PointSample{avg=3.154411004473904E-5}, derivative=-2.29525316493063E-13}, evalInputDelta = -6.776263578034403E-21
New Minimum: 3.154411004473904E-5 > 3.154411004473899E-5
F(2.4010000000000004E-7) = LineSearchPoint{point=PointSample{avg=3.154411004473899E-5}, derivative=-2.295253164930627E-13}, evalInputDelta = -6.098637220230962E-20
New Minimum: 3.154411004473899E-5 > 3.154411004473867E-5
F(1.6807000000000003E-6) = LineSearchPoint{point=PointSample{avg=3.154411004473867E-5}, derivative=-2.2952531649306073E-13}, evalInputDelta = -3.7947076036992655E-19
New Minimum: 3.154411004473867E-5 > 3.154411004473638E-5
F(1.1764900000000001E-5) = LineSearchPoint{point=PointSample{avg=3.154411004473638E-5}, derivative=-2.2952531649304674E-13}, evalInputDelta = -2.6698478497455547E-18
New Minimum: 3.154411004473638E-5 > 3.154411004472016E-5
F(8.235430000000001E-5) = LineSearchPoint{point=PointSample{avg=3.154411004472016E-5}, derivative=-2.2952531649294915E-13}, evalInputDelta = -1.8892222855559915E-17
New Minimum: 3.154411004472016E-5 > 3.154411004460679E-5
F(5.764801000000001E-4) = LineSearchPoint{point=PointSample{avg=3.154411004460679E-5}, derivative=-2.2952531649226566E-13}, evalInputDelta = -1.3225911251607547E-16
New Minimum: 3.154411004460679E-5 > 3.1544110043812877E-5
F(0.004035360700000001) = LineSearchPoint{point=PointSample{avg=3.1544110043812877E-5}, derivative=-2.2952531648748125E-13}, evalInputDelta = -9.261729295821641E-16
New Minimum: 3.1544110043812877E-5 > 3.154411003825556E-5
F(0.028247524900000005) = LineSearchPoint{point=PointSample{avg=3.154411003825556E-5}, derivative=-2.295253164539906E-13}, evalInputDelta = -6.483488333881848E-15
New Minimum: 3.154411003825556E-5 > 3.154410999935444E-5
F(0.19773267430000002) = LineSearchPoint{point=PointSample{avg=3.154410999935444E-5}, derivative=-2.295253162195557E-13}, evalInputDelta = -4.538460807255312E-14
New Minimum: 3.154410999935444E-5 > 3.154410972704653E-5
F(1.3841287201) = LineSearchPoint{point=PointSample{avg=3.154410972704653E-5}, derivative=-2.2952531457851157E-13}, evalInputDelta = -3.176925207821514E-13
New Minimum: 3.154410972704653E-5 > 3.154410782089105E-5
F(9.688901040700001) = LineSearchPoint{point=PointSample{avg=3.154410782089105E-5}, derivative=-2.295253030912028E-13}, evalInputDelta = -2.223847997840766E-12
New Minimum: 3.154410782089105E-5 > 3.154409447780569E-5
F(67.8223072849) = LineSearchPoint{point=PointSample{avg=3.154409447780569E-5}, derivative=-2.295252226800416E-13}, evalInputDelta = -1.5566933362471357E-11
New Minimum: 3.154409447780569E-5 > 3.1544001076339174E-5
F(474.7561509943) = LineSearchPoint{point=PointSample{avg=3.1544001076339174E-5}, derivative=-2.295246598019129E-13}, evalInputDelta = -1.0896839987550042E-10
New Minimum: 3.1544001076339174E-5 > 3.1543347272486666E-5
F(3323.2930569601003) = LineSearchPoint{point=PointSample{avg=3.1543347272486666E-5}, derivative=-2.295207196550122E-13}, evalInputDelta = -7.627722523837486E-10
New Minimum: 3.1543347272486666E-5 > 3.153877095978188E-5
F(23263.0513987207) = LineSearchPoint{point=PointSample{avg=3.153877095978188E-5}, derivative=-2.29493138626707E-13}, evalInputDelta = -5.339084957172303E-9
New Minimum: 3.153877095978188E-5 > 3.1506752169701225E-5
F(162841.3597910449) = LineSearchPoint{point=PointSample{avg=3.1506752169701225E-5}, derivative=-2.2930007142857085E-13}, evalInputDelta = -3.735787503782471E-8
New Minimum: 3.1506752169701225E-5 > 3.128337518293811E-5
F(1139889.5185373144) = LineSearchPoint{point=PointSample{avg=3.128337518293811E-5}, derivative=-2.279486010416175E-13}, evalInputDelta = -2.607348618009417E-7
New Minimum: 3.128337518293811E-5 > 2.9756708921885267E-5
F(7979226.6297612) = LineSearchPoint{point=PointSample{avg=2.9756708921885267E-5}, derivative=-2.1848830833294407E-13}, evalInputDelta = -1.7874011228537826E-6
New Minimum: 2.9756708921885267E-5 > 2.0881704762669202E-5
F(5.58545864083284E7) = LineSearchPoint{point=PointSample{avg=2.0881704762669202E-5}, derivative=-1.5226625937223026E-13}, evalInputDelta = -1.0662405282069847E-5
New Minimum: 2.0881704762669202E-5 > 1.9221127043626126E-5
F(3.909821048582988E8) = LineSearchPoint{point=PointSample{avg=1.9221127043626126E-5}, derivative=5.43573163117449E-14}, evalInputDelta = -1.2322983001112924E-5
1.9221127043626126E-5 <= 3.154411004473905E-5
New Minimum: 1.9221127043626126E-5 > 1.5739748873602052E-5
F(3.161175816712558E8) = LineSearchPoint{point=PointSample{avg=1.5739748873602052E-5}, derivative=3.868528308480907E-14}, evalInputDelta = -1.5804361171136997E-5
Right bracket at 3.161175816712558E8
New Minimum: 1.5739748873602052E-5 > 1.4196731233753057E-5
F(2.7052244801775825E8) = LineSearchPoint{point=PointSample{avg=1.4196731233753057E-5}, derivative=2.892683719468503E-14}, evalInputDelta = -1.7347378810985992E-5
Right bracket at 2.7052244801775825E8
New Minimum: 1.4196731233753057E-5 > 1.3422784446997317E-5
F(2.4024466275011587E8) = LineSearchPoint{point=PointSample{avg=1.3422784446997317E-5}, derivative=2.2257707635543776E-14}, evalInputDelta = -1.8121325597741732E-5
Right bracket at 2.4024466275011587E8
New Minimum: 1.3422784446997317E-5 > 1.3002147453479804E-5
F(2.1900695030703798E8) = LineSearchPoint{point=PointSample{avg=1.3002147453479804E-5}, derivative=1.7238010272786393E-14}, evalInputDelta = -1.8541962591259245E-5
Right bracket at 2.1900695030703798E8
New Minimum: 1.3002147453479804E-5 > 1.2768661120047124E-5
F(2.0370790198943028E8) = LineSearchPoint{point=PointSample{avg=1.2768661120047124E-5}, derivative=1.3120773967635121E-14}, evalInputDelta = -1.8775448924691924E-5
Right bracket at 2.0370790198943028E8
New Minimum: 1.2768661120047124E-5 > 1.2641599424332041E-5
F(1.9269266027525398E8) = LineSearchPoint{point=PointSample{avg=1.2641599424332041E-5}, derivative=9.905018936061712E-15}, evalInputDelta = -1.890251062040701E-5
Right bracket at 1.9269266027525398E8
New Minimum: 1.2641599424332041E-5 > 1.2572769781753752E-5
F(1.847211371787937E8) = LineSearchPoint{point=PointSample{avg=1.2572769781753752E-5}, derivative=7.319239619570092E-15}, evalInputDelta = -1.8971340262985297E-5
Right bracket at 1.847211371787937E8
New Minimum: 1.2572769781753752E-5 > 1.2536661646276476E-5
F(1.790126746833834E8) = LineSearchPoint{point=PointSample{avg=1.2536661646276476E-5}, derivative=5.300853377770929E-15}, evalInputDelta = -1.9007448398462576E-5
Right bracket at 1.790126746833834E8
New Minimum: 1.2536661646276476E-5 > 1.2518339235514458E-5
F(1.749717283877419E8) = LineSearchPoint{point=PointSample{avg=1.2518339235514458E-5}, derivative=3.7617223200501024E-15}, evalInputDelta = -1.902577080922459E-5
Right bracket at 1.749717283877419E8
New Minimum: 1.2518339235514458E-5 > 1.2509272084541246E-5
F(1.7215033265396008E8) = LineSearchPoint{point=PointSample{avg=1.2509272084541246E-5}, derivative=2.6534284567018898E-15}, evalInputDelta = -1.9034837960197803E-5
Right bracket at 1.7215033265396008E8
New Minimum: 1.2509272084541246E-5 > 1.2504844244511937E-5
F(1.7018293209972954E8) = LineSearchPoint{point=PointSample{avg=1.2504844244511937E-5}, derivative=1.8475192408086505E-15}, evalInputDelta = -1.9039265800227113E-5
Right bracket at 1.7018293209972954E8
Converged to right
Fitness changed from 3.154411004473905E-5 to 1.2504844244511937E-5
Iteration 1 complete. Error: 1.2504844244511937E-5 Total: 3.0020; Orientation: 0.0041; Line Search: 2.8085
Low gradient: 6.876596839180794E-9
F(0.0) = LineSearchPoint{point=PointSample{avg=1.2504844244511937E-5}, derivative=-4.7287584088631286E-17}
New Minimum: 1.2504844244511937E-5 > 1.2500923463762162E-5
F(1.7018293209972954E8) = LineSearchPoint{point=PointSample{avg=1.2500923463762162E-5}, derivative=1.210334138636975E-18}, evalInputDelta = -3.920780749774581E-9
1.2500923463762162E-5 <= 1.2504844244511937E-5
New Minimum: 1.2500923463762162E-5 > 1.2500920893523354E-5
F(1.659357763441279E8) = LineSearchPoint{point=PointSample{avg=1.2500920893523354E-5}, derivative=1.0805874878926028E-34}, evalInputDelta = -3.923350988582609E-9
Right bracket at 1.659357763441279E8
Converged to right
Fitness changed from 1.2504844244511937E-5 to 1.2500920893523354E-5
Iteration 2 complete. Error: 1.2500920893523354E-5 Total: 0.4235; Orientation: 0.0031; Line Search: 0.4128
Zero gradient: 2.4069839074386418E-23
F(0.0) = LineSearchPoint{point=PointSample{avg=1.2500920893523354E-5}, derivative=-5.7935715306685916E-46}
F(1.659357763441279E8) = LineSearchPoint{point=PointSample{avg=1.2500920893523354E-5}, derivative=1.0626048011350557E-51}, evalInputDelta = 0.0
1.2500920893523354E-5 <= 1.2500920893523354E-5
Converged to right
Fitness changed from 1.2500920893523354E-5 to 1.2500920893523354E-5
Static Iteration Total: 0.1383; Orientation: 0.0037; Line Search: 0.1197
Iteration 3 failed. Error: 1.2500920893523354E-5
Previous Error: 0.0 -> 1.2500920893523354E-5
Optimization terminated 3
Final threshold in iteration 3: 1.2500920893523354E-5 (> 0.0) after 3.565s (< 30.000s)

Returns

    1.2500920893523354E-5

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.6524909755319812 ], [ 0.3983849674146309 ], [ -0.782967385038444 ], [ -0.004243624593691042 ], [ 0.4182427756951623 ], [ 0.042822515491306 ], [ 0.4919911504468344 ], [ -0.7723372548153262 ], ... ],
    	[ [ 0.32397914491889157 ], [ 0.026828151576178575 ], [ -0.33260840269642267 ], [ -0.39002501545958546 ], [ -0.366193047074302 ], [ -0.021203435865796427 ], [ 0.8208987329336315 ], [ -0.8620506285385265 ], ... ],
    	[ [ -0.011696865340105778 ], [ -0.01982403949756517 ], [ -0.5082332485444891 ], [ -0.02831983838041152 ], [ -0.7112254465832557 ], [ -0.7560625376987475 ], [ -0.0022868723009615705 ], [ -0.7459194930325039 ], ... ],
    	[ [ 0.8008739687095394 ], [ -0.6006182779140217 ], [ -0.2500213807822589 ], [ -0.6391529673982723 ], [ -0.2548173936748279 ], [ -0.004793900410290514 ], [ -4.8289883390475324E-4 ], [ -0.2698241226323346 ], ... ],
    	[ [ -0.8685167684846917 ], [ -0.1805903514242373 ], [ -0.006865233207258459 ], [ -0.4424380521132065 ], [ -0.6302347514219349 ], [ -0.6394926265285732 ], [ -0.2626424196099362 ], [ -0.9043464507842942 ], ... ],
    	[ [ -0.8723866280149402 ], [ -0.8113426003639113 ], [ -0.35162442653541204 ], [ 0.7114228036698196 ], [ -0.5156939908225759 ], [ -0.014604732970455614 ], [ -0.020996564849810384 ], [ -0.01418201857719259 ], ... ],
    	[ [ -0.6730890742265239 ], [ 0.18583968422658215 ], [ -0.024694695758783136 ], [ -0.6045353408424179 ], [ -0.9143511157324296 ], [ 0.7455383358363454 ], [ -0.7553992796252627 ], [ -0.01654643225533492 ], ... ],
    	[ [ 0.28435212863971127 ], [ -0.6959664466262401 ], [ -0.9335735426173968 ], [ -0.9969752920295614 ], [ 0.22612210057967563 ], [ -0.5262287986476555 ], [ -0.6299783105779808 ], [ -0.18631765031531633 ], ... ],
    	...
    ]

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.008008930002440535 ], [ 0.004889933252252232 ], [ 0.0 ], [ 0.0 ], [ 0.005133675775113937 ], [ 5.256203410609244E-4 ], [ 0.006038892235308404 ], [ 0.0 ], ... ],
    	[ [ 0.003976647020735328 ], [ 3.292992487647786E-4 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.01007603283064156 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.009830241025083833 ], [ 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.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.008732282361585415 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0022810691311598032 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.009151029776283294 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0034902494896020086 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.002775511299709426 ], [ 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 31.60 seconds (0.086 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: 3245763498713
Reset training subject: 3245771175279
Adding measurement 69ab655d to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD
Non-optimal measurement 3.154411004473905E-5 < 3.154411004473905E-5. Total: 1
th(0)=3.154411004473905E-5;dx=-2.2952531649306305E-13
Adding measurement 25fff240 to history. Total: 1
New Minimum: 3.154411004473905E-5 > 3.154410955024176E-5
WOLFE (weak): th(2.154434690031884)=3.154410955024176E-5; dx=-2.295253135130107E-13 evalInputDelta=4.944972925059743E-13
Adding measurement 2f9a3181 to history. Total: 2
New Minimum: 3.154410955024176E-5 > 3.1544109055744485E-5
WOLFE (weak): th(4.308869380063768)=3.1544109055744485E-5; dx=-2.295253105329583E-13 evalInputDelta=9.889945646831579E-13
Adding measurement 30809ae to history. Total: 3
New Minimum: 3.1544109055744485E-5 > 3.15441070777554E-5
WOLFE (weak): th(12.926608140191302)=3.15441070777554E-5; dx=-2.295252986127488E-13 evalInputDelta=2.9669836466156285E-12
Adding measurement 66cacde3 to history. Total: 4
New Minimum: 3.15441070777554E-5 > 3.1544098176805635E-5
WOLFE (weak): th(51.70643256076521)=3.1544098176805635E-5; dx=-2.295252449718061E-13 evalInputDelta=1.1867933414168915E-11
Adding measurement 100cdceb to history. Total: 5
New Minimum: 3.1544098176805635E-5 > 3.154405070510887E-5
WOLFE (weak): th(258.53216280382605)=3.154405070510887E-5; dx=-2.2952495888677825E-13 evalInputDelta=5.933963018086566E-11
Adding measurement 2aabbd00 to history. Total: 6
New Minimum: 3.154405070510887E-5 > 3.154375400834433E-5
WOLFE (weak): th(1551.1929768229563)=3.154375400834433E-5; dx=-2.2952317085535437E-13 evalInputDelta=3.5603639472265225E-10
Adding measurement 40198454 to history. Total: 7
New Minimum: 3.154375400834433E-5 > 3.1541617859869714E-5
WOLFE (weak): th(10858.350837760694)=3.1541617859869714E-5; dx=-2.295102970291021E-13 evalInputDelta=2.492184869335324E-9
Adding measurement 7fafc484 to history. Total: 8
New Minimum: 3.1541617859869714E-5 > 3.152417713220957E-5
WOLFE (weak): th(86866.80670208555)=3.152417713220957E-5; dx=-2.2940516078137563E-13 evalInputDelta=1.9932912529482382E-8
Adding measurement 12a54099 to history. Total: 9
New Minimum: 3.152417713220957E-5 > 3.136508958352046E-5
WOLFE (weak): th(781801.26031877)=3.136508958352046E-5; dx=-2.28443915087876E-13 evalInputDelta=1.790204612185886E-7
Adding measurement 6f306318 to history. Total: 10
New Minimum: 3.136508958352046E-5 > 2.9791950276719957E-5
WOLFE (weak): th(7818012.6031877)=2.9791950276719957E-5; dx=-2.187113024411927E-13 evalInputDelta=1.7521597680190926E-6
Adding measurement 37c87396 to history. Total: 11
New Minimum: 2.9791950276719957E-5 > 1.692027799470016E-5
END: th(8.599813863506469E7)=1.692027799470016E-5; dx=-1.1057116192248934E-13 evalInputDelta=1.462383205003889E-5
Fitness changed from 3.154411004473905E-5 to 1.692027799470016E-5
Iteration 1 complete. Error: 1.692027799470016E-5 Total: 0.9728; Orientation: 0.0163; Line Search: 0.8701
Non-optimal measurement 1.692027799470016E-5 < 1.692027799470016E-5. Total: 12
Rejected: LBFGS Orientation magnitude: 3.830e+01, gradient 2.308e-07, dot -1.000; [74635add-7f74-4c04-823d-b062e82a8f03 = 1.000/1.000e+00, 1743a5c9-19e5-497f-ab65-40a27b23a689 = 1.000/1.000e+00, e43b1850-2cff-4cdd-9536-2f4119e4631d = 1.000/1.000e+00, e0d1ac58-2c8b-4177-938d-cb248ea9853a = 1.000/1.000e+00, 056528e2-b1fd-4121-a783-ba3bbf3ab921 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.692027799470016E-5, 2.9791950276719957E-5, 3.136508958352046E-5, 3.152417713220957E-5, 3.1541617859869714E-5, 3.154375400834433E-5, 3.154405070510887E-5, 3.1544098176805635E-5, 3.15441070777554E-5, 3.1544109055744485E-5, 3.154410955024176E-5, 3.154411004473905E-5
Rejected: LBFGS Orientation magnitude: 3.830e+01, gradient 2.308e-07, dot -1.000; [e43b1850-2cff-4cdd-9536-2f4119e4631d = 1.000/1.000e+00, 056528e2-b1fd-4121-a783-ba3bbf3ab921 = 1.000/1.000e+00, e0d1ac58-2c8b-4177-938d-cb248ea9853a = 1.000/1.000e+00, 74635add-7f74-4c04-823d-b062e82a8f03 = 1.000/1.000e+00, 1743a5c9-19e5-497f-ab65-40a27b23a689 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.692027799470016E-5, 2.9791950276719957E-5, 3.136508958352046E-5, 3.152417713220957E-5, 3.1541617859869714E-5, 3.154375400834433E-5, 3.154405070510887E-5, 3.1544098176805635E-5, 3.15441070777554E-5, 3.1544109055744485E-5, 3.154410955024176E-5
Rejected: LBFGS Orientation magnitude: 3.830e+01, gradient 2.308e-07, dot -1.000; [e43b1850-2cff-4cdd-9536-2f4119e4631d = 1.000/1.000e+00, e0d1ac58-2c8b-4177-938d-cb248ea9853a = 1.000/1.000e+00, 056528e2-b1fd-4121-a783-ba3bbf3ab921 = 1.000/1.000e+00, 74635add-7f74-4c04-823d-b062e82a8f03 = 1.000/1.000e+00, 1743a5c9-19e5-497f-ab65-40a27b23a689 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.692027799470016E-5, 2.9791950276719957E-5, 3.136508958352046E-5, 3.152417713220957E-5, 3.1541617859869714E-5, 3.154375400834433E-5, 3.154405070510887E-5, 3.1544098176805635E-5, 3.15441070777554E-5, 3.1544109055744485E-5
Rejected: LBFGS Orientation magnitude: 3.830e+01, gradient 2.308e-07, dot -1.000; [e0d1ac58-2c8b-4177-938d-cb248ea9853a = 1.000/1.000e+00, 1743a5c9-19e5-497f-ab65-40a27b23a689 = 1.000/1.000e+00, 056528e2-b1fd-4121-a783-ba3bbf3ab921 = 1.000/1.000e+00, e43b1850-2cff-4cdd-9536-2f4119e4631d = 1.000/1.000e+00, 74635add-7f74-4c04-823d-b062e82a8f03 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.692027799470016E-5, 2.9791950276719957E-5, 3.136508958352046E-5, 3.152417713220957E-5, 3.1541617859869714E-5, 3.154375400834433E-5, 3.154405070510887E-5, 3.1544098176805635E-5, 3.15441070777554E-5
Rejected: LBFGS Orientation magnitude: 3.830e+01, gradient 2.308e-07, dot -1.000; [e0d1ac58-2c8b-4177-938d-cb248ea9853a = 1.000/1.000e+00, 056528e2-b1fd-4121-a783-ba3bbf3ab921 = 1.000/1.000e+00, 1743a5c9-19e5-497f-ab65-40a27b23a689 = 1.000/1.000e+00, 74635add-7f74-4c04-823d-b062e82a8f03 = 1.000/1.000e+00, e43b1850-2cff-4cdd-9536-2f4119e4631d = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.692027799470016E-5, 2.9791950276719957E-5, 3.136508958352046E-5, 3.152417713220957E-5, 3.1541617859869714E-5, 3.154375400834433E-5, 3.154405070510887E-5, 3.1544098176805635E-5
Rejected: LBFGS Orientation magnitude: 3.830e+01, gradient 2.308e-07, dot -1.000; [74635add-7f74-4c04-823d-b062e82a8f03 = 1.000/1.000e+00, e0d1ac58-2c8b-4177-938d-cb248ea9853a = 1.000/1.000e+00, 1743a5c9-19e5-497f-ab65-40a27b23a689 = 1.000/1.000e+00, 056528e2-b1fd-4121-a783-ba3bbf3ab921 = 1.000/1.000e+00, e43b1850-2cff-4cdd-9536-2f4119e4631d = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.692027799470016E-5, 2.9791950276719957E-5, 3.136508958352046E-5, 3.152417713220957E-5, 3.1541617859869714E-5, 3.154375400834433E-5, 3.154405070510887E-5
Rejected: LBFGS Orientation magnitude: 3.830e+01, gradient 2.308e-07, dot -1.000; [1743a5c9-19e5-497f-ab65-40a27b23a689 = 1.000/1.000e+00, e43b1850-2cff-4cdd-9536-2f4119e4631d = 1.000/1.000e+00, e0d1ac58-2c8b-4177-938d-cb248ea9853a = 1.000/1.000e+00, 74635add-7f74-4c04-823d-b062e82a8f03 = 1.000/1.000e+00, 056528e2-b1fd-4121-a783-ba3bbf3ab921 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.692027799470016E-5, 2.9791950276719957E-5, 3.136508958352046E-5, 3.152417713220957E-5, 3.1541617859869714E-5, 3.154375400834433E-5
Rejected: LBFGS Orientation magnitude: 3.830e+01, gradient 2.308e-07, dot -1.000; [056528e2-b1fd-4121-a783-ba3bbf3ab921 = 1.000/1.000e+00, e43b1850-2cff-4cdd-9536-2f4119e4631d = 1.000/1.000e+00, e0d1ac58-2c8b-4177-938d-cb248ea9853a = 1.000/1.000e+00, 74635add-7f74-4c04-823d-b062e82a8f03 = 1.000/1.000e+00, 1743a5c9-19e5-497f-ab65-40a27b23a689 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.692027799470016E-5, 2.9791950276719957E-5, 3.136508958352046E-5, 3.152417713220957E-5, 3.1541617859869714E-5
Rejected: LBFGS Orientation magnitude: 3.830e+01, gradient 2.308e-07, dot -1.000; [056528e2-b1fd-4121-a783-ba3bbf3ab921 = 1.000/1.000e+00, 74635add-7f74-4c04-823d-b062e82a8f03 = 1.000/1.000e+00, e43b1850-2cff-4cdd-9536-2f4119e4631d = 1.000/1.000e+00, e0d1ac58-2c8b-4177-938d-cb248ea98

...skipping 5192 bytes...

85E-5, 3.154410955024176E-5, 3.154411004473905E-5
Rejected: LBFGS Orientation magnitude: 2.403e+00, gradient 1.448e-08, dot -1.000; [056528e2-b1fd-4121-a783-ba3bbf3ab921 = 1.000/1.000e+00, 1743a5c9-19e5-497f-ab65-40a27b23a689 = 1.000/1.000e+00, e43b1850-2cff-4cdd-9536-2f4119e4631d = 1.000/1.000e+00, 74635add-7f74-4c04-823d-b062e82a8f03 = 1.000/1.000e+00, e0d1ac58-2c8b-4177-938d-cb248ea9853a = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.2518275267048345E-5, 1.2611055394487183E-5, 3.1544109055744485E-5, 3.154410955024176E-5
LBFGS Accumulation History: 3 points
Removed measurement adfda49 to history. Total: 4
Removed measurement 45841977 to history. Total: 3
Adding measurement 1977f25e to history. Total: 3
th(0)=1.2518275267048345E-5;dx=-2.0967164702520292E-16
Adding measurement 241f38f7 to history. Total: 4
New Minimum: 1.2518275267048345E-5 > 1.2503625957712627E-5
END: th(1.0E8)=1.2503625957712627E-5; dx=-8.331453968846267E-17 evalInputDelta=1.4649309335717985E-8
Fitness changed from 1.2518275267048345E-5 to 1.2503625957712627E-5
Iteration 5 complete. Error: 1.2503625957712627E-5 Total: 2.3526; Orientation: 2.2600; Line Search: 0.0860
Non-optimal measurement 1.2503625957712627E-5 < 1.2503625957712627E-5. Total: 5
Rejected: LBFGS Orientation magnitude: 9.548e-01, gradient 5.754e-09, dot -1.000; [e43b1850-2cff-4cdd-9536-2f4119e4631d = 1.000/1.000e+00, 056528e2-b1fd-4121-a783-ba3bbf3ab921 = 1.000/1.000e+00, 1743a5c9-19e5-497f-ab65-40a27b23a689 = 1.000/1.000e+00, e0d1ac58-2c8b-4177-938d-cb248ea9853a = 1.000/1.000e+00, 74635add-7f74-4c04-823d-b062e82a8f03 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.2503625957712627E-5, 1.2518275267048345E-5, 3.1544109055744485E-5, 3.154410955024176E-5, 3.154411004473905E-5
Rejected: LBFGS Orientation magnitude: 9.548e-01, gradient 5.754e-09, dot -1.000; [e43b1850-2cff-4cdd-9536-2f4119e4631d = 1.000/1.000e+00, 056528e2-b1fd-4121-a783-ba3bbf3ab921 = 1.000/1.000e+00, 1743a5c9-19e5-497f-ab65-40a27b23a689 = 1.000/1.000e+00, e0d1ac58-2c8b-4177-938d-cb248ea9853a = 1.000/1.000e+00, 74635add-7f74-4c04-823d-b062e82a8f03 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.2503625957712627E-5, 1.2518275267048345E-5, 3.1544109055744485E-5, 3.154410955024176E-5
LBFGS Accumulation History: 3 points
Removed measurement 241f38f7 to history. Total: 4
Removed measurement 1977f25e to history. Total: 3
Adding measurement 5efb322e to history. Total: 3
th(0)=1.2503625957712627E-5;dx=-3.310563264982634E-17
Adding measurement 41c56494 to history. Total: 4
New Minimum: 1.2503625957712627E-5 > 1.2501312937996723E-5
END: th(1.0E8)=1.2501312937996723E-5; dx=-1.3154761668772902E-17 evalInputDelta=2.313019715903636E-9
Fitness changed from 1.2503625957712627E-5 to 1.2501312937996723E-5
Iteration 6 complete. Error: 1.2501312937996723E-5 Total: 2.4144; Orientation: 2.3019; Line Search: 0.1058
Non-optimal measurement 1.2501312937996723E-5 < 1.2501312937996723E-5. Total: 5
Rejected: LBFGS Orientation magnitude: 3.794e-01, gradient 2.286e-09, dot -1.000; [e43b1850-2cff-4cdd-9536-2f4119e4631d = 1.000/1.000e+00, 056528e2-b1fd-4121-a783-ba3bbf3ab921 = 1.000/1.000e+00, e0d1ac58-2c8b-4177-938d-cb248ea9853a = 1.000/1.000e+00, 74635add-7f74-4c04-823d-b062e82a8f03 = 1.000/1.000e+00, 1743a5c9-19e5-497f-ab65-40a27b23a689 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.2501312937996723E-5, 1.2503625957712627E-5, 3.1544109055744485E-5, 3.154410955024176E-5, 3.154411004473905E-5
Rejected: LBFGS Orientation magnitude: 3.794e-01, gradient 2.286e-09, dot -1.000; [1743a5c9-19e5-497f-ab65-40a27b23a689 = 1.000/1.000e+00, 056528e2-b1fd-4121-a783-ba3bbf3ab921 = 1.000/1.000e+00, 74635add-7f74-4c04-823d-b062e82a8f03 = 1.000/1.000e+00, e0d1ac58-2c8b-4177-938d-cb248ea9853a = 1.000/1.000e+00, e43b1850-2cff-4cdd-9536-2f4119e4631d = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.2501312937996723E-5, 1.2503625957712627E-5, 3.1544109055744485E-5, 3.154410955024176E-5
LBFGS Accumulation History: 3 points
Removed measurement 41c56494 to history. Total: 4
Removed measurement 5efb322e to history. Total: 3
Adding measurement 7fd8e489 to history. Total: 3
th(0)=1.2501312937996723E-5;dx=-5.227139332832674E-18
Adding measurement 637f28a to history. Total: 4
New Minimum: 1.2501312937996723E-5 > 1.2500947728956237E-5
END: th(1.0E8)=1.2500947728956237E-5; dx=-2.077041476905385E-18 evalInputDelta=3.6520904048598524E-10
Fitness changed from 1.2501312937996723E-5 to 1.2500947728956237E-5
Iteration 7 complete. Error: 1.2500947728956237E-5 Total: 1.9660; Orientation: 1.8861; Line Search: 0.0265
Non-optimal measurement 1.2500947728956237E-5 < 1.2500947728956237E-5. Total: 5
Rejected: LBFGS Orientation magnitude: 1.507e-01, gradient 9.085e-10, dot -1.000; [e43b1850-2cff-4cdd-9536-2f4119e4631d = 1.000/1.000e+00, 056528e2-b1fd-4121-a783-ba3bbf3ab921 = 1.000/1.000e+00, 74635add-7f74-4c04-823d-b062e82a8f03 = 1.000/1.000e+00, e0d1ac58-2c8b-4177-938d-cb248ea9853a = 1.000/1.000e+00, 1743a5c9-19e5-497f-ab65-40a27b23a689 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.2500947728956237E-5, 1.2501312937996723E-5, 3.1544109055744485E-5, 3.154410955024176E-5, 3.154411004473905E-5
Rejected: LBFGS Orientation magnitude: 1.507e-01, gradient 9.085e-10, dot -1.000; [e43b1850-2cff-4cdd-9536-2f4119e4631d = 1.000/1.000e+00, 056528e2-b1fd-4121-a783-ba3bbf3ab921 = 1.000/1.000e+00, 1743a5c9-19e5-497f-ab65-40a27b23a689 = 1.000/1.000e+00, e0d1ac58-2c8b-4177-938d-cb248ea9853a = 1.000/1.000e+00, 74635add-7f74-4c04-823d-b062e82a8f03 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.2500947728956237E-5, 1.2501312937996723E-5, 3.1544109055744485E-5, 3.154410955024176E-5
LBFGS Accumulation History: 3 points
Removed measurement 637f28a to history. Total: 4
Removed measurement 7fd8e489 to history. Total: 3
Adding measurement 600e4b8 to history. Total: 3
th(0)=1.2500947728956237E-5;dx=-8.253273965144946E-19
Adding measurement 1943041b to history. Total: 4
New Minimum: 1.2500947728956237E-5 > 1.2500890065097016E-5
END: th(1.0E8)=1.2500890065097016E-5; dx=-3.2794978772030683E-19 evalInputDelta=5.766385922054173E-11
Fitness changed from 1.2500947728956237E-5 to 1.2500890065097016E-5
Iteration 8 complete. Error: 1.2500890065097016E-5 Total: 2.0870; Orientation: 1.9672; Line Search: 0.1127
Non-optimal measurement 1.2500890065097016E-5 < 1.2500890065097016E-5. Total: 5
Rejected: LBFGS Orientation magnitude: 5.990e-02, gradient 3.610e-10, dot -1.000; [1743a5c9-19e5-497f-ab65-40a27b23a689 = 1.000/1.000e+00, 056528e2-b1fd-4121-a783-ba3bbf3ab921 = 1.000/1.000e+00, e43b1850-2cff-4cdd-9536-2f4119e4631d = 1.000/1.000e+00, e0d1ac58-2c8b-4177-938d-cb248ea9853a = 1.000/1.000e+00, 74635add-7f74-4c04-823d-b062e82a8f03 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.2500890065097016E-5, 1.2500947728956237E-5, 3.1544109055744485E-5, 3.154410955024176E-5, 3.154411004473905E-5
Rejected: LBFGS Orientation magnitude: 5.990e-02, gradient 3.610e-10, dot -1.000; [e0d1ac58-2c8b-4177-938d-cb248ea9853a = 1.000/1.000e+00, e43b1850-2cff-4cdd-9536-2f4119e4631d = 1.000/1.000e+00, 74635add-7f74-4c04-823d-b062e82a8f03 = 1.000/1.000e+00, 056528e2-b1fd-4121-a783-ba3bbf3ab921 = 1.000/1.000e+00, 1743a5c9-19e5-497f-ab65-40a27b23a689 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.2500890065097016E-5, 1.2500947728956237E-5, 3.1544109055744485E-5, 3.154410955024176E-5
LBFGS Accumulation History: 3 points
Removed measurement 1943041b to history. Total: 4
Removed measurement 600e4b8 to history. Total: 3
Adding measurement 69f50a0d to history. Total: 3
th(0)=1.2500890065097016E-5;dx=-1.3031321112082516E-19
Adding measurement 5edb597d to history. Total: 4
New Minimum: 1.2500890065097016E-5 > 1.25008809603918E-5
END: th(1.0E8)=1.25008809603918E-5; dx=-5.1780893382079395E-20 evalInputDelta=9.104705216752412E-12
Fitness changed from 1.2500890065097016E-5 to 1.25008809603918E-5
Iteration 9 complete. Error: 1.25008809603918E-5 Total: 2.1650; Orientation: 2.1311; Line Search: 0.0279
Final threshold in iteration 9: 1.25008809603918E-5 (> 0.0) after 31.602s (< 30.000s)

Returns

    1.25008809603918E-5

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.6524836555080576 ], [ 0.3983353041611838 ], [ -0.782967385038444 ], [ 4.964080543660308E-5 ], [ 0.4183822404836134 ], [ 0.04294524076593735 ], [ 0.49205195070229396 ], [ -0.7723372548153262 ], ... ],
    	[ [ 0.32410661688784553 ], [ 0.027040265284169373 ], [ -0.33260840269642267 ], [ -0.39002501545958546 ], [ -0.366193047074302 ], [ 2.4803222131531566E-4 ], [ 0.8207201779070024 ], [ -0.8620506285385265 ], ... ],
    	[ [ 1.3682685726479568E-4 ], [ 2.3189640505175683E-4 ], [ -0.5082332485444891 ], [ -0.02831983838041152 ], [ -0.7112254465832557 ], [ -0.7560625376987475 ], [ 2.6751231275066916E-5 ], [ -0.7459194930325039 ], ... ],
    	[ [ 0.8008460692945626 ], [ -0.6006182779140217 ], [ -0.2500213807822589 ], [ -0.6391529673982723 ], [ -0.2548173936748279 ], [ 5.607778734798431E-5 ], [ 5.648823671883399E-6 ], [ -0.2698241226323346 ], ... ],
    	[ [ -0.8685167684846917 ], [ -0.1805903514242373 ], [ 8.030769414077859E-5 ], [ -0.4424380521132065 ], [ -0.6302347514219349 ], [ -0.6394926265285732 ], [ -0.2626424196099362 ], [ -0.9043464507842942 ], ... ],
    	[ [ -0.8723866280149402 ], [ -0.8113426003639113 ], [ -0.35162442653541204 ], [ 0.7112283630543712 ], [ -0.5156939908225759 ], [ 1.7084232872949527E-4 ], [ 2.4561229852801246E-4 ], [ 1.6589752683009493E-4 ], ... ],
    	[ [ -0.6730890742265239 ], [ 0.18597743672041822 ], [ 2.88872062175422E-4 ], [ -0.6045353408424179 ], [ -0.9143511157324296 ], [ 0.7455430590953194 ], [ -0.7553992796252627 ], [ 1.9355581676054796E-4 ], ... ],
    	[ [ 0.28453799338871194 ], [ -0.6959664466262401 ], [ -0.9335735426173968 ], [ -0.9969752920295614 ], [ 0.22623256508168246 ], [ -0.5262287986476555 ], [ -0.6299783105779808 ], [ -0.18631765031531633 ], ... ],
    	...
    ]

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.008008840153597535 ], [ 0.004889323666012013 ], [ 0.0 ], [ 6.093107045386824E-7 ], [ 0.0051353876205959366 ], [ 5.271267191886087E-4 ], [ 0.006039638521476897 ], [ 0.0 ], ... ],
    	[ [ 0.003978211661649776 ], [ 3.3190281556272756E-4 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 3.044444710127393E-6 ], [ 0.010073841176253252 ], [ 0.0 ], ... ],
    	[ [ 1.6794664805811702E-6 ], [ 2.8463873762589493E-6 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 3.283550988370839E-7 ], [ 0.0 ], ... ],
    	[ [ 0.009829898576728165 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 6.883207437399086E-7 ], [ 6.933587602090264E-8 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 9.857281175521405E-7 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.008729895721252975 ], [ 0.0 ], [ 2.096985711002219E-6 ], [ 3.0147416292548636E-6 ], [ 2.036291274184999E-6 ], ... ],
    	[ [ 0.0 ], [ 0.002282759959266499 ], [ 3.545728925579919E-6 ], [ 0.0 ], [ 0.0 ], [ 0.009151087751415403 ], [ 0.0 ], [ 2.375779966514579E-6 ], ... ],
    	[ [ 0.003492530866388031 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.002776867184307839 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], ... ],
    	...
    ]

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

    return TestUtil.compare(title + " vs Iteration", runs);
Logging
Plotting range=[1.0, -4.903059439678291], [19.0, -4.771592505920371]; valueStats=DoubleSummaryStatistics{count=30, sum=0.000386, min=0.000013, average=0.000013, max=0.000017}
Plotting 19 points for GD
Plotting 2 points for CjGD
Plotting 9 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, -4.903059439678291], [30.629, -4.771592505920371]; valueStats=DoubleSummaryStatistics{count=30, sum=0.000386, min=0.000013, average=0.000013, max=0.000017}
Plotting 19 points for GD
Plotting 2 points for CjGD
Plotting 9 points for LBFGS

Returns

Result

Model Learning

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

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

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

Returns

    [0.44988450636003785]

Gradient Descent

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

TrainingTester.java:480 executed in 0.00 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: 3277693000482

Nothing to optimize
java.lang.AssertionError: Nothing to optimize
at com.simiacryptus.mindseye.opt.IterativeTrainer.measure(IterativeTrainer.java:147)
at com.simiacryptus.mindseye.opt.IterativeTrainer.run(IterativeTrainer.java:185)
at com.simiacryptus.mindseye.test.unit.TrainingTester.lambda$trainGD$892d3ca8$1(TrainingTester.java:489)
at com.simiacryptus.notebook.MarkdownNotebookOutput.lambda$eval$dc58be99$1(MarkdownNotebookOutput.java:657)
at com.simiacryptus.util.test.SysOutInterceptor.withOutput(SysOutInterceptor.java:102)
at com.simiacryptus.notebook.MarkdownNotebookOutput.eval(MarkdownNotebookOutput.java:649)
at com.simiacryptus.notebook.NotebookOutput.eval(NotebookOutput.java:125)
at com.simiacryptus.mindseye.test.unit.TrainingTester.trainGD(TrainingTester.java:480)
at com.simiacryptus.mindseye.test.unit.TrainingTester.runOpt(TrainingTester.java:658)
at com.simiacryptus.mindseye.test.unit.TrainingTester.train(TrainingTester.java:606)
at com.simiacryptus.mindseye.test.unit.TrainingTester.trainAll(TrainingTester.java:414)
at com.simiacryptus.mindseye.test.unit.TrainingTester.testModelLearning(TrainingTester.java:394)
at com.simiacryptus.mindseye.test.unit.TrainingTester.test(TrainingTester.java:238)
at com.simiacryptus.mindseye.test.unit.TrainingTester.test(TrainingTester.java:58)
at com.simiacryptus.mindseye.test.unit.LayerTests.run(LayerTests.java:369)
at com.simiacryptus.mindseye.test.unit.LayerTests.run(LayerTests.java:418)
at com.simiacryptus.mindseye.test.LayerTestBase.trainingTest(LayerTestBase.java:95)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:686)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutInvocation.proceed(TimeoutInvocation.java:46)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:205)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:201)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:137)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:71)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
at java.util.ArrayList.forEach(Unknown Source)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
at java.util.ArrayList.forEach(Unknown Source)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:248)
at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$5(DefaultLauncher.java:211)
at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:226)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:199)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:141)
at org.junit.platform.runner.JUnitPlatform.run(JUnitPlatform.java:139)
at com.simiacryptus.util.test.MacroTestRunner.runTest(MacroTestRunner.java:94)
at com.simiacryptus.util.test.MacroTestRunner.lambda$null$8bb7732f$1(MacroTestRunner.java:177)
at com.simiacryptus.aws.TendrilControl.lambda$null$0(TendrilControl.java:86)
at java.lang.Thread.run(Unknown Source)


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

    

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 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.3047614163677704 ], [ 0.0 ], [ 0.4023118052196314 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.06010530274939545 ], [ 0.26519485060765624 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.22520731425511123 ], [ 0.2657745378759479 ], ... ],
    	[ [ 0.031695449034519776 ], [ 0.22446031688902515 ], [ 0.0 ], [ 0.4265998031564402 ], [ 0.04136417714549202 ], [ 0.38724069777896003 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.3884715257271497 ], [ 0.006936789510449367 ], [ 0.0 ], [ 0.0 ], [ 0.03588086670759543 ], [ 0.0 ], [ 0.3057888609833718 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.3759625699238124 ], ... ],
    	[ [ 0.3080108401051193 ], [ 0.0 ], [ 0.19357564066928942 ], [ 0.1885286901396227 ], [ 0.0 ], [ 0.0 ], [ 0.14847229952586335 ], [ 0.15946430379273205 ], ... ],
    	[ [ 0.0 ], [ 0.35561321240796157 ], [ 0.0 ], [ 0.0 ], [ 0.14442878570490908 ], [ 0.0 ], [ 0.33655643299498006 ], [ 0.0 ], ... ],
    	[ [ 0.17701818207702327 ], [ 0.1730878876376291 ], [ 0.3771132110432502 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.36653625633046905 ], [ 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.00 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: 3277703692843

Nothing to optimize
java.lang.AssertionError: Nothing to optimize
at com.simiacryptus.mindseye.opt.IterativeTrainer.measure(IterativeTrainer.java:147)
at com.simiacryptus.mindseye.opt.IterativeTrainer.run(IterativeTrainer.java:185)
at com.simiacryptus.mindseye.test.unit.TrainingTester.lambda$trainCjGD$892d3ca8$1(TrainingTester.java:461)
at com.simiacryptus.notebook.MarkdownNotebookOutput.lambda$eval$dc58be99$1(MarkdownNotebookOutput.java:657)
at com.simiacryptus.util.test.SysOutInterceptor.withOutput(SysOutInterceptor.java:102)
at com.simiacryptus.notebook.MarkdownNotebookOutput.eval(MarkdownNotebookOutput.java:649)
at com.simiacryptus.notebook.NotebookOutput.eval(NotebookOutput.java:125)
at com.simiacryptus.mindseye.test.unit.TrainingTester.trainCjGD(TrainingTester.java:452)
at com.simiacryptus.mindseye.test.unit.TrainingTester.runOpt(TrainingTester.java:658)
at com.simiacryptus.mindseye.test.unit.TrainingTester.train(TrainingTester.java:606)
at com.simiacryptus.mindseye.test.unit.TrainingTester.trainAll(TrainingTester.java:416)
at com.simiacryptus.mindseye.test.unit.TrainingTester.testModelLearning(TrainingTester.java:394)
at com.simiacryptus.mindseye.test.unit.TrainingTester.test(TrainingTester.java:238)
at com.simiacryptus.mindseye.test.unit.TrainingTester.test(TrainingTester.java:58)
at com.simiacryptus.mindseye.test.unit.LayerTests.run(LayerTests.java:369)
at com.simiacryptus.mindseye.test.unit.LayerTests.run(LayerTests.java:418)
at com.simiacryptus.mindseye.test.LayerTestBase.trainingTest(LayerTestBase.java:95)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:686)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutInvocation.proceed(TimeoutInvocation.java:46)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:205)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:201)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:137)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:71)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
at java.util.ArrayList.forEach(Unknown Source)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
at java.util.ArrayList.forEach(Unknown Source)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:248)
at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$5(DefaultLauncher.java:211)
at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:226)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:199)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:141)
at org.junit.platform.runner.JUnitPlatform.run(JUnitPlatform.java:139)
at com.simiacryptus.util.test.MacroTestRunner.runTest(MacroTestRunner.java:94)
at com.simiacryptus.util.test.MacroTestRunner.lambda$null$8bb7732f$1(MacroTestRunner.java:177)
at com.simiacryptus.aws.TendrilControl.lambda$null$0(TendrilControl.java:86)
at java.lang.Thread.run(Unknown Source)


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

    

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 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.3047614163677704 ], [ 0.0 ], [ 0.4023118052196314 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.06010530274939545 ], [ 0.26519485060765624 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.22520731425511123 ], [ 0.2657745378759479 ], ... ],
    	[ [ 0.031695449034519776 ], [ 0.22446031688902515 ], [ 0.0 ], [ 0.4265998031564402 ], [ 0.04136417714549202 ], [ 0.38724069777896003 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.3884715257271497 ], [ 0.006936789510449367 ], [ 0.0 ], [ 0.0 ], [ 0.03588086670759543 ], [ 0.0 ], [ 0.3057888609833718 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.3759625699238124 ], ... ],
    	[ [ 0.3080108401051193 ], [ 0.0 ], [ 0.19357564066928942 ], [ 0.1885286901396227 ], [ 0.0 ], [ 0.0 ], [ 0.14847229952586335 ], [ 0.15946430379273205 ], ... ],
    	[ [ 0.0 ], [ 0.35561321240796157 ], [ 0.0 ], [ 0.0 ], [ 0.14442878570490908 ], [ 0.0 ], [ 0.33655643299498006 ], [ 0.0 ], ... ],
    	[ [ 0.17701818207702327 ], [ 0.1730878876376291 ], [ 0.3771132110432502 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.36653625633046905 ], [ 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.00 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: 3277714394659

Nothing to optimize
java.lang.AssertionError: Nothing to optimize
at com.simiacryptus.mindseye.opt.IterativeTrainer.measure(IterativeTrainer.java:147)
at com.simiacryptus.mindseye.opt.IterativeTrainer.run(IterativeTrainer.java:185)
at com.simiacryptus.mindseye.test.unit.TrainingTester.lambda$trainLBFGS$892d3ca8$1(TrainingTester.java:519)
at com.simiacryptus.notebook.MarkdownNotebookOutput.lambda$eval$dc58be99$1(MarkdownNotebookOutput.java:657)
at com.simiacryptus.util.test.SysOutInterceptor.withOutput(SysOutInterceptor.java:102)
at com.simiacryptus.notebook.MarkdownNotebookOutput.eval(MarkdownNotebookOutput.java:649)
at com.simiacryptus.notebook.NotebookOutput.eval(NotebookOutput.java:125)
at com.simiacryptus.mindseye.test.unit.TrainingTester.trainLBFGS(TrainingTester.java:509)
at com.simiacryptus.mindseye.test.unit.TrainingTester.runOpt(TrainingTester.java:658)
at com.simiacryptus.mindseye.test.unit.TrainingTester.train(TrainingTester.java:606)
at com.simiacryptus.mindseye.test.unit.TrainingTester.trainAll(TrainingTester.java:418)
at com.simiacryptus.mindseye.test.unit.TrainingTester.testModelLearning(TrainingTester.java:394)
at com.simiacryptus.mindseye.test.unit.TrainingTester.test(TrainingTester.java:238)
at com.simiacryptus.mindseye.test.unit.TrainingTester.test(TrainingTester.java:58)
at com.simiacryptus.mindseye.test.unit.LayerTests.run(LayerTests.java:369)
at com.simiacryptus.mindseye.test.unit.LayerTests.run(LayerTests.java:418)
at com.simiacryptus.mindseye.test.LayerTestBase.trainingTest(LayerTestBase.java:95)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:686)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutInvocation.proceed(TimeoutInvocation.java:46)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:205)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:201)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:137)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:71)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
at java.util.ArrayList.forEach(Unknown Source)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
at java.util.ArrayList.forEach(Unknown Source)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:248)
at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$5(DefaultLauncher.java:211)
at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:226)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:199)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:141)
at org.junit.platform.runner.JUnitPlatform.run(JUnitPlatform.java:139)
at com.simiacryptus.util.test.MacroTestRunner.runTest(MacroTestRunner.java:94)
at com.simiacryptus.util.test.MacroTestRunner.lambda$null$8bb7732f$1(MacroTestRunner.java:177)
at com.simiacryptus.aws.TendrilControl.lambda$null$0(TendrilControl.java:86)
at java.lang.Thread.run(Unknown Source)


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

    

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 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.3047614163677704 ], [ 0.0 ], [ 0.4023118052196314 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.06010530274939545 ], [ 0.26519485060765624 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.22520731425511123 ], [ 0.2657745378759479 ], ... ],
    	[ [ 0.031695449034519776 ], [ 0.22446031688902515 ], [ 0.0 ], [ 0.4265998031564402 ], [ 0.04136417714549202 ], [ 0.38724069777896003 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.3884715257271497 ], [ 0.006936789510449367 ], [ 0.0 ], [ 0.0 ], [ 0.03588086670759543 ], [ 0.0 ], [ 0.3057888609833718 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.3759625699238124 ], ... ],
    	[ [ 0.3080108401051193 ], [ 0.0 ], [ 0.19357564066928942 ], [ 0.1885286901396227 ], [ 0.0 ], [ 0.0 ], [ 0.14847229952586335 ], [ 0.15946430379273205 ], ... ],
    	[ [ 0.0 ], [ 0.35561321240796157 ], [ 0.0 ], [ 0.0 ], [ 0.14442878570490908 ], [ 0.0 ], [ 0.33655643299498006 ], [ 0.0 ], ... ],
    	[ [ 0.17701818207702327 ], [ 0.1730878876376291 ], [ 0.3771132110432502 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.36653625633046905 ], [ 0.0 ], ... ],
    	...
    ]

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

    return TestUtil.compare(title + " vs Iteration", runs);
Logging
No Data

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

    return TestUtil.compareTime(title + " vs Time", runs);
Logging
No Data

Composite Learning

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

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

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

Returns

    [0.9191411548840611]

We simultaneously regress this target input:

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

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

Returns

    [
    	[ [ -0.893499976212689 ], [ 0.345507865464209 ], [ -0.33169397355839614 ], [ 0.8945259594640438 ], [ 0.8727929486089077 ], [ 0.7281492018734563 ], [ -0.9828365842509077 ], [ -0.838118759949378 ], ... ],
    	[ [ -0.07365044498773998 ], [ -0.0623198274128951 ], [ -0.9366785059511893 ], [ 0.781729170040981 ], [ -0.5860587323511846 ], [ 0.881490321789762 ], [ -0.5518720039965519 ], [ -0.42713561958650037 ], ... ],
    	[ [ 0.6228234501510248 ], [ 0.7029132239018268 ], [ 0.5532979696152076 ], [ 0.05071352816886332 ], [ 0.8467790007475213 ], [ -0.4209405137941835 ], [ -0.058006259885604594 ], [ 0.4116932467992729 ], ... ],
    	[ [ -0.7758115855952059 ], [ -0.09909947685456078 ], [ 0.8444690476909962 ], [ 0.19069459268544753 ], [ 0.9014931374958106 ], [ 0.621434725168619 ], [ -0.9249908966374429 ], [ -0.9684640496615393 ], ... ],
    	[ [ 0.9615785406447748 ], [ 0.7535458503253667 ], [ -0.8572622553078799 ], [ 0.6640354967913658 ], [ -0.5693880117490913 ], [ 0.18364874335950332 ], [ -0.6188521168364509 ], [ 0.0583217820996802 ], ... ],
    	[ [ -0.5752565740139264 ], [ -0.8916926082314194 ], [ -0.2255906930964724 ], [ 0.08509405063196307 ], [ 0.7988103489078304 ], [ 0.6412398818387994 ], [ 0.36410135004063915 ], [ 0.05888495666725224 ], ... ],
    	[ [ 0.2992148947893276 ], [ -0.9901529154544664 ], [ -0.8377187527119763 ], [ 0.41040707324638337 ], [ -0.007884423295730691 ], [ -0.1359762729023284 ], [ 0.7893871284690606 ], [ 0.8157849320649515 ], ... ],
    	[ [ 0.32981627982267536 ], [ -0.008115329261786819 ], [ -0.7384623961319594 ], [ -0.8795839971140531 ], [ 0.050356183760180695 ], [ 0.4496531593238051 ], [ -0.7048095945319253 ], [ -0.4519436252278062 ], ... ],
    	...
    ]
    [
    	[ [ -0.1295048390021203 ], [ -0.0692615118383797 ], [ 0.9989042695406725 ], [ 0.7628807052831807 ], [ -0.868683190906421 ], [ -0.026332163905724792 ], [ 0.9888746488431237 ], [ -0.2308566345140175 ], ... ],
    	[ [ 0.1679977110182984 ], [ -0.7767387478169139 ], [ 0.1400090397025866 ], [ 0.9728243007129895 ], [ 0.1778670646294931 ], [ 0.20941727801260068 ], [ -0.07530744121068955 ], [ 0.9322567694188049 ], ... ],
    	[ [ 0.36800351945306553 ], [ -0.6502903424239797 ], [ 0.2503585826195056 ], [ -0.12655386720455386 ], [ -0.9822218410501267 ], [ 0.6392857575270512 ], [ 0.06630833701374672 ], [ 0.8826647223377369 ], ... ],
    	[ [ 0.5481283218550066 ], [ 0.2873360648683001 ], [ -0.039280411920115554 ], [ -0.0585779833641904 ], [ 0.36611823907343277 ], [ 0.7463216405033413 ], [ 0.07378767780515205 ], [ -0.4202568742824553 ], ... ],
    	[ [ -0.8286615053957711 ], [ -0.42653127821163683 ], [ -0.5663396565355243 ], [ 0.10139021651994518 ], [ 0.2189065900424978 ], [ -0.7713437454225698 ], [ -0.35143340228951603 ], [ -0.20702247874842294 ], ... ],
    	[ [ -0.7267580362444475 ], [ 0.2672882121977065 ], [ 0.8557947137503732 ], [ -0.22991894935945378 ], [ 0.42623071493984765 ], [ 0.593779376843945 ], [ 0.39715350480789957 ], [ -0.025372406163806538 ], ... ],
    	[ [ -0.5041318318040044 ], [ 0.5768929911038132 ], [ 0.2257503742552378 ], [ -0.23979581391532134 ], [ -0.4383906548236698 ], [ -0.4956171229593389 ], [ 0.16507889263045494 ], [ -0.6820354292905724 ], ... ],
    	[ [ -0.865603145682549 ], [ 0.9459834276875949 ], [ 0.054475193113946885 ], [ -0.4118252724291882 ], [ 0.7821322972755071 ], [ -0.10643757321260905 ], [ 0.7618084337306175 ], [ -0.10671225931823503 ], ... ],
    	...
    ]
    [
    	[ [ -0.2462832726855273 ], [ 0.8685888610912798 ], [ 0.7174955461685402 ], [ -0.5552976993042815 ], [ -0.16054530093077402 ], [ 0.46024791638588747 ], [ 0.13992720643721368 ], [ 0.6333984819061149 ], ... ],
    	[ [ 0.5096714917177274 ], [ -0.11096415393479764 ], [ -0.6586130146156144 ], [ 0.8384629821761642 ], [ 0.7981994757897675 ], [ 0.6380673228789573 ], [ -0.7576016425409169 ], [ -0.5131731945455305 ], ... ],
    	[ [ -0.8910413814207949 ], [ 0.7861421609162744 ], [ 0.6552921013448403 ], [ 0.284311769112084 ], [ -0.34928055761873855 ], [ -0.8385575933443878 ], [ 0.4509324574369178 ], [ -0.6077646806557595 ], ... ],
    	[ [ 0.7113677163412271 ], [ 0.5335025325849216 ], [ 0.6062727120910683 ], [ 0.8705862279821086 ], [ 0.6536324443278412 ], [ -0.20625381733023485 ], [ -0.00601199861531776 ], [ -0.30301861688067744 ], ... ],
    	[ [ 0.45861724806519955 ], [ -0.08899475760168651 ], [ 0.3282894084330863 ], [ -0.5497579218646076 ], [ 0.4370031149265765 ], [ -0.9929311499948319 ], [ 0.10314575344350785 ], [ 0.7089764002246879 ], ... ],
    	[ [ 0.5923860123861766 ], [ 0.7242049606737804 ], [ 0.834658821232281 ], [ 0.9643254102153496 ], [ -0.6177406805929448 ], [ -0.29804663259991027 ], [ -0.24392391152672555 ], [ 0.8125651080096454 ], ... ],
    	[ [ 0.1462528039001414 ], [ 0.6605158583120307 ], [ -0.39134244625669545 ], [ 0.5284998036479163 ], [ -0.4837874555141979 ], [ 0.6390075950679195 ], [ 0.48510281626699725 ], [ 0.4281655521547232 ], ... ],
    	[ [ 0.5971106863043809 ], [ 0.1100686094457255 ], [ -0.061842757680874216 ], [ -0.4137922275328949 ], [ -0.3069636364393027 ], [ -0.7639473863545343 ], [ -0.4396516801947099 ], [ -0.504489558899786 ], ... ],
    	...
    ]
    [
    	[ [ 0.07703287033794015 ], [ 0.7630053270138917 ], [ -0.5835998391629431 ], [ 0.023954138179882456 ], [ 0.7217121536229765 ], [ 0.3201222942005406 ], [ 0.49340880882290317 ], [ 0.0903156169700492 ], ... ],
    	[ [ -0.09918262751220674 ], [ 0.03815419634002981 ], [ -0.46301584160398 ], [ 0.2269587947160685 ], [ 0.918080458843102 ], [ -0.8460012209622318 ], [ 0.26625807929049095 ], [ -0.11956420811310631 ], ... ],
    	[ [ 0.8938980915029182 ], [ 0.43107043476731 ], [ 0.3357191764763787 ], [ -0.9378957505065031 ], [ 0.492440065382173 ], [ -0.15310529234082337 ], [ 0.6280144319595773 ], [ 0.8545181087825318 ], ... ],
    	[ [ 0.4027434773774412 ], [ 0.8615811833248168 ], [ -0.7988524026619803 ], [ -0.07527755300070504 ], [ 0.29635603043738556 ], [ 0.8630797507117247 ], [ 0.7217017444512559 ], [ 0.9555417607553025 ], ... ],
    	[ [ 0.7221276552094222 ], [ 0.7776622960715636 ], [ 0.8262653672994025 ], [ -0.37441547040467005 ], [ -0.13299653302012615 ], [ -0.7579552317849603 ], [ -0.17210341225612957 ], [ 0.3604838323471211 ], ... ],
    	[ [ -0.962148551280871 ], [ 0.48085437331344005 ], [ 0.8387082250678441 ], [ -0.0388796971049592 ], [ -0.4457534441688571 ], [ -0.48165961740337915 ], [ 0.7514527919497209 ], [ -0.740423576801321 ], ... ],
    	[ [ -0.8502597774808915 ], [ -0.6775716644742904 ], [ 0.6726642730763561 ], [ -0.8847801292744175 ], [ -0.8317047470180174 ], [ -0.8370874629235645 ], [ 0.47849529045322914 ], [ 0.4521560376028122 ], ... ],
    	[ [ 0.503727119342527 ], [ -0.340693654173688 ], [ 0.20133264102671866 ], [ 0.12787365295225306 ], [ 0.21031015799607644 ], [ -0.5978239891639623 ], [ 0.03365949217727837 ], [ -0.5621763359856125 ], ... ],
    	...
    ]
    [
    	[ [ -0.10248938982368694 ], [ -0.4062030069838314 ], [ 0.8992654693978728 ], [ -0.6571830720654597 ], [ -0.4652468821249016 ], [ 0.23429903308528588 ], [ 0.3961001490933207 ], [ -0.6518999684188875 ], ... ],
    	[ [ -0.7390440380081615 ], [ 0.4475913415727564 ], [ 0.7829867270138722 ], [ -0.36417776064670493 ], [ 0.8827208474085195 ], [ 0.22966753976364407 ], [ -0.4974073178836047 ], [ -0.9341286893109089 ], ... ],
    	[ [ -0.9812875644181633 ], [ 0.4464119913429405 ], [ -0.6986918809403884 ], [ -0.9041067873663637 ], [ -0.6968554640607425 ], [ 0.3139547503788864 ], [ -0.7836576294097692 ], [ 0.47169738279504947 ], ... ],
    	[ [ 0.38133291935837166 ], [ 0.7425979642988065 ], [ 0.2222067246272239 ], [ -0.0647725701873536 ], [ 0.45013360429317406 ], [ -0.2828498311528067 ], [ -0.9616960181011085 ], [ -0.3626550972784559 ], ... ],
    	[ [ 0.05150867370977541 ], [ 0.3558685227716014 ], [ 0.41457203759771266 ], [ -0.3017735469623013 ], [ 0.9829730980465978 ], [ 0.768154750432485 ], [ 0.8356173269324687 ], [ 0.46437791860368693 ], ... ],
    	[ [ 0.08330382346129794 ], [ -0.9543630747775993 ], [ -0.2344257421128737 ], [ -0.6976633880064873 ], [ -0.08726953469756982 ], [ 0.5098984396488206 ], [ 0.5766459597191802 ], [ 0.6315501726174475 ], ... ],
    	[ [ -0.6514113210931072 ], [ 0.723251017493659 ], [ 0.6285993651564423 ], [ -0.6204197977135528 ], [ -0.47487140349571777 ], [ 0.7927376397286656 ], [ 0.47938040223041556 ], [ -0.9933821766222326 ], ... ],
    	[ [ -0.5665840922292309 ], [ 0.3585430661041624 ], [ -0.8362700158776233 ], [ 0.2344543053756234 ], [ -0.32766749302745235 ], [ 0.9482298949720764 ], [ -0.9165358953500853 ], [ -0.6120285487170962 ], ... ],
    	...
    ]

Which produces the following output:

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

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

Returns

    [
    	[ [ 0.0 ], [ 0.31757049848429986 ], [ 0.0 ], [ 0.8221956234555541 ], [ 0.8022199187590564 ], [ 0.669271898337876 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.7185194521580258 ], [ 0.0 ], [ 0.8102140323889646 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.5724626652606885 ], [ 0.6460764724004037 ], [ 0.5085589347871281 ], [ 0.046612890849374394 ], [ 0.778309428678648 ], [ 0.0 ], [ 0.0 ], [ 0.3784042063210525 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.7761862557585455 ], [ 0.17527524815104786 ], [ 0.8285994435179551 ], [ 0.5711862309765435 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.8838264103599683 ], [ 0.6926150031261494 ], [ 0.0 ], [ 0.6103423534048272 ], [ 0.0 ], [ 0.16879911806446043 ], [ 0.0 ], [ 0.05360595015399662 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0782134439716253 ], [ 0.734219466628483 ], [ 0.589389965551033 ], [ 0.3346605353711989 ], [ 0.05412358707643612 ], ... ],
    	[ [ 0.2750207239551754 ], [ 0.0 ], [ 0.0 ], [ 0.3772220312762683 ], [ 0.0 ], [ 0.0 ], [ 0.725558196911665 ], [ 0.7498215045951949 ], ... ],
    	[ [ 0.30314771633577847 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.046284440896886485 ], [ 0.413294724158149 ], [ 0.0 ], [ 0.0 ], ... ],
    	...
    ]
    [
    	[ [ 0.0 ], [ 0.0 ], [ 0.9181340239242332 ], [ 0.7011950524927498 ], [ 0.0 ], [ 0.0 ], [ 0.9089153867732391 ], [ 0.0 ], ... ],
    	[ [ 0.15441361012323757 ], [ 0.0 ], [ 0.12868807044644381 ], [ 0.8941628512566163 ], [ 0.16348493919939022 ], [ 0.19248403876517828 ], [ 0.0 ], [ 0.8568755636920842 ], ... ],
    	[ [ 0.3382471798714897 ], [ 0.0 ], [ 0.23011487676402903 ], [ 0.0 ], [ 0.0 ], [ 0.5875938494743457 ], [ 0.060946721461256695 ], [ 0.8112934722649265 ], ... ],
    	[ [ 0.5038072987744732 ], [ 0.26410240250289085 ], [ 0.0 ], [ 0.0 ], [ 0.3365143410860738 ], [ 0.6859749345672081 ], [ 0.06782129139404046 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.09319192070608742 ], [ 0.20120605598339314 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.24567559604629594 ], [ 0.7865961415401925 ], [ 0.0 ], [ 0.3917661915768706 ], [ 0.5457670621786818 ], [ 0.36504013107538535 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.5302460900876793 ], [ 0.2074964597084683 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.15173080401933828 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.8694923002259587 ], [ 0.05007039191128539 ], [ 0.0 ], [ 0.7188899829899335 ], [ 0.0 ], [ 0.7002094835795775 ], [ 0.0 ], ... ],
    	...
    ]
    [
    	[ [ 0.0 ], [ 0.7983557689028702 ], [ 0.6594796849295222 ], [ 0.0 ], [ 0.0 ], [ 0.4230328013999074 ], [ 0.12861285412440102 ], [ 0.5821826121609975 ], ... ],
    	[ [ 0.4684600435089142 ], [ 0.0 ], [ 0.0 ], [ 0.7706658337649336 ], [ 0.733657988005259 ], [ 0.586473936044746 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.7225756136876359 ], [ 0.6023059388164997 ], [ 0.2613226478088114 ], [ 0.0 ], [ 0.0 ], [ 0.41447057970327633 ], [ 0.0 ], ... ],
    	[ [ 0.6538473443451127 ], [ 0.49036413393367634 ], [ 0.5572502007660763 ], [ 0.8001916310136338 ], [ 0.6007804797491837 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.42153398703639744 ], [ 0.0 ], [ 0.3017443060033922 ], [ 0.0 ], [ 0.4016675477415456 ], [ 0.0 ], [ 0.09480550694145243 ], [ 0.651649387288064 ], ... ],
    	[ [ 0.5444863635617941 ], [ 0.6656465839264646 ], [ 0.7671692728816079 ], [ 0.8863511712293823 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.7468620317944774 ], ... ],
    	[ [ 0.13442697108180807 ], [ 0.6071073088281568 ], [ 0.0 ], [ 0.4857659198809453 ], [ 0.0 ], [ 0.587338178910414 ], [ 0.4458779627811584 ], [ 0.39354458008906396 ], ... ],
    	[ [ 0.548829005803423 ], [ 0.10116858880242681 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], ... ],
    	...
    ]
    [
    	[ [ 0.07080408140644845 ], [ 0.7013095974542392 ], [ 0.0 ], [ 0.02201723423090954 ], [ 0.6633553423748856 ], [ 0.2942375751956201 ], [ 0.45351234237145216 ], [ 0.08301280048591753 ], ... ],
    	[ [ 0.0 ], [ 0.03506909208764822 ], [ 0.0 ], [ 0.20860716868642176 ], [ 0.8438455332175375 ], [ 0.0 ], [ 0.24472875849627376 ], [ 0.0 ], ... ],
    	[ [ 0.8216185241726504 ], [ 0.39621457724839965 ], [ 0.30857331158322465 ], [ 0.0 ], [ 0.4526219304065531 ], [ 0.0 ], [ 0.5772339102751834 ], [ 0.78542276137572 ], ... ],
    	[ [ 0.37017810491872405 ], [ 0.7919147238675481 ], [ 0.0 ], [ 0.0 ], [ 0.27239302407307453 ], [ 0.7932921188262222 ], [ 0.6633457748767689 ], [ 0.878277757520578 ], ... ],
    	[ [ 0.6637372469829075 ], [ 0.7147814209210076 ], [ 0.7594545039402757 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.33133552598056515 ], ... ],
    	[ [ 0.0 ], [ 0.44197304401836673 ], [ 0.7708912465996194 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.6906911870335186 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.6182734168046494 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.4398047138737653 ], [ 0.4155952225900498 ], ... ],
    	[ [ 0.46299632621891157 ], [ 0.0 ], [ 0.1850531161891563 ], [ 0.1175339370537775 ], [ 0.19330472150436306 ], [ 0.0 ], [ 0.030937824512634663 ], [ 0.0 ], ... ],
    	...
    ]
    [
    	[ [ 0.0 ], [ 0.0 ], [ 0.8265519020897181 ], [ 0.0 ], [ 0.0 ], [ 0.2153538838582285 ], [ 0.36407194848738356 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.4113996226092896 ], [ 0.7196753245264216 ], [ 0.0 ], [ 0.8113450591273037 ], [ 0.21109688773773683 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.41031563327704385 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.2885687318445868 ], [ 0.0 ], [ 0.4335564771780308 ], ... ],
    	[ [ 0.3504987798943643 ], [ 0.6825523505201578 ], [ 0.20423934549687112 ], [ 0.0 ], [ 0.41373632090215295 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.04734374184014925 ], [ 0.32709340500717454 ], [ 0.3810502214202 ], [ 0.0 ], [ 0.9034910285585134 ], [ 0.706042644442192 ], [ 0.7680502749178414 ], [ 0.42682885640804935 ], ... ],
    	[ [ 0.07656797250247534 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.4686686406923977 ], [ 0.530019033375515 ], [ 0.5804837550268288 ], ... ],
    	[ [ 0.0 ], [ 0.6647697754901941 ], [ 0.5777715464492801 ], [ 0.0 ], [ 0.0 ], [ 0.7286377897002705 ], [ 0.44061825653484993 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.3295516878546521 ], [ 0.0 ], [ 0.2154966010104908 ], [ 0.0 ], [ 0.8715571207602263 ], [ 0.0 ], [ 0.0 ], ... ],
    	...
    ]

Gradient Descent

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

TrainingTester.java:480 executed in 3.31 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: 3277753178859
Reset training subject: 3277759472967
Constructing line search parameters: GD
th(0)=0.12757781102488264;dx=-1.2457331394169029E-6
New Minimum: 0.12757781102488264 > 0.1275751272064182
WOLFE (weak): th(2.154434690031884)=0.1275751272064182; dx=-1.2457032236296097E-6 evalInputDelta=2.6838184644384366E-6
New Minimum: 0.1275751272064182 > 0.12757244345240562
WOLFE (weak): th(4.308869380063768)=0.12757244345240562; dx=-1.2456733078423167E-6 evalInputDelta=5.367572477016358E-6
New Minimum: 0.12757244345240562 > 0.1275617090808709
WOLFE (weak): th(12.926608140191302)=0.1275617090808709; dx=-1.2455536446931448E-6 evalInputDelta=1.6101944011748248E-5
New Minimum: 0.1275617090808709 > 0.127513417170384
WOLFE (weak): th(51.70643256076521)=0.127513417170384; dx=-1.245015160521871E-6 evalInputDelta=6.439385449863444E-5
New Minimum: 0.127513417170384 > 0.1272562129936643
WOLFE (weak): th(258.53216280382605)=0.1272562129936643; dx=-1.2421432449417445E-6 evalInputDelta=3.2159803121833974E-4
New Minimum: 0.1272562129936643 > 0.1256621443853156
WOLFE (weak): th(1551.1929768229563)=0.1256621443853156; dx=-1.2241937725659522E-6 evalInputDelta=0.0019156666395670485
New Minimum: 0.1256621443853156 > 0.11486979055418664
END: th(10858.350837760694)=0.11486979055418664; dx=-1.0949575714602502E-6 evalInputDelta=0.012708020470695996
Fitness changed from 0.12757781102488264 to 0.11486979055418664
Iteration 1 complete. Error: 0.11486979055418664 Total: 0.7522; Orientation: 0.0032; Line Search: 0.7286
th(0)=0.11486979055418664;dx=-9.62430913461385E-7
New Minimum: 0.11486979055418664 > 0.0952905185848462
END: th(23393.607721408407)=0.0952905185848462; dx=-7.114684014717724E-7 evalInputDelta=0.019579271969340437
Fitness changed from 0.11486979055418664 to 0.0952905185848462
Iteration 2 complete. Error: 0.0952905185848462 Total: 0.0668; Orientation: 0.0037; Line Search: 0.0566
th(0)=0.0952905185848462;dx=-5.259466203888809E-7
New Minimum: 0.0952905185848462 > 0.07622866832204118
END: th(50400.00000000001)=0.07622866832204118; dx=-2.304760090875135E-7 evalInputDelta=0.01906185026280502
Fitness changed from 0.0952905185848462 to 0.07622866832204118
Iteration 3 complete. Error: 0.07622866832204118 Total: 0.0465; Orientation: 0.0040; Line Search: 0.0350
th(0)=0.07622866832204118;dx=-1.0099730410974347E-7
New Minimum: 0.07622866832204118 > 0.07181356675301491
WOLF (strong): th(108583.50837760697)=0.07181356675301491; dx=1.2149747968550241E-8 evalInputDelta=0.004415101569026275
END: th(54291.75418880348)=0.07240451267308655; dx=-3.987696698695825E-8 evalInputDelta=0.0038241556489546358
Fitness changed from 0.07622866832204118 to 0.07181356675301491
Iteration 4 complete. Error: 0.07181356675301491 Total: 0.2240; Orientation: 0.0033; Line Search: 0.2133
th(0)=0.07181356675301491;dx=-2.5555295304959017E-9
New Minimum: 0.07181356675301491 > 0.07170951358966811
WOLF (strong): th(116968.03860704206)=0.07170951358966811; dx=7.763569533364756E-10 evalInputDelta=1.0405316334680115E-4
END: th(58484.01930352103)=0.0717128246429822; dx=-8.895862885797131E-10 evalInputDelta=1.0074211003270606E-4
Fitness changed from 0.07181356675301491 to 0.07170951358966811
Iteration 5 complete. Error: 0.07170951358966811 Total: 0.3735; Orientation: 0.1330; Line Search: 0.2342
th(0)=0.07170951358966811;dx=-2.3585331799196015E-10
New Minimum: 0.07170951358966811 > 0.0717006647607638
WOLF (strong): th(126000.00000000004)=0.0717006647607638; dx=9.539571633501063E-11 evalInputDelta=8.848828904312045E-6
New Minimum: 0.0717006647607638 > 0.07169987200292517
END: th(63000.00000000002)=0.07169987200292517; dx=-7.022880082847475E-11 evalInputDelta=9.641586742936692E-6
Fitness changed from 0.07170951358966811 to 0.07169987200292517
Iteration 6 complete. Error: 0.07169987200292517 Total: 0.2964; Orientation: 0.0028; Line Search: 0.2874
Low gradient: 4.57292688517524E-6
th(0)=0.07169987200292517;dx=-2.091166029715852E-11
New Minimum: 0.07169987200292517 > 0.07169918075683683
WOLF (strong): th(135729.38547200873)=0.07169918075683683; dx=1.0726009104657416E-11 evalInputDelta=6.912460883412574E-7
New Minimum: 0.07169918075683683 > 0.07169898960970278
END: th(67864.69273600436)=0.07169898960970278; dx=-5.092825596250559E-12 evalInputDelta=8.823932223928077E-7
Fitness changed from 0.07169987200292517 to 0.07169898960970278
Iteration 7 complete. Error: 0.07169898960970278 Total: 0.1484; Orientation: 0.0034; Line Search: 0.1380
Low gradient: 1.1136905802628847E-6
th(0)=0.07169898960970278;dx=-1.240306708566281E-12
New Minimum: 0.07169898960970278 > 0.0716989560375805
WOLF (strong): th(146210.0482588026)=0.0716989560375805; dx=7.810753126369192E-13 evalInputDelta=3.357212227661499E-8
New Minimum: 0.0716989560375805 > 0.0716989358803463
END: th(73105.0241294013)=0.0716989358803463; dx=-2.2961569796468124E-13 evalInputDelta=5.37293564778496E-8
Fitness changed from 0.07169898960970278 to 0.0716989358803463
Iteration 8 complete. Error: 0.0716989358803463 Total: 0.1883; Orientation: 0.0030; Line Search: 0.1793
Low gradient: 2.0617548719006032E-7
th(0)=0.0716989358803463;dx=-4.2508331518058724E-14
New Minimum: 0.0716989358803463 > 0.07169893506217005
WOLF (strong): th(157500.00000000006)=0.07169893506217005; dx=3.2118792058637E-14 evalInputDelta=8.181762489734012E-10
New Minimum: 0.07169893506217005 > 0.07169893400203665
END: th(78750.00000000003)=0.07169893400203665; dx=-5.194769729711243E-15 evalInputDelta=1.8783096467078764E-9
Fitness changed from 0.0716989358803463 to 0.07169893400203665
Iteration 9 complete. Error: 0.07169893400203665 Total: 0.3689; Orientation: 0.1701; Line Search: 0.1924
Low gradient: 2.5195864942579272E-8
th(0)=0.07169893400203665;dx=-6.348316102046952E-16
New Minimum: 0.07169893400203665 > 0.0716989339961748
WOLF (strong): th(169661.7318400109)=0.0716989339961748; dx=5.6573020100928845E-16 evalInputDelta=5.861852669930556E-12
New Minimum: 0.0716989339961748 > 0.07169893397364424
END: th(84830.86592000545)=0.07169893397364424; dx=-3.455070459770163E-17 evalInputDelta=2.839241342034171E-11
Fitness changed from 0.07169893400203665 to 0.07169893397364424
Iteration 10 complete. Error: 0.07169893397364424 Total: 0.2628; Orientation: 0.0028; Line Search: 0.2543
Low gradient: 1.3712847197919897E-9
th(0)=0.07169893397364424;dx=-1.8804217827349956E-18
Armijo: th(182762.56032350325)=0.07169893397365065; dx=1.950335115585882E-18 evalInputDelta=-6.411537967210279E-15
New Minimum: 0.07169893397364424 > 0.07169893397356022
WOLF (strong): th(91381.28016175162)=0.07169893397356022; dx=3.495666642601917E-20 evalInputDelta=8.401612738850872E-14
END: th(30460.426720583873)=0.07169893397359657; dx=-1.2419622996805283E-18 evalInputDelta=4.767020111984266E-14
Fitness changed from 0.07169893397364424 to 0.07169893397356022
Iteration 11 complete. Error: 0.07169893397356022 Total: 0.3830; Orientation: 0.0028; Line Search: 0.3741
Zero gradient: 2.5491909828413865E-11
th(0)=0.07169893397356022;dx=-6.498374666999834E-22
END: th(65625.00000000003)=0.07169893397356022; dx=-1.7448456530569443E-22 evalInputDelta=0.0
Fitness changed from 0.07169893397356022 to 0.07169893397356022
Static Iteration Total: 0.1978; Orientation: 0.0915; Line Search: 0.0991
Iteration 12 failed. Error: 0.07169893397356022
Previous Error: 0.0 -> 0.07169893397356022
Optimization terminated 12
Final threshold in iteration 12: 0.07169893397356022 (> 0.0) after 3.309s (< 30.000s)

Returns

    0.07169893397356022

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.015041588701643405 ], [ -0.11679963356672762 ], [ -0.049946003844280606 ], [ -0.29659012812864227 ], [ -0.6195508935817116 ], [ 1.2678315254710228 ], [ -0.0444194050525224 ], [ -5.705575726352922E-4 ], ... ],
    	[ [ -0.0223568933358744 ], [ -0.027772061350685995 ], [ -0.016904634977602404 ], [ -0.7012639622313901 ], [ -0.98417161670403 ], [ 1.5348245019396278 ], [ -0.05813413357465702 ], [ -0.031420491057744526 ], ... ],
    	[ [ -0.4871258522150552 ], [ -0.5718789437847471 ], [ 0.9633858174248723 ], [ -0.8263407297620289 ], [ -0.4623821576928844 ], [ -0.7658268217232664 ], [ -0.00450458291003375 ], [ -0.5320238023308437 ], ... ],
    	[ [ -0.5977037517635746 ], [ -0.6445312761777306 ], [ -0.7420955487186269 ], [ -0.6686888817951229 ], [ -0.6720114273236109 ], [ -9.004446328746418E-4 ], [ -0.040905866881391 ], [ -0.2952948641866395 ], ... ],
    	[ [ -0.9029847886355442 ], [ -0.6450074340397662 ], [ -0.027617390932323183 ], [ -0.08903317449557724 ], [ -0.03838626404041817 ], [ 0.31976367052159393 ], [ -0.0475559645334237 ], [ -0.013263962890425418 ], ... ],
    	[ [ -0.014618750860011576 ], [ -0.7782962713277248 ], [ -0.3020870421612021 ], [ -0.11702406295895007 ], [ 1.3908646122278088 ], [ 1.1165076295751892 ], [ -0.14429077054617756 ], [ 0.10252870970484523 ], ... ],
    	[ [ 0.5209839811100886 ], [ -0.03199304000944145 ], [ -0.22178076451761064 ], [ -0.7255747950876581 ], [ -0.05260166125669263 ], [ -0.8262573176045838 ], [ 1.3744571759681041 ], [ 1.4204202328341426 ], ... ],
    	[ [ -0.20408258703727666 ], [ -0.3048211434956263 ], [ -0.5328659271374105 ], [ -0.5530647794296542 ], [ -0.8763976492616412 ], [ -0.797557139544032 ], [ -0.043075820469453685 ], [ -0.3820652288574622 ], ... ],
    	...
    ]

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 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.6692719038921594 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.8102140512493099 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.5085589427752285 ], [ 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.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.16879911586519677 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.7342194829365057 ], [ 0.5893899717301103 ], [ 0.0 ], [ 0.05412358295971135 ], ... ],
    	[ [ 0.2750207215468355 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.7255582090346423 ], [ 0.7498215137083517 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 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 2.72 seconds (0.051 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: 3281073465219
Reset training subject: 3281079950455
Constructing line search parameters: GD
F(0.0) = LineSearchPoint{point=PointSample{avg=0.12757781102488264}, derivative=-1.2457331394169029E-6}
New Minimum: 0.12757781102488264 > 0.1275778110248825
F(1.0E-10) = LineSearchPoint{point=PointSample{avg=0.1275778110248825}, derivative=-1.2457331394169014E-6}, evalInputDelta = -1.3877787807814457E-16
New Minimum: 0.1275778110248825 > 0.1275778110248817
F(7.000000000000001E-10) = LineSearchPoint{point=PointSample{avg=0.1275778110248817}, derivative=-1.2457331394168931E-6}, evalInputDelta = -9.43689570931383E-16
New Minimum: 0.1275778110248817 > 0.12757781102487656
F(4.900000000000001E-9) = LineSearchPoint{point=PointSample{avg=0.12757781102487656}, derivative=-1.2457331394168345E-6}, evalInputDelta = -6.078471059822732E-15
New Minimum: 0.12757781102487656 > 0.1275778110248401
F(3.430000000000001E-8) = LineSearchPoint{point=PointSample{avg=0.1275778110248401}, derivative=-1.2457331394164266E-6}, evalInputDelta = -4.2549297418759124E-14
New Minimum: 0.1275778110248401 > 0.1275778110245833
F(2.4010000000000004E-7) = LineSearchPoint{point=PointSample{avg=0.1275778110245833}, derivative=-1.2457331394135687E-6}, evalInputDelta = -2.9934388301455783E-13
New Minimum: 0.1275778110245833 > 0.12757781102278862
F(1.6807000000000003E-6) = LineSearchPoint{point=PointSample{avg=0.12757781102278862}, derivative=-1.245733139393565E-6}, evalInputDelta = -2.0940194023211234E-12
New Minimum: 0.12757781102278862 > 0.1275778110102265
F(1.1764900000000001E-5) = LineSearchPoint{point=PointSample{avg=0.1275778110102265}, derivative=-1.2457331392535392E-6}, evalInputDelta = -1.4656137414803538E-11
New Minimum: 0.1275778110102265 > 0.1275778109222911
F(8.235430000000001E-5) = LineSearchPoint{point=PointSample{avg=0.1275778109222911}, derivative=-1.2457331382733574E-6}, evalInputDelta = -1.0259154636926837E-10
New Minimum: 0.1275778109222911 > 0.1275778103067422
F(5.764801000000001E-4) = LineSearchPoint{point=PointSample{avg=0.1275778103067422}, derivative=-1.2457331314120853E-6}, evalInputDelta = -7.1814043600682E-10
New Minimum: 0.1275778103067422 > 0.12757780599790008
F(0.004035360700000001) = LineSearchPoint{point=PointSample{avg=0.12757780599790008}, derivative=-1.2457330833831817E-6}, evalInputDelta = -5.026982552447379E-9
New Minimum: 0.12757780599790008 > 0.1275777758360103
F(0.028247524900000005) = LineSearchPoint{point=PointSample{avg=0.1275777758360103}, derivative=-1.2457327471808556E-6}, evalInputDelta = -3.5188872343772104E-8
New Minimum: 0.1275777758360103 > 0.12757756470300893
F(0.19773267430000002) = LineSearchPoint{point=PointSample{avg=0.12757756470300893}, derivative=-1.2457303937645733E-6}, evalInputDelta = -2.4632187370365877E-7
New Minimum: 0.12757756470300893 > 0.12757608678316779
F(1.3841287201) = LineSearchPoint{point=PointSample{avg=0.12757608678316779}, derivative=-1.2457139198505968E-6}, evalInputDelta = -1.7242417148510825E-6
New Minimum: 0.12757608678316779 > 0.12756574189152917
F(9.688901040700001) = LineSearchPoint{point=PointSample{avg=0.12756574189152917}, derivative=-1.245598602452762E-6}, evalInputDelta = -1.2069133353470596E-5
New Minimum: 0.12756574189152917 > 0.1274933544652314
F(67.8223072849) = LineSearchPoint{point=PointSample{avg=0.1274933544652314}, derivative=-1.2447913806679177E-6}, evalInputDelta = -8.445655965122478E-5
New Minimum: 0.1274933544652314 > 0.12698795642460287
F(474.7561509943) = LineSearchPoint{point=PointSample{avg=0.12698795642460287}, derivative=-1.2391408281740066E-6}, evalInputDelta = -5.898546002797711E-4
New Minimum: 0.12698795642460287 > 0.12351455336947312
F(3323.2930569601003) = LineSearchPoint{point=PointSample{avg=0.12351455336947312}, derivative=-1.1995869607166302E-6}, evalInputDelta = -0.004063257655409519
New Minimum: 0.12351455336947312 > 0.10235551021789371
F(23263.0513987207) = LineSearchPoint{point=PointSample{avg=0.10235551021789371}, derivative=-9.227098885149947E-7}, evalInputDelta = -0.025222300806988923
New Minimum: 0.10235551021789371 > 0.091750802899785
F(162841.3597910449) = LineSearchPoint{point=PointSample{avg=0.091750802899785}, derivative=5.406005901604819E-7}, evalInputDelta = -0.035827008125097634
0.091750802899785 <= 0.12757781102488264
New Minimum: 0.091750802899785 > 0.07390132257257179
F(113560.4590567789) = LineSearchPoint{point=PointSample{avg=0.07390132257257179}, derivative=1.8226887164900468E-7}, evalInputDelta = -0.05367648845231085
Right bracket at 113560.4590567789
New Minimum: 0.07390132257257179 > 0.07204485910297495
F(99065.70584507157) = LineSearchPoint{point=PointSample{avg=0.07204485910297495}, derivative=7.34718439983442E-8}, evalInputDelta = -0.055532951921907686
Right bracket at 99065.70584507157
New Minimum: 0.07204485910297495 > 0.07175717134636751
F(93548.3372958778) = LineSearchPoint{point=PointSample{avg=0.07175717134636751}, derivative=3.0622542027795004E-8}, evalInputDelta = -0.055820639678515124
Right bracket at 93548.3372958778
New Minimum: 0.07175717134636751 > 0.07170843308692892
F(91303.90971811136) = LineSearchPoint{point=PointSample{avg=0.07170843308692892}, derivative=1.2781017985901818E-8}, evalInputDelta = -0.05586937793795371
Right bracket at 91303.90971811136
New Minimum: 0.07170843308692892 > 0.07170002886773773
F(90376.65998839946) = LineSearchPoint{point=PointSample{avg=0.07170002886773773}, derivative=5.341255591137896E-9}, evalInputDelta = -0.05587778215714491
Right bracket at 90376.65998839946
Converged to right
Fitness changed from 0.12757781102488264 to 0.07170002886773773
Iteration 1 complete. Error: 0.07170002886773773 Total: 2.2031; Orientation: 0.0031; Line Search: 2.1809
Low gradient: 6.283391851201912E-6
F(0.0) = LineSearchPoint{point=PointSample{avg=0.07170002886773773}, derivative=-3.948101315575059E-11}
New Minimum: 0.07170002886773773 > 0.07169825797409674
F(90376.65998839946) = LineSearchPoint{point=PointSample{avg=0.07169825797409674}, derivative=2.918322055942818E-13}, evalInputDelta = -1.770893640992699E-6
0.07169825797409674 <= 0.07170002886773773
Converged to right
Fitness changed from 0.07170002886773773 to 0.07169825797409674
Iteration 2 complete. Error: 0.07169825797409674 Total: 0.0307; Orientation: 0.0028; Line Search: 0.0216
Low gradient: 4.6445011310007504E-8
F(0.0) = LineSearchPoint{point=PointSample{avg=0.07169825797409674}, derivative=-2.157139075586725E-15}
New Minimum: 0.07169825797409674 > 0.07169825787733873
F(90376.65998839946) = LineSearchPoint{point=PointSample{avg=0.07169825787733873}, derivative=1.594494679551451E-17}, evalInputDelta = -9.675800438646576E-11
0.07169825787733873 <= 0.07169825797409674
Converged to right
Fitness changed from 0.07169825797409674 to 0.07169825787733873
Iteration 3 complete. Error: 0.07169825787733873 Total: 0.2154; Orientation: 0.0029; Line Search: 0.2022
Low gradient: 3.433080614209874E-10
F(0.0) = LineSearchPoint{point=PointSample{avg=0.07169825787733873}, derivative=-1.1786042503663645E-19}
New Minimum: 0.07169825787733873 > 0.0716982578773345
F(90376.65998839946) = LineSearchPoint{point=PointSample{avg=0.0716982578773345}, derivative=8.711900998640766E-22}, evalInputDelta = -4.232725281383409E-15
0.0716982578773345 <= 0.07169825787733873
Converged to right
Fitness changed from 0.07169825787733873 to 0.0716982578773345
Iteration 4 complete. Error: 0.0716982578773345 Total: 0.0381; Orientation: 0.0033; Line Search: 0.0253
Zero gradient: 2.537633681708876E-12
F(0.0) = LineSearchPoint{point=PointSample{avg=0.0716982578773345}, derivative=-6.439584702543345E-24}
F(90376.65998839946) = LineSearchPoint{point=PointSample{avg=0.0716982578773345}, derivative=4.759954166870958E-26}, evalInputDelta = 0.0
0.0716982578773345 <= 0.0716982578773345
Converged to right
Fitness changed from 0.0716982578773345 to 0.0716982578773345
Static Iteration Total: 0.2373; Orientation: 0.0036; Line Search: 0.2265
Iteration 5 failed. Error: 0.0716982578773345
Previous Error: 0.0 -> 0.0716982578773345
Optimization terminated 5
Final threshold in iteration 5: 0.0716982578773345 (> 0.0) after 2.725s (< 30.000s)

Returns

    0.0716982578773345

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.0018564472826991252 ], [ -0.11679963356672762 ], [ -0.006164383627127457 ], [ -0.29659012812864227 ], [ -0.6195508935817116 ], [ 1.26783151390926 ], [ -0.005482285511493767 ], [ -7.041876203053334E-5 ], ... ],
    	[ [ -0.002759309186432024 ], [ -0.003427654408859171 ], [ -0.0020863862382942133 ], [ -0.7012639622313901 ], [ -0.98417161670403 ], [ 1.5348244626800465 ], [ -0.05813413357465702 ], [ -0.0038779470973600016 ], ... ],
    	[ [ -0.4871258522150552 ], [ -0.5718789437847471 ], [ 0.9633858007968904 ], [ -0.8263407297620289 ], [ -0.4623821576928844 ], [ -0.7658268217232664 ], [ -5.559599367393475E-4 ], [ -0.5320238023308437 ], ... ],
    	[ [ -0.5977037517635746 ], [ -0.6445312761777306 ], [ -0.7420955487186269 ], [ -0.6686888817951229 ], [ -0.6720114273236109 ], [ -9.004446328746418E-4 ], [ -0.005048641265540832 ], [ -0.2952948641866395 ], ... ],
    	[ [ -0.9029847886355442 ], [ -0.6450074340397662 ], [ -0.027617390932323183 ], [ -0.08903317449557724 ], [ -0.004737669469915717 ], [ 0.31976367509956793 ], [ -0.005869402686470515 ], [ -0.013263962890425418 ], ... ],
    	[ [ -0.0018042602313383949 ], [ -0.7782962713277248 ], [ -0.3020870421612021 ], [ -0.11702406295895007 ], [ 1.3908645782811266 ], [ 1.116507616712859 ], [ -0.14429077054617756 ], [ 0.10252871827419478 ], ... ],
    	[ [ 0.5209839861232746 ], [ -0.003948611637301425 ], [ -0.22178076451761064 ], [ -0.7255747950876581 ], [ -0.0064921474082572095 ], [ -0.8262573176045838 ], [ 1.3744571507329875 ], [ 1.42042021386425 ], ... ],
    	[ [ -0.20408258703727666 ], [ -0.3048211434956263 ], [ -0.5328659271374105 ], [ -0.5530647794296542 ], [ -0.8763976492616412 ], [ -0.797557139544032 ], [ -0.005316459015517028 ], [ -0.3820652288574622 ], ... ],
    	...
    ]

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 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.669271897788854 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.8102140305246834 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.5085589339975314 ], [ 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.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.16879911828185018 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.7342194650164902 ], [ 0.5893899649402521 ], [ 0.0 ], [ 0.05412358748336041 ], ... ],
    	[ [ 0.27502072419323165 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.7255581957133499 ], [ 0.7498215036943903 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 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 32.73 seconds (0.055 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: 3283810389624
Reset training subject: 3283819883128
Adding measurement 4c6c6598 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD
Non-optimal measurement 0.12757781102488264 < 0.12757781102488264. Total: 1
th(0)=0.12757781102488264;dx=-1.2457331394169029E-6
Adding measurement 6e026b09 to history. Total: 1
New Minimum: 0.12757781102488264 > 0.1275751272064182
WOLFE (weak): th(2.154434690031884)=0.1275751272064182; dx=-1.2457032236296097E-6 evalInputDelta=2.6838184644384366E-6
Adding measurement 548cb11d to history. Total: 2
New Minimum: 0.1275751272064182 > 0.12757244345240562
WOLFE (weak): th(4.308869380063768)=0.12757244345240562; dx=-1.2456733078423167E-6 evalInputDelta=5.367572477016358E-6
Adding measurement 580c6406 to history. Total: 3
New Minimum: 0.12757244345240562 > 0.1275617090808709
WOLFE (weak): th(12.926608140191302)=0.1275617090808709; dx=-1.2455536446931448E-6 evalInputDelta=1.6101944011748248E-5
Adding measurement 3ed8de14 to history. Total: 4
New Minimum: 0.1275617090808709 > 0.127513417170384
WOLFE (weak): th(51.70643256076521)=0.127513417170384; dx=-1.245015160521871E-6 evalInputDelta=6.439385449863444E-5
Adding measurement 75f7a352 to history. Total: 5
New Minimum: 0.127513417170384 > 0.1272562129936643
WOLFE (weak): th(258.53216280382605)=0.1272562129936643; dx=-1.2421432449417445E-6 evalInputDelta=3.2159803121833974E-4
Adding measurement 14f3cabb to history. Total: 6
New Minimum: 0.1272562129936643 > 0.1256621443853156
WOLFE (weak): th(1551.1929768229563)=0.1256621443853156; dx=-1.2241937725659522E-6 evalInputDelta=0.0019156666395670485
Adding measurement 44af6acc to history. Total: 7
New Minimum: 0.1256621443853156 > 0.11486979055418664
END: th(10858.350837760694)=0.11486979055418664; dx=-1.0949575714602502E-6 evalInputDelta=0.012708020470695996
Fitness changed from 0.12757781102488264 to 0.11486979055418664
Iteration 1 complete. Error: 0.11486979055418664 Total: 0.5205; Orientation: 0.0054; Line Search: 0.4902
Non-optimal measurement 0.11486979055418664 < 0.11486979055418664. Total: 8
Rejected: LBFGS Orientation magnitude: 8.801e+01, gradient 9.810e-04, dot -1.000; [6b99da20-27d9-4e27-9912-55ee0c8da46d = 1.000/1.000e+00, 54d944bb-0c0a-472a-a01f-5021dfd310b6 = 1.000/1.000e+00, 32abcddf-a2eb-46bb-a804-e2e04dd29053 = 1.000/1.000e+00, a3c152fa-30ed-48ec-bb19-2aa0fd134adc = 1.000/1.000e+00, 46385825-9d94-4677-b3b8-25ef0c7bc902 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.11486979055418664, 0.1256621443853156, 0.1272562129936643, 0.127513417170384, 0.1275617090808709, 0.12757244345240562, 0.1275751272064182, 0.12757781102488264
Rejected: LBFGS Orientation magnitude: 8.801e+01, gradient 9.810e-04, dot -1.000; [46385825-9d94-4677-b3b8-25ef0c7bc902 = 1.000/1.000e+00, 32abcddf-a2eb-46bb-a804-e2e04dd29053 = 1.000/1.000e+00, a3c152fa-30ed-48ec-bb19-2aa0fd134adc = 1.000/1.000e+00, 6b99da20-27d9-4e27-9912-55ee0c8da46d = 1.000/1.000e+00, 54d944bb-0c0a-472a-a01f-5021dfd310b6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.11486979055418664, 0.1256621443853156, 0.1272562129936643, 0.127513417170384, 0.1275617090808709, 0.12757244345240562, 0.1275751272064182
Rejected: LBFGS Orientation magnitude: 8.801e+01, gradient 9.810e-04, dot -1.000; [6b99da20-27d9-4e27-9912-55ee0c8da46d = 1.000/1.000e+00, 54d944bb-0c0a-472a-a01f-5021dfd310b6 = 1.000/1.000e+00, 46385825-9d94-4677-b3b8-25ef0c7bc902 = 1.000/1.000e+00, 32abcddf-a2eb-46bb-a804-e2e04dd29053 = 1.000/1.000e+00, a3c152fa-30ed-48ec-bb19-2aa0fd134adc = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.11486979055418664, 0.1256621443853156, 0.1272562129936643, 0.127513417170384, 0.1275617090808709, 0.12757244345240562
Rejected: LBFGS Orientation magnitude: 8.801e+01, gradient 9.810e-04, dot -1.000; [a3c152fa-30ed-48ec-bb19-2aa0fd134adc = 1.000/1.000e+00, 46385825-9d94-4677-b3b8-25ef0c7bc902 = 1.000/1.000e+00, 6b99da20-27d9-4e27-9912-55ee0c8da46d = 1.000/1.000e+00, 54d944bb-0c0a-472a-a01f-5021dfd310b6 = 1.000/1.000e+00, 32abcddf-a2eb-46bb-a804-e2e04dd29053 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.11486979055418664, 0.1256621443853156, 0.1272562129936643, 0.127513417170384, 0.1275617090808709
Rejected: LBFGS Orientation magnitude: 8.801e+01, gradient 9.810e-04, dot -1.000; [54d944bb-0c0a-472a-a01f-5021dfd310b6 = 1.000/1.000e+00, 46385825-9d94-4677-b3b8-25ef0c7bc902 = 1.000/1.000e+00, a3c152fa-30ed-48ec-bb19-2aa0fd134adc = 1.000/1.000e+00, 32abcddf-a2eb-46bb-a804-e2e04dd29053 = 1.000/1.000e+00, 6b99da20-27d9-4e27-9912-55ee0c8da46d = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.11486979055418664, 0.1256621443853156, 0.1272562129936643, 0.127513417170384
LBFGS Accumulation History: 3 points
Removed measurement 44af6acc to history. Total: 7
Removed measurement 14f3cabb to history. Total: 6
Removed measurement 75f7a352 to history. Total: 5
Removed measurement 3ed8de14 to history. Total: 4
Removed measurement 580c6406 to history. Total: 3
Adding measurement 304b5f7 to history. Total: 3
th(0)=0.11486979055418664;dx=-9.62430913461385E-7
Adding measurement 13bbfac7 to history. Total: 4
New Minimum: 0.11486979055418664 > 0.0952905185848462
END: th(23393.607721408407)=0.0952905185848462; dx=-7.114684014717724E-7 evalInputDelta=0.019579271969340437
Fitness changed from 0.11486979055418664 to 0.0952905185848462
Iteration 2 complete. Error: 0.0952905185848462 Total: 8.1086; Orientation: 7.9718; Line Search: 0.0266
Non-optimal measurement 0.0952905185848462 < 0.0952905185848462. Total: 5
Rejected: LBFGS Orientation magnitude: 6.506e+01, gradient 7.252e-04, dot -1.000; [54d944bb-0c0a-472a-a01f-5021dfd310b6 = 1.000/1.000e+00, 6b99da20-27d9-4e27-9912-55ee0c8da46d = 1.000/1.000e+00, 46385825-9d94-4677-b3b8-25ef0c7bc902 = 1.000/1.000e+00, 32abcddf-a2eb-46bb-a804-e2e04dd29053 = 1.000/1.000e+00, a3c152fa-30ed-48ec-bb19-2aa0fd134adc = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.0952905185848462, 0.11486979055418664, 0.12757244345240562, 0.1275751272064182, 0.12757781102488264
Rejected: LBFGS Orientation magnitude: 6.506e+01, gradient 7.252e-04, dot -1.000; [6b99da20-27d9-4e27-9912-55ee0c8da46d = 1.000/1.000e+00, 46385825-9d94-4677-b3b8-25ef0c7bc902 = 1.000/1.000e+00, a3c152fa-30ed-48ec-bb19-2aa0fd134adc = 1.000/1.000e+00, 32abcddf-a2eb-46bb-a804-e2e04dd29053 = 1.000/1.000e+00, 54d944bb-0c0a-472a-a01f-5021dfd310b6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.0952905185848462, 0.11486979055418664, 0.12757244345240562, 0.1275751272064182
LBFGS Accumulation History: 3 points
Removed measurement 13bbfac7 to history. Total: 4
Removed measurement 304b5f7 to history. Total: 3
Adding measurement 2c7dbd2d to history. Total: 3
th(0)=0.0952905185848462;dx=-5.259466203888809E-7
Adding measurement 52389d32 to history. Total: 4
New Minimum: 0.0952905185848462 > 0.07622866832204118
END: th(50400.00000000001)=0.07622866832204118; dx=-2.304760090875135E-7 evalInputDelta=0.01906185026280502
Fitness changed from 0.0952905185848462 to 0.07622866832204118
Iteration 3 complete. Error: 0.07622866832204118 Total: 2.2723; Orientation: 2.1699; Line Search: 0.0957
Non-optimal measurement 0.07622866832204118 < 0.07622866832204118. Total: 5
Rejected: LBFGS Orientation magnitude: 2.851e+01, gradient 3.178e-04, dot -1.000; [6b99da20-27d9-4e27-9912-55ee0c8da46d = 1.000/1.000e+00, 46385825-9d94-4677-b3b8-25ef0c7bc902 = 1.000/1.000e+00, 32abcddf-a2eb-46bb-a804-e2e04dd29053 = 1.000/1.000e+00, 54d944bb-0c0a-472a-a01f-5021dfd310b6 = 1.000/1.000e+00, a3c152fa-30ed-48ec-bb19-2aa0fd134adc = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.07622866832204118, 0.0952905185848462, 0.12757244345240562, 0.1275751272064182, 0.12757781102488264
Rejected: LBFGS Orientation magnitude: 2.851e+01, gradient 3.178e-04, dot -1.000; [a3c152fa-30ed-48ec-bb19-2aa0fd134adc = 1.000/1.000e+00, 6b99da20-27d9-4e27-9912-55ee0c8da46d = 1.000/1.000e+00, 54d944bb-0c0a-472a-a01f-5021dfd310b6 = 1.000/1.000e+00, 46385825-9d94-4677-b3b8-25ef0c7bc902 = 1.000/1.000e+00, 32abcddf-a2eb-46bb-a804-e2e04dd29053 = 1.000/

...skipping 6755 bytes...

4
New Minimum: 0.07169987200292517 > 0.07169918075683683
WOLF (strong): th(135729.38547200873)=0.07169918075683683; dx=1.0726009104657416E-11 evalInputDelta=6.912460883412574E-7
Adding measurement 27c5f376 to history. Total: 5
New Minimum: 0.07169918075683683 > 0.07169898960970278
END: th(67864.69273600436)=0.07169898960970278; dx=-5.092825596250559E-12 evalInputDelta=8.823932223928077E-7
Fitness changed from 0.07169987200292517 to 0.07169898960970278
Iteration 7 complete. Error: 0.07169898960970278 Total: 3.7760; Orientation: 3.5898; Line Search: 0.0666
Non-optimal measurement 0.07169898960970278 < 0.07169898960970278. Total: 6
Rejected: LBFGS Orientation magnitude: 9.999e-02, gradient 1.114e-06, dot -1.000; [6b99da20-27d9-4e27-9912-55ee0c8da46d = 1.000/1.000e+00, 46385825-9d94-4677-b3b8-25ef0c7bc902 = 1.000/1.000e+00, a3c152fa-30ed-48ec-bb19-2aa0fd134adc = 1.000/1.000e+00, 32abcddf-a2eb-46bb-a804-e2e04dd29053 = 1.000/1.000e+00, 54d944bb-0c0a-472a-a01f-5021dfd310b6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.07169898960970278, 0.07169918075683683, 0.07169987200292517, 0.12757244345240562, 0.1275751272064182, 0.12757781102488264
Rejected: LBFGS Orientation magnitude: 9.999e-02, gradient 1.114e-06, dot -1.000; [32abcddf-a2eb-46bb-a804-e2e04dd29053 = 1.000/1.000e+00, 46385825-9d94-4677-b3b8-25ef0c7bc902 = 1.000/1.000e+00, a3c152fa-30ed-48ec-bb19-2aa0fd134adc = 1.000/1.000e+00, 6b99da20-27d9-4e27-9912-55ee0c8da46d = 1.000/1.000e+00, 54d944bb-0c0a-472a-a01f-5021dfd310b6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.07169898960970278, 0.07169918075683683, 0.07169987200292517, 0.12757244345240562, 0.1275751272064182
Rejected: LBFGS Orientation magnitude: 9.912e-02, gradient 1.114e-06, dot -1.000; [46385825-9d94-4677-b3b8-25ef0c7bc902 = 1.000/1.000e+00, 54d944bb-0c0a-472a-a01f-5021dfd310b6 = 1.000/1.000e+00, a3c152fa-30ed-48ec-bb19-2aa0fd134adc = 1.000/1.000e+00, 6b99da20-27d9-4e27-9912-55ee0c8da46d = 1.000/1.000e+00, 32abcddf-a2eb-46bb-a804-e2e04dd29053 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.07169898960970278, 0.07169918075683683, 0.07169987200292517, 0.12757244345240562
LBFGS Accumulation History: 3 points
Removed measurement 27c5f376 to history. Total: 5
Removed measurement 6789b334 to history. Total: 4
Removed measurement 730612ab to history. Total: 3
Adding measurement 78262758 to history. Total: 3
th(0)=0.07169898960970278;dx=-1.240306708566281E-12
Adding measurement 7c1f9c80 to history. Total: 4
New Minimum: 0.07169898960970278 > 0.0716989560375805
WOLF (strong): th(146210.0482588026)=0.0716989560375805; dx=7.810753126369192E-13 evalInputDelta=3.357212227661499E-8
Adding measurement 6904d5c to history. Total: 5
New Minimum: 0.0716989560375805 > 0.0716989358803463
END: th(73105.0241294013)=0.0716989358803463; dx=-2.2961569796468124E-13 evalInputDelta=5.37293564778496E-8
Fitness changed from 0.07169898960970278 to 0.0716989358803463
Iteration 8 complete. Error: 0.0716989358803463 Total: 3.5163; Orientation: 3.3590; Line Search: 0.0646
Non-optimal measurement 0.0716989358803463 < 0.0716989358803463. Total: 6
Rejected: LBFGS Orientation magnitude: 1.851e-02, gradient 2.062e-07, dot -1.000; [46385825-9d94-4677-b3b8-25ef0c7bc902 = 1.000/1.000e+00, 6b99da20-27d9-4e27-9912-55ee0c8da46d = 1.000/1.000e+00, a3c152fa-30ed-48ec-bb19-2aa0fd134adc = 1.000/1.000e+00, 32abcddf-a2eb-46bb-a804-e2e04dd29053 = 1.000/1.000e+00, 54d944bb-0c0a-472a-a01f-5021dfd310b6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.0716989358803463, 0.0716989560375805, 0.07169898960970278, 0.12757244345240562, 0.1275751272064182, 0.12757781102488264
Rejected: LBFGS Orientation magnitude: 1.851e-02, gradient 2.062e-07, dot -1.000; [54d944bb-0c0a-472a-a01f-5021dfd310b6 = 1.000/1.000e+00, 6b99da20-27d9-4e27-9912-55ee0c8da46d = 1.000/1.000e+00, 46385825-9d94-4677-b3b8-25ef0c7bc902 = 1.000/1.000e+00, 32abcddf-a2eb-46bb-a804-e2e04dd29053 = 1.000/1.000e+00, a3c152fa-30ed-48ec-bb19-2aa0fd134adc = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.0716989358803463, 0.0716989560375805, 0.07169898960970278, 0.12757244345240562, 0.1275751272064182
Rejected: LBFGS Orientation magnitude: 1.835e-02, gradient 2.062e-07, dot -1.000; [32abcddf-a2eb-46bb-a804-e2e04dd29053 = 1.000/1.000e+00, 54d944bb-0c0a-472a-a01f-5021dfd310b6 = 1.000/1.000e+00, 6b99da20-27d9-4e27-9912-55ee0c8da46d = 1.000/1.000e+00, 46385825-9d94-4677-b3b8-25ef0c7bc902 = 1.000/1.000e+00, a3c152fa-30ed-48ec-bb19-2aa0fd134adc = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.0716989358803463, 0.0716989560375805, 0.07169898960970278, 0.12757244345240562
LBFGS Accumulation History: 3 points
Removed measurement 6904d5c to history. Total: 5
Removed measurement 7c1f9c80 to history. Total: 4
Removed measurement 78262758 to history. Total: 3
Adding measurement 3bb0177c to history. Total: 3
th(0)=0.0716989358803463;dx=-4.2508331518058724E-14
Adding measurement 5820243c to history. Total: 4
New Minimum: 0.0716989358803463 > 0.07169893506217005
WOLF (strong): th(157500.00000000006)=0.07169893506217005; dx=3.2118792058637E-14 evalInputDelta=8.181762489734012E-10
Adding measurement b3c7960 to history. Total: 5
New Minimum: 0.07169893506217005 > 0.07169893400203665
END: th(78750.00000000003)=0.07169893400203665; dx=-5.194769729711243E-15 evalInputDelta=1.8783096467078764E-9
Fitness changed from 0.0716989358803463 to 0.07169893400203665
Iteration 9 complete. Error: 0.07169893400203665 Total: 4.0625; Orientation: 3.9925; Line Search: 0.0641
Non-optimal measurement 0.07169893400203665 < 0.07169893400203665. Total: 6
Rejected: LBFGS Orientation magnitude: 2.262e-03, gradient 2.520e-08, dot -1.000; [a3c152fa-30ed-48ec-bb19-2aa0fd134adc = 1.000/1.000e+00, 32abcddf-a2eb-46bb-a804-e2e04dd29053 = 1.000/1.000e+00, 6b99da20-27d9-4e27-9912-55ee0c8da46d = 1.000/1.000e+00, 46385825-9d94-4677-b3b8-25ef0c7bc902 = 1.000/1.000e+00, 54d944bb-0c0a-472a-a01f-5021dfd310b6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.07169893400203665, 0.07169893506217005, 0.0716989358803463, 0.12757244345240562, 0.1275751272064182, 0.12757781102488264
Rejected: LBFGS Orientation magnitude: 2.262e-03, gradient 2.520e-08, dot -1.000; [6b99da20-27d9-4e27-9912-55ee0c8da46d = 1.000/1.000e+00, 46385825-9d94-4677-b3b8-25ef0c7bc902 = 1.000/1.000e+00, a3c152fa-30ed-48ec-bb19-2aa0fd134adc = 1.000/1.000e+00, 32abcddf-a2eb-46bb-a804-e2e04dd29053 = 1.000/1.000e+00, 54d944bb-0c0a-472a-a01f-5021dfd310b6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.07169893400203665, 0.07169893506217005, 0.0716989358803463, 0.12757244345240562, 0.1275751272064182
Rejected: LBFGS Orientation magnitude: 2.242e-03, gradient 2.520e-08, dot -1.000; [46385825-9d94-4677-b3b8-25ef0c7bc902 = 1.000/1.000e+00, 6b99da20-27d9-4e27-9912-55ee0c8da46d = 1.000/1.000e+00, 32abcddf-a2eb-46bb-a804-e2e04dd29053 = 1.000/1.000e+00, a3c152fa-30ed-48ec-bb19-2aa0fd134adc = 1.000/1.000e+00, 54d944bb-0c0a-472a-a01f-5021dfd310b6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.07169893400203665, 0.07169893506217005, 0.0716989358803463, 0.12757244345240562
LBFGS Accumulation History: 3 points
Removed measurement b3c7960 to history. Total: 5
Removed measurement 5820243c to history. Total: 4
Removed measurement 3bb0177c to history. Total: 3
Adding measurement 63ac4219 to history. Total: 3
th(0)=0.07169893400203665;dx=-6.348316102046952E-16
Adding measurement 259fc44d to history. Total: 4
New Minimum: 0.07169893400203665 > 0.0716989339961748
WOLF (strong): th(169661.7318400109)=0.0716989339961748; dx=5.6573020100928845E-16 evalInputDelta=5.861852669930556E-12
Adding measurement 5f3cd658 to history. Total: 5
New Minimum: 0.0716989339961748 > 0.07169893397364424
END: th(84830.86592000545)=0.07169893397364424; dx=-3.455070459770163E-17 evalInputDelta=2.839241342034171E-11
Fitness changed from 0.07169893400203665 to 0.07169893397364424
Iteration 10 complete. Error: 0.07169893397364424 Total: 3.3656; Orientation: 3.2331; Line Search: 0.1258
Final threshold in iteration 10: 0.07169893397364424 (> 0.0) after 32.727s (< 30.000s)

Returns

    0.07169893397364424

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.015041588701643405 ], [ -0.11679963356672762 ], [ -0.049946003844280606 ], [ -0.29659012812864227 ], [ -0.6195508935817116 ], [ 1.2678309489547435 ], [ -0.0444194050525224 ], [ -5.705575726352922E-4 ], ... ],
    	[ [ -0.0223568933358744 ], [ -0.027772061350685995 ], [ -0.016904634977602404 ], [ -0.7012639622313901 ], [ -0.98417161670403 ], [ 1.5348225442980548 ], [ -0.05813413357465702 ], [ -0.031420491057744526 ], ... ],
    	[ [ -0.4871258522150552 ], [ -0.5718789437847471 ], [ 0.9633849882864189 ], [ -0.8263407297620289 ], [ -0.4623821576928844 ], [ -0.7658268217232664 ], [ -0.00450458291003375 ], [ -0.5320238023308437 ], ... ],
    	[ [ -0.5977037517635746 ], [ -0.6445312761777306 ], [ -0.7420955487186269 ], [ -0.6686888817951229 ], [ -0.6720114273236109 ], [ -9.004446328746418E-4 ], [ -0.040905866881391 ], [ -0.2952948641866395 ], ... ],
    	[ [ -0.9029847886355442 ], [ -0.6450074340397662 ], [ -0.027617390932323183 ], [ -0.08903317449557724 ], [ -0.03838626404041817 ], [ 0.31976389879789974 ], [ -0.0475559645334237 ], [ -0.013263962890425418 ], ... ],
    	[ [ -0.014618750860011576 ], [ -0.7782962713277248 ], [ -0.3020870421612021 ], [ -0.11702406295895007 ], [ 1.3908629195088973 ], [ 1.1165069882073624 ], [ -0.14429077054617756 ], [ 0.10252913700728511 ], ... ],
    	[ [ 0.5209842310878249 ], [ -0.03199304000944145 ], [ -0.22178076451761064 ], [ -0.7255747950876581 ], [ -0.05260166125669263 ], [ -0.8262573176045838 ], [ 1.3744559176430833 ], [ 1.4204192869185537 ], ... ],
    	[ [ -0.20408258703727666 ], [ -0.3048211434956263 ], [ -0.5328659271374105 ], [ -0.5530647794296542 ], [ -0.8763976492616412 ], [ -0.797557139544032 ], [ -0.043075820469453685 ], [ -0.3820652288574622 ], ... ],
    	...
    ]

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 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.6692715995566542 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.8102130178355823 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.5085585050837371 ], [ 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.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.16879923636931324 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.7342185893720329 ], [ 0.5893896331603099 ], [ 0.0 ], [ 0.054123808527156016 ], ... ],
    	[ [ 0.27502085350685707 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.7255575447810996 ], [ 0.7498210143717171 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], [ 0.0 ], ... ],
    	...
    ]

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

    return TestUtil.compare(title + " vs Iteration", runs);
Logging
Plotting range=[1.0, -1.144491396681603], [11.0, -0.9397941707951374]; valueStats=DoubleSummaryStatistics{count=25, sum=1.935309, min=0.071698, average=0.077412, max=0.114870}
Plotting 11 points for GD
Plotting 4 points for CjGD
Plotting 10 points for LBFGS

Returns

Result

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

    return TestUtil.compareTime(title + " vs Time", runs);
Logging
Plotting range=[0.0, -1.144491396681603], [32.207, -0.9397941707951374]; valueStats=DoubleSummaryStatistics{count=25, sum=1.935309, min=0.071698, average=0.077412, max=0.114870}
Plotting 11 points for GD
Plotting 4 points for CjGD
Plotting 10 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.25008809603918E-5 }, "CjGD": { "type": "NonConverged", "value": 1.2500920893523354E-5 }, "GD": { "type": "NonConverged", "value": 1.250087925328509E-5 } }, "model":{ "LBFGS": { "type": "NonConverged", "value": NaN }, "CjGD": { "type": "NonConverged", "value": NaN }, "GD": { "type": "NonConverged", "value": NaN } }, "complete":{ "LBFGS": { "type": "NonConverged", "value": 0.07169893397364424 }, "CjGD": { "type": "NonConverged", "value": 0.0716982578773345 }, "GD": { "type": "NonConverged", "value": 0.07169893397356022 } }}

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

    throwException(exceptions.addRef());

Results

detailsresult
{"input":{ "LBFGS": { "type": "NonConverged", "value": 1.25008809603918E-5 }, "CjGD": { "type": "NonConverged", "value": 1.2500920893523354E-5 }, "GD": { "type": "NonConverged", "value": 1.250087925328509E-5 } }, "model":{ "LBFGS": { "type": "NonConverged", "value": NaN }, "CjGD": { "type": "NonConverged", "value": NaN }, "GD": { "type": "NonConverged", "value": NaN } }, "complete":{ "LBFGS": { "type": "NonConverged", "value": 0.07169893397364424 }, "CjGD": { "type": "NonConverged", "value": 0.0716982578773345 }, "GD": { "type": "NonConverged", "value": 0.07169893397356022 } }}OK
  {
    "result": "OK",
    "performance": {
      "execution_time": "78.690",
      "gc_time": "0.403"
    },
    "created_on": 1586737826185,
    "file_name": "trainingTest",
    "report": {
      "simpleName": "Basic",
      "canonicalName": "com.simiacryptus.mindseye.layers.java.ReLuActivationLayerTest.Basic",
      "link": "https://github.com/SimiaCryptus/mindseye-java/tree/93db34cedee48c0202777a2b25deddf1dfaf5731/src/test/java/com/simiacryptus/mindseye/layers/java/ReLuActivationLayerTest.java",
      "javaDoc": ""
    },
    "training_analysis": {
      "input": {
        "LBFGS": {
          "type": "NonConverged",
          "value": 1.25008809603918E-5
        },
        "CjGD": {
          "type": "NonConverged",
          "value": 1.2500920893523354E-5
        },
        "GD": {
          "type": "NonConverged",
          "value": 1.250087925328509E-5
        }
      },
      "model": {
        "LBFGS": {
          "type": "NonConverged",
          "value": "NaN"
        },
        "CjGD": {
          "type": "NonConverged",
          "value": "NaN"
        },
        "GD": {
          "type": "NonConverged",
          "value": "NaN"
        }
      },
      "complete": {
        "LBFGS": {
          "type": "NonConverged",
          "value": 0.07169893397364424
        },
        "CjGD": {
          "type": "NonConverged",
          "value": 0.0716982578773345
        },
        "GD": {
          "type": "NonConverged",
          "value": 0.07169893397356022
        }
      }
    },
    "archive": "s3://code.simiacrypt.us/tests/com/simiacryptus/mindseye/layers/java/ReLuActivationLayer/Basic/trainingTest/202004133026",
    "id": "ad9bd818-38c5-46f6-97b6-3fbe9e0713f2",
    "report_type": "Components",
    "display_name": "Comparative Training",
    "target": {
      "simpleName": "ReLuActivationLayer",
      "canonicalName": "com.simiacryptus.mindseye.layers.java.ReLuActivationLayer",
      "link": "https://github.com/SimiaCryptus/mindseye-java/tree/93db34cedee48c0202777a2b25deddf1dfaf5731/src/main/java/com/simiacryptus/mindseye/layers/java/ReLuActivationLayer.java",
      "javaDoc": ""
    }
  }