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 253056646911961088

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.008301909561693632 ], [ -0.033859553363296824 ], [ -0.6388741187684772 ], [ 0.6957794180851125 ], [ 0.004732966967055718 ], [ 0.792656608099102 ], [ 0.5875908061083976 ], [ -0.6768779138073349 ], ... ],
    	[ [ -0.8591909036258327 ], [ 0.29395607865818807 ], [ -0.8065014602331306 ], [ -0.13344148958215607 ], [ 0.20786607864127293 ], [ -0.06770021882107313 ], [ 0.57943099178784 ], [ -0.6124842155165875 ], ... ],
    	[ [ -0.7921917627439252 ], [ -0.04080078291156819 ], [ 0.3909816403267661 ], [ 0.059219358551684476 ], [ 0.9570486141102397 ], [ -0.5900033922226025 ], [ 0.5615883181811134 ], [ 0.9370952940707928 ], ... ],
    	[ [ 0.14075364155591674 ], [ -0.10212430879307788 ], [ 0.6986482826841101 ], [ -0.6548525958652904 ], [ -0.08210150156382445 ], [ 0.17485948775876903 ], [ -0.9316436406277111 ], [ 0.5108911843859587 ], ... ],
    	[ [ -0.9364186749389847 ], [ -0.8651427650820227 ], [ -0.4097564975582364 ], [ 0.056155237944049086 ], [ -0.3238364588954534 ], [ 0.7758539633207953 ], [ -0.12931086321486673 ], [ -0.08023133709235064 ], ... ],
    	[ [ -0.6109047004821437 ], [ -0.3814647801790654 ], [ -0.26118447662492295 ], [ 0.9657520901423702 ], [ 0.9040066382952818 ], [ -0.23027490902372838 ], [ -0.2805602269686198 ], [ 0.4952576783885012 ], ... ],
    	[ [ 0.8053678481871105 ], [ 0.6238361560207539 ], [ 0.10888172280804143 ], [ -0.0840429324718075 ], [ -0.3883831883798101 ], [ -0.6207068431997775 ], [ -0.08106298932793621 ], [ -0.7509199128642763 ], ... ],
    	[ [ -0.9878065249499401 ], [ -0.2045987199035848 ], [ -0.5125038486226914 ], [ -0.039366675383133876 ], [ 0.02930328853985742 ], [ 0.7178316188487779 ], [ -0.822369320432325 ], [ -0.4410484994196946 ], ... ],
    	...
    ]
    [
    	[ [ -0.42762716197112405 ], [ 0.390518698173417 ], [ 0.27465986544224696 ], [ -0.9996983933576069 ], [ 0.6587552650448905 ], [ -0.016498770149477426 ], [ -0.7898305824406151 ], [ -0.3086114934850275 ], ... ],
    	[ [ 0.6412945101239769 ], [ 0.4451860778774419 ], [ 0.37011192674888393 ], [ 0.49252331018646855 ], [ 0.8048785583188429 ], [ 0.3484282644324541 ], [ 0.43535732008005024 ], [ -0.40195896527720687 ], ... ],
    	[ [ 0.17943955537644496 ], [ -0.8907188584558066 ], [ 0.715615308082655 ], [ 0.43845767509234346 ], [ 0.6387908719702939 ], [ -0.15466888696401826 ], [ 0.13870224021536282 ], [ -0.7063167029486241 ], ... ],
    	[ [ 0.783566057526992 ], [ -0.43642192045884 ], [ -0.9862075239675943 ], [ 0.9646821460363413 ], [ -0.39575723730649215 ], [ -0.513946839920203 ], [ -0.27220200854768994 ], [ 0.47648549311773736 ], ... ],
    	[ [ 0.1317051222893697 ], [ -0.3481571821038689 ], [ 0.8609168362645356 ], [ -0.7646947641410675 ], [ 0.9985952255205659 ], [ 0.9778555555843838 ], [ 0.04143844212272896 ], [ -0.720983456057698 ], ... ],
    	[ [ -0.7999045106909457 ], [ 0.7552087028192875 ], [ 0.4778084501647739 ], [ 0.7818664902875907 ], [ 0.06194230177866733 ], [ -0.9661900231134388 ], [ -0.14848513687829556 ], [ -0.7188046860302675 ], ... ],
    	[ [ -0.8790656757575774 ], [ 0.16386436139588323 ], [ 0.015614747653969197 ], [ 0.33911179331905306 ], [ -0.7997182488223751 ], [ -0.7865907833540515 ], [ 0.8727924370998279 ], [ -0.8379357079075569 ], ... ],
    	[ [ -0.948494066768339 ], [ 0.11536840898067457 ], [ -0.6451485633891414 ], [ -0.643247416603995 ], [ -0.9421014130129981 ], [ 0.5008733476289919 ], [ -0.9301804848577759 ], [ 0.7063754672781917 ], ... ],
    	...
    ]
    [
    	[ [ 0.661895213318235 ], [ -0.746572619249551 ], [ -0.7789068273832112 ], [ -0.6672948955749163 ], [ 0.9841720549814013 ], [ 0.4074620446166122 ], [ -0.38835553599722106 ], [ 0.2860776234842264 ], ... ],
    	[ [ -0.5948518239959963 ], [ -0.38831035360679356 ], [ -0.36090271661919715 ], [ -0.3906318479210291 ], [ -0.6854973427902362 ], [ -0.1882394900701534 ], [ 0.6768773919938382 ], [ -0.6266882535956799 ], ... ],
    	[ [ -0.5535549773009625 ], [ 0.013520691034177856 ], [ -0.9200765472270114 ], [ -0.1126766269132502 ], [ 0.49805409841265336 ], [ -0.47288333230614343 ], [ 0.33995963577145005 ], [ 0.4695146763444624 ], ... ],
    	[ [ 0.575774687043743 ], [ -0.7231782708184589 ], [ 0.20658198614450596 ], [ 0.9015540439688039 ], [ -0.5528325474106737 ], [ -0.3572276315205334 ], [ -0.5391489193769008 ], [ 0.8219965757939736 ], ... ],
    	[ [ -0.3308591108570422 ], [ -0.5809679747067531 ], [ -0.9785944725586035 ], [ -0.3173994210385014 ], [ 0.9595402951957732 ], [ -0.16816799606866795 ], [ 0.8751724202812523 ], [ 0.9545759755283258 ], ... ],
    	[ [ -0.33128010435525557 ], [ -0.790340397608918 ], [ -0.6287177094726366 ], [ -0.03906234172073497 ], [ -0.7398091375706648 ], [ 0.5469144785153881 ], [ -0.4047734579186142 ], [ -0.4960780834590477 ], ... ],
    	[ [ -0.9606396378041393 ], [ -0.06673978061523078 ], [ 0.472587841999929 ], [ -0.40589064231508565 ], [ -0.344357725090525 ], [ 0.18603566661766147 ], [ -0.40487093677865915 ], [ -0.6821288960477252 ], ... ],
    	[ [ -0.7116178479276336 ], [ -0.29529240068849805 ], [ -0.26814905668671996 ], [ 0.5366550350046382 ], [ 0.2429354459468278 ], [ -0.9954624464624233 ], [ -0.5799597938749663 ], [ -0.015521534088053235 ], ... ],
    	...
    ]
    [
    	[ [ -0.9425902607972061 ], [ 0.17177392285995818 ], [ -0.7087228972499577 ], [ -0.9580314565860657 ], [ 0.022785592040792002 ], [ 0.5132798195260655 ], [ -0.6048642175205496 ], [ -0.4756398221507141 ], ... ],
    	[ [ -0.6532044783753705 ], [ 0.3753414961562358 ], [ 0.3926349947588683 ], [ -0.7313874958793751 ], [ -0.08703677731486925 ], [ 0.7400823984525429 ], [ 0.8918393455400551 ], [ 0.4965410317386867 ], ... ],
    	[ [ 0.1637884447697353 ], [ -0.6712222725372905 ], [ 0.3554953127075009 ], [ -0.8339719538329844 ], [ 0.38503115608118366 ], [ 0.8157582241596741 ], [ 0.4914867183799785 ], [ -0.8113694315067856 ], ... ],
    	[ [ 0.6443310218954443 ], [ -0.5325387589465405 ], [ -0.28920203757402074 ], [ 0.5182485826767385 ], [ 0.35905149557843785 ], [ 0.0225461482585656 ], [ 0.042174762660548204 ], [ -0.48442624869344875 ], ... ],
    	[ [ -0.41261285616726817 ], [ -0.6647966581416311 ], [ -0.8156656741314761 ], [ -0.7421585952663381 ], [ 0.6349722114523582 ], [ 0.7885031558185696 ], [ 0.9244119190321087 ], [ -0.09978884634456398 ], ... ],
    	[ [ 0.4617249510404908 ], [ 0.4998740230017422 ], [ 0.5876817379390613 ], [ 0.643680453521527 ], [ 0.4912881874776027 ], [ -0.24915804618175885 ], [ -0.5578561301996166 ], [ -0.28152162652401946 ], ... ],
    	[ [ 0.4274562042312149 ], [ 0.07621602309524333 ], [ -0.154223903627001 ], [ 0.8968243005030523 ], [ 0.04671094640464757 ], [ 0.4140901386564144 ], [ 0.5784711398705811 ], [ 0.11167386634661036 ], ... ],
    	[ [ 0.6706183057547734 ], [ -0.5157117424903033 ], [ -0.6594646506696991 ], [ -0.04568778387928285 ], [ -0.5986069175330708 ], [ -0.537138280652875 ], [ -0.7959315048816489 ], [ -0.32125886446489393 ], ... ],
    	...
    ]
    [
    	[ [ -0.7700707152691928 ], [ -0.3218270012120774 ], [ 0.2135871029567855 ], [ 0.47361872775578884 ], [ 0.44980222634116074 ], [ -0.56158720687673 ], [ 0.9668757046579177 ], [ 0.9406213777614367 ], ... ],
    	[ [ -0.5111220687553351 ], [ 0.6774679918156037 ], [ 0.02470639458443813 ], [ 0.32266438743438974 ], [ 0.7988244930877684 ], [ -0.01704167553519631 ], [ -0.037077969354235574 ], [ -0.8719364681976207 ], ... ],
    	[ [ -0.11843572759065402 ], [ -0.349118867833204 ], [ -0.786377721102467 ], [ 0.40273811814426264 ], [ 0.6842667222302168 ], [ -0.2388208525239759 ], [ -0.35651077732300407 ], [ 0.20373242259329039 ], ... ],
    	[ [ 0.13932687116018405 ], [ 0.918096979760346 ], [ 0.1664978878312584 ], [ -0.22339065773409583 ], [ 0.2998894838270574 ], [ -0.4304227708328763 ], [ 0.9185859420872562 ], [ -0.09494119550513869 ], ... ],
    	[ [ 0.46718938504537033 ], [ -0.6340194421078007 ], [ 0.18897875255364038 ], [ 0.11011585272254987 ], [ -0.0037532779633171476 ], [ -0.5158523706580749 ], [ 0.04212006693160286 ], [ 0.9503439545039356 ], ... ],
    	[ [ -0.2104771127891918 ], [ 0.28687456794887445 ], [ 0.8196065477550758 ], [ 0.9234468936116593 ], [ 0.9418776853607833 ], [ -0.39841299922502427 ], [ 0.562348988752071 ], [ -0.5673960467413304 ], ... ],
    	[ [ 0.994931969235056 ], [ 0.9288381054072592 ], [ 0.3746025439279419 ], [ 0.2412573606541748 ], [ 0.7390744447893687 ], [ 0.3339068537886316 ], [ -0.4473784687573099 ], [ -0.12056909618056988 ], ... ],
    	[ [ 0.47397585360914274 ], [ 0.8260070198699807 ], [ 0.6415857605165494 ], [ 0.7701248307458484 ], [ 0.7202692612974362 ], [ -0.6450831148985929 ], [ -0.2552199982163619 ], [ -0.7335141197634107 ], ... ],
    	...
    ]

Gradient Descent

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

TrainingTester.java:480 executed in 7.93 seconds (0.046 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: 4390846753983
BACKPROP_AGG_SIZE = 3
THREADS = 64
SINGLE_THREADED = false
Initialized CoreSettings = {
"backpropAggregationSize" : 3,
"jvmThreads" : 64,
"singleThreaded" : false
}
Reset training subject: 4390920307143
Constructing line search parameters: GD
th(0)=18439.01364585362;dx=-3.814062516802853E25
New Minimum: 18439.01364585362 > 9602.54824612377
Armijo: th(2.154434690031884)=9602.54824612377; dx=3.7317039287245275E26 evalInputDelta=8836.465399729852
New Minimum: 9602.54824612377 > 8262.38177742565
Armijo: th(1.077217345015942)=8262.38177742565; dx=3.636118598043182E26 evalInputDelta=10176.631868427972
New Minimum: 8262.38177742565 > 7510.921543889203
Armijo: th(0.3590724483386473)=7510.921543889203; dx=3.4846194332939094E26 evalInputDelta=10928.09210196442
New Minimum: 7510.921543889203 > 7269.4014597733885
Armijo: th(0.08976811208466183)=7269.4014597733885; dx=3.293448771928668E26 evalInputDelta=11169.612186080234
New Minimum: 7269.4014597733885 > 7245.911016742262
Armijo: th(0.017953622416932366)=7245.911016742262; dx=3.0715065071435635E26 evalInputDelta=11193.10262911136
Armijo: th(0.002992270402822061)=7275.746047011967; dx=2.8244220115985495E26 evalInputDelta=11163.267598841656
Armijo: th(4.2746720040315154E-4)=7298.640992048868; dx=2.556080062189209E26 evalInputDelta=11140.372653804754
Armijo: th(5.343340005039394E-5)=7309.650058555424; dx=2.269324063216147E26 evalInputDelta=11129.363587298198
Armijo: th(5.9370444500437714E-6)=7313.9473921581375; dx=1.9663256703223725E26 evalInputDelta=11125.066253695484
Armijo: th(5.937044450043771E-7)=7315.3715024184985; dx=1.648797432855578E26 evalInputDelta=11123.642143435123
Armijo: th(5.397313136403428E-8)=7313.875282314293; dx=1.3181193531060046E26 evalInputDelta=11125.138363539329
Armijo: th(4.4977609470028565E-9)=7302.476070596943; dx=9.753620561233359E25 evalInputDelta=11136.53757525668
Armijo: th(3.4598161130791205E-10)=7251.616860757911; dx=6.203569514507598E25 evalInputDelta=11187.39678509571
Armijo: th(2.4712972236279432E-11)=8039.354273479791; dx=2.2978142260554087E25 evalInputDelta=10399.65937237383
Armijo: th(1.6475314824186289E-12)=15276.31932337227; dx=-1.4236926712787376E25 evalInputDelta=3162.6943224813513
Armijo: th(1.029707176511643E-13)=18075.891696265673; dx=-2.8428561312224946E25 evalInputDelta=363.1219495879486
Armijo: th(6.057101038303783E-15)=18404.18299671834; dx=-3.5874760586757795E25 evalInputDelta=34.83064913528142
MIN ALPHA (3.3650561323909904E-16): th(0.017953622416932366)=7245.911016742262
Fitness changed from 18439.01364585362 to 7245.911016742262
Iteration 1 complete. Error: 7245.911016742262 Total: 1.2179; Orientation: 0.0105; Line Search: 1.0963
th(0)=7245.911016742262;dx=-6.20805633127077E27
New Minimum: 7245.911016742262 > 7245.9110167422605
Armijo: th(2.154434690031884E-15)=7245.9110167422605; dx=-6.208056446325591E27 evalInputDelta=1.8189894035458565E-12
Armijo: th(1.077217345015942E-15)=7245.911016742262; dx=-6.208056388646978E27 evalInputDelta=0.0
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.9110167422605
Fitness changed from 7245.911016742262 to 7245.9110167422605
Iteration 2 complete. Error: 7245.9110167422605 Total: 0.0899; Orientation: 0.0039; Line Search: 0.0755
th(0)=7245.9110167422605;dx=-6.208056561904613E27
New Minimum: 7245.9110167422605 > 7245.91101674226
Armijo: th(2.154434690031884E-15)=7245.91101674226; dx=-6.208056679245175E27 evalInputDelta=9.094947017729282E-13
Armijo: th(1.077217345015942E-15)=7245.91101674226; dx=-6.208056620418617E27 evalInputDelta=9.094947017729282E-13
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.91101674226
Fitness changed from 7245.9110167422605 to 7245.91101674226
Iteration 3 complete. Error: 7245.91101674226 Total: 0.1162; Orientation: 0.0032; Line Search: 0.1039
th(0)=7245.91101674226;dx=-6.208056797125176E27
New Minimum: 7245.91101674226 > 7245.911016742257
Armijo: th(2.154434690031884E-15)=7245.911016742257; dx=-6.208056916823819E27 evalInputDelta=2.7284841053187847E-12
Armijo: th(1.077217345015942E-15)=7245.911016742258; dx=-6.208056856812908E27 evalInputDelta=1.8189894035458565E-12
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.911016742257
Fitness changed from 7245.91101674226 to 7245.911016742257
Iteration 4 complete. Error: 7245.911016742257 Total: 0.4092; Orientation: 0.0029; Line Search: 0.3967
th(0)=7245.911016742257;dx=-6.208057037077791E27
New Minimum: 7245.911016742257 > 7245.911016742255
Armijo: th(2.154434690031884E-15)=7245.911016742255; dx=-6.208057159210146E27 evalInputDelta=1.8189894035458565E-12
Armijo: th(1.077217345015942E-15)=7245.911016742257; dx=-6.208057097976813E27 evalInputDelta=0.0
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.911016742255
Fitness changed from 7245.911016742257 to 7245.911016742255
Iteration 5 complete. Error: 7245.911016742255 Total: 0.1668; Orientation: 0.0037; Line Search: 0.1499
th(0)=7245.911016742255;dx=-6.208057281914412E27
New Minimum: 7245.911016742255 > 7245.911016742253
Armijo: th(2.154434690031884E-15)=7245.911016742253; dx=-6.208057406559598E27 evalInputDelta=1.8189894035458565E-12
Armijo: th(1.077217345015942E-15)=7245.911016742253; dx=-6.208057344064015E27 evalInputDelta=1.8189894035458565E-12
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.911016742253
Fitness changed from 7245.911016742255 to 7245.911016742253
Iteration 6 complete. Error: 7245.911016742253 Total: 0.6266; Orientation: 0.0035; Line Search: 0.6131
th(0)=7245.911016742253;dx=-6.208057531794006E27
New Minimum: 7245.911016742253 > 7245.9110167422505
Armijo: th(2.154434690031884E-15)=7245.9110167422505; dx=-6.208057659034837E27 evalInputDelta=2.7284841053187847E-12
Armijo: th(1.077217345015942E-15)=7245.911016742252; dx=-6.208057595235311E27 evalInputDelta=9.094947017729282E-13
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.9110167422505
Fitness changed from 7245.911016742253 to 7245.9110167422505
Iteration 7 complete. Error: 7245.9110167422505 Total: 0.2694; Orientation: 0.0110; Line Search: 0.2345
th(0)=7245.9110167422505;dx=-6.208057786882978E27
New Minimum: 7245.9110167422505 > 7245.911016742248
Armijo: th(2.154434690031884E-15)=7245.911016742248; dx=-6.208057916806202E27 evalInputDelta=2.7284841053187847E-12
Armijo: th(1.077217345015942E-15)=7245.91101674225; dx=-6.208057851659055E27 evalInputDelta=9.094947017729282E-13
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.911016742248
Fitness changed from 7245.9110167422505 to 7245.911016742248
Iteration 8 complete. Error: 7245.911016742248 Total: 0.2433; Orientation: 0.0045; Line Search: 0.2203
th(0)=7245.911016742248;dx=-6.208058047355641E27
New Minimum: 7245.911016742248 > 7245.911016742246
Armijo: th(2.154434690031884E-15)=7245.911016742246; dx=-6.208058180052174E27 evalInputDelta=1.8189894035458565E-12
Armijo: th(1.077217345015942E-15)=7245.911016742248; dx=-6.208058113511625E27 evalInputDelta=0.0
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.911016742246
Fitness changed from 7245.911016742248 to 7245.911016742246
Iteration 9 complete. Error: 7245.911016742246 Total: 0.5627; Orientation: 0.0361; Line Search: 0.5170
th(0)=7245.911016742246;dx=-6.208058313394699E27
New Minimum: 7245.911016742246 > 7245.911016742245
Armijo: th(2.154434690031884E-15)=7245.911016742245; dx=-6.208058448959896E27 evalInputDelta=9.094947017729282E-13
Armijo: th(1.077217345015942E-15)=7245.911016742246; dx=-6.208058380977922E27 evalInputDelta=0.0
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.911016742245
Fitness changed from 7245.911016742246 to 7245.911016742245
Iteration 10 complete. Error: 7245.911016742245 Total: 0.1480; Orientation: 0.0034; Line Search: 0.1352
th(0)=7245.911016742245;dx=-6.208058585191784E27
New Minimum: 7245.911016742245 > 7245.911016742242
Armijo: th(2.154434690031884E-15)=7245.911016742242; dx=-6.208058723725721E27 evalInputDelta=2.7284841053187847E-12
Armijo: th(1.077217345015942E-15)=7245.911016742243; dx=-6.208058654251919E27 evalInputDelta=1.8189894035458565E-12
MIN ALPHA (3.5907244833864734E-16): th(2.154434690

...skipping 622 bytes...

from 7245.911016742242 to 7245.911016742239
Iteration 12 complete. Error: 7245.911016742239 Total: 0.2007; Orientation: 0.0050; Line Search: 0.1861
th(0)=7245.911016742239;dx=-6.208059146874709E27
New Minimum: 7245.911016742239 > 7245.911016742238
Armijo: th(2.154434690031884E-15)=7245.911016742238; dx=-6.208059291666826E27 evalInputDelta=9.094947017729282E-13
Armijo: th(1.077217345015942E-15)=7245.911016742239; dx=-6.20805921904781E27 evalInputDelta=0.0
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.911016742238
Fitness changed from 7245.911016742239 to 7245.911016742238
Iteration 13 complete. Error: 7245.911016742238 Total: 0.2130; Orientation: 0.0039; Line Search: 0.1992
th(0)=7245.911016742238;dx=-6.208059437193875E27
New Minimum: 7245.911016742238 > 7245.911016742236
Armijo: th(2.154434690031884E-15)=7245.911016742236; dx=-6.20805958528652E27 evalInputDelta=1.8189894035458565E-12
Armijo: th(1.077217345015942E-15)=7245.911016742238; dx=-6.208059511008519E27 evalInputDelta=0.0
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.911016742236
Fitness changed from 7245.911016742238 to 7245.911016742236
Iteration 14 complete. Error: 7245.911016742236 Total: 0.2360; Orientation: 0.0032; Line Search: 0.2132
th(0)=7245.911016742236;dx=-6.208059734139115E27
New Minimum: 7245.911016742236 > 7245.911016742235
Armijo: th(2.154434690031884E-15)=7245.911016742235; dx=-6.208059885654613E27 evalInputDelta=9.094947017729282E-13
Armijo: th(1.077217345015942E-15)=7245.911016742235; dx=-6.208059809655986E27 evalInputDelta=9.094947017729282E-13
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.911016742235
Fitness changed from 7245.911016742236 to 7245.911016742235
Iteration 15 complete. Error: 7245.911016742235 Total: 0.2131; Orientation: 0.0035; Line Search: 0.2003
th(0)=7245.911016742235;dx=-6.208060037956339E27
New Minimum: 7245.911016742235 > 7245.911016742231
Armijo: th(2.154434690031884E-15)=7245.911016742231; dx=-6.208060193023554E27 evalInputDelta=3.637978807091713E-12
Armijo: th(1.077217345015942E-15)=7245.911016742233; dx=-6.208060115239353E27 evalInputDelta=1.8189894035458565E-12
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.911016742231
Fitness changed from 7245.911016742235 to 7245.911016742231
Iteration 16 complete. Error: 7245.911016742231 Total: 0.2577; Orientation: 0.0978; Line Search: 0.0771
th(0)=7245.911016742231;dx=-6.208060348904624E27
New Minimum: 7245.911016742231 > 7245.9110167422305
Armijo: th(2.154434690031884E-15)=7245.9110167422305; dx=-6.208060507659434E27 evalInputDelta=9.094947017729282E-13
Armijo: th(1.077217345015942E-15)=7245.9110167422305; dx=-6.208060428021166E27 evalInputDelta=9.094947017729282E-13
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.9110167422305
Fitness changed from 7245.911016742231 to 7245.9110167422305
Iteration 17 complete. Error: 7245.9110167422305 Total: 0.0722; Orientation: 0.0043; Line Search: 0.0588
th(0)=7245.9110167422305;dx=-6.208060667257162E27
New Minimum: 7245.9110167422305 > 7245.911016742228
Armijo: th(2.154434690031884E-15)=7245.911016742228; dx=-6.20806082984295E27 evalInputDelta=2.7284841053187847E-12
Armijo: th(1.077217345015942E-15)=7245.911016742229; dx=-6.208060748278333E27 evalInputDelta=1.8189894035458565E-12
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.911016742228
Fitness changed from 7245.9110167422305 to 7245.911016742228
Iteration 18 complete. Error: 7245.911016742228 Total: 0.2845; Orientation: 0.0029; Line Search: 0.2730
th(0)=7245.911016742228;dx=-6.208060993302265E27
New Minimum: 7245.911016742228 > 7245.911016742224
Armijo: th(2.154434690031884E-15)=7245.911016742224; dx=-6.208061159870479E27 evalInputDelta=3.637978807091713E-12
Armijo: th(1.077217345015942E-15)=7245.911016742226; dx=-6.208061076303149E27 evalInputDelta=1.8189894035458565E-12
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.911016742224
Fitness changed from 7245.911016742228 to 7245.911016742224
Iteration 19 complete. Error: 7245.911016742224 Total: 0.2551; Orientation: 0.0031; Line Search: 0.2434
th(0)=7245.911016742224;dx=-6.208061327344477E27
New Minimum: 7245.911016742224 > 7245.911016742221
Armijo: th(2.154434690031884E-15)=7245.911016742221; dx=-6.208061498055226E27 evalInputDelta=2.7284841053187847E-12
Armijo: th(1.077217345015942E-15)=7245.911016742223; dx=-6.208061412404439E27 evalInputDelta=9.094947017729282E-13
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.911016742221
Fitness changed from 7245.911016742224 to 7245.911016742221
Iteration 20 complete. Error: 7245.911016742221 Total: 0.1866; Orientation: 0.0626; Line Search: 0.0883
th(0)=7245.911016742221;dx=-6.208061669705781E27
New Minimum: 7245.911016742221 > 7245.91101674222
Armijo: th(2.154434690031884E-15)=7245.91101674222; dx=-6.20806184472849E27 evalInputDelta=9.094947017729282E-13
Armijo: th(1.077217345015942E-15)=7245.911016742221; dx=-6.208061756908793E27 evalInputDelta=0.0
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.91101674222
Fitness changed from 7245.911016742221 to 7245.91101674222
Iteration 21 complete. Error: 7245.91101674222 Total: 0.1788; Orientation: 0.0038; Line Search: 0.1560
th(0)=7245.91101674222;dx=-6.208062020726925E27
New Minimum: 7245.91101674222 > 7245.911016742217
Armijo: th(2.154434690031884E-15)=7245.911016742217; dx=-6.208062200241052E27 evalInputDelta=3.637978807091713E-12
Armijo: th(1.077217345015942E-15)=7245.911016742219; dx=-6.208062110161916E27 evalInputDelta=1.8189894035458565E-12
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.911016742217
Fitness changed from 7245.91101674222 to 7245.911016742217
Iteration 22 complete. Error: 7245.911016742217 Total: 0.4453; Orientation: 0.0032; Line Search: 0.4308
th(0)=7245.911016742217;dx=-6.208062380768867E27
New Minimum: 7245.911016742217 > 7245.911016742214
Armijo: th(2.154434690031884E-15)=7245.911016742214; dx=-6.208062564964688E27 evalInputDelta=2.7284841053187847E-12
Armijo: th(1.077217345015942E-15)=7245.911016742216; dx=-6.208062472530108E27 evalInputDelta=9.094947017729282E-13
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.911016742214
Fitness changed from 7245.911016742217 to 7245.911016742214
Iteration 23 complete. Error: 7245.911016742214 Total: 0.2639; Orientation: 0.0048; Line Search: 0.2491
th(0)=7245.911016742214;dx=-6.208062750214358E27
New Minimum: 7245.911016742214 > 7245.911016742213
Armijo: th(2.154434690031884E-15)=7245.911016742213; dx=-6.20806293929384E27 evalInputDelta=9.094947017729282E-13
Armijo: th(1.077217345015942E-15)=7245.911016742213; dx=-6.208062844401894E27 evalInputDelta=9.094947017729282E-13
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.911016742213
Fitness changed from 7245.911016742214 to 7245.911016742213
Iteration 24 complete. Error: 7245.911016742213 Total: 0.3512; Orientation: 0.0038; Line Search: 0.3388
th(0)=7245.911016742213;dx=-6.208063129469694E27
New Minimum: 7245.911016742213 > 7245.9110167422095
Armijo: th(2.154434690031884E-15)=7245.9110167422095; dx=-6.208063323647438E27 evalInputDelta=3.637978807091713E-12
Armijo: th(1.077217345015942E-15)=7245.911016742213; dx=-6.208063226189811E27 evalInputDelta=0.0
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.9110167422095
Fitness changed from 7245.911016742213 to 7245.9110167422095
Iteration 25 complete. Error: 7245.9110167422095 Total: 0.2102; Orientation: 0.0272; Line Search: 0.1740
th(0)=7245.9110167422095;dx=-6.208063518966633E27
Armijo: th(2.154434690031884E-15)=7245.9110167422095; dx=-6.208063718470923E27 evalInputDelta=0.0
Armijo: th(1.077217345015942E-15)=7245.9110167422095; dx=-6.208063618332369E27 evalInputDelta=0.0
MIN ALPHA (3.5907244833864734E-16): th(0.0)=7245.9110167422095
Fitness changed from 7245.9110167422095 to 7245.9110167422095
Static Iteration Total: 0.4732; Orientation: 0.0039; Line Search: 0.4607
Iteration 26 failed. Error: 7245.9110167422095
Previous Error: 0.0 -> 7245.9110167422095
Optimization terminated 26
Final threshold in iteration 26: 7245.9110167422095 (> 0.0) after 7.919s (< 30.000s)

Returns

    7245.9110167422095

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.5078580566310986 ], [ -0.8600474177974433 ], [ -0.9126178188682639 ], [ -1.1976294003523414E8 ], [ 0.12408199403899116 ], [ 0.5599954999975527 ], [ 0.15592653936426126 ], [ -0.07031352516332201 ], ... ],
    	[ [ -0.8409090794812224 ], [ 3.272537863516741E9 ], [ 0.6005885552808996 ], [ -0.8256070405131541 ], [ 0.5834055993648362 ], [ 0.4189600650409435 ], [ 0.43193586625670893 ], [ 0.5002206493773007 ], ... ],
    	[ [ 0.11927737480358602 ], [ 0.3721119255735734 ], [ 0.32889237086840944 ], [ 0.7033777912321854 ], [ -7.461487810054182E7 ], [ 0.7181165906211178 ], [ 0.7767074955588893 ], [ 0.16597101237085796 ], ... ],
    	[ [ 1.6843055258602732E8 ], [ -0.04396980306769738 ], [ 0.901215605612284 ], [ -0.4100501746030547 ], [ 0.053231390927482636 ], [ 0.5556168337526632 ], [ -0.47984455735120957 ], [ 0.14471543443263812 ], ... ],
    	[ [ 0.8056717231845243 ], [ -0.8945825300126584 ], [ -0.4601974607642665 ], [ -5.473105389851433E8 ], [ 0.7900459026043154 ], [ 0.1865566865257349 ], [ 0.4530522498443186 ], [ -0.4191428276804594 ], ... ],
    	[ [ 0.011223444511212044 ], [ 0.9973398447273027 ], [ 0.4865094988053402 ], [ 0.19175123158331533 ], [ 0.048252489352069425 ], [ 0.8872673851058324 ], [ -0.04755271185217946 ], [ 0.6448162592488619 ], ... ],
    	[ [ 1.9364268030404693E8 ], [ 0.30105030258874094 ], [ -4.7807789829986006E8 ], [ -0.4402472379654958 ], [ 0.5883140445698254 ], [ -0.009639990116719677 ], [ 0.9319880822775108 ], [ 0.5659152385722725 ], ... ],
    	[ [ 0.19726209024060215 ], [ 0.2466967267882676 ], [ -0.11043967604204274 ], [ 0.8299873796084773 ], [ -2.7820505279813385E8 ], [ 1.2934355153401697E9 ], [ -0.16230059443607647 ], [ 0.7162539674609933 ], ... ],
    	...
    ]

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.34410089536018285 ], [ -0.12966741775632096 ], [ -0.08344802596100084 ], [ 2.227713423365128E9 ], [ 0.2589358797178288 ], [ 0.32470024814136683 ], [ 0.28976924726530656 ], [ -0.18666772127651665 ], ... ],
    	[ [ -0.14570577506454557 ], [ -7.169748104114714E10 ], [ 0.30620717952708876 ], [ -0.15821632517594947 ], [ 0.3143813060578595 ], [ 0.36448674070576903 ], [ 0.3626007260263854 ], [ 0.34650583471745267 ], ... ],
    	[ [ 0.2536199135256114 ], [ 0.36785518646419013 ], [ 0.3657364472685241 ], [ 0.24749130647620446 ], [ 1.3526073540611892E9 ], [ 0.2377851644524955 ], [ 0.19626734567330695 ], [ 0.29807433349982787 ], ... ],
    	[ [ -3.190417265846011E9 ], [ -0.13737275285042966 ], [ 0.09373611474048513 ], [ -0.3655497868150304 ], [ 0.15613336543540732 ], [ 0.3265228840984539 ], [ -0.3523465314026798 ], [ 0.2797329067138296 ], ... ],
    	[ [ 0.1740886683883238 ], [ -0.09965480884417909 ], [ -0.35715907399833047 ], [ 1.101217642900915E10 ], [ 0.18618555981278417 ], [ 0.3132324333466574 ], [ 0.3587031304040868 ], [ -0.3644629379903457 ], ... ],
    	[ [ 0.05039046480421703 ], [ 0.0026566139180814762 ], [ 0.35052953574947154 ], [ 0.3166879767773584 ], [ 0.1462681502249005 ], [ 0.10612506997267868 ], [ -0.14484158774939837 ], [ 0.2829388439566708 ], ... ],
    	[ [ -3.6949976771672635E9 ], [ 0.36140423804483973 ], [ 9.554522688455809E9 ], [ -0.36118711305758294 ], [ 0.3120972968220665 ], [ -0.044747245408994274 ], [ 0.06564481509528561 ], [ 0.3221817518055824 ], ... ],
    	[ [ 0.32020016999804735 ], [ 0.34527563447969084 ], [ -0.24333017277012225 ], [ 0.15466381864228435 ], [ 5.409382601676842E9 ], [ -2.7137011402291336E10 ], [ -0.2951120053953028 ], [ 0.23902861191817001 ], ... ],
    	...
    ]

Conjugate Gradient Descent

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

TrainingTester.java:452 executed in 31.22 seconds (0.081 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: 4398790241091
Reset training subject: 4398801104247
Constructing line search parameters: GD
F(0.0) = LineSearchPoint{point=PointSample{avg=18439.01364585362}, derivative=-3.814062516802853E25}
New Minimum: 18439.01364585362 > 7223.0313904467475
F(1.0E-10) = LineSearchPoint{point=PointSample{avg=7223.0313904467475}, derivative=4.4491301790405875E25}, evalInputDelta = -11215.982255406874
7223.0313904467475 <= 18439.01364585362
Converged to right
Fitness changed from 18439.01364585362 to 7223.0313904467475
Iteration 1 complete. Error: 7223.0313904467475 Total: 0.0625; Orientation: 0.0028; Line Search: 0.0316
F(0.0) = LineSearchPoint{point=PointSample{avg=7223.0313904467475}, derivative=-8.963753240170987E25}
New Minimum: 7223.0313904467475 > 1661.5104797046617
F(1.0E-10) = LineSearchPoint{point=PointSample{avg=1661.5104797046617}, derivative=-9.494262480721542E22}, evalInputDelta = -5561.520910742086
New Minimum: 1661.5104797046617 > 1479.397995840268
F(7.000000000000001E-10) = LineSearchPoint{point=PointSample{avg=1479.397995840268}, derivative=3.447718337114524E24}, evalInputDelta = -5743.63339460648
1479.397995840268 <= 7223.0313904467475
New Minimum: 1479.397995840268 > 1477.1561917316315
F(6.740731983120332E-10) = LineSearchPoint{point=PointSample{avg=1477.1561917316315}, derivative=3.4211373336110556E24}, evalInputDelta = -5745.875198715116
Right bracket at 6.740731983120332E-10
New Minimum: 1477.1561917316315 > 1477.1220952046192
F(6.492920898898847E-10) = LineSearchPoint{point=PointSample{avg=1477.1220952046192}, derivative=3.3947754878824183E24}, evalInputDelta = -5745.909295242129
Right bracket at 6.492920898898847E-10
New Minimum: 1477.1220952046192 > 1476.270931918897
F(6.255992360712952E-10) = LineSearchPoint{point=PointSample{avg=1476.270931918897}, derivative=3.368579076898834E24}, evalInputDelta = -5746.7604585278505
Right bracket at 6.255992360712952E-10
New Minimum: 1476.270931918897 > 1475.1579461198448
F(6.02940719725965E-10) = LineSearchPoint{point=PointSample{avg=1475.1579461198448}, derivative=3.342464225117333E24}, evalInputDelta = -5747.873444326902
Right bracket at 6.02940719725965E-10
F(5.812660815385824E-10) = LineSearchPoint{point=PointSample{avg=1475.7451843436454}, derivative=3.316898482705946E24}, evalInputDelta = -5747.286206103102
1475.7451843436454 > 1475.1579461198448
Fitness changed from 7223.0313904467475 to 1475.1579461198448
Iteration 2 complete. Error: 1475.1579461198448 Total: 0.3398; Orientation: 0.0043; Line Search: 0.3255
F(0.0) = LineSearchPoint{point=PointSample{avg=1475.1579461198448}, derivative=-1.3397586261428332E25}
New Minimum: 1475.1579461198448 > 1075.8471817507138
F(6.02940719725965E-10) = LineSearchPoint{point=PointSample{avg=1075.8471817507138}, derivative=1.017184744161005E23}, evalInputDelta = -399.310764369131
1075.8471817507138 <= 1475.1579461198448
Converged to right
Fitness changed from 1475.1579461198448 to 1075.8471817507138
Iteration 3 complete. Error: 1075.8471817507138 Total: 0.1231; Orientation: 0.0032; Line Search: 0.1101
F(0.0) = LineSearchPoint{point=PointSample{avg=1075.8471817507138}, derivative=-3.04783286877945E23}
New Minimum: 1075.8471817507138 > 1066.7794188172059
F(6.02940719725965E-10) = LineSearchPoint{point=PointSample{avg=1066.7794188172059}, derivative=-1.2280325556826658E22}, evalInputDelta = -9.067762933507993
New Minimum: 1066.7794188172059 > 1065.9748124000753
F(4.2205850380817545E-9) = LineSearchPoint{point=PointSample{avg=1065.9748124000753}, derivative=1.0348345161510778E20}, evalInputDelta = -9.872369350638564
1065.9748124000753 <= 1075.8471817507138
Converged to right
Fitness changed from 1075.8471817507138 to 1065.9748124000753
Iteration 4 complete. Error: 1065.9748124000753 Total: 0.1628; Orientation: 0.0029; Line Search: 0.1515
F(0.0) = LineSearchPoint{point=PointSample{avg=1065.9748124000753}, derivative=-5.5234493094010356E20}
New Minimum: 1065.9748124000753 > 1065.3910687925636
F(4.2205850380817545E-9) = LineSearchPoint{point=PointSample{avg=1065.3910687925636}, derivative=4.5592763532981011E17}, evalInputDelta = -0.5837436075116784
1065.3910687925636 <= 1065.9748124000753
Converged to right
Fitness changed from 1065.9748124000753 to 1065.3910687925636
Iteration 5 complete. Error: 1065.3910687925636 Total: 0.0410; Orientation: 0.0037; Line Search: 0.0288
F(0.0) = LineSearchPoint{point=PointSample{avg=1065.3910687925636}, derivative=-7.3539141681629517E17}
New Minimum: 1065.3910687925636 > 1065.3713193276963
F(4.2205850380817545E-9) = LineSearchPoint{point=PointSample{avg=1065.3713193276963}, derivative=5.7135353385006842E17}, evalInputDelta = -0.019749464867345523
1065.3713193276963 <= 1065.3910687925636
F(2.375201074521735E-9) = LineSearchPoint{point=PointSample{avg=1065.376312521577}, derivative=4.2523902372860723E17}, evalInputDelta = -0.014756270986708842
1065.376312521577 > 1065.3713193276963
Fitness changed from 1065.3910687925636 to 1065.3713193276963
Iteration 6 complete. Error: 1065.3713193276963 Total: 0.2580; Orientation: 0.0035; Line Search: 0.2455
F(0.0) = LineSearchPoint{point=PointSample{avg=1065.3713193276963}, derivative=-4.6026301925387104E17}
New Minimum: 1065.3713193276963 > 1065.3539669919633
F(4.2205850380817545E-9) = LineSearchPoint{point=PointSample{avg=1065.3539669919633}, derivative=-5.475347849284696E15}, evalInputDelta = -0.017352335732994106
New Minimum: 1065.3539669919633 > 1065.3011099783894
F(2.9544095266572283E-8) = LineSearchPoint{point=PointSample{avg=1065.3011099783894}, derivative=-7.806933891015398E11}, evalInputDelta = -0.07020934930687872
New Minimum: 1065.3011099783894 > 1065.1085953611978
F(2.0680866686600597E-7) = LineSearchPoint{point=PointSample{avg=1065.1085953611978}, derivative=6.718046387108143E15}, evalInputDelta = -0.26272396649846996
1065.1085953611978 <= 1065.3713193276963
F(2.0383349224012517E-7) = LineSearchPoint{point=PointSample{avg=1065.1110737824042}, derivative=6.680653891278018E15}, evalInputDelta = -0.2602455452920367
1065.1110737824042 > 1065.1085953611978
Fitness changed from 1065.3713193276963 to 1065.1085953611978
Iteration 7 complete. Error: 1065.1085953611978 Total: 0.4084; Orientation: 0.0044; Line Search: 0.3938
F(0.0) = LineSearchPoint{point=PointSample{avg=1065.1085953611978}, derivative=-5.5677426647375008E16}
New Minimum: 1065.1085953611978 > 1065.010094954765
F(2.0680866686600597E-7) = LineSearchPoint{point=PointSample{avg=1065.010094954765}, derivative=-540630.2442392051}, evalInputDelta = -0.0985004064327768
New Minimum: 1065.010094954765 > 1064.560160824481
F(1.4476606680620417E-6) = LineSearchPoint{point=PointSample{avg=1064.560160824481}, derivative=-446551.80134522484}, evalInputDelta = -0.5484345367167407
New Minimum: 1064.560160824481 > 1062.870209679025
F(1.0133624676434292E-5) = LineSearchPoint{point=PointSample{avg=1062.870209679025}, derivative=-322463.2580515306}, evalInputDelta = -2.2383856821727477
New Minimum: 1062.870209679025 > 1057.9806704075138
F(7.093537273504004E-5) = LineSearchPoint{point=PointSample{avg=1057.9806704075138}, derivative=-274938.8613200802}, evalInputDelta = -7.127924953683987
New Minimum: 1057.9806704075138 > 1045.6330625087878
F(4.965476091452803E-4) = LineSearchPoint{point=PointSample{avg=1045.6330625087878}, derivative=-278305.8478895173}, evalInputDelta = -19.47553285240997
New Minimum: 1045.6330625087878 > 1016.9747568559067
F(0.003475833264016962) = LineSearchPoint{point=PointSample{avg=1016.9747568559067}, derivative=-305036.71325481986}, evalInputDelta = -48.13383850529112
New Minimum: 1016.9747568559067 > 984.8479672136069
F(0.024330832848118735) = LineSearchPoint{point=PointSample{avg=984.8479672136069}, derivative=1.8543484452551228E14}, evalInputDelta = -80.26062814759086
984.8479672136069 <= 1065.1085953611978
Converged to right
Fitness changed from 1065.1085953611978 to 984.8479672136069
Iteration 8 complete. Error: 984.8479672136069 Total: 0.2475; Orientation: 0.0042; Line Search: 0.2340
F(0.0) = LineSearchPoint{point=PointSample{avg=984.8479672136069}, derivative=-2.6719993489366885E23}
New Minimum: 984.8479672136069 > 939.1640696878974
F(0.024330832848118735) = LineSearchPoint{point=Point

...skipping 55528 bytes...

, evalInputDelta = 330.67581178830926
F(4.491982513766404) = LineSearchPoint{point=PointSample{avg=650.0271921280485}, derivative=-7.087887774036456E9}, evalInputDelta = 1.0755240310127192
F(0.34553711644356955) = LineSearchPoint{point=PointSample{avg=648.8440901529268}, derivative=-610.9764049506016}, evalInputDelta = -0.1075779441089253
F(2.4187598151049867) = LineSearchPoint{point=PointSample{avg=648.4307571890621}, derivative=-615.0162607625444}, evalInputDelta = -0.5209109079736436
F(16.931318705734906) = LineSearchPoint{point=PointSample{avg=647.9101816878019}, derivative=-639.8911641458365}, evalInputDelta = -1.041486409233812
F(118.51923094014434) = LineSearchPoint{point=PointSample{avg=1423.7958746346833}, derivative=2.7383246117552447E9}, evalInputDelta = 774.8442065376476
New Minimum: 647.672944281076 > 647.6218142483665
F(9.116863918472642) = LineSearchPoint{point=PointSample{avg=647.6218142483665}, derivative=-627.5243688349194}, evalInputDelta = -1.329853848669245
F(63.81804742930849) = LineSearchPoint{point=PointSample{avg=1045.7771467865496}, derivative=1.5687728549963864E11}, evalInputDelta = 396.82547868951383
F(4.909080571485268) = LineSearchPoint{point=PointSample{avg=649.9745613743032}, derivative=-1.1552286006638033E10}, evalInputDelta = 1.0228932772674852
F(0.3776215824219437) = LineSearchPoint{point=PointSample{avg=648.8347839356961}, derivative=-611.0416621579883}, evalInputDelta = -0.11688416133961255
F(2.643351076953606) = LineSearchPoint{point=PointSample{avg=648.46440936945}, derivative=-614.7997410604113}, evalInputDelta = -0.48725872758575406
F(18.503457538675242) = LineSearchPoint{point=PointSample{avg=648.1087994506946}, derivative=-642.1689549097523}, evalInputDelta = -0.8428686463411168
F(129.5242027707267) = LineSearchPoint{point=PointSample{avg=1431.393557777887}, derivative=9.903849294463701E9}, evalInputDelta = 782.4418896808513
New Minimum: 647.6218142483665 > 647.597881150987
F(9.963400213132823) = LineSearchPoint{point=PointSample{avg=647.597881150987}, derivative=-628.9582810987312}, evalInputDelta = -1.3537869460487855
F(69.74380149192976) = LineSearchPoint{point=PointSample{avg=1098.0352519275061}, derivative=1.2992640612482297E11}, evalInputDelta = 449.0835838304704
F(5.3649078070715195) = LineSearchPoint{point=PointSample{avg=649.9217970928138}, derivative=-1.555057412707477E10}, evalInputDelta = 0.9701289957780546
F(0.41268521592857843) = LineSearchPoint{point=PointSample{avg=648.8247613630265}, derivative=-611.1130227703932}, evalInputDelta = -0.12690673400925334
F(2.888796511500049) = LineSearchPoint{point=PointSample{avg=650.2657702677232}, derivative=4.179366870111283E10}, evalInputDelta = 1.3141021706874199
F(0.22221511626923454) = LineSearchPoint{point=PointSample{avg=648.880828978864}, derivative=-610.726114187503}, evalInputDelta = -0.07083911817176158
F(1.5555058138846418) = LineSearchPoint{point=PointSample{avg=648.5539963754687}, derivative=-613.4230492667511}, evalInputDelta = -0.3976717215670078
New Minimum: 647.597881150987 > 647.5870161769839
F(10.888540697192493) = LineSearchPoint{point=PointSample{avg=647.5870161769839}, derivative=-630.4968037358336}, evalInputDelta = -1.3646519200518696
F(76.21978488034745) = LineSearchPoint{point=PointSample{avg=1155.724254854349}, derivative=1.1193812085281042E11}, evalInputDelta = 506.7725867573133
F(5.863060375411342) = LineSearchPoint{point=PointSample{avg=649.8700644603775}, derivative=-1.9200386640106968E10}, evalInputDelta = 0.9183963633417989
F(0.45100464426241094) = LineSearchPoint{point=PointSample{avg=648.8139550847598}, derivative=-611.1910483313063}, evalInputDelta = -0.13771301227598087
F(3.1570325098368768) = LineSearchPoint{point=PointSample{avg=650.2213562142038}, derivative=2.228528942186612E10}, evalInputDelta = 1.269688117168016
F(0.24284865460283667) = LineSearchPoint{point=PointSample{avg=648.8745783896023}, derivative=-610.7679150342497}, evalInputDelta = -0.0770897074334016
F(1.6999405822198566) = LineSearchPoint{point=PointSample{avg=648.5265117110595}, derivative=-613.708473928996}, evalInputDelta = -0.4251563859762655
F(11.899584075538996) = LineSearchPoint{point=PointSample{avg=647.5936048831832}, derivative=-632.1455560317528}, evalInputDelta = -1.3580632138525743
F(83.29708852877297) = LineSearchPoint{point=PointSample{avg=1212.0903088293087}, derivative=8.916328255621715E10}, evalInputDelta = 563.138640732273
F(6.407468348367152) = LineSearchPoint{point=PointSample{avg=647.9849992580703}, derivative=-623.0609871897302}, evalInputDelta = -0.966668838965461
F(44.85227843857006) = LineSearchPoint{point=PointSample{avg=785.2355378019413}, derivative=1.3629255730012367E11}, evalInputDelta = 136.28386970490556
F(3.4501752645053894) = LineSearchPoint{point=PointSample{avg=650.17491537518}, derivative=1.1569068920611748E10}, evalInputDelta = 1.2232472781442993
F(0.26539809726964536) = LineSearchPoint{point=PointSample{avg=648.8677955607858}, derivative=-610.8136376063356}, evalInputDelta = -0.08387253624994173
F(1.8577866808875174) = LineSearchPoint{point=PointSample{avg=648.4986419059003}, derivative=-614.0168709614063}, evalInputDelta = -0.45302619113545006
F(13.004506766212621) = LineSearchPoint{point=PointSample{avg=647.6224882440977}, derivative=-633.910130749168}, evalInputDelta = -1.3291798529380685
F(91.03154736348836) = LineSearchPoint{point=PointSample{avg=1267.5242623699887}, derivative=6.836198112235445E10}, evalInputDelta = 618.572594272953
F(7.0024267202683355) = LineSearchPoint{point=PointSample{avg=647.8378478598087}, derivative=-623.8981258875796}, evalInputDelta = -1.1138202372270598
F(49.01698704187835) = LineSearchPoint{point=PointSample{avg=852.7793380506173}, derivative=1.561570205137722E11}, evalInputDelta = 203.82766995358156
F(3.7705374647598733) = LineSearchPoint{point=PointSample{avg=650.126826572137}, derivative=3.930391966077522E9}, evalInputDelta = 1.1751584751012842
F(0.2900413434430672) = LineSearchPoint{point=PointSample{avg=648.8604386355748}, derivative=-610.863648269453}, evalInputDelta = -0.09122946146089816
F(2.0302894041014703) = LineSearchPoint{point=PointSample{avg=648.4713041532186}, derivative=-614.3474830048269}, evalInputDelta = -0.48036394381711034
F(14.212025828710292) = LineSearchPoint{point=PointSample{avg=647.6795960573749}, derivative=-635.7960635234122}, evalInputDelta = -1.272072039660884
F(99.48418080097204) = LineSearchPoint{point=PointSample{avg=1317.5773560045768}, derivative=3.842570716375365E10}, evalInputDelta = 668.6256879075411
F(7.652629292382465) = LineSearchPoint{point=PointSample{avg=647.7447116273134}, derivative=-625.0101291377496}, evalInputDelta = -1.2069564697222859
F(53.568405046677256) = LineSearchPoint{point=PointSample{avg=916.7733650190742}, derivative=1.637977456068426E11}, evalInputDelta = 267.8216969220384
F(4.120646542052096) = LineSearchPoint{point=PointSample{avg=650.0771470750043}, derivative=-2.1269313995394173E9}, evalInputDelta = 1.1254789779685552
F(0.31697281092708435) = LineSearchPoint{point=PointSample{avg=648.8524657793732}, derivative=-610.9183468514241}, evalInputDelta = -0.09920231766250254
F(2.2188096764895904) = LineSearchPoint{point=PointSample{avg=648.4465097191267}, derivative=-614.6943404325029}, evalInputDelta = -0.5051583779090834
F(15.531667735427133) = LineSearchPoint{point=PointSample{avg=647.7738471149794}, derivative=-637.8088195891102}, evalInputDelta = -1.177820982056346
F(108.72167414798993) = LineSearchPoint{point=PointSample{avg=1372.9741439428462}, derivative=1.447924218099282E10}, evalInputDelta = 724.0224758458105
F(8.363205703691532) = LineSearchPoint{point=PointSample{avg=647.6710564157836}, derivative=-626.2339395598588}, evalInputDelta = -1.2806116812521395
Loops = 52
F(16.726411407383065) = LineSearchPoint{point=PointSample{avg=647.8879346941757}, derivative=-639.589584467885}, evalInputDelta = -1.0637334028600662
647.8879346941757 > 647.6710564157836
Fitness changed from 648.9516680970357 to 647.5870161769839
Iteration 16 complete. Error: 647.5870161769839 Total: 3.7144; Orientation: 0.0377; Line Search: 3.6682
Final threshold in iteration 16: 647.5870161769839 (> 0.0) after 31.218s (< 30.000s)

Returns

    647.5870161769839

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.40007455147159393 ], [ -0.8600474177974433 ], [ -0.9126178188682639 ], [ -3.4802851703191684 ], [ 0.3098556503551004 ], [ 0.3573558418537476 ], [ 0.36787921554279296 ], [ -0.07031352516332201 ], ... ],
    	[ [ -0.8409090794812224 ], [ -160.2588369343321 ], [ 0.6005885552808996 ], [ -0.8256070405131541 ], [ 0.36778984470139264 ], [ 0.4189600650409435 ], [ 0.3678696482749325 ], [ 0.5002206493773007 ], ... ],
    	[ [ 0.11927737480358602 ], [ 0.3721119255735734 ], [ 0.3678926908377849 ], [ 0.3434479491923409 ], [ -1.729109672822798 ], [ 0.7181165906211178 ], [ 0.36779420819653724 ], [ 0.37138456783327534 ], ... ],
    	[ [ 0.36759371537935853 ], [ -0.04396980306769738 ], [ 0.3676954288672967 ], [ -0.4100501746030547 ], [ 0.053231390927482636 ], [ 0.3678920074817349 ], [ -0.47984455735120957 ], [ 0.36781540357427384 ], ... ],
    	[ [ 0.8056717231845243 ], [ -0.8945825300126584 ], [ -0.4601974607642665 ], [ -5.704764391579232 ], [ 0.7900459026043154 ], [ 0.3704799750168464 ], [ 0.4530522498443186 ], [ -0.4191428276804594 ], ... ],
    	[ [ 0.011223444511212044 ], [ 0.9973398447273027 ], [ 0.4865094988053402 ], [ 0.3367212157711422 ], [ 0.37440301602541104 ], [ 0.8872673851058324 ], [ -0.04755271185217946 ], [ 0.36764823016671355 ], ... ],
    	[ [ 0.3438347608276378 ], [ 0.36786763805149986 ], [ -5.74690539499511 ], [ -0.4402472379654958 ], [ 0.5883140445698254 ], [ -0.009639990116719677 ], [ 0.9319880822775108 ], [ 0.5659152385722725 ], ... ],
    	[ [ 0.19726209024060215 ], [ 0.2466967267882676 ], [ -0.11043967604204274 ], [ 0.8299873796084773 ], [ -3.180016586235488 ], [ -83.30133041319252 ], [ -0.16230059443607647 ], [ 0.7162539674609933 ], ... ],
    	...
    ]

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.3665100451535664 ], [ -0.12966741775632096 ], [ -0.08344802596100084 ], [ 4.3403131809769055 ], [ 0.36304198045032837 ], [ 0.367727465409986 ], [ 0.36787944117137317 ], [ -0.18666772127651665 ], ... ],
    	[ [ -0.14570577506454557 ], [ 813.6004990547204 ], [ 0.30620717952708876 ], [ -0.15821632517594947 ], [ 0.36787943026001546 ], [ 0.36448674070576903 ], [ 0.36787944104109843 ], [ 0.34650583471745267 ], ... ],
    	[ [ 0.2536199135256114 ], [ 0.36785518646419013 ], [ 0.367879440932843 ], [ 0.3670495925019918 ], [ 0.9468719312964496 ], [ 0.2377851644524955 ], [ 0.36787943129698303 ], [ 0.36786279566664243 ], ... ],
    	[ [ 0.36787933018348906 ], [ -0.13737275285042966 ], [ 0.3678793951425381 ], [ -0.3655497868150304 ], [ 0.15613336543540732 ], [ 0.3678794409568199 ], [ -0.3523465314026798 ], [ 0.367879435597535 ], ... ],
    	[ [ 0.1740886683883238 ], [ -0.09965480884417909 ], [ -0.35715907399833047 ], [ 9.933715841180724 ], [ 0.18618555981278417 ], [ 0.3678702711876207 ], [ 0.3587031304040868 ], [ -0.3644629379903457 ], ... ],
    	[ [ 0.05039046480421703 ], [ 0.0026566139180814762 ], [ 0.35052953574947154 ], [ 0.36652102447578716 ], [ 0.36782193906928257 ], [ 0.10612506997267868 ], [ -0.14484158774939837 ], [ 0.3678793684985423 ], ... ],
    	[ [ 0.367075956341738 ], [ 0.3678794409820934 ], [ 10.049392310418638 ], [ -0.36118711305758294 ], [ 0.3120972968220665 ], [ -0.044747245408994274 ], [ 0.06564481509528561 ], [ 0.3221817518055824 ], ... ],
    	[ [ 0.32020016999804735 ], [ 0.34527563447969084 ], [ -0.24333017277012225 ], [ 0.15466381864228435 ], [ 3.678917980381536 ], [ 368.3971782538037 ], [ -0.2951120053953028 ], [ 0.23902861191817001 ], ... ],
    	...
    ]

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.58 seconds (0.078 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: 4430027280777
Reset training subject: 4430176271537
Adding measurement 27a74732 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD
Non-optimal measurement 18439.01364585362 < 18439.01364585362. Total: 1
th(0)=18439.01364585362;dx=-3.814062516802853E25
Adding measurement 11ea9583 to history. Total: 1
New Minimum: 18439.01364585362 > 9602.54824612377
Armijo: th(2.154434690031884)=9602.54824612377; dx=3.7317039287245275E26 evalInputDelta=8836.465399729852
Adding measurement 38d17b7b to history. Total: 2
New Minimum: 9602.54824612377 > 8262.38177742565
Armijo: th(1.077217345015942)=8262.38177742565; dx=3.636118598043182E26 evalInputDelta=10176.631868427972
Adding measurement 6556f5c5 to history. Total: 3
New Minimum: 8262.38177742565 > 7510.921543889203
Armijo: th(0.3590724483386473)=7510.921543889203; dx=3.4846194332939094E26 evalInputDelta=10928.09210196442
Adding measurement 3848bca4 to history. Total: 4
New Minimum: 7510.921543889203 > 7269.4014597733885
Armijo: th(0.08976811208466183)=7269.4014597733885; dx=3.293448771928668E26 evalInputDelta=11169.612186080234
Adding measurement 2682642b to history. Total: 5
New Minimum: 7269.4014597733885 > 7245.911016742262
Armijo: th(0.017953622416932366)=7245.911016742262; dx=3.0715065071435635E26 evalInputDelta=11193.10262911136
Non-optimal measurement 7275.746047011967 < 7245.911016742262. Total: 6
Armijo: th(0.002992270402822061)=7275.746047011967; dx=2.8244220115985495E26 evalInputDelta=11163.267598841656
Non-optimal measurement 7298.640992048868 < 7245.911016742262. Total: 6
Armijo: th(4.2746720040315154E-4)=7298.640992048868; dx=2.556080062189209E26 evalInputDelta=11140.372653804754
Non-optimal measurement 7309.650058555424 < 7245.911016742262. Total: 6
Armijo: th(5.343340005039394E-5)=7309.650058555424; dx=2.269324063216147E26 evalInputDelta=11129.363587298198
Non-optimal measurement 7313.9473921581375 < 7245.911016742262. Total: 6
Armijo: th(5.9370444500437714E-6)=7313.9473921581375; dx=1.9663256703223725E26 evalInputDelta=11125.066253695484
Non-optimal measurement 7315.3715024184985 < 7245.911016742262. Total: 6
Armijo: th(5.937044450043771E-7)=7315.3715024184985; dx=1.648797432855578E26 evalInputDelta=11123.642143435123
Non-optimal measurement 7313.875282314293 < 7245.911016742262. Total: 6
Armijo: th(5.397313136403428E-8)=7313.875282314293; dx=1.3181193531060046E26 evalInputDelta=11125.138363539329
Non-optimal measurement 7302.476070596943 < 7245.911016742262. Total: 6
Armijo: th(4.4977609470028565E-9)=7302.476070596943; dx=9.753620561233359E25 evalInputDelta=11136.53757525668
Non-optimal measurement 7251.616860757911 < 7245.911016742262. Total: 6
Armijo: th(3.4598161130791205E-10)=7251.616860757911; dx=6.203569514507598E25 evalInputDelta=11187.39678509571
Non-optimal measurement 8039.354273479791 < 7245.911016742262. Total: 6
Armijo: th(2.4712972236279432E-11)=8039.354273479791; dx=2.2978142260554087E25 evalInputDelta=10399.65937237383
Non-optimal measurement 15276.31932337227 < 7245.911016742262. Total: 6
Armijo: th(1.6475314824186289E-12)=15276.31932337227; dx=-1.4236926712787376E25 evalInputDelta=3162.6943224813513
Non-optimal measurement 18075.891696265673 < 7245.911016742262. Total: 6
Armijo: th(1.029707176511643E-13)=18075.891696265673; dx=-2.8428561312224946E25 evalInputDelta=363.1219495879486
Non-optimal measurement 18404.18299671834 < 7245.911016742262. Total: 6
Armijo: th(6.057101038303783E-15)=18404.18299671834; dx=-3.5874760586757795E25 evalInputDelta=34.83064913528142
Non-optimal measurement 7245.911016742262 < 7245.911016742262. Total: 6
MIN ALPHA (3.3650561323909904E-16): th(0.017953622416932366)=7245.911016742262
Fitness changed from 18439.01364585362 to 7245.911016742262
Iteration 1 complete. Error: 7245.911016742262 Total: 1.3481; Orientation: 0.0169; Line Search: 1.1493
Non-optimal measurement 7245.911016742262 < 7245.911016742262. Total: 6
Rejected: LBFGS Orientation magnitude: 9.485e+12, gradient 7.879e+13, dot -0.666; [7847a24f-4907-4b5b-ba81-4e0d737f8022 = 1.000/1.000e+00, ffaf0efc-74fb-4845-99a7-e27692206364 = 1.000/1.000e+00, 6a88c64a-92ee-40af-a272-317f43faf8dd = 1.000/1.000e+00, 1b604664-1047-495a-9880-13dda4d768bd = 1.000/1.000e+00, 4462d082-af71-4729-a9f3-560b1d64d3cb = 1.000/1.000e+00]
Orientation rejected. Popping history element from 7245.911016742262, 7269.4014597733885, 7510.921543889203, 8262.38177742565, 9602.54824612377, 18439.01364585362
Rejected: LBFGS Orientation magnitude: 3.592e+14, gradient 7.879e+13, dot -0.616; [4462d082-af71-4729-a9f3-560b1d64d3cb = 1.000/1.000e+00, 7847a24f-4907-4b5b-ba81-4e0d737f8022 = 1.000/1.000e+00, 6a88c64a-92ee-40af-a272-317f43faf8dd = 1.000/1.000e+00, ffaf0efc-74fb-4845-99a7-e27692206364 = 1.000/1.000e+00, 1b604664-1047-495a-9880-13dda4d768bd = 1.000/1.000e+00]
Orientation rejected. Popping history element from 7245.911016742262, 7269.4014597733885, 7510.921543889203, 8262.38177742565, 9602.54824612377
Rejected: LBFGS Orientation magnitude: 1.188e+14, gradient 7.879e+13, dot -0.604; [ffaf0efc-74fb-4845-99a7-e27692206364 = 1.000/1.000e+00, 4462d082-af71-4729-a9f3-560b1d64d3cb = 1.000/1.000e+00, 1b604664-1047-495a-9880-13dda4d768bd = 1.000/1.000e+00, 7847a24f-4907-4b5b-ba81-4e0d737f8022 = 1.000/1.000e+00, 6a88c64a-92ee-40af-a272-317f43faf8dd = 1.000/1.000e+00]
Orientation rejected. Popping history element from 7245.911016742262, 7269.4014597733885, 7510.921543889203, 8262.38177742565
LBFGS Accumulation History: 3 points
Removed measurement 2682642b to history. Total: 5
Removed measurement 3848bca4 to history. Total: 4
Removed measurement 6556f5c5 to history. Total: 3
Adding measurement 5ab112e1 to history. Total: 3
th(0)=7245.911016742262;dx=-6.20805633127077E27
Adding measurement 69dcc38c to history. Total: 4
New Minimum: 7245.911016742262 > 7245.9110167422605
Armijo: th(2.154434690031884E-15)=7245.9110167422605; dx=-6.208056446325591E27 evalInputDelta=1.8189894035458565E-12
Non-optimal measurement 7245.911016742262 < 7245.9110167422605. Total: 5
Armijo: th(1.077217345015942E-15)=7245.911016742262; dx=-6.208056388646978E27 evalInputDelta=0.0
Non-optimal measurement 7245.9110167422605 < 7245.9110167422605. Total: 5
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.9110167422605
Fitness changed from 7245.911016742262 to 7245.9110167422605
Iteration 2 complete. Error: 7245.9110167422605 Total: 3.1326; Orientation: 3.0583; Line Search: 0.0662
Non-optimal measurement 7245.9110167422605 < 7245.9110167422605. Total: 5
Rejected: LBFGS Orientation magnitude: 9.647e+16, gradient 7.879e+13, dot -0.042; [ffaf0efc-74fb-4845-99a7-e27692206364 = 1.000/1.000e+00, 6a88c64a-92ee-40af-a272-317f43faf8dd = 1.000/1.000e+00, 4462d082-af71-4729-a9f3-560b1d64d3cb = 1.000/1.000e+00, 7847a24f-4907-4b5b-ba81-4e0d737f8022 = 1.000/1.000e+00, 1b604664-1047-495a-9880-13dda4d768bd = 1.000/1.000e+00]
Orientation rejected. Popping history element from 7245.9110167422605, 7245.911016742262, 8262.38177742565, 9602.54824612377, 18439.01364585362
Rejected: LBFGS Orientation magnitude: 6.300e+17, gradient 7.879e+13, dot -0.035; [7847a24f-4907-4b5b-ba81-4e0d737f8022 = 1.000/1.000e+00, 1b604664-1047-495a-9880-13dda4d768bd = 1.000/1.000e+00, 6a88c64a-92ee-40af-a272-317f43faf8dd = 1.000/1.000e+00, 4462d082-af71-4729-a9f3-560b1d64d3cb = 1.000/1.000e+00, ffaf0efc-74fb-4845-99a7-e27692206364 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 7245.9110167422605, 7245.911016742262, 8262.38177742565, 9602.54824612377
LBFGS Accumulation History: 3 points
Removed measurement 69dcc38c to history. Total: 4
Removed measurement 5ab112e1 to history. Total: 3
Adding measurement 548487e1 to history. Total: 3
th(0)=7245.9110167422605;dx=-6.208056561904613E27
Adding measurement 12b83a1b to history. Total: 4
New Minimum: 7245.9110167422605 > 7245.91101674226
Armijo: th(2.154434690031884E-15)=7245.91101674226; dx=-6.208056679245175E27 evalInputDelta=9.094947017729282E-13
Non-optimal measurement 7245.91101674226 < 7245.91101674226. Total: 5
Armijo: th(1.077217345015942E-15)=7245.91101674226; dx=-6.208056620418617E27 evalInputDelta=9.094947017729282E-13
Non-optimal measuremen

...skipping 12298 bytes...

1016742246 Total: 2.5974; Orientation: 2.3434; Line Search: 0.2457
Non-optimal measurement 7245.911016742246 < 7245.911016742246. Total: 5
Rejected: LBFGS Orientation magnitude: 8.937e+16, gradient 7.879e+13, dot -0.042; [ffaf0efc-74fb-4845-99a7-e27692206364 = 1.000/1.000e+00, 1b604664-1047-495a-9880-13dda4d768bd = 1.000/1.000e+00, 4462d082-af71-4729-a9f3-560b1d64d3cb = 1.000/1.000e+00, 6a88c64a-92ee-40af-a272-317f43faf8dd = 1.000/1.000e+00, 7847a24f-4907-4b5b-ba81-4e0d737f8022 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 7245.911016742246, 7245.911016742248, 8262.38177742565, 9602.54824612377, 18439.01364585362
Rejected: LBFGS Orientation magnitude: 5.837e+17, gradient 7.879e+13, dot -0.035; [7847a24f-4907-4b5b-ba81-4e0d737f8022 = 1.000/1.000e+00, 6a88c64a-92ee-40af-a272-317f43faf8dd = 1.000/1.000e+00, ffaf0efc-74fb-4845-99a7-e27692206364 = 1.000/1.000e+00, 4462d082-af71-4729-a9f3-560b1d64d3cb = 1.000/1.000e+00, 1b604664-1047-495a-9880-13dda4d768bd = 1.000/1.000e+00]
Orientation rejected. Popping history element from 7245.911016742246, 7245.911016742248, 8262.38177742565, 9602.54824612377
LBFGS Accumulation History: 3 points
Removed measurement 470d5946 to history. Total: 4
Removed measurement 1f0c62bf to history. Total: 3
Adding measurement 1c3f4285 to history. Total: 3
th(0)=7245.911016742246;dx=-6.208058313394699E27
Adding measurement 5c6d81e6 to history. Total: 4
New Minimum: 7245.911016742246 > 7245.911016742245
Armijo: th(2.154434690031884E-15)=7245.911016742245; dx=-6.208058448959896E27 evalInputDelta=9.094947017729282E-13
Non-optimal measurement 7245.911016742246 < 7245.911016742245. Total: 5
Armijo: th(1.077217345015942E-15)=7245.911016742246; dx=-6.208058380977922E27 evalInputDelta=0.0
Non-optimal measurement 7245.911016742245 < 7245.911016742245. Total: 5
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.911016742245
Fitness changed from 7245.911016742246 to 7245.911016742245
Iteration 10 complete. Error: 7245.911016742245 Total: 2.6161; Orientation: 2.2129; Line Search: 0.3858
Non-optimal measurement 7245.911016742245 < 7245.911016742245. Total: 5
Rejected: LBFGS Orientation magnitude: 8.837e+16, gradient 7.879e+13, dot -0.042; [7847a24f-4907-4b5b-ba81-4e0d737f8022 = 1.000/1.000e+00, ffaf0efc-74fb-4845-99a7-e27692206364 = 1.000/1.000e+00, 6a88c64a-92ee-40af-a272-317f43faf8dd = 1.000/1.000e+00, 1b604664-1047-495a-9880-13dda4d768bd = 1.000/1.000e+00, 4462d082-af71-4729-a9f3-560b1d64d3cb = 1.000/1.000e+00]
Orientation rejected. Popping history element from 7245.911016742245, 7245.911016742246, 8262.38177742565, 9602.54824612377, 18439.01364585362
Rejected: LBFGS Orientation magnitude: 5.772e+17, gradient 7.879e+13, dot -0.035; [4462d082-af71-4729-a9f3-560b1d64d3cb = 1.000/1.000e+00, ffaf0efc-74fb-4845-99a7-e27692206364 = 1.000/1.000e+00, 7847a24f-4907-4b5b-ba81-4e0d737f8022 = 1.000/1.000e+00, 6a88c64a-92ee-40af-a272-317f43faf8dd = 1.000/1.000e+00, 1b604664-1047-495a-9880-13dda4d768bd = 1.000/1.000e+00]
Orientation rejected. Popping history element from 7245.911016742245, 7245.911016742246, 8262.38177742565, 9602.54824612377
LBFGS Accumulation History: 3 points
Removed measurement 5c6d81e6 to history. Total: 4
Removed measurement 1c3f4285 to history. Total: 3
Adding measurement 28eb926a to history. Total: 3
th(0)=7245.911016742245;dx=-6.208058585191784E27
Adding measurement 71fb1078 to history. Total: 4
New Minimum: 7245.911016742245 > 7245.911016742242
Armijo: th(2.154434690031884E-15)=7245.911016742242; dx=-6.208058723725722E27 evalInputDelta=2.7284841053187847E-12
Non-optimal measurement 7245.911016742243 < 7245.911016742242. Total: 5
Armijo: th(1.077217345015942E-15)=7245.911016742243; dx=-6.208058654251919E27 evalInputDelta=1.8189894035458565E-12
Non-optimal measurement 7245.911016742242 < 7245.911016742242. Total: 5
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.911016742242
Fitness changed from 7245.911016742245 to 7245.911016742242
Iteration 11 complete. Error: 7245.911016742242 Total: 2.9153; Orientation: 2.5135; Line Search: 0.3935
Non-optimal measurement 7245.911016742242 < 7245.911016742242. Total: 5
Rejected: LBFGS Orientation magnitude: 8.738e+16, gradient 7.879e+13, dot -0.042; [4462d082-af71-4729-a9f3-560b1d64d3cb = 1.000/1.000e+00, 7847a24f-4907-4b5b-ba81-4e0d737f8022 = 1.000/1.000e+00, 6a88c64a-92ee-40af-a272-317f43faf8dd = 1.000/1.000e+00, 1b604664-1047-495a-9880-13dda4d768bd = 1.000/1.000e+00, ffaf0efc-74fb-4845-99a7-e27692206364 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 7245.911016742242, 7245.911016742245, 8262.38177742565, 9602.54824612377, 18439.01364585362
Rejected: LBFGS Orientation magnitude: 5.707e+17, gradient 7.879e+13, dot -0.035; [6a88c64a-92ee-40af-a272-317f43faf8dd = 1.000/1.000e+00, 4462d082-af71-4729-a9f3-560b1d64d3cb = 1.000/1.000e+00, 7847a24f-4907-4b5b-ba81-4e0d737f8022 = 1.000/1.000e+00, ffaf0efc-74fb-4845-99a7-e27692206364 = 1.000/1.000e+00, 1b604664-1047-495a-9880-13dda4d768bd = 1.000/1.000e+00]
Orientation rejected. Popping history element from 7245.911016742242, 7245.911016742245, 8262.38177742565, 9602.54824612377
LBFGS Accumulation History: 3 points
Removed measurement 71fb1078 to history. Total: 4
Removed measurement 28eb926a to history. Total: 3
Adding measurement 5cd42312 to history. Total: 3
th(0)=7245.911016742242;dx=-6.208058862948034E27
Adding measurement 641dc306 to history. Total: 4
New Minimum: 7245.911016742242 > 7245.911016742239
Armijo: th(2.154434690031884E-15)=7245.911016742239; dx=-6.208059004555823E27 evalInputDelta=3.637978807091713E-12
Non-optimal measurement 7245.9110167422405 < 7245.911016742239. Total: 5
Armijo: th(1.077217345015942E-15)=7245.9110167422405; dx=-6.208058933537241E27 evalInputDelta=1.8189894035458565E-12
Non-optimal measurement 7245.911016742239 < 7245.911016742239. Total: 5
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.911016742239
Fitness changed from 7245.911016742242 to 7245.911016742239
Iteration 12 complete. Error: 7245.911016742239 Total: 2.3302; Orientation: 2.0808; Line Search: 0.2407
Non-optimal measurement 7245.911016742239 < 7245.911016742239. Total: 5
Rejected: LBFGS Orientation magnitude: 8.639e+16, gradient 7.879e+13, dot -0.042; [6a88c64a-92ee-40af-a272-317f43faf8dd = 1.000/1.000e+00, ffaf0efc-74fb-4845-99a7-e27692206364 = 1.000/1.000e+00, 4462d082-af71-4729-a9f3-560b1d64d3cb = 1.000/1.000e+00, 1b604664-1047-495a-9880-13dda4d768bd = 1.000/1.000e+00, 7847a24f-4907-4b5b-ba81-4e0d737f8022 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 7245.911016742239, 7245.911016742242, 8262.38177742565, 9602.54824612377, 18439.01364585362
Rejected: LBFGS Orientation magnitude: 5.642e+17, gradient 7.879e+13, dot -0.035; [7847a24f-4907-4b5b-ba81-4e0d737f8022 = 1.000/1.000e+00, 6a88c64a-92ee-40af-a272-317f43faf8dd = 1.000/1.000e+00, ffaf0efc-74fb-4845-99a7-e27692206364 = 1.000/1.000e+00, 1b604664-1047-495a-9880-13dda4d768bd = 1.000/1.000e+00, 4462d082-af71-4729-a9f3-560b1d64d3cb = 1.000/1.000e+00]
Orientation rejected. Popping history element from 7245.911016742239, 7245.911016742242, 8262.38177742565, 9602.54824612377
LBFGS Accumulation History: 3 points
Removed measurement 641dc306 to history. Total: 4
Removed measurement 5cd42312 to history. Total: 3
Adding measurement 7da80b66 to history. Total: 3
th(0)=7245.911016742239;dx=-6.208059146874709E27
Adding measurement 4886facf to history. Total: 4
New Minimum: 7245.911016742239 > 7245.911016742238
Armijo: th(2.154434690031884E-15)=7245.911016742238; dx=-6.208059291666826E27 evalInputDelta=9.094947017729282E-13
Non-optimal measurement 7245.911016742239 < 7245.911016742238. Total: 5
Armijo: th(1.077217345015942E-15)=7245.911016742239; dx=-6.20805921904781E27 evalInputDelta=0.0
Non-optimal measurement 7245.911016742238 < 7245.911016742238. Total: 5
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=7245.911016742238
Fitness changed from 7245.911016742239 to 7245.911016742238
Iteration 13 complete. Error: 7245.911016742238 Total: 2.7535; Orientation: 2.3893; Line Search: 0.3558
Final threshold in iteration 13: 7245.911016742238 (> 0.0) after 31.575s (< 30.000s)

Returns

    7245.911016742238

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.5078580566310986 ], [ -0.8600474177974433 ], [ -0.9126178188682639 ], [ -1.1976294003523414E8 ], [ 0.12408199403899066 ], [ 0.559995499997554 ], [ 0.1559265393642566 ], [ -0.07031352516332201 ], ... ],
    	[ [ -0.8409090794812224 ], [ 3.27253786355937E9 ], [ 0.6005885552808996 ], [ -0.8256070405131541 ], [ 0.5834055993648388 ], [ 0.4189600650409435 ], [ 0.4319358662567096 ], [ 0.5002206493773007 ], ... ],
    	[ [ 0.11927737480358602 ], [ 0.3721119255735734 ], [ 0.3288923708684088 ], [ 0.703377791232188 ], [ -7.461487810054182E7 ], [ 0.7181165906211178 ], [ 0.776707495558896 ], [ 0.16597101237085696 ], ... ],
    	[ [ 1.6843055261448485E8 ], [ -0.04396980306769738 ], [ 0.901215605612296 ], [ -0.4100501746030547 ], [ 0.053231390927482636 ], [ 0.5556168337526646 ], [ -0.47984455735120957 ], [ 0.14471543443263213 ], ... ],
    	[ [ 0.8056717231845243 ], [ -0.8945825300126584 ], [ -0.4601974607642665 ], [ -5.473105389851433E8 ], [ 0.7900459026043154 ], [ 0.18655668652573257 ], [ 0.4530522498443186 ], [ -0.4191428276804594 ], ... ],
    	[ [ 0.011223444511212044 ], [ 0.9973398447273027 ], [ 0.4865094988053402 ], [ 0.191751231583315 ], [ 0.04825248935206285 ], [ 0.8872673851058324 ], [ -0.04755271185217946 ], [ 0.6448162592488659 ], ... ],
    	[ [ 1.936426803221479E8 ], [ 0.30105030258874027 ], [ -4.7807789829986006E8 ], [ -0.4402472379654958 ], [ 0.5883140445698254 ], [ -0.009639990116719677 ], [ 0.9319880822775108 ], [ 0.5659152385722725 ], ... ],
    	[ [ 0.19726209024060215 ], [ 0.2466967267882676 ], [ -0.11043967604204274 ], [ 0.8299873796084773 ], [ -2.7820505279813385E8 ], [ 1.2934355153672178E9 ], [ -0.16230059443607647 ], [ 0.7162539674609933 ], ... ],
    	...
    ]

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.34410089536018285 ], [ -0.12966741775632096 ], [ -0.08344802596100084 ], [ 2.227713423365128E9 ], [ 0.2589358797178282 ], [ 0.3247002481413663 ], [ 0.2897692472653025 ], [ -0.18666772127651665 ], ... ],
    	[ [ -0.14570577506454557 ], [ -7.169748104212373E10 ], [ 0.30620717952708876 ], [ -0.15821632517594947 ], [ 0.3143813060578583 ], [ 0.36448674070576903 ], [ 0.36260072602638527 ], [ 0.34650583471745267 ], ... ],
    	[ [ 0.2536199135256114 ], [ 0.36785518646419013 ], [ 0.365736447268524 ], [ 0.24749130647620274 ], [ 1.3526073540611892E9 ], [ 0.2377851644524955 ], [ 0.19626734567330198 ], [ 0.2980743334998271 ], ... ],
    	[ [ -3.1904172664135118E9 ], [ -0.13737275285042966 ], [ 0.09373611474047437 ], [ -0.3655497868150304 ], [ 0.15613336543540732 ], [ 0.32652288409845337 ], [ -0.3523465314026798 ], [ 0.27973290671382406 ], ... ],
    	[ [ 0.1740886683883238 ], [ -0.09965480884417909 ], [ -0.35715907399833047 ], [ 1.101217642900915E10 ], [ 0.18618555981278417 ], [ 0.31323243334665585 ], [ 0.3587031304040868 ], [ -0.3644629379903457 ], ... ],
    	[ [ 0.05039046480421703 ], [ 0.0026566139180814762 ], [ 0.35052953574947154 ], [ 0.31668797677735816 ], [ 0.14626815022488712 ], [ 0.10612506997267868 ], [ -0.14484158774939837 ], [ 0.2829388439566686 ], ... ],
    	[ [ -3.6949976775307584E9 ], [ 0.3614042380448396 ], [ 9.554522688455809E9 ], [ -0.36118711305758294 ], [ 0.3120972968220665 ], [ -0.044747245408994274 ], [ 0.06564481509528561 ], [ 0.3221817518055824 ], ... ],
    	[ [ 0.32020016999804735 ], [ 0.34527563447969084 ], [ -0.24333017277012225 ], [ 0.15466381864228435 ], [ 5.409382601676842E9 ], [ -2.7137011402885868E10 ], [ -0.2951120053953028 ], [ 0.23902861191817001 ], ... ],
    	...
    ]

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

    return TestUtil.compare(title + " vs Iteration", runs);
Logging
Plotting range=[1.0, 2.811298132763212], [25.0, 3.860092996387021]; valueStats=DoubleSummaryStatistics{count=54, sum=295906.262525, min=647.587016, average=5479.745602, max=7245.911017}
Plotting 25 points for GD
Plotting 16 points for CjGD
Plotting 13 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, 2.811298132763212], [31.155, 3.860092996387021]; valueStats=DoubleSummaryStatistics{count=54, sum=295906.262525, min=647.587016, average=5479.745602, max=7245.911017}
Plotting 25 points for GD
Plotting 16 points for CjGD
Plotting 13 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": 7245.911016742238 }, "CjGD": { "type": "NonConverged", "value": 647.5870161769839 }, "GD": { "type": "NonConverged", "value": 7245.9110167422095 } }, "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": 7245.911016742238 }, "CjGD": { "type": "NonConverged", "value": 647.5870161769839 }, "GD": { "type": "NonConverged", "value": 7245.9110167422095 } }, "model":null, "complete":null}OK
  {
    "result": "OK",
    "performance": {
      "execution_time": "71.418",
      "gc_time": "0.402"
    },
    "created_on": 1586738978617,
    "file_name": "trainingTest",
    "report": {
      "simpleName": "Basic",
      "canonicalName": "com.simiacryptus.mindseye.layers.java.EntropyLayerTest.Basic",
      "link": "https://github.com/SimiaCryptus/mindseye-java/tree/93db34cedee48c0202777a2b25deddf1dfaf5731/src/test/java/com/simiacryptus/mindseye/layers/java/EntropyLayerTest.java",
      "javaDoc": ""
    },
    "training_analysis": {
      "input": {
        "LBFGS": {
          "type": "NonConverged",
          "value": 7245.911016742238
        },
        "CjGD": {
          "type": "NonConverged",
          "value": 647.5870161769839
        },
        "GD": {
          "type": "NonConverged",
          "value": 7245.9110167422095
        }
      }
    },
    "archive": "s3://code.simiacrypt.us/tests/com/simiacryptus/mindseye/layers/java/EntropyLayer/Basic/trainingTest/202004134938",
    "id": "f60e86bd-2b9a-4a8c-888c-5b204b882e4e",
    "report_type": "Components",
    "display_name": "Comparative Training",
    "target": {
      "simpleName": "EntropyLayer",
      "canonicalName": "com.simiacryptus.mindseye.layers.java.EntropyLayer",
      "link": "https://github.com/SimiaCryptus/mindseye-java/tree/93db34cedee48c0202777a2b25deddf1dfaf5731/src/main/java/com/simiacryptus/mindseye/layers/java/EntropyLayer.java",
      "javaDoc": ""
    }
  }