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

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

Test Modules

Using Seed 6581932998578358272

Training Characteristics

Input Learning

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

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

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

Returns

    [
    	[ [ -0.285191986512201 ], [ -0.9766278229368146 ], [ 0.42153582005459644 ], [ -0.8174999308979245 ], [ -0.2906069810291214 ], [ -0.36539999634736553 ], [ -0.789742689740417 ], [ 0.48777126473963994 ], ... ],
    	[ [ 0.0480433876923998 ], [ -0.28903267767635055 ], [ -0.9205137781428987 ], [ -0.7037433866362486 ], [ 0.4111082746539294 ], [ 0.9724219750783474 ], [ 0.5665451583743562 ], [ 0.11219123312316737 ], ... ],
    	[ [ 0.625774815193469 ], [ -0.0829833725000173 ], [ 0.7401091179552985 ], [ -0.09082152014043077 ], [ -0.6485118378228765 ], [ -0.9963735389865525 ], [ 0.22923371880571541 ], [ 0.2688286509006039 ], ... ],
    	[ [ 0.32889499206211315 ], [ -0.015972529732976692 ], [ -0.9488060091309756 ], [ -0.49820950926195895 ], [ 0.9078000684423677 ], [ -0.34324358220310924 ], [ 0.06997576889303558 ], [ 0.06401148966679315 ], ... ],
    	[ [ -0.994544035133063 ], [ 0.13692596651536948 ], [ -0.724241839616252 ], [ 0.5121912592134521 ], [ -0.06489955248663248 ], [ -0.615921533815271 ], [ 0.41290560037148616 ], [ -0.05921098970395011 ], ... ],
    	[ [ 0.32213223389404777 ], [ -0.8480196156255659 ], [ -0.41047417528034913 ], [ -0.5716964253429657 ], [ 0.35580487743379186 ], [ 0.12364539343392034 ], [ 0.07086190440659257 ], [ 0.5514238056295346 ], ... ],
    	[ [ 0.5911009782200327 ], [ 0.3197780331052089 ], [ -0.874759840079443 ], [ -0.747225575842513 ], [ 0.7120973880640766 ], [ 0.650663882589376 ], [ 0.8142506546483821 ], [ -0.2598609537227241 ], ... ],
    	[ [ -0.05935334947030424 ], [ 0.8888345007481144 ], [ -0.8759921857250577 ], [ 0.8450510179300206 ], [ -0.5799970693818408 ], [ 0.12942608153040025 ], [ -0.5035443769206438 ], [ 0.9938719072191142 ], ... ],
    	...
    ]
    [
    	[ [ -0.026665658966747108 ], [ -0.7557461661495195 ], [ 0.4531105804526421 ], [ 0.5748124226096745 ], [ -0.4858552936292413 ], [ 0.4735719554217763 ], [ 0.4571723191084065 ], [ 0.5726320983304904 ], ... ],
    	[ [ 0.633056862841441 ], [ 0.0812564943098093 ], [ -0.20289228770117118 ], [ 0.455640194728524 ], [ 0.00804040581033183 ], [ 0.7476157995585138 ], [ -0.8292792335038375 ], [ -0.3338473217035416 ], ... ],
    	[ [ -0.3395575553534984 ], [ -0.44743616213772364 ], [ -0.5141566055707485 ], [ 0.9082739592973696 ], [ -0.7779678855823018 ], [ 0.4526532365504856 ], [ 0.491748109105107 ], [ -0.7871172945293008 ], ... ],
    	[ [ 0.6618552224325329 ], [ -0.6176234651902752 ], [ -0.4465915986994824 ], [ 0.6351728928355274 ], [ 0.5775929493397352 ], [ 0.04658536469102037 ], [ -0.861172454030807 ], [ -0.9234856900558699 ], ... ],
    	[ [ 0.209278726384855 ], [ 0.18701248178596752 ], [ 0.5201756229440933 ], [ -0.3699728561244484 ], [ 0.9243787806807042 ], [ -0.25680445270133045 ], [ 0.08711869310172515 ], [ -0.9806465272746607 ], ... ],
    	[ [ -0.9126165028966298 ], [ -0.5843752155522031 ], [ -0.4482271098504418 ], [ -0.557233961992637 ], [ -0.7737452168694052 ], [ 0.13048354217460245 ], [ 0.8632871068166179 ], [ -0.48214930653650456 ], ... ],
    	[ [ 0.20327121439171636 ], [ 0.9435228125635553 ], [ 0.18165385875455065 ], [ -0.6579860896902632 ], [ -0.031800472376588784 ], [ -0.21731934347846815 ], [ -0.7627339013624197 ], [ 0.23879504311756583 ], ... ],
    	[ [ -0.7385015874610685 ], [ 0.5540480369014793 ], [ 0.6935005987633345 ], [ -0.18557857145134649 ], [ 0.309511263742267 ], [ 0.6089632704071506 ], [ -0.954232579226775 ], [ 0.6988685879794514 ], ... ],
    	...
    ]
    [
    	[ [ -0.7175140469622117 ], [ 0.7056969624180911 ], [ 0.5604142418033842 ], [ -0.8121236125579929 ], [ -0.732542775014194 ], [ 0.05938361053596908 ], [ 0.5348066462696206 ], [ -0.7807840369050383 ], ... ],
    	[ [ 0.32146280121521187 ], [ -0.4389091497602795 ], [ 0.6089619414426384 ], [ -0.10399030311933055 ], [ -0.3638440166576511 ], [ -0.45638076141969885 ], [ -0.6516412851178348 ], [ 0.3697250133434964 ], ... ],
    	[ [ 0.45947503910079557 ], [ 0.09757174317299211 ], [ -0.9809971854434087 ], [ -0.9848721241451701 ], [ 0.03719154158289428 ], [ 0.6980560460889296 ], [ -0.1942726537860895 ], [ 0.017359144091132928 ], ... ],
    	[ [ -0.15389599573679336 ], [ 0.8573026720000247 ], [ 0.8897595272639403 ], [ 0.7108563625772906 ], [ -0.7288586777690751 ], [ -0.30316560308041307 ], [ -0.9877383753339011 ], [ 0.9352970712297892 ], ... ],
    	[ [ 0.16330646040661922 ], [ -0.40184795018278985 ], [ -0.8236378046667081 ], [ -0.4906711932233008 ], [ 0.7804775743254904 ], [ 0.6470833220462124 ], [ 0.4027910154983201 ], [ 0.7053472859834347 ], ... ],
    	[ [ -0.04116967783500769 ], [ 0.4594321273155435 ], [ -0.3464390759227898 ], [ 0.17700909751741545 ], [ 0.6629556335170528 ], [ 0.9545688882441632 ], [ 0.09896066495144318 ], [ -0.3732973497261276 ], ... ],
    	[ [ -0.5298928431348879 ], [ 0.5305505363362824 ], [ -0.9331537462909529 ], [ 0.6591490255553671 ], [ -0.7062844055060451 ], [ 0.8246686995984394 ], [ 0.7364149924126695 ], [ -0.06983439910984535 ], ... ],
    	[ [ -0.8230513567827895 ], [ -0.23871681178425153 ], [ 0.2710801250218935 ], [ -0.20400015626579848 ], [ -0.3476340878854305 ], [ -0.14035681243750542 ], [ 0.8583802199491302 ], [ -0.5369142537860045 ], ... ],
    	...
    ]
    [
    	[ [ 0.5235097537086815 ], [ 0.44569879973795423 ], [ 0.8829765528498015 ], [ -0.43247810858640956 ], [ 0.1682449299613784 ], [ 0.6398659136354374 ], [ -0.8831812400815282 ], [ 0.3420305191795814 ], ... ],
    	[ [ -0.12160707078233579 ], [ 0.4052086365525893 ], [ -0.8958911328113317 ], [ -0.2535762277831124 ], [ -0.355567601129531 ], [ 0.8217731142754796 ], [ 0.14141359960921052 ], [ 0.8778137752277497 ], ... ],
    	[ [ -0.47113971112735653 ], [ -0.3906501821407784 ], [ -0.8859910612770703 ], [ 0.8505655411071336 ], [ 0.2515192710199936 ], [ 0.39300234115243504 ], [ 0.909935591821287 ], [ -0.31477326684639007 ], ... ],
    	[ [ 0.45626789123967715 ], [ -0.9944349585106389 ], [ -0.48902429608880094 ], [ -0.40452234639846507 ], [ -0.5111865650682181 ], [ 0.16609134089099364 ], [ -0.8859802742926 ], [ 0.9194172643480787 ], ... ],
    	[ [ 0.5521513715470279 ], [ 0.7881118768154671 ], [ 0.24004658215906605 ], [ 0.2918597396391205 ], [ 0.2895663271317983 ], [ 0.7870174391366642 ], [ 0.4363649033569057 ], [ 0.2418318468530738 ], ... ],
    	[ [ 0.4202616397613257 ], [ -0.6250189629907938 ], [ -0.9959632590535397 ], [ 0.6730195314680154 ], [ 0.7997803732320574 ], [ -0.41223759663944426 ], [ 0.9891703125939071 ], [ -0.12124889660524651 ], ... ],
    	[ [ -0.13113609355624245 ], [ -0.932504688174066 ], [ 0.3367861111522794 ], [ 0.5287210163299891 ], [ -0.3601894952178162 ], [ -0.9841872552376525 ], [ -0.9268261338554673 ], [ -0.7003017850182882 ], ... ],
    	[ [ 0.439091926035152 ], [ 0.5077474257884595 ], [ 0.8807327874867554 ], [ -0.1906490136543879 ], [ -0.8295753327468243 ], [ 0.9260276186173522 ], [ -0.36355174536212087 ], [ -0.878582741057734 ], ... ],
    	...
    ]
    [
    	[ [ 0.044486252449188246 ], [ -0.5470688801691026 ], [ -0.45193459684818915 ], [ -0.20927164828494615 ], [ 0.4494554818679528 ], [ -0.08763551389848323 ], [ 0.10758615460757182 ], [ -0.8136457719080188 ], ... ],
    	[ [ 0.18050038719987338 ], [ 0.415980945625839 ], [ -0.8062685526618107 ], [ -0.35094173042245447 ], [ -0.9194123711745601 ], [ 5.359744253081722E-4 ], [ 0.45821362104716945 ], [ -0.6500420471456203 ], ... ],
    	[ [ -0.4212985694089344 ], [ -0.41366238131164246 ], [ -0.9967864995131166 ], [ 0.4930524467858459 ], [ -0.5370465335698129 ], [ 0.9089504555442971 ], [ -0.5713816119388073 ], [ 0.06753632531442522 ], ... ],
    	[ [ 0.03448988466956826 ], [ 0.03580253991938287 ], [ 0.2514699320732918 ], [ 0.7667293921148584 ], [ -0.14690395411399937 ], [ 0.25794146526819395 ], [ -0.32433841604993274 ], [ -0.5533627249305282 ], ... ],
    	[ [ 0.4916910303042348 ], [ 0.8343942375896303 ], [ 0.22651014756563193 ], [ 0.5832263551736598 ], [ 0.683545240101169 ], [ -0.22738520495827674 ], [ -0.9009178263391189 ], [ 0.5200986178046443 ], ... ],
    	[ [ -0.7223647284134553 ], [ 0.44816545704042055 ], [ -0.6796868661436155 ], [ -0.8859704601248992 ], [ 0.642880692724656 ], [ -0.5988840641508928 ], [ -0.5146892009478754 ], [ 0.8079195833522712 ], ... ],
    	[ [ -0.5432793739043229 ], [ 0.39162162969984804 ], [ -0.22331121742200355 ], [ 0.6941692086932785 ], [ -0.4196409267471892 ], [ -0.8608958405029197 ], [ -0.6056671775043279 ], [ -0.3168039418701536 ], ... ],
    	[ [ 0.29776690254690896 ], [ -0.2796464686449145 ], [ 0.48867756307914045 ], [ 0.23749114227834545 ], [ 0.10703213734228423 ], [ 0.09714180083270829 ], [ 0.9426322829409024 ], [ 0.7064980410996655 ], ... ],
    	...
    ]

Gradient Descent

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

TrainingTester.java:480 executed in 10.51 seconds (2.652 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: 463635853101
BACKPROP_AGG_SIZE = 3
THREADS = 64
SINGLE_THREADED = false
Initialized CoreSettings = {
"backpropAggregationSize" : 3,
"jvmThreads" : 64,
"singleThreaded" : false
}
Reset training subject: 463760822963
Constructing line search parameters: GD
th(0)=0.1917614366389853;dx=-8.252521412749796E-6
New Minimum: 0.1917614366389853 > 0.19174365818874142
WOLFE (weak): th(2.154434690031884)=0.19174365818874142; dx=-8.25076970314279E-6 evalInputDelta=1.777845024386604E-5
New Minimum: 0.19174365818874142 > 0.19172880275313947
WOLFE (weak): th(4.308869380063768)=0.19172880275313947; dx=-8.248161202138679E-6 evalInputDelta=3.26338858458175E-5
New Minimum: 0.19172880275313947 > 0.19165777263156122
WOLFE (weak): th(12.926608140191302)=0.19165777263156122; dx=-8.239809892760793E-6 evalInputDelta=1.0366400742406467E-4
New Minimum: 0.19165777263156122 > 0.19118365272648016
WOLFE (weak): th(51.70643256076521)=0.19118365272648016; dx=-8.209814029393355E-6 evalInputDelta=5.777839125051254E-4
New Minimum: 0.19118365272648016 > 0.18882785015450626
WOLFE (weak): th(258.53216280382605)=0.18882785015450626; dx=-8.039644518192216E-6 evalInputDelta=0.0029335864844790283
New Minimum: 0.18882785015450626 > 0.17647509831159217
END: th(1551.1929768229563)=0.17647509831159217; dx=-7.140155419023204E-6 evalInputDelta=0.015286338327393123
Fitness changed from 0.1917614366389853 to 0.17647509831159217
Iteration 1 complete. Error: 0.17647509831159217 Total: 1.2940; Orientation: 0.0083; Line Search: 1.0485
th(0)=0.17647509831159217;dx=-7.191105605900009E-6
New Minimum: 0.17647509831159217 > 0.15151313630484226
END: th(3341.943960201201)=0.15151313630484226; dx=-4.950561770794103E-6 evalInputDelta=0.02496196200674991
Fitness changed from 0.17647509831159217 to 0.15151313630484226
Iteration 2 complete. Error: 0.15151313630484226 Total: 1.0496; Orientation: 0.0041; Line Search: 0.9950
th(0)=0.15151313630484226;dx=-5.44817351544606E-6
New Minimum: 0.15151313630484226 > 0.1199750575424818
END: th(7200.000000000001)=0.1199750575424818; dx=-2.2076272521939943E-6 evalInputDelta=0.03153807876236045
Fitness changed from 0.15151313630484226 to 0.1199750575424818
Iteration 3 complete. Error: 0.1199750575424818 Total: 0.1458; Orientation: 0.0040; Line Search: 0.0923
th(0)=0.1199750575424818;dx=-3.3768026895060267E-6
New Minimum: 0.1199750575424818 > 0.09245853440932941
END: th(15511.929768229566)=0.09245853440932941; dx=-3.9356899638701296E-7 evalInputDelta=0.027516523133152393
Fitness changed from 0.1199750575424818 to 0.09245853440932941
Iteration 4 complete. Error: 0.09245853440932941 Total: 0.1230; Orientation: 0.0034; Line Search: 0.0819
th(0)=0.09245853440932941;dx=-1.7683564348490298E-6
New Minimum: 0.09245853440932941 > 0.07508758528030565
WOLF (strong): th(33419.43960201202)=0.07508758528030565; dx=1.1523837628673776E-7 evalInputDelta=0.01737094912902376
New Minimum: 0.07508758528030565 > 0.07381970763879109
END: th(16709.71980100601)=0.07381970763879109; dx=-1.2881031610858728E-7 evalInputDelta=0.018638826770538325
Fitness changed from 0.09245853440932941 to 0.07381970763879109
Iteration 5 complete. Error: 0.07381970763879109 Total: 0.4499; Orientation: 0.0031; Line Search: 0.4096
th(0)=0.07381970763879109;dx=-7.918943317888359E-7
New Minimum: 0.07381970763879109 > 0.0663688061245655
WOLF (strong): th(36000.000000000015)=0.0663688061245655; dx=1.2543912952410921E-7 evalInputDelta=0.0074509015142255886
New Minimum: 0.0663688061245655 > 0.06527825637817157
END: th(18000.000000000007)=0.06527825637817157; dx=-8.182527918212418E-8 evalInputDelta=0.008541451260619518
Fitness changed from 0.07381970763879109 to 0.06527825637817157
Iteration 6 complete. Error: 0.06527825637817157 Total: 0.4822; Orientation: 0.0040; Line Search: 0.4389
th(0)=0.06527825637817157;dx=-3.496392671689451E-7
New Minimum: 0.06527825637817157 > 0.06212529228519692
WOLF (strong): th(38779.824420573925)=0.06212529228519692; dx=9.131659127129377E-8 evalInputDelta=0.00315296409297465
New Minimum: 0.06212529228519692 > 0.06129264027245015
END: th(19389.912210286962)=0.06129264027245015; dx=-3.767560956537298E-8 evalInputDelta=0.003985616105721422
Fitness changed from 0.06527825637817157 to 0.06129264027245015
Iteration 7 complete. Error: 0.06129264027245015 Total: 0.1960; Orientation: 0.0039; Line Search: 0.1433
th(0)=0.06129264027245015;dx=-1.806727017040051E-7
New Minimum: 0.06129264027245015 > 0.05985834786432881
WOLF (strong): th(41774.29950251503)=0.05985834786432881; dx=7.502055529725399E-8 evalInputDelta=0.001434292408121339
New Minimum: 0.05985834786432881 > 0.05915359990060039
END: th(20887.149751257515)=0.05915359990060039; dx=-1.848122326581553E-8 evalInputDelta=0.002139040371849761
Fitness changed from 0.06129264027245015 to 0.05915359990060039
Iteration 8 complete. Error: 0.05915359990060039 Total: 0.3413; Orientation: 0.0027; Line Search: 0.3038
th(0)=0.05915359990060039;dx=-6.964312378628372E-8
New Minimum: 0.05915359990060039 > 0.05870383527099676
WOLF (strong): th(45000.00000000002)=0.05870383527099676; dx=3.48325635811773E-8 evalInputDelta=4.497646296036245E-4
New Minimum: 0.05870383527099676 > 0.05833413104611436
END: th(22500.00000000001)=0.05833413104611436; dx=-4.36775480531959E-9 evalInputDelta=8.194688544860274E-4
Fitness changed from 0.05915359990060039 to 0.05833413104611436
Iteration 9 complete. Error: 0.05833413104611436 Total: 0.4150; Orientation: 0.0029; Line Search: 0.3520
th(0)=0.05833413104611436;dx=-3.7162307370875084E-8
New Minimum: 0.05833413104611436 > 0.058191247205013966
WOLF (strong): th(48474.78052571741)=0.058191247205013966; dx=2.7118918172159456E-8 evalInputDelta=1.428838411003941E-4
New Minimum: 0.058191247205013966 > 0.05786849100170123
END: th(24237.390262858706)=0.05786849100170123; dx=-8.817640726951235E-10 evalInputDelta=4.6564004441312923E-4
Fitness changed from 0.05833413104611436 to 0.05786849100170123
Iteration 10 complete. Error: 0.05786849100170123 Total: 0.4108; Orientation: 0.0030; Line Search: 0.3717
th(0)=0.05786849100170123;dx=-2.0007784072740738E-8
Armijo: th(52217.874378143795)=0.05788517340957289; dx=1.9357023575526075E-8 evalInputDelta=-1.668240787165709E-5
New Minimum: 0.05786849100170123 > 0.05761956979013176
WOLF (strong): th(26108.937189071898)=0.05761956979013176; dx=7.892533136063433E-10 evalInputDelta=2.4892121156946945E-4
END: th(8702.979063023966)=0.0577176335463888; dx=-1.2222155305316662E-8 evalInputDelta=1.508574553124309E-4
Fitness changed from 0.05786849100170123 to 0.05761956979013176
Iteration 11 complete. Error: 0.05761956979013176 Total: 0.5214; Orientation: 0.0181; Line Search: 0.4595
th(0)=0.05761956979013176;dx=-1.3993149363097638E-8
New Minimum: 0.05761956979013176 > 0.057461395487548896
END: th(18750.00000000001)=0.057461395487548896; dx=-3.317012840325275E-9 evalInputDelta=1.5817430258286552E-4
Fitness changed from 0.05761956979013176 to 0.057461395487548896
Iteration 12 complete. Error: 0.057461395487548896 Total: 1.4525; Orientation: 0.0041; Line Search: 0.2017
th(0)=0.057461395487548896;dx=-4.853221362743354E-9
New Minimum: 0.057461395487548896 > 0.057423769597645835
WOLF (strong): th(40395.650438097844)=0.057423769597645835; dx=2.9688572156303006E-9 evalInputDelta=3.762588990306043E-5
New Minimum: 0.057423769597645835 > 0.05740313038064211
END: th(20197.825219048922)=0.05740313038064211; dx=-9.261980867808104E-10 evalInputDelta=5.8265106906783826E-5
Fitness changed from 0.057461395487548896 to 0.05740313038064211
Iteration 13 complete. Error: 0.05740313038064211 Total: 0.4034; Orientation: 0.0036; Line Search: 0.3545
th(0)=0.05740313038064211;dx=-1.8268565143776274E-10
New Minimum: 0.05740313038064211 > 0.05740207158204519
WOLF (strong): th(43514.89531511983)=0.05740207158204519; dx=1.3175873402563828E-10 evalInputDelta=1.0587985969229274E-6
New Minimum: 0.05740207158204519 > 0.05740088806270911
END: th(21757.447657559915)=0.05740088806270911; dx=-2.3092252707003053E-11 evalInputDelta=2.242317932998894E-6
Fitness changed from 0.05740313038064211 to 0.05740088806270911
Iteration 14 complete. Error: 0.05740088806270911 Total: 0.2374; Orientation: 0.0032; Line Search: 0.1985
Low gradient: 1.8799961489486792E-6
th(0)=0.05740088806270911;dx=-3.5343855200618643E-12
New Minimum: 0.05740088806270911 > 0.05740087355621919
WOLF (strong): th(46875.00000000003)=0.05740087355621919; dx=2.626761505387034E-12 evalInputDelta=1.4506489925958377E-8
New Minimum: 0.05740087355621919 > 0.057400844972597634
END: th(23437.500000000015)=0.057400844972597634; dx=-1.8762582181335434E-13 evalInputDelta=4.309011147896058E-8
Fitness changed from 0.05740088806270911 to 0.057400844972597634
Iteration 15 complete. Error: 0.057400844972597634 Total: 0.5042; Orientation: 0.0037; Line Search: 0.3617
Low gradient: 3.66529706659409E-7
th(0)=0.057400844972597634;dx=-1.3434402586383244E-13
New Minimum: 0.057400844972597634 > 0.057400843602927965
WOLF (strong): th(50494.56304762231)=0.057400843602927965; dx=1.1958676913341229E-14 evalInputDelta=1.3696696693488164E-9
New Minimum: 0.057400843602927965 > 0.05740084345050197
WOLF (strong): th(25247.281523811154)=0.05740084345050197; dx=1.1599178398827848E-16 evalInputDelta=1.52209566478545E-9
END: th(8415.760507937051)=0.057400844032289; dx=-8.911973997014791E-14 evalInputDelta=9.403086365100677E-10
Fitness changed from 0.057400844972597634 to 0.05740084345050197
Iteration 16 complete. Error: 0.05740084345050197 Total: 0.2203; Orientation: 0.0031; Line Search: 0.1807
Low gradient: 1.1214432959942882E-7
th(0)=0.05740084345050197;dx=-1.2576350661305329E-14
New Minimum: 0.05740084345050197 > 0.05740084330516473
END: th(18131.20638129993)=0.05740084330516473; dx=-3.4553742867563365E-15 evalInputDelta=1.4533724224108369E-10
Fitness changed from 0.05740084345050197 to 0.05740084330516473
Iteration 17 complete. Error: 0.05740084330516473 Total: 0.5590; Orientation: 0.0034; Line Search: 0.5183
Low gradient: 3.0811850221038154E-8
th(0)=0.05740084330516473;dx=-9.493701140436888E-16
New Minimum: 0.05740084330516473 > 0.0574008432973052
WOLF (strong): th(39062.50000000003)=0.0574008432973052; dx=4.871720145802688E-20 evalInputDelta=7.859525530395928E-12
END: th(19531.250000000015)=0.057400843297305534; dx=-2.6107180932202512E-17 evalInputDelta=7.85919246348854E-12
Fitness changed from 0.05740084330516473 to 0.0574008432973052
Iteration 18 complete. Error: 0.0574008432973052 Total: 0.2031; Orientation: 0.0028; Line Search: 0.1586
Low gradient: 1.7905556286331526E-8
th(0)=0.0574008432973052;dx=-3.2060894592298643E-16
New Minimum: 0.0574008432973052 > 0.05740084329341
WOLF (strong): th(42078.80253968526)=0.05740084329341; dx=3.883134929776016E-18 evalInputDelta=3.895203604109554E-12
New Minimum: 0.05740084329341 > 0.05740084329339819
END: th(21039.40126984263)=0.05740084329339819; dx=-5.079213536398698E-17 evalInputDelta=3.907013601534004E-12
Fitness changed from 0.0574008432973052 to 0.05740084329339819
Iteration 19 complete. Error: 0.05740084329339819 Total: 0.1695; Orientation: 0.0040; Line Search: 0.1297
Low gradient: 2.8366689396162417E-9
th(0)=0.05740084329339819;dx=-8.046690672983533E-18
New Minimum: 0.05740084329339819 > 0.05740084329336091
WOLF (strong): th(45328.01595324983)=0.05740084329336091; dx=5.4079424695396996E-18 evalInputDelta=3.727573805178963E-14
New Minimum: 0.05740084329336091 > 0.057400843293298476
END: th(22664.007976624915)=0.057400843293298476; dx=-7.518802090662836E-19 evalInputDelta=9.971190539914687E-14
Fitness changed from 0.05740084329339819 to 0.057400843293298476
Iteration 20 complete. Error: 0.057400843293298476 Total: 0.5298; Orientation: 0.1267; Line Search: 0.3576
Low gradient: 2.650574406359882E-10
th(0)=0.057400843293298476;dx=-7.025544683650041E-20
New Minimum: 0.057400843293298476 > 0.0574008432932984
WOLF (strong): th(48828.125000000044)=0.0574008432932984; dx=6.696222276603954E-20 evalInputDelta=7.632783294297951E-17
New Minimum: 0.0574008432932984 > 0.0574008432932976
END: th(24414.062500000022)=0.0574008432932976; dx=-1.6466120352277423E-21 evalInputDelta=8.743006318923108E-16
Fitness changed from 0.057400843293298476 to 0.0574008432932976
Iteration 21 complete. Error: 0.0574008432932976 Total: 0.2068; Orientation: 0.0035; Line Search: 0.1503
Zero gradient: 6.2122837648956516E-12
th(0)=0.0574008432932976;dx=-3.859246957558609E-23
WOLF (strong): th(52598.50317460659)=0.0574008432932976; dx=4.2603775763867976E-23 evalInputDelta=0.0
WOLF (strong): th(26299.251587303293)=0.0574008432932976; dx=2.0056530941939743E-24 evalInputDelta=0.0
END: th(8766.417195767764)=0.0574008432932976; dx=-2.5059762019095475E-23 evalInputDelta=0.0
Fitness changed from 0.0574008432932976 to 0.0574008432932976
Static Iteration Total: 0.5904; Orientation: 0.0029; Line Search: 0.3809
Iteration 22 failed. Error: 0.0574008432932976
Previous Error: 0.0 -> 0.0574008432932976
Optimization terminated 22
Final threshold in iteration 22: 0.0574008432932976 (> 0.0) after 10.507s (< 30.000s)

Returns

    0.0574008432932976

This training apply resulted in the following configuration:

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

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

Returns

    

And regressed input:

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

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

Returns

    [
    	[ [ -0.6909278843125095 ], [ -0.3935015637639423 ], [ -0.7860391440585832 ], [ -0.07508599735645838 ], [ -4.8071791066436886E-4 ], [ -2.5518147231391376E-10 ], [ -0.2754580896845038 ], [ -0.42341122340583603 ], ... ],
    	[ [ 0.0480433876923998 ], [ -0.600716949422494 ], [ 8.375464616705687E-14 ], [ -1.7999263240740023E-4 ], [ -1.9730758635313607E-6 ], [ -0.7370821573710078 ], [ 0.5665451583743562 ], [ 0.3085452783352096 ], ... ],
    	[ [ 0.625774815193469 ], [ -0.1341290374993147 ], [ -0.9655700318707789 ], [ -0.791508416395027 ], [ -0.4726192503936524 ], [ -4.868031803157021E-5 ], [ -0.30690313367309163 ], [ -0.9927192600957728 ], ... ],
    	[ [ 0.18878462543718671 ], [ 0.3152258863097539 ], [ 7.32942309801491E-18 ], [ -0.776666727825785 ], [ -0.581041835384718 ], [ 3.466734514981434E-14 ], [ 3.1402823020209506E-14 ], [ -8.783870679291697E-5 ], ... ],
    	[ [ -0.6405482742950652 ], [ -8.581726985074612E-18 ], [ 4.6567881853697314E-14 ], [ -0.4686918592278684 ], [ -5.706919953265021E-6 ], [ -6.993587129344003E-10 ], [ -0.7240391507157453 ], [ -6.508014758471172E-5 ], ... ],
    	[ [ -0.36942561261492846 ], [ -1.6786915825384163E-4 ], [ -1.0569968250245679E-4 ], [ -0.15906483560732854 ], [ -0.6062539801321127 ], [ -0.0014206609897532974 ], [ 4.1579018457977324E-14 ], [ -0.40073542969051723 ], ... ],
    	[ [ -0.09082814231413106 ], [ -1.0281633014137426E-17 ], [ -0.7285612928651009 ], [ -1.5353465066117154E-18 ], [ -0.7356006224450851 ], [ -0.01643999693018139 ], [ 0.5164802133031585 ], [ 0.6860684115890006 ], ... ],
    	[ [ -0.1871268291850352 ], [ -0.1565731472451355 ], [ -0.32103578676059685 ], [ -0.5971231146851215 ], [ 5.680269873056883E-14 ], [ -1.376408331911095E-4 ], [ -0.647739801157569 ], [ 0.9938719072191142 ], ... ],
    	...
    ]

To produce the following output:

TrainingTester.java:633 executed in 0.03 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 ], [ -2.5518147231391376E-10 ], [ -0.0 ], [ -0.0 ], ... ],
    	[ [ 0.0480433876923998 ], [ -0.0 ], [ 8.375464616705687E-14 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ 0.5665451583743562 ], [ 0.0 ], ... ],
    	[ [ 0.625774815193469 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 7.32942309801491E-18 ], [ -0.0 ], [ -0.0 ], [ 3.466734514981434E-14 ], [ 3.1402823020209506E-14 ], [ -0.0 ], ... ],
    	[ [ -0.0 ], [ -8.581726985074612E-18 ], [ 4.6567881853697314E-14 ], [ -0.0 ], [ -0.0 ], [ -6.993587129344003E-10 ], [ -0.0 ], [ -0.0 ], ... ],
    	[ [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ 4.1579018457977324E-14 ], [ -0.0 ], ... ],
    	[ [ -0.0 ], [ -1.0281633014137426E-17 ], [ -0.0 ], [ -1.5353465066117154E-18 ], [ -0.0 ], [ -0.0 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ 5.680269873056883E-14 ], [ -0.0 ], [ -0.0 ], [ 0.9938719072191142 ], ... ],
    	...
    ]

Conjugate Gradient Descent

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

TrainingTester.java:452 executed in 9.91 seconds (1.851 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: 474194572244
Reset training subject: 474264722232
Constructing line search parameters: GD
F(0.0) = LineSearchPoint{point=PointSample{avg=0.1917614366389853}, derivative=-8.252521412749796E-6}
New Minimum: 0.1917614366389853 > 0.19176143663898454
F(1.0E-10) = LineSearchPoint{point=PointSample{avg=0.19176143663898454}, derivative=-8.252521412749762E-6}, evalInputDelta = -7.494005416219807E-16
New Minimum: 0.19176143663898454 > 0.19176143663897943
F(7.000000000000001E-10) = LineSearchPoint{point=PointSample{avg=0.19176143663897943}, derivative=-8.252521412749564E-6}, evalInputDelta = -5.856426454897701E-15
New Minimum: 0.19176143663897943 > 0.1917614366389449
F(4.900000000000001E-9) = LineSearchPoint{point=PointSample{avg=0.1917614366389449}, derivative=-8.252521412748178E-6}, evalInputDelta = -4.038436252074007E-14
New Minimum: 0.1917614366389449 > 0.1917614366387021
F(3.430000000000001E-8) = LineSearchPoint{point=PointSample{avg=0.1917614366387021}, derivative=-8.252521412738472E-6}, evalInputDelta = -2.831901380062618E-13
New Minimum: 0.1917614366387021 > 0.191761436637004
F(2.4010000000000004E-7) = LineSearchPoint{point=PointSample{avg=0.191761436637004}, derivative=-8.252521412670539E-6}, evalInputDelta = -1.9812762541704387E-12
New Minimum: 0.191761436637004 > 0.19176143662511524
F(1.6807000000000003E-6) = LineSearchPoint{point=PointSample{avg=0.19176143662511524}, derivative=-8.252521412194994E-6}, evalInputDelta = -1.3870044002217696E-11
New Minimum: 0.19176143662511524 > 0.19176143654189526
F(1.1764900000000001E-5) = LineSearchPoint{point=PointSample{avg=0.19176143654189526}, derivative=-8.252521408866192E-6}, evalInputDelta = -9.709003045976772E-11
New Minimum: 0.19176143654189526 > 0.19176143595935485
F(8.235430000000001E-5) = LineSearchPoint{point=PointSample{avg=0.19176143595935485}, derivative=-8.25252138556457E-6}, evalInputDelta = -6.79630435262979E-10
New Minimum: 0.19176143595935485 > 0.19176143188157102
F(5.764801000000001E-4) = LineSearchPoint{point=PointSample{avg=0.19176143188157102}, derivative=-8.25252122245322E-6}, evalInputDelta = -4.75741426808618E-9
New Minimum: 0.19176143188157102 > 0.19176140333708766
F(0.004035360700000001) = LineSearchPoint{point=PointSample{avg=0.19176140333708766}, derivative=-8.252520080673772E-6}, evalInputDelta = -3.330189762840163E-8
New Minimum: 0.19176140333708766 > 0.19176120352581286
F(0.028247524900000005) = LineSearchPoint{point=PointSample{avg=0.19176120352581286}, derivative=-8.252512088217632E-6}, evalInputDelta = -2.3311317243202012E-7
New Minimum: 0.19176120352581286 > 0.19175980485230987
F(0.19773267430000002) = LineSearchPoint{point=PointSample{avg=0.19175980485230987}, derivative=-8.252456141024649E-6}, evalInputDelta = -1.6317866754211874E-6
New Minimum: 0.19175980485230987 > 0.19175001440329034
F(1.3841287201) = LineSearchPoint{point=PointSample{avg=0.19175001440329034}, derivative=-8.25206451067377E-6}, evalInputDelta = -1.1422235694946714E-5
New Minimum: 0.19175001440329034 > 0.19168445245096014
F(9.688901040700001) = LineSearchPoint{point=PointSample{avg=0.19168445245096014}, derivative=-8.240877568457338E-6}, evalInputDelta = -7.698418802515317E-5
New Minimum: 0.19168445245096014 > 0.19102920584495756
F(67.8223072849) = LineSearchPoint{point=PointSample{avg=0.19102920584495756}, derivative=-8.195849982008523E-6}, evalInputDelta = -7.322307940277328E-4
New Minimum: 0.19102920584495756 > 0.18675968087567535
F(474.7561509943) = LineSearchPoint{point=PointSample{avg=0.18675968087567535}, derivative=-7.898109223296338E-6}, evalInputDelta = -0.00500175576330994
New Minimum: 0.18675968087567535 > 0.161555752180092
F(3323.2930569601003) = LineSearchPoint{point=PointSample{avg=0.161555752180092}, derivative=-6.037758206478762E-6}, evalInputDelta = -0.030205684458893295
New Minimum: 0.161555752180092 > 0.10436011054398771
F(23263.0513987207) = LineSearchPoint{point=PointSample{avg=0.10436011054398771}, derivative=-1.5139339387738416E-7}, evalInputDelta = -0.08740132609499758
F(162841.3597910449) = LineSearchPoint{point=PointSample{avg=0.34685540482584}, derivative=3.3062818421582745E-6}, evalInputDelta = 0.1550939681868547
F(12526.258445464993) = LineSearchPoint{point=PointSample{avg=0.11657147817079808}, derivative=-2.0695084131751327E-6}, evalInputDelta = -0.07518995846818721
F(87683.80911825495) = LineSearchPoint{point=PointSample{avg=0.1640382218275276}, derivative=1.5314765580324377E-6}, evalInputDelta = -0.027723214811457675
0.1640382218275276 <= 0.1917614366389853
F(73958.77579500477) = LineSearchPoint{point=PointSample{avg=0.14481029828386846}, derivative=1.2140119539672314E-6}, evalInputDelta = -0.04695113835511683
Right bracket at 73958.77579500477
F(64474.11710974669) = LineSearchPoint{point=PointSample{avg=0.13374266865126558}, derivative=9.973624005503816E-7}, evalInputDelta = -0.05801876798771971
Right bracket at 64474.11710974669
F(57522.239495729285) = LineSearchPoint{point=PointSample{avg=0.12681545037207037}, derivative=8.469614726925936E-7}, evalInputDelta = -0.06494598626691492
Right bracket at 57522.239495729285
F(52168.18572264937) = LineSearchPoint{point=PointSample{avg=0.12218454013214426}, derivative=7.369161138288793E-7}, evalInputDelta = -0.06957689650684103
Right bracket at 52168.18572264937
F(47891.65823418598) = LineSearchPoint{point=PointSample{avg=0.11883621304884366}, derivative=6.604231142284782E-7}, evalInputDelta = -0.07292522359014163
Right bracket at 47891.65823418598
F(44343.02646823578) = LineSearchPoint{point=PointSample{avg=0.11603387992151264}, derivative=5.968082962378974E-7}, evalInputDelta = -0.07572755671747265
Right bracket at 44343.02646823578
F(41352.48515642753) = LineSearchPoint{point=PointSample{avg=0.11378688228972292}, derivative=5.54741341702568E-7}, evalInputDelta = -0.07797455434926237
Right bracket at 41352.48515642753
F(38747.82423759492) = LineSearchPoint{point=PointSample{avg=0.11176498698315591}, derivative=5.077175534819402E-7}, evalInputDelta = -0.07999644965582937
Right bracket at 38747.82423759492
F(36502.11489102417) = LineSearchPoint{point=PointSample{avg=0.11029242507787071}, derivative=4.65784024128819E-7}, evalInputDelta = -0.08146901156111458
Right bracket at 36502.11489102417
F(34551.95357971768) = LineSearchPoint{point=PointSample{avg=0.10896197643116397}, derivative=4.2820614066836413E-7}, evalInputDelta = -0.08279946020782132
Right bracket at 34551.95357971768
F(32847.562029138775) = LineSearchPoint{point=PointSample{avg=0.10784840963694442}, derivative=3.8329700735977644E-7}, evalInputDelta = -0.08391302700204087
Right bracket at 32847.562029138775
F(31389.637416514306) = LineSearchPoint{point=PointSample{avg=0.10693702879917251}, derivative=3.3870469047154134E-7}, evalInputDelta = -0.08482440783981278
Loops = 12
Fitness changed from 0.1917614366389853 to 0.10436011054398771
Iteration 1 complete. Error: 0.10436011054398771 Total: 5.8777; Orientation: 0.0035; Line Search: 5.6075
F(0.0) = LineSearchPoint{point=PointSample{avg=0.10436011054398771}, derivative=-2.7546057816653024E-6}
New Minimum: 0.10436011054398771 > 0.07033496724858565
F(31389.637416514306) = LineSearchPoint{point=PointSample{avg=0.07033496724858565}, derivative=1.3605175879600273E-7}, evalInputDelta = -0.03402514329540206
0.07033496724858565 <= 0.10436011054398771
New Minimum: 0.07033496724858565 > 0.0701234411206508
F(29912.251970916324) = LineSearchPoint{point=PointSample{avg=0.0701234411206508}, derivative=1.0540448233443109E-7}, evalInputDelta = -0.034236669423336905
Right bracket at 29912.251970916324
New Minimum: 0.0701234411206508 > 0.06998839145039344
F(28809.84843267091) = LineSearchPoint{point=PointSample{avg=0.06998839145039344}, derivative=8.197740193235389E-8}, evalInputDelta = -0.034371719093594266
Right bracket at 28809.84843267091
New Minimum: 0.06998839145039344 > 0.06988799182204623
F(27977.242310547663) = LineSearchPoint{point=PointSample{avg=0.06988799182204623}, derivative=6.429754615289885E-8}, evalInputDelta = -0.034472118721941475
Right bracket at 27977.242310547663
New Minimum: 0.06988799182204623 > 0.06983738937944622
F(27339.097677866845) = LineSearchPoint{point=PointSample{avg=0.06983738937944622}, derivative=5.062326905521209E-8}, evalInputDelta = -0.034522721164541484
Right bracket at 27339.097677866845
New Minimum: 0.06983738937944622 > 0.0698077667247418
F(26845.735291961882) = LineSearchPoint{point=PointSample{avg=0.0698077667247418}, derivative=4.00780820281644E-8}, evalInputDelta = -0.034552343819245906
Right bracket at 26845.735291961882
New Minimum: 0.0698077667247418 > 0.0697809316796908
F(26460.745205921994) = LineSearchPoint{point=PointSample{avg=0.0697809316796908}, derivative=3.189135622938959E-8}, evalInputDelta = -0.034579178864296914
Right bracket at 26460.745205921994
New Minimum: 0.0697809316796908 > 0.06976918684582704
F(26157.90296001366) = LineSearchPoint{point=PointSample{avg=0.06976918684582704}, derivative=2.5295043011088667E-8}, evalInputDelta = -0.034590923698160664
Right bracket at 26157.90296001366
Converged to right
Fitness changed from 0.10436011054398771 to 0.06976918684582704
Iteration 2 complete. Error: 0.06976918684582704 Total: 1.8384; Orientation: 0.0028; Line Search: 1.7699
F(0.0) = LineSearchPoint{point=PointSample{avg=0.06976918684582704}, derivative=-7.380004172826842E-7}
New Minimum: 0.06976918684582704 > 0.059582310694576854
F(26157.90296001366) = LineSearchPoint{point=PointSample{avg=0.059582310694576854}, derivative=1.645144027113058E-8}, evalInputDelta = -0.01018687615125019
0.059582310694576854 <= 0.06976918684582704
New Minimum: 0.059582310694576854 > 0.059575170642465355
F(25587.50847578509) = LineSearchPoint{point=PointSample{avg=0.059575170642465355}, derivative=8.348092771947435E-9}, evalInputDelta = -0.010194016203361689
Right bracket at 25587.50847578509
New Minimum: 0.059575170642465355 > 0.05957314686029121
F(25301.305861749977) = LineSearchPoint{point=PointSample{avg=0.05957314686029121}, derivative=4.282270325566973E-9}, evalInputDelta = -0.010196039985535837
Right bracket at 25301.305861749977
Converged to right
Fitness changed from 0.06976918684582704 to 0.05957314686029121
Iteration 3 complete. Error: 0.05957314686029121 Total: 0.7422; Orientation: 0.1497; Line Search: 0.5305
F(0.0) = LineSearchPoint{point=PointSample{avg=0.05957314686029121}, derivative=-1.34900499687853E-7}
New Minimum: 0.05957314686029121 > 0.05777842884729199
F(25301.305861749977) = LineSearchPoint{point=PointSample{avg=0.05777842884729199}, derivative=1.3511732853262618E-9}, evalInputDelta = -0.0017947180129992135
0.05777842884729199 <= 0.05957314686029121
Converged to right
Fitness changed from 0.05957314686029121 to 0.05777842884729199
Iteration 4 complete. Error: 0.05777842884729199 Total: 0.8343; Orientation: 0.0030; Line Search: 0.7957
F(0.0) = LineSearchPoint{point=PointSample{avg=0.05777842884729199}, derivative=-3.17657761723864E-8}
New Minimum: 0.05777842884729199 > 0.05738521615160798
F(25301.305861749977) = LineSearchPoint{point=PointSample{avg=0.05738521615160798}, derivative=3.772491326188455E-10}, evalInputDelta = -3.932126956840143E-4
0.05738521615160798 <= 0.05777842884729199
New Minimum: 0.05738521615160798 > 0.05738515932979442
F(25004.355104940445) = LineSearchPoint{point=PointSample{avg=0.05738515932979442}, derivative=5.452796542708519E-12}, evalInputDelta = -3.932695174975742E-4
Right bracket at 25004.355104940445
Converged to right
Fitness changed from 0.05777842884729199 to 0.05738515932979442
Iteration 5 complete. Error: 0.05738515932979442 Total: 0.2435; Orientation: 0.0028; Line Search: 0.1994
Low gradient: 2.3418833999417765E-6
F(0.0) = LineSearchPoint{point=PointSample{avg=0.05738515932979442}, derivative=-5.484417858922855E-12}
New Minimum: 0.05738515932979442 > 0.05738509077457341
F(25004.355104940445) = LineSearchPoint{point=PointSample{avg=0.05738509077457341}, derivative=9.554086125148654E-16}, evalInputDelta = -6.855522100696065E-8
0.05738509077457341 <= 0.05738515932979442
Converged to right
Fitness changed from 0.05738515932979442 to 0.05738509077457341
Iteration 6 complete. Error: 0.05738509077457341 Total: 0.1350; Orientation: 0.0027; Line Search: 0.0901
Low gradient: 4.0796591860150617E-10
F(0.0) = LineSearchPoint{point=PointSample{avg=0.05738509077457341}, derivative=-1.6643619074037077E-19}
New Minimum: 0.05738509077457341 > 0.05738509077457134
F(25004.355104940445) = LineSearchPoint{point=PointSample{avg=0.05738509077457134}, derivative=2.8993883024692675E-23}, evalInputDelta = -2.0747292772682613E-15
0.05738509077457134 <= 0.05738509077457341
Converged to right
Fitness changed from 0.05738509077457341 to 0.05738509077457134
Iteration 7 complete. Error: 0.05738509077457134 Total: 0.1181; Orientation: 0.0028; Line Search: 0.0807
Zero gradient: 7.106937541275425E-14
F(0.0) = LineSearchPoint{point=PointSample{avg=0.05738509077457134}, derivative=-5.050856121558998E-27}
F(25004.355104940445) = LineSearchPoint{point=PointSample{avg=0.05738509077457134}, derivative=8.798837406678948E-31}, evalInputDelta = 0.0
0.05738509077457134 <= 0.05738509077457134
Converged to right
Fitness changed from 0.05738509077457134 to 0.05738509077457134
Static Iteration Total: 0.1162; Orientation: 0.0029; Line Search: 0.0786
Iteration 8 failed. Error: 0.05738509077457134
Previous Error: 0.0 -> 0.05738509077457134
Optimization terminated 8
Final threshold in iteration 8: 0.05738509077457134 (> 0.0) after 9.906s (< 30.000s)

Returns

    0.05738509077457134

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.6909278843125095 ], [ -0.3935015637639423 ], [ -0.7860391440585832 ], [ -0.07508599735645838 ], [ -7.939406670343929E-4 ], [ -0.011697633064194912 ], [ -0.2754580896845038 ], [ -0.42341122340583603 ], ... ],
    	[ [ 0.0480433876923998 ], [ -0.600716949422494 ], [ -4.9946197598657555E-17 ], [ -0.03547162639986956 ], [ 3.0627890099044938E-15 ], [ -0.7370821573710078 ], [ 0.5665451583743562 ], [ 0.3085452783352096 ], ... ],
    	[ [ 0.625774815193469 ], [ -0.1341290374993147 ], [ -0.9655700318707789 ], [ -0.791508416395027 ], [ -0.4726192503936524 ], [ -0.0068306144655854995 ], [ -0.30690313367309163 ], [ -0.9927192600957728 ], ... ],
    	[ [ -0.031227753799827118 ], [ 0.3152258863097539 ], [ -8.613698935419666E-19 ], [ -0.776666727825785 ], [ -0.581041835384718 ], [ -2.903582120609983E-17 ], [ -0.013209811755890588 ], [ -2.4540188359208135E-17 ], ... ],
    	[ [ -0.6405482742950652 ], [ -0.0013133594371497262 ], [ -2.777026392275443E-17 ], [ -0.4686918592278684 ], [ 3.3621180579785075E-15 ], [ -0.028011744972565422 ], [ -0.7240391507157453 ], [ -0.00913176855636566 ], ... ],
    	[ [ -0.36942561261492846 ], [ 1.2890860346658556E-19 ], [ -0.020830517328207232 ], [ -0.15906483560732854 ], [ -0.6062539801321127 ], [ -0.0070755303634379985 ], [ -3.4824730323352486E-17 ], [ -0.40073542969051723 ], ... ],
    	[ [ -0.09082814231413106 ], [ 1.2083200841882028E-18 ], [ -0.7285612928651009 ], [ 1.8043729216676023E-19 ], [ -0.7356006224450851 ], [ -0.01643999693018139 ], [ 0.5164802133031585 ], [ 0.6860684115890006 ], ... ],
    	[ [ -0.1871268291850352 ], [ -0.1565731472451355 ], [ -0.32103578676059685 ], [ -0.5971231146851215 ], [ -0.02389444276950836 ], [ -3.8453798965859924E-17 ], [ -0.647739801157569 ], [ 0.9938719072191142 ], ... ],
    	...
    ]

To produce the following output:

TrainingTester.java:633 executed in 0.03 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.0 ], [ -0.0 ], [ -0.0 ], ... ],
    	[ [ 0.0480433876923998 ], [ -0.0 ], [ -4.9946197598657555E-17 ], [ -0.0 ], [ 3.0627890099044938E-15 ], [ -0.0 ], [ 0.5665451583743562 ], [ 0.0 ], ... ],
    	[ [ 0.625774815193469 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], ... ],
    	[ [ -0.0 ], [ 0.0 ], [ -8.613698935419666E-19 ], [ -0.0 ], [ -0.0 ], [ -2.903582120609983E-17 ], [ -0.0 ], [ -2.4540188359208135E-17 ], ... ],
    	[ [ -0.0 ], [ -0.0 ], [ -2.777026392275443E-17 ], [ -0.0 ], [ 3.3621180579785075E-15 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], ... ],
    	[ [ -0.0 ], [ 1.2890860346658556E-19 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -3.4824730323352486E-17 ], [ -0.0 ], ... ],
    	[ [ -0.0 ], [ 1.2083200841882028E-18 ], [ -0.0 ], [ 1.8043729216676023E-19 ], [ -0.0 ], [ -0.0 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -3.8453798965859924E-17 ], [ -0.0 ], [ 0.9938719072191142 ], ... ],
    	...
    ]

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.13 seconds (0.901 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: 484147064991
Reset training subject: 484197235440
Adding measurement 618e079e to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD
Non-optimal measurement 0.1917614366389853 < 0.1917614366389853. Total: 1
th(0)=0.1917614366389853;dx=-8.252521412749796E-6
Adding measurement 1c8b88b6 to history. Total: 1
New Minimum: 0.1917614366389853 > 0.19174365818874142
WOLFE (weak): th(2.154434690031884)=0.19174365818874142; dx=-8.25076970314279E-6 evalInputDelta=1.777845024386604E-5
Adding measurement 332d655a to history. Total: 2
New Minimum: 0.19174365818874142 > 0.19172880275313947
WOLFE (weak): th(4.308869380063768)=0.19172880275313947; dx=-8.248161202138679E-6 evalInputDelta=3.26338858458175E-5
Adding measurement 3196ba6b to history. Total: 3
New Minimum: 0.19172880275313947 > 0.19165777263156122
WOLFE (weak): th(12.926608140191302)=0.19165777263156122; dx=-8.239809892760793E-6 evalInputDelta=1.0366400742406467E-4
Adding measurement 27f34a27 to history. Total: 4
New Minimum: 0.19165777263156122 > 0.19118365272648016
WOLFE (weak): th(51.70643256076521)=0.19118365272648016; dx=-8.209814029393355E-6 evalInputDelta=5.777839125051254E-4
Adding measurement 1ca83737 to history. Total: 5
New Minimum: 0.19118365272648016 > 0.18882785015450626
WOLFE (weak): th(258.53216280382605)=0.18882785015450626; dx=-8.039644518192216E-6 evalInputDelta=0.0029335864844790283
Adding measurement 4e78e6a5 to history. Total: 6
New Minimum: 0.18882785015450626 > 0.17647509831159217
END: th(1551.1929768229563)=0.17647509831159217; dx=-7.140155419023204E-6 evalInputDelta=0.015286338327393123
Fitness changed from 0.1917614366389853 to 0.17647509831159217
Iteration 1 complete. Error: 0.17647509831159217 Total: 0.4921; Orientation: 0.0189; Line Search: 0.3511
Non-optimal measurement 0.17647509831159217 < 0.17647509831159217. Total: 7
Rejected: LBFGS Orientation magnitude: 5.046e+01, gradient 2.682e-03, dot -0.927; [91b51bee-7b11-497b-880d-79c617f33c51 = 1.000/1.000e+00, 9c05f5be-13f5-402a-ac19-6cb75def9f1c = 1.000/1.000e+00, 28e9d3c0-914b-4b47-9cc8-d5908e86e03b = 1.000/1.000e+00, c4fa7658-aa18-47a1-94d6-cf15be87883d = 1.000/1.000e+00, 21d104ad-a6af-4f9e-b283-a95b9e53d9d3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.17647509831159217, 0.18882785015450626, 0.19118365272648016, 0.19165777263156122, 0.19172880275313947, 0.19174365818874142, 0.1917614366389853
Rejected: LBFGS Orientation magnitude: 3.389e+01, gradient 2.682e-03, dot -0.927; [28e9d3c0-914b-4b47-9cc8-d5908e86e03b = 1.000/1.000e+00, 9c05f5be-13f5-402a-ac19-6cb75def9f1c = 1.000/1.000e+00, 91b51bee-7b11-497b-880d-79c617f33c51 = 1.000/1.000e+00, 21d104ad-a6af-4f9e-b283-a95b9e53d9d3 = 1.000/1.000e+00, c4fa7658-aa18-47a1-94d6-cf15be87883d = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.17647509831159217, 0.18882785015450626, 0.19118365272648016, 0.19165777263156122, 0.19172880275313947, 0.19174365818874142
Rejected: LBFGS Orientation magnitude: 4.234e+01, gradient 2.682e-03, dot -0.927; [21d104ad-a6af-4f9e-b283-a95b9e53d9d3 = 1.000/1.000e+00, 91b51bee-7b11-497b-880d-79c617f33c51 = 1.000/1.000e+00, 28e9d3c0-914b-4b47-9cc8-d5908e86e03b = 1.000/1.000e+00, 9c05f5be-13f5-402a-ac19-6cb75def9f1c = 1.000/1.000e+00, c4fa7658-aa18-47a1-94d6-cf15be87883d = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.17647509831159217, 0.18882785015450626, 0.19118365272648016, 0.19165777263156122, 0.19172880275313947
Rejected: LBFGS Orientation magnitude: 5.306e+01, gradient 2.682e-03, dot -0.928; [c4fa7658-aa18-47a1-94d6-cf15be87883d = 1.000/1.000e+00, 28e9d3c0-914b-4b47-9cc8-d5908e86e03b = 1.000/1.000e+00, 91b51bee-7b11-497b-880d-79c617f33c51 = 1.000/1.000e+00, 9c05f5be-13f5-402a-ac19-6cb75def9f1c = 1.000/1.000e+00, 21d104ad-a6af-4f9e-b283-a95b9e53d9d3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.17647509831159217, 0.18882785015450626, 0.19118365272648016, 0.19165777263156122
LBFGS Accumulation History: 3 points
Removed measurement 4e78e6a5 to history. Total: 6
Removed measurement 1ca83737 to history. Total: 5
Removed measurement 27f34a27 to history. Total: 4
Removed measurement 3196ba6b to history. Total: 3
Adding measurement 674acee1 to history. Total: 3
th(0)=0.17647509831159217;dx=-7.191105605900009E-6
Adding measurement 2a827dca to history. Total: 4
New Minimum: 0.17647509831159217 > 0.15151313630484226
END: th(3341.943960201201)=0.15151313630484226; dx=-4.950561770794103E-6 evalInputDelta=0.02496196200674991
Fitness changed from 0.17647509831159217 to 0.15151313630484226
Iteration 2 complete. Error: 0.15151313630484226 Total: 4.8550; Orientation: 4.6881; Line Search: 0.1303
Non-optimal measurement 0.15151313630484226 < 0.15151313630484226. Total: 5
Rejected: LBFGS Orientation magnitude: 7.129e+01, gradient 2.334e-03, dot -0.847; [28e9d3c0-914b-4b47-9cc8-d5908e86e03b = 1.000/1.000e+00, 9c05f5be-13f5-402a-ac19-6cb75def9f1c = 1.000/1.000e+00, 21d104ad-a6af-4f9e-b283-a95b9e53d9d3 = 1.000/1.000e+00, c4fa7658-aa18-47a1-94d6-cf15be87883d = 1.000/1.000e+00, 91b51bee-7b11-497b-880d-79c617f33c51 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.15151313630484226, 0.17647509831159217, 0.19172880275313947, 0.19174365818874142, 0.1917614366389853
Rejected: LBFGS Orientation magnitude: 7.998e+01, gradient 2.334e-03, dot -0.844; [28e9d3c0-914b-4b47-9cc8-d5908e86e03b = 1.000/1.000e+00, c4fa7658-aa18-47a1-94d6-cf15be87883d = 1.000/1.000e+00, 91b51bee-7b11-497b-880d-79c617f33c51 = 1.000/1.000e+00, 21d104ad-a6af-4f9e-b283-a95b9e53d9d3 = 1.000/1.000e+00, 9c05f5be-13f5-402a-ac19-6cb75def9f1c = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.15151313630484226, 0.17647509831159217, 0.19172880275313947, 0.19174365818874142
LBFGS Accumulation History: 3 points
Removed measurement 2a827dca to history. Total: 4
Removed measurement 674acee1 to history. Total: 3
Adding measurement 12ab4759 to history. Total: 3
th(0)=0.15151313630484226;dx=-5.44817351544606E-6
Adding measurement bdeefb7 to history. Total: 4
New Minimum: 0.15151313630484226 > 0.1199750575424818
END: th(7200.000000000001)=0.1199750575424818; dx=-2.2076272521939943E-6 evalInputDelta=0.03153807876236045
Fitness changed from 0.15151313630484226 to 0.1199750575424818
Iteration 3 complete. Error: 0.1199750575424818 Total: 2.3046; Orientation: 2.0781; Line Search: 0.1786
Non-optimal measurement 0.1199750575424818 < 0.1199750575424818. Total: 5
Rejected: LBFGS Orientation magnitude: 3.994e+01, gradient 1.838e-03, dot -0.669; [9c05f5be-13f5-402a-ac19-6cb75def9f1c = 1.000/1.000e+00, 28e9d3c0-914b-4b47-9cc8-d5908e86e03b = 1.000/1.000e+00, 21d104ad-a6af-4f9e-b283-a95b9e53d9d3 = 1.000/1.000e+00, 91b51bee-7b11-497b-880d-79c617f33c51 = 1.000/1.000e+00, c4fa7658-aa18-47a1-94d6-cf15be87883d = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.1199750575424818, 0.15151313630484226, 0.19172880275313947, 0.19174365818874142, 0.1917614366389853
Rejected: LBFGS Orientation magnitude: 4.203e+01, gradient 1.838e-03, dot -0.686; [9c05f5be-13f5-402a-ac19-6cb75def9f1c = 1.000/1.000e+00, 21d104ad-a6af-4f9e-b283-a95b9e53d9d3 = 1.000/1.000e+00, c4fa7658-aa18-47a1-94d6-cf15be87883d = 1.000/1.000e+00, 28e9d3c0-914b-4b47-9cc8-d5908e86e03b = 1.000/1.000e+00, 91b51bee-7b11-497b-880d-79c617f33c51 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.1199750575424818, 0.15151313630484226, 0.19172880275313947, 0.19174365818874142
LBFGS Accumulation History: 3 points
Removed measurement bdeefb7 to history. Total: 4
Removed measurement 12ab4759 to history. Total: 3
Adding measurement 2fa942a2 to history. Total: 3
th(0)=0.1199750575424818;dx=-3.3768026895060267E-6
Adding measurement 180c5ec8 to history. Total: 4
New Minimum: 0.1199750575424818 > 0.09245853440932941
END: th(15511.929768229566)=0.09245853440932941; dx=-3.9356899638701296E-7 evalInputDelta=0.027516523133152393
Fitness changed from 0.1199750575424818 to 0.09245853440932941
Iteration 4 complete. Error: 0.09245853440932941 Total: 1.9179; Orientation: 1.6870; Line Search: 0.1799
Non-optimal measurement 0.09245853440932941 < 0.0924585344093

...skipping 9050 bytes...

asurement 10e5b68 to history. Total: 5
New Minimum: 0.05985834786432881 > 0.05915359990060039
END: th(20887.149751257515)=0.05915359990060039; dx=-1.848122326581553E-8 evalInputDelta=0.002139040371849761
Fitness changed from 0.06129264027245015 to 0.05915359990060039
Iteration 8 complete. Error: 0.05915359990060039 Total: 2.9536; Orientation: 2.5804; Line Search: 0.3315
Non-optimal measurement 0.05915359990060039 < 0.05915359990060039. Total: 6
Rejected: LBFGS Orientation magnitude: 2.034e+00, gradient 2.639e-04, dot -0.216; [91b51bee-7b11-497b-880d-79c617f33c51 = 1.000/1.000e+00, 21d104ad-a6af-4f9e-b283-a95b9e53d9d3 = 1.000/1.000e+00, 28e9d3c0-914b-4b47-9cc8-d5908e86e03b = 1.000/1.000e+00, c4fa7658-aa18-47a1-94d6-cf15be87883d = 1.000/1.000e+00, 9c05f5be-13f5-402a-ac19-6cb75def9f1c = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.05915359990060039, 0.05985834786432881, 0.06129264027245015, 0.19172880275313947, 0.19174365818874142, 0.1917614366389853
Rejected: LBFGS Orientation magnitude: 4.738e+00, gradient 2.639e-04, dot -0.182; [9c05f5be-13f5-402a-ac19-6cb75def9f1c = 1.000/1.000e+00, 91b51bee-7b11-497b-880d-79c617f33c51 = 1.000/1.000e+00, 28e9d3c0-914b-4b47-9cc8-d5908e86e03b = 1.000/1.000e+00, c4fa7658-aa18-47a1-94d6-cf15be87883d = 1.000/1.000e+00, 21d104ad-a6af-4f9e-b283-a95b9e53d9d3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.05915359990060039, 0.05985834786432881, 0.06129264027245015, 0.19172880275313947, 0.19174365818874142
Rejected: LBFGS Orientation magnitude: 7.535e+00, gradient 2.639e-04, dot -0.887; [28e9d3c0-914b-4b47-9cc8-d5908e86e03b = 1.000/1.000e+00, 91b51bee-7b11-497b-880d-79c617f33c51 = 1.000/1.000e+00, c4fa7658-aa18-47a1-94d6-cf15be87883d = 1.000/1.000e+00, 21d104ad-a6af-4f9e-b283-a95b9e53d9d3 = 1.000/1.000e+00, 9c05f5be-13f5-402a-ac19-6cb75def9f1c = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.05915359990060039, 0.05985834786432881, 0.06129264027245015, 0.19172880275313947
LBFGS Accumulation History: 3 points
Removed measurement 10e5b68 to history. Total: 5
Removed measurement 57dc478e to history. Total: 4
Removed measurement 261c2add to history. Total: 3
Adding measurement 3a5412d to history. Total: 3
th(0)=0.05915359990060039;dx=-6.964312378628372E-8
Adding measurement 36ad220d to history. Total: 4
New Minimum: 0.05915359990060039 > 0.05870383527099676
WOLF (strong): th(45000.00000000002)=0.05870383527099676; dx=3.48325635811773E-8 evalInputDelta=4.497646296036245E-4
Adding measurement 63171249 to history. Total: 5
New Minimum: 0.05870383527099676 > 0.05833413104611436
END: th(22500.00000000001)=0.05833413104611436; dx=-4.36775480531959E-9 evalInputDelta=8.194688544860274E-4
Fitness changed from 0.05915359990060039 to 0.05833413104611436
Iteration 9 complete. Error: 0.05833413104611436 Total: 3.0338; Orientation: 2.5361; Line Search: 0.3346
Non-optimal measurement 0.05833413104611436 < 0.05833413104611436. Total: 6
Rejected: LBFGS Orientation magnitude: 8.617e-01, gradient 1.928e-04, dot -0.128; [91b51bee-7b11-497b-880d-79c617f33c51 = 1.000/1.000e+00, c4fa7658-aa18-47a1-94d6-cf15be87883d = 1.000/1.000e+00, 21d104ad-a6af-4f9e-b283-a95b9e53d9d3 = 1.000/1.000e+00, 28e9d3c0-914b-4b47-9cc8-d5908e86e03b = 1.000/1.000e+00, 9c05f5be-13f5-402a-ac19-6cb75def9f1c = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.05833413104611436, 0.05870383527099676, 0.05915359990060039, 0.19172880275313947, 0.19174365818874142, 0.1917614366389853
Rejected: LBFGS Orientation magnitude: 7.623e-01, gradient 1.928e-04, dot -0.111; [21d104ad-a6af-4f9e-b283-a95b9e53d9d3 = 1.000/1.000e+00, 9c05f5be-13f5-402a-ac19-6cb75def9f1c = 1.000/1.000e+00, 28e9d3c0-914b-4b47-9cc8-d5908e86e03b = 1.000/1.000e+00, c4fa7658-aa18-47a1-94d6-cf15be87883d = 1.000/1.000e+00, 91b51bee-7b11-497b-880d-79c617f33c51 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.05833413104611436, 0.05870383527099676, 0.05915359990060039, 0.19172880275313947, 0.19174365818874142
Rejected: LBFGS Orientation magnitude: 5.211e+00, gradient 1.928e-04, dot -0.885; [9c05f5be-13f5-402a-ac19-6cb75def9f1c = 1.000/1.000e+00, 28e9d3c0-914b-4b47-9cc8-d5908e86e03b = 1.000/1.000e+00, c4fa7658-aa18-47a1-94d6-cf15be87883d = 1.000/1.000e+00, 91b51bee-7b11-497b-880d-79c617f33c51 = 1.000/1.000e+00, 21d104ad-a6af-4f9e-b283-a95b9e53d9d3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.05833413104611436, 0.05870383527099676, 0.05915359990060039, 0.19172880275313947
LBFGS Accumulation History: 3 points
Removed measurement 63171249 to history. Total: 5
Removed measurement 36ad220d to history. Total: 4
Removed measurement 3a5412d to history. Total: 3
Adding measurement 59bc0496 to history. Total: 3
th(0)=0.05833413104611436;dx=-3.7162307370875084E-8
Adding measurement 544454d9 to history. Total: 4
New Minimum: 0.05833413104611436 > 0.058191247205013966
WOLF (strong): th(48474.78052571741)=0.058191247205013966; dx=2.711891817215946E-8 evalInputDelta=1.428838411003941E-4
Adding measurement 3d3c8b81 to history. Total: 5
New Minimum: 0.058191247205013966 > 0.05786849100170123
END: th(24237.390262858706)=0.05786849100170123; dx=-8.817640726951235E-10 evalInputDelta=4.6564004441312923E-4
Fitness changed from 0.05833413104611436 to 0.05786849100170123
Iteration 10 complete. Error: 0.05786849100170123 Total: 3.6249; Orientation: 3.2758; Line Search: 0.2867
Non-optimal measurement 0.05786849100170123 < 0.05786849100170123. Total: 6
Rejected: LBFGS Orientation magnitude: 3.241e-01, gradient 1.414e-04, dot -0.069; [91b51bee-7b11-497b-880d-79c617f33c51 = 1.000/1.000e+00, c4fa7658-aa18-47a1-94d6-cf15be87883d = 1.000/1.000e+00, 28e9d3c0-914b-4b47-9cc8-d5908e86e03b = 1.000/1.000e+00, 9c05f5be-13f5-402a-ac19-6cb75def9f1c = 1.000/1.000e+00, 21d104ad-a6af-4f9e-b283-a95b9e53d9d3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.05786849100170123, 0.058191247205013966, 0.05833413104611436, 0.19172880275313947, 0.19174365818874142, 0.1917614366389853
Rejected: LBFGS Orientation magnitude: 3.422e-01, gradient 1.414e-04, dot -0.069; [28e9d3c0-914b-4b47-9cc8-d5908e86e03b = 1.000/1.000e+00, c4fa7658-aa18-47a1-94d6-cf15be87883d = 1.000/1.000e+00, 21d104ad-a6af-4f9e-b283-a95b9e53d9d3 = 1.000/1.000e+00, 9c05f5be-13f5-402a-ac19-6cb75def9f1c = 1.000/1.000e+00, 91b51bee-7b11-497b-880d-79c617f33c51 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.05786849100170123, 0.058191247205013966, 0.05833413104611436, 0.19172880275313947, 0.19174365818874142
Rejected: LBFGS Orientation magnitude: 3.522e+00, gradient 1.414e-04, dot -0.913; [91b51bee-7b11-497b-880d-79c617f33c51 = 1.000/1.000e+00, c4fa7658-aa18-47a1-94d6-cf15be87883d = 1.000/1.000e+00, 21d104ad-a6af-4f9e-b283-a95b9e53d9d3 = 1.000/1.000e+00, 28e9d3c0-914b-4b47-9cc8-d5908e86e03b = 1.000/1.000e+00, 9c05f5be-13f5-402a-ac19-6cb75def9f1c = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.05786849100170123, 0.058191247205013966, 0.05833413104611436, 0.19172880275313947
LBFGS Accumulation History: 3 points
Removed measurement 3d3c8b81 to history. Total: 5
Removed measurement 544454d9 to history. Total: 4
Removed measurement 59bc0496 to history. Total: 3
Adding measurement 411bb92f to history. Total: 3
th(0)=0.05786849100170123;dx=-2.0007784072740738E-8
Non-optimal measurement 0.05788517340957289 < 0.05786849100170123. Total: 4
Armijo: th(52217.874378143795)=0.05788517340957289; dx=1.9357023575526075E-8 evalInputDelta=-1.668240787165709E-5
Adding measurement 1a9c5a17 to history. Total: 4
New Minimum: 0.05786849100170123 > 0.05761956979013176
WOLF (strong): th(26108.937189071898)=0.05761956979013176; dx=7.892533136063433E-10 evalInputDelta=2.4892121156946945E-4
Non-optimal measurement 0.0577176335463888 < 0.05761956979013176. Total: 5
END: th(8702.979063023966)=0.0577176335463888; dx=-1.2222155305316662E-8 evalInputDelta=1.508574553124309E-4
Fitness changed from 0.05786849100170123 to 0.05761956979013176
Iteration 11 complete. Error: 0.05761956979013176 Total: 3.3842; Orientation: 2.9519; Line Search: 0.3957
Final threshold in iteration 11: 0.05761956979013176 (> 0.0) after 31.134s (< 30.000s)

Returns

    0.05761956979013176

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.6909278843125095 ], [ -0.3935015637639423 ], [ -0.7860391440585832 ], [ -0.07508599735645838 ], [ -4.8071791066436886E-4 ], [ 5.733067108537153E-4 ], [ -0.2754580896845038 ], [ -0.42341122340583603 ], ... ],
    	[ [ 0.048043380854009 ], [ -0.600716949422494 ], [ 4.056634025541971E-4 ], [ -1.7999263240740023E-4 ], [ 0.004253660439121183 ], [ -0.7370821573710078 ], [ 0.5665451651478691 ], [ 0.3085452783352096 ], ... ],
    	[ [ 0.6257746886392007 ], [ -0.1341290374993147 ], [ -0.9655700318707789 ], [ -0.791508416395027 ], [ -0.4726192503936524 ], [ -4.868031803157021E-5 ], [ -0.30690313367309163 ], [ -0.9927192600957728 ], ... ],
    	[ [ 0.18878462543718671 ], [ 0.3152258863097539 ], [ 3.549986596289303E-8 ], [ -0.776666727825785 ], [ -0.581041835384718 ], [ 1.6791036479270414E-4 ], [ 1.5209873862730063E-4 ], [ -8.783870679291697E-5 ], ... ],
    	[ [ -0.6405482742950652 ], [ -4.1565366554265E-8 ], [ 2.2555029800774493E-4 ], [ -0.4686918592278684 ], [ 0.012303277376769187 ], [ 0.0015712231761327994 ], [ -0.7240391507157453 ], [ -6.508014758471172E-5 ], ... ],
    	[ [ -0.36942561261492846 ], [ -1.6786915825384163E-4 ], [ -1.0569968250245679E-4 ], [ -0.15906483560732854 ], [ -0.6062539801321127 ], [ -0.0014206609897532974 ], [ 2.0138687075202822E-4 ], [ -0.40073542969051723 ], ... ],
    	[ [ -0.09082814231413106 ], [ -4.979881622339253E-8 ], [ -0.7285612928651009 ], [ -7.4364099960435814E-9 ], [ -0.7356006224450851 ], [ -0.01643999693018139 ], [ 0.5164802133031585 ], [ 0.6860684115890006 ], ... ],
    	[ [ -0.1871268291850352 ], [ -0.1565731472451355 ], [ -0.32103578676059685 ], [ -0.5971231146851215 ], [ 2.7512236151463684E-4 ], [ -1.376408331911095E-4 ], [ -0.647739801157569 ], [ 0.9938719319276894 ], ... ],
    	...
    ]

To produce the following output:

TrainingTester.java:633 executed in 0.05 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.0 ], [ -0.0 ], [ -0.0 ], ... ],
    	[ [ 0.048043380854009 ], [ -0.0 ], [ 4.056634025541971E-4 ], [ -0.0 ], [ 0.004253660439121183 ], [ -0.0 ], [ 0.5665451651478691 ], [ 0.0 ], ... ],
    	[ [ 0.6257746886392007 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], ... ],
    	[ [ 0.0 ], [ 0.0 ], [ 3.549986596289303E-8 ], [ -0.0 ], [ -0.0 ], [ 1.6791036479270414E-4 ], [ 1.5209873862730063E-4 ], [ -0.0 ], ... ],
    	[ [ -0.0 ], [ -4.1565366554265E-8 ], [ 2.2555029800774493E-4 ], [ -0.0 ], [ 0.012303277376769187 ], [ 0.0 ], [ -0.0 ], [ -0.0 ], ... ],
    	[ [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ 2.0138687075202822E-4 ], [ -0.0 ], ... ],
    	[ [ -0.0 ], [ -4.979881622339253E-8 ], [ -0.0 ], [ -7.4364099960435814E-9 ], [ -0.0 ], [ -0.0 ], [ 0.0 ], [ 0.0 ], ... ],
    	[ [ -0.0 ], [ -0.0 ], [ -0.0 ], [ -0.0 ], [ 2.7512236151463684E-4 ], [ -0.0 ], [ -0.0 ], [ 0.9938719319276894 ], ... ],
    	...
    ]

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

    return TestUtil.compare(title + " vs Iteration", runs);
Logging
Plotting range=[1.0, -1.2412009270339899], [21.0, -0.7533165674933633]; valueStats=DoubleSummaryStatistics{count=39, sum=2.985284, min=0.057385, average=0.076546, max=0.176475}
Plotting 21 points for GD
Plotting 7 points for CjGD
Plotting 11 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.2412009270339899], [30.641, -0.7533165674933633]; valueStats=DoubleSummaryStatistics{count=39, sum=2.985284, min=0.057385, average=0.076546, max=0.176475}
Plotting 21 points for GD
Plotting 7 points for CjGD
Plotting 11 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": 0.05761956979013176 }, "CjGD": { "type": "NonConverged", "value": 0.05738509077457134 }, "GD": { "type": "NonConverged", "value": 0.0574008432932976 } }, "model":null, "complete":null}

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

    throwException(exceptions.addRef());

Results

detailsresult
{"input":{ "LBFGS": { "type": "NonConverged", "value": 0.05761956979013176 }, "CjGD": { "type": "NonConverged", "value": 0.05738509077457134 }, "GD": { "type": "NonConverged", "value": 0.0574008432932976 } }, "model":null, "complete":null}OK
  {
    "result": "OK",
    "performance": {
      "execution_time": "52.883",
      "gc_time": "6.035"
    },
    "created_on": 1586735051362,
    "file_name": "trainingTest",
    "report": {
      "simpleName": "Basic",
      "canonicalName": "com.simiacryptus.mindseye.layers.java.MaxDropoutNoiseLayerTest.Basic",
      "link": "https://github.com/SimiaCryptus/mindseye-java/tree/93db34cedee48c0202777a2b25deddf1dfaf5731/src/test/java/com/simiacryptus/mindseye/layers/java/MaxDropoutNoiseLayerTest.java",
      "javaDoc": ""
    },
    "training_analysis": {
      "input": {
        "LBFGS": {
          "type": "NonConverged",
          "value": 0.05761956979013176
        },
        "CjGD": {
          "type": "NonConverged",
          "value": 0.05738509077457134
        },
        "GD": {
          "type": "NonConverged",
          "value": 0.0574008432932976
        }
      }
    },
    "archive": "s3://code.simiacrypt.us/tests/com/simiacryptus/mindseye/layers/java/MaxDropoutNoiseLayer/Basic/trainingTest/202004124411",
    "id": "f30ee8d1-c680-4ab8-b3ca-319d44d72cc8",
    "report_type": "Components",
    "display_name": "Comparative Training",
    "target": {
      "simpleName": "MaxDropoutNoiseLayer",
      "canonicalName": "com.simiacryptus.mindseye.layers.java.MaxDropoutNoiseLayer",
      "link": "https://github.com/SimiaCryptus/mindseye-java/tree/93db34cedee48c0202777a2b25deddf1dfaf5731/src/main/java/com/simiacryptus/mindseye/layers/java/MaxDropoutNoiseLayer.java",
      "javaDoc": ""
    }
  }