Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

BasicOptimizer.scala:89 executed in 174.40 seconds (2.172 gc):

    val lineSearchInstance: LineSearchStrategy = lineSearchFactory
    val trainer = new IterativeTrainer(trainable)
    trainer.setOrientation(orientation())
    trainer.setMonitor(new TrainingMonitor() {
      override def clear(): Unit = trainingMonitor.clear()
  
      override def log(msg: String): Unit = {
        trainingMonitor.log(msg)
        BasicOptimizer.this.log(msg)
      }
  
      override def onStepFail(currentPoint: Step): Boolean = {
        BasicOptimizer.this.onStepFail(trainable.addRef().asInstanceOf[Trainable], currentPoint)
      }
  
      override def onStepComplete(currentPoint: Step): Unit = {
        if (0 < logEvery && (0 == currentPoint.iteration % logEvery || currentPoint.iteration < logEvery)) {
          val image = currentImage()
          timelineAnimation += image
          val caption = "Iteration " + currentPoint.iteration
          out.p(caption + "\n" + out.jpg(image, caption))
        }
        BasicOptimizer.this.onStepComplete(trainable.addRef().asInstanceOf[Trainable], currentPoint)
        trainingMonitor.onStepComplete(currentPoint)
        super.onStepComplete(currentPoint)
      }
    })
    trainer.setTimeout(trainingMinutes, TimeUnit.MINUTES)
    trainer.setMaxIterations(trainingIterations)
    trainer.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
    trainer.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
    val result = trainer.run.asInstanceOf[lang.Double]
    trainer.freeRef()
    result
Logging
Reset training subject: 6312655944874
Reset training subject: 6314974913379
Adding measurement 418c67f0 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-1.2467080073184942;dx=-6.765098590315011E-6
New Minimum: -1.2467080073184942 > -1.2467087846006732
WOLFE (weak): th(2.154434690031884)=-1.2467087846006732; dx=-6.813701276044679E-6 evalInputDelta=7.772821790652529E-7
New Minimum: -1.2467087846006732 > -1.2467089259246538
WOLFE (weak): th(4.308869380063768)=-1.2467089259246538; dx=-6.843332261691488E-6 evalInputDelta=9.186061595833905E-7
New Minimum: -1.2467089259246538 > -1.2467112577680188
WOLFE (weak): th(12.926608140191302)=-1.2467112577680188; dx=-6.837117794817498E-6 evalInputDelta=3.250449524649923E-6
New Minimum: -1.2467112577680188 > -1.2467213623722024
WOLFE (weak): th(51.70643256076521)=-1.2467213623722024; dx=-6.818752816047014E-6 evalInputDelta=1.335505370825274E-5
New Minimum: -1.2467213623722024 > -1.2467746398399688
WOLFE (weak): th(258.53216280382605)=-1.2467746398399688; dx=-6.855720891225255E-6 evalInputDelta=6.663252147465215E-5
New Minimum: -1.2467746398399688 > -1.2471182036307646
WOLFE (weak): th(1551.1929768229563)=-1.2471182036307646; dx=-6.739006874223345E-6 evalInputDelta=4.1019631227046105E-4
New Minimum: -1.2471182036307646 > -1.2499828487060993
WOLFE (weak): th(10858.350837760694)=-1.2499828487060993; dx=-6.532946531010227E-6 evalInputDelta=0.003274841387605143
New Minimum: -1.2499828487060993 > -1.2720705254908873
END: th(86866.80670208555)=-1.2720705254908873; dx=-4.739179285559582E-6 evalInputDelta=0.0253625181723931
Fitness changed from -1.2467080073184942 to -1.2720705254908873
Iteration 1 complete. Error: -1.2720705254908873 Total: 26.5420; Orientation: 0.0204; Line Search: 18.7001
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/01d17e75-46fd-4b48-a072-790f2d388c29.jpg)
Adding measurement 4ab94c99 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-1.2720705254908873;dx=-7.066984012016528E-6
New Minimum: -1.2720705254908873 > -1.3572651695759765
END: th(187148.86177126726)=-1.3572651695759765; dx=-2.792541519141099E-6 evalInputDelta=0.08519464408508926
Fitness changed from -1.2720705254908873 to -1.3572651695759765
Iteration 2 complete. Error: -1.3572651695759765 Total: 4.3113; Orientation: 0.0234; Line Search: 2.7550
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/88e645e0-e6cc-4439-b723-1ed627775799.jpg)
Adding measurement 6b1c2cf0 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-1.3572651695759765;dx=-7.097121196854506E-6
New Minimum: -1.3572651695759765 > -1.41436472681124
END: th(403200.00000000006)=-1.41436472681124; dx=-1.2603214509962612E-6 evalInputDelta=0.0570995572352635
Fitness changed from -1.3572651695759765 to -1.41436472681124
Iteration 3 complete. Error: -1.41436472681124 Total: 4.2252; Orientation: 0.0172; Line Search: 2.6710
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/84f67cce-a803-4f9b-8a02-5e6e1873b846.jpg)
Adding measurement 5c66c43 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.518e+03, gradient 2.859e-03, dot -0.206; [37bc5b79-7c03-4259-8b79-7279c08e7446 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.41436472681124, -1.3572651695759765, -1.2720705254908873, -1.2467080073184942
LBFGS Accumulation History: 3 points
Removed measurement 5c66c43 to history. Total: 3
th(0)=-1.41436472681124;dx=-8.053044412063166E-6
New Minimum: -1.41436472681124 > -1.4777107002996521
END: th(868668.0670208557)=-1.4777107002996521; dx=-3.0904055492194355E-7 evalInputDelta=0.06334597348841209
Fitness changed from -1.41436472681124 to -1.4777107002996521
Iteration 4 complete. Error: -1.4777107002996521 Total: 5.2236; Orientation: 0.4831; Line Search: 2.6402
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/dde3048f-ae71-4244-a89e-00b9e45cadf5.jpg)
Adding measurement 338616b1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.254e+03, gradient 2.722e-03, dot -0.148; [37bc5b79-7c03-4259-8b79-7279c08e7446 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.4777107002996521, -1.3572651695759765, -1.2720705254908873, -1.2467080073184942
LBFGS Accumulation History: 3 points
Removed measurement 338616b1 to history. Total: 3
th(0)=-1.4777107002996521;dx=-7.32411442687418E-6
New Minimum: -1.4777107002996521 > -1.6078243063995696
END: th(1871488.617712673)=-1.6078243063995696; dx=-6.298988028521145E-8 evalInputDelta=0.1301136060999175
Fitness changed from -1.4777107002996521 to -1.6078243063995696
Iteration 5 complete. Error: -1.6078243063995696 Total: 4.7039; Orientation: 0.4751; Line Search: 2.7096
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/fc5f2724-55c9-45fe-9768-9ddda250cc2d.jpg)
Adding measurement 24b51369 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.689e+02, gradient 1.586e-03, dot -0.140; [37bc5b79-7c03-4259-8b79-7279c08e7446 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.6078243063995696, -1.3572651695759765, -1.2720705254908873, -1.2467080073184942
LBFGS Accumulation History: 3 points
Removed measurement 24b51369 to history. Total: 3
th(0)=-1.6078243063995696;dx=-2.4439804901193503E-6
New Minimum: -1.6078243063995696 > -1.8810272202149918
END: th(4032000.0000000014)=-1.8810272202149918; dx=-4.0005275150621634E-8 evalInputDelta=0.27320291381542217
Fitness changed from -1.6078243063995696 to -1.8810272202149918
Iteration 6 complete. Error: -1.8810272202149918 Total: 4.6462; Orientation: 0.4794; Line Search: 2.6231
Adding measurement 5484d824 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.592e+02, gradient 1.247e-03, dot -0.093; [37bc5b79-7c03-4259-8b79-7279c08e7446 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8810272202149918, -1.3572651695759765, -1.2720705254908873, -1.2467080073184942
LBFGS Accumulation History: 3 points
Removed measurement 5484d824 to history. Total: 3
th(0)=-1.8810272202149918;dx=-1.521524317167567E-6
Armijo: th(8686680.670208558)=-1.8538938806475094; dx=-4.849364220175612E-9 evalInputDelta=-0.02713333956748243
Armijo: th(4343340.335104279)=-1.8746755328761275; dx=-8.497135523333287E-8 evalInputDelta=-0.006351687338864265
New Minimum: -1.8810272202149918 > -1.9636368258768027
END: th(1447780.1117014263)=-1.9636368258768027; dx=-5.142415190708535E-7 evalInputDelta=0.08260960566181086
Fitness changed from -1.8810272202149918 to -1.9636368258768027
Iteration 7 complete. Error: -1.9636368258768027 Total: 7.0837; Orientation: 0.4918; Line Search: 5.2432
Adding measurement 423bb27c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.990e+03, gradient 1.179e-03, dot -0.104; [37bc5b79-7c03-4259-8b79-7279c08e7446 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.9636368258768027, -1.3572651695759765, -1.2720705254908873, -1.2467080073184942
LBFGS Accumulation History: 3 points
Removed measurement 423bb27c to history. Total: 3
th(0)=-1.9636368258768027;dx=-1.3589027678806405E-6
Armijo: th(3119147.6961877886)=-1.8485410411246601; dx=-1.6874112433836506E-7 evalInputDelta=-0.11509578475214255
Armijo: th(1559573.8480938943)=-1.8991809539158053; dx=-4.718708952886072E-7 evalInputDelta=-0.06445587196099734
Armijo: th(519857.94936463144)=-1.9449908364729775; dx=-9.417999579122397E-7 evalInputDelta=-0.018645989403825114
Armijo: th(129964.48734115786)=-1.9580055144881865; dx=-1.209575697201185E-6 evalInputDelta=-0.005631311388616167
Armijo: th(25992.89746823157)=-1.9627165567990144; dx=-1.3366348490068319E-6 evalInputDelta=-9.202690777883049E-4
Armijo: th(4332.149578038595)=-1.9635105769206576; dx=-1.3709250458506745E-6 evalInputDelta=-1.26248956145103E-4
Armijo: th(618.8785111483706)=-1.963620136714933; dx=-1.3627861653385913E-6 evalInputDelta=-1.6689161869587466E-5
Armijo: th(77.35981389354633)=-1.9636345827181358; dx=-1.3645522756475936E-6 evalInputDelta=-2.243158666814793E-6
Armijo: th(8.595534877060704)=-1.9636361977926342; dx=-1.365684409935007E-6 evalInputDelta=-6.280841684525029E-7
New Minimum: -1.9636368258768027 > -1.963636915603096
W

...skipping 847 bytes...

6697898; dx=-1.3631182984431632E-6 evalInputDelta=-2.691789047215565E-7
WOLFE (weak): th(0.889772165008237)=-1.963636915603096; dx=-1.3724335525658497E-6 evalInputDelta=8.972629328418691E-8
Armijo: th(0.9048815036593203)=-1.963636556697898; dx=-1.3611653851488134E-6 evalInputDelta=-2.691789047215565E-7
Armijo: th(0.8973268343337786)=-1.963636556697898; dx=-1.3343783418335007E-6 evalInputDelta=-2.691789047215565E-7
Armijo: th(0.8935494996710078)=-1.9636366464242037; dx=-1.3572398342291575E-6 evalInputDelta=-1.794525990028717E-7
Armijo: th(0.8916608323396225)=-1.9636368258768027; dx=-1.337757908272844E-6 evalInputDelta=0.0
Armijo: th(0.8907164986739298)=-1.9636366464242037; dx=-1.3679859994080346E-6 evalInputDelta=-1.794525990028717E-7
Armijo: th(0.8902443318410833)=-1.9636367361505052; dx=-1.364314271235294E-6 evalInputDelta=-8.97262975030344E-8
Armijo: th(0.8900082484246601)=-1.9636368258768027; dx=-1.3583510811060293E-6 evalInputDelta=0.0
Armijo: th(0.8898902067164485)=-1.9636368258768027; dx=-1.367335356039275E-6 evalInputDelta=0.0
Armijo: th(0.8898311858623427)=-1.9636367361505052; dx=-1.3691022413603356E-6 evalInputDelta=-8.97262975030344E-8
Armijo: th(0.8898016754352898)=-1.9636368258768027; dx=-1.3618275816717812E-6 evalInputDelta=0.0
WOLFE (weak): th(0.8897869202217634)=-1.963636915603096; dx=-1.3559732154882145E-6 evalInputDelta=8.972629328418691E-8
Armijo: th(0.8897942978285266)=-1.9636368258768027; dx=-1.3354792427595828E-6 evalInputDelta=0.0
mu ~= nu (0.8897869202217634): th(0.8595534877060704)=-1.963636915603096
Fitness changed from -1.9636368258768027 to -1.963636915603096
Iteration 8 complete. Error: -1.963636915603096 Total: 45.2289; Orientation: 0.4909; Line Search: 43.3945
Adding measurement 443f817e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.928e+03, gradient 1.180e-03, dot -0.102; [37bc5b79-7c03-4259-8b79-7279c08e7446 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.963636915603096, -1.3572651695759765, -1.2720705254908873, -1.2467080073184942
LBFGS Accumulation History: 3 points
Removed measurement 443f817e to history. Total: 3
th(0)=-1.963636915603096;dx=-1.3666780099956857E-6
Armijo: th(1.9169957549483696)=-1.9636367361505052; dx=-1.3530209505351554E-6 evalInputDelta=-1.794525907872213E-7
Armijo: th(0.9584978774741848)=-1.9636363772452743; dx=-1.3563836122381595E-6 evalInputDelta=-5.383578216555662E-7
Armijo: th(0.3194992924913949)=-1.963636915603096; dx=-1.344244686054669E-6 evalInputDelta=0.0
Armijo: th(0.07987482312284873)=-1.9636366464242037; dx=-1.3561244124953608E-6 evalInputDelta=-2.691788922870586E-7
Armijo: th(0.015974964624569744)=-1.9636367361505052; dx=-1.3616697919207416E-6 evalInputDelta=-1.794525907872213E-7
Armijo: th(0.0026624941040949575)=-1.963636556697898; dx=-1.3532427652302706E-6 evalInputDelta=-3.589051980057434E-7
Armijo: th(3.8035630058499395E-4)=-1.9636367361505052; dx=-1.3474506384337835E-6 evalInputDelta=-1.794525907872213E-7
Armijo: th(4.7544537573124244E-5)=-1.9636368258768027; dx=-1.3614170161293547E-6 evalInputDelta=-8.972629328418691E-8
WOLFE (weak): th(5.282726397013805E-6)=-1.963636915603096; dx=-1.348388397845753E-6 evalInputDelta=0.0
WOLFE (weak): th(2.6413631985069023E-5)=-1.963636915603096; dx=-1.3537521299639935E-6 evalInputDelta=0.0
Armijo: th(3.697908477909663E-5)=-1.9636368258768027; dx=-1.352280731655887E-6 evalInputDelta=-8.972629328418691E-8
WOLFE (weak): th(3.169635838208283E-5)=-1.963636915603096; dx=-1.3592242718735016E-6 evalInputDelta=0.0
WOLFE (weak): th(3.4337721580589734E-5)=-1.963636915603096; dx=-1.349273622616591E-6 evalInputDelta=0.0
Armijo: th(3.565840317984318E-5)=-1.9636368258768027; dx=-1.3590830910504529E-6 evalInputDelta=-8.972629328418691E-8
Armijo: th(3.4998062380216457E-5)=-1.9636368258768027; dx=-1.3491233034835337E-6 evalInputDelta=-8.972629328418691E-8
Armijo: th(3.46678919804031E-5)=-1.9636368258768027; dx=-1.36318549396832E-6 evalInputDelta=-8.972629328418691E-8
Armijo: th(3.4502806780496416E-5)=-1.9636368258768027; dx=-1.3408751603953338E-6 evalInputDelta=-8.972629328418691E-8
WOLFE (weak): th(3.4420264180543075E-5)=-1.963636915603096; dx=-1.352399406407154E-6 evalInputDelta=0.0
Armijo: th(3.446153548051974E-5)=-1.9636368258768027; dx=-1.351340702464317E-6 evalInputDelta=-8.972629328418691E-8
WOLFE (weak): th(3.4440899830531405E-5)=-1.963636915603096; dx=-1.3526253033491516E-6 evalInputDelta=0.0
WOLFE (weak): th(3.4451217655525574E-5)=-1.963636915603096; dx=-1.3537298088641074E-6 evalInputDelta=0.0
Armijo: th(3.445637656802266E-5)=-1.9636368258768027; dx=-1.3515512134053307E-6 evalInputDelta=-8.972629328418691E-8
Armijo: th(3.445379711177412E-5)=-1.9636368258768027; dx=-1.3354561342379947E-6 evalInputDelta=-8.972629328418691E-8
Armijo: th(3.4452507383649846E-5)=-1.9636366464242037; dx=-1.3522611954563844E-6 evalInputDelta=-2.691788922870586E-7
WOLFE (weak): th(3.445186251958771E-5)=-1.963636915603096; dx=-1.3611195454371178E-6 evalInputDelta=0.0
Armijo: th(3.445218495161877E-5)=-1.9636366464242037; dx=-1.3541307019398273E-6 evalInputDelta=-2.691788922870586E-7
mu ~= nu (3.445186251958771E-5): th(0.0)=-1.963636915603096
Fitness changed from -1.963636915603096 to -1.963636915603096
Static Iteration Total: 40.1377; Orientation: 0.4735; Line Search: 38.4250
Iteration 9 failed. Error: -1.963636915603096
Previous Error: 0.0 -> -1.963636915603096
Retrying iteration 9
Reset training subject: 6454758464839
Adding measurement 1612a1a0 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-1.963636915603096;dx=-1.3650815666011436E-6
Armijo: th(7.422463507778547E-5)=-1.9636367361505052; dx=-1.3608165392551214E-6 evalInputDelta=-1.794525907872213E-7
Armijo: th(3.7112317538892736E-5)=-1.9636368258768027; dx=-1.3687800804678746E-6 evalInputDelta=-8.972629328418691E-8
WOLFE (weak): th(1.2370772512964246E-5)=-1.963636915603096; dx=-1.3774362613801836E-6 evalInputDelta=0.0
WOLFE (weak): th(2.474154502592849E-5)=-1.963636915603096; dx=-1.37538790693769E-6 evalInputDelta=0.0
WOLFE (weak): th(3.092693128241061E-5)=-1.963636915603096; dx=-1.3581174037552892E-6 evalInputDelta=0.0
Armijo: th(3.401962441065167E-5)=-1.9636368258768027; dx=-1.3686470649814464E-6 evalInputDelta=-8.972629328418691E-8
Armijo: th(3.247327784653114E-5)=-1.9636368258768027; dx=-1.3572828717523685E-6 evalInputDelta=-8.972629328418691E-8
Armijo: th(3.170010456447088E-5)=-1.9636368258768027; dx=-1.3723848467978484E-6 evalInputDelta=-8.972629328418691E-8
WOLFE (weak): th(3.1313517923440744E-5)=-1.963636915603096; dx=-1.370248337778113E-6 evalInputDelta=0.0
WOLFE (weak): th(3.150681124395581E-5)=-1.963636915603096; dx=-1.3719256219605824E-6 evalInputDelta=0.0
WOLFE (weak): th(3.160345790421334E-5)=-1.963636915603096; dx=-1.3710354546095534E-6 evalInputDelta=0.0
Armijo: th(3.165178123434211E-5)=-1.9636368258768027; dx=-1.3677803950368455E-6 evalInputDelta=-8.972629328418691E-8
WOLFE (weak): th(3.1627619569277726E-5)=-1.963636915603096; dx=-1.3462957703957239E-6 evalInputDelta=0.0
Armijo: th(3.1639700401809914E-5)=-1.9636368258768027; dx=-1.3532883320437838E-6 evalInputDelta=-8.972629328418691E-8
WOLFE (weak): th(3.163365998554382E-5)=-1.963636915603096; dx=-1.371241835175928E-6 evalInputDelta=0.0
WOLFE (weak): th(3.163668019367687E-5)=-1.963636915603096; dx=-1.3721722583009268E-6 evalInputDelta=0.0
Armijo: th(3.1638190297743395E-5)=-1.9636368258768027; dx=-1.3675754401794762E-6 evalInputDelta=-8.972629328418691E-8
Armijo: th(3.163743524571013E-5)=-1.9636368258768027; dx=-1.372966574330111E-6 evalInputDelta=-8.972629328418691E-8
Armijo: th(3.1637057719693495E-5)=-1.9636368258768027; dx=-1.3659804904310295E-6 evalInputDelta=-8.972629328418691E-8
WOLFE (weak): th(3.163686895668518E-5)=-1.963636915603096; dx=-1.3676358659072843E-6 evalInputDelta=0.0
mu ~= nu (3.163686895668518E-5): th(0.0)=-1.963636915603096
Fitness changed from -1.963636915603096 to -1.963636915603096
Static Iteration Total: 32.2954; Orientation: 0.0175; Line Search: 29.7529
Iteration 10 failed. Error: -1.963636915603096
Previous Error: 0.0 -> -1.963636915603096
Optimization terminated 10
Final threshold in iteration 10: -1.963636915603096 (> -Infinity) after 174.398s (< 3600.000s)

Returns

    -1.963636915603096