Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

BasicOptimizer.scala:89 executed in 189.47 seconds (1.864 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: 11210194614777
Reset training subject: 11211389223559
Adding measurement 68e28198 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.057412278174619205;dx=-1.9156657885367002E-4
New Minimum: -0.057412278174619205 > -0.057863237454101574
WOLFE (weak): th(2.154434690031884)=-0.057863237454101574; dx=-1.881620458285638E-4 evalInputDelta=4.509592794823686E-4
New Minimum: -0.057863237454101574 > -0.058315989652856746
WOLFE (weak): th(4.308869380063768)=-0.058315989652856746; dx=-1.9160850957483622E-4 evalInputDelta=9.037114782375413E-4
New Minimum: -0.058315989652856746 > -0.06013176887437222
WOLFE (weak): th(12.926608140191302)=-0.06013176887437222; dx=-1.9001889113328765E-4 evalInputDelta=0.0027194906997530174
New Minimum: -0.06013176887437222 > -0.06833761413809604
WOLFE (weak): th(51.70643256076521)=-0.06833761413809604; dx=-1.925027343894837E-4 evalInputDelta=0.010925335963476834
New Minimum: -0.06833761413809604 > -0.11528500559979908
WOLFE (weak): th(258.53216280382605)=-0.11528500559979908; dx=-2.0751939710573353E-4 evalInputDelta=0.057872727425179876
New Minimum: -0.11528500559979908 > -0.4166416240160138
END: th(1551.1929768229563)=-0.4166416240160138; dx=-1.7020362552742845E-4 evalInputDelta=0.3592293458413946
Fitness changed from -0.057412278174619205 to -0.4166416240160138
Iteration 1 complete. Error: -0.4166416240160138 Total: 12.0069; Orientation: 0.0174; Line Search: 8.4301
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0061bad4-55ef-4a57-8529-552051d1d953.jpg)
Adding measurement 6949d106 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.4166416240160138;dx=-2.7710745516693053E-4
New Minimum: -0.4166416240160138 > -0.9563997637586888
END: th(3341.943960201201)=-0.9563997637586888; dx=-9.328168440657304E-5 evalInputDelta=0.5397581397426751
Fitness changed from -0.4166416240160138 to -0.9563997637586888
Iteration 2 complete. Error: -0.9563997637586888 Total: 3.7031; Orientation: 0.0178; Line Search: 2.4062
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/748263f2-4c6b-44f8-a4aa-cd86659671b1.jpg)
Adding measurement 13141776 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.9563997637586888;dx=-3.040507009311495E-4
New Minimum: -0.9563997637586888 > -1.5782996354874708
END: th(7200.000000000001)=-1.5782996354874708; dx=-4.099279150131324E-5 evalInputDelta=0.6218998717287819
Fitness changed from -0.9563997637586888 to -1.5782996354874708
Iteration 3 complete. Error: -1.5782996354874708 Total: 3.7615; Orientation: 0.0200; Line Search: 2.3828
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/9491effd-3fc0-4883-a5ec-610106e71cbd.jpg)
Adding measurement 2983138c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.494e+03, gradient 2.443e-02, dot -0.403; [222d9a55-a633-4700-8028-60aa32ad397c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5782996354874708, -0.9563997637586888, -0.4166416240160138, -0.057412278174619205
LBFGS Accumulation History: 3 points
Removed measurement 2983138c to history. Total: 3
th(0)=-1.5782996354874708;dx=-5.851850896802374E-4
New Minimum: -1.5782996354874708 > -2.8051510058604565
END: th(15511.929768229566)=-2.8051510058604565; dx=-1.713228757418207E-5 evalInputDelta=1.2268513703729858
Fitness changed from -1.5782996354874708 to -2.8051510058604565
Iteration 4 complete. Error: -2.8051510058604565 Total: 4.1549; Orientation: 0.4682; Line Search: 2.3812
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/695c0e85-4f4b-4979-8ffd-238b34c74edf.jpg)
Adding measurement 7bd2eb0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.259e+02, gradient 2.284e-02, dot -0.090; [222d9a55-a633-4700-8028-60aa32ad397c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.8051510058604565, -0.9563997637586888, -0.4166416240160138, -0.057412278174619205
LBFGS Accumulation History: 3 points
Removed measurement 7bd2eb0 to history. Total: 3
th(0)=-2.8051510058604565;dx=-4.997521230978329E-4
New Minimum: -2.8051510058604565 > -5.707673566053081
END: th(33419.43960201202)=-5.707673566053081; dx=-2.6756518329774E-6 evalInputDelta=2.902522560192624
Fitness changed from -2.8051510058604565 to -5.707673566053081
Iteration 5 complete. Error: -5.707673566053081 Total: 4.1818; Orientation: 0.4564; Line Search: 2.4331
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/14663a10-4bc3-449c-85dd-523d4c3c7338.jpg)
Adding measurement 4ce8b3e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.142e+02, gradient 2.463e-02, dot -0.032; [222d9a55-a633-4700-8028-60aa32ad397c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.707673566053081, -0.9563997637586888, -0.4166416240160138, -0.057412278174619205
LBFGS Accumulation History: 3 points
Removed measurement 4ce8b3e to history. Total: 3
th(0)=-5.707673566053081;dx=-6.01335421953866E-4
New Minimum: -5.707673566053081 > -9.480420464957385
WOLF (strong): th(72000.00000000003)=-9.480420464957385; dx=8.94232630707964E-6 evalInputDelta=3.7727468989043045
New Minimum: -9.480420464957385 > -11.95461911107252
END: th(36000.000000000015)=-11.95461911107252; dx=-3.594566844950245E-5 evalInputDelta=6.246945545019439
Fitness changed from -5.707673566053081 to -11.95461911107252
Iteration 6 complete. Error: -11.95461911107252 Total: 5.8377; Orientation: 0.4572; Line Search: 4.0865
Adding measurement 5762c031 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.290e+04, gradient 3.057e-02, dot -0.075; [222d9a55-a633-4700-8028-60aa32ad397c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -11.95461911107252, -0.9563997637586888, -0.4166416240160138, -0.057412278174619205
LBFGS Accumulation History: 3 points
Removed measurement 5762c031 to history. Total: 3
th(0)=-11.95461911107252;dx=-9.292879371083664E-4
New Minimum: -11.95461911107252 > -16.398662680088048
WOLF (strong): th(77559.64884114785)=-16.398662680088048; dx=4.7845977193958855E-5 evalInputDelta=4.444043569015529
New Minimum: -16.398662680088048 > -20.58336158575469
END: th(38779.824420573925)=-20.58336158575469; dx=-1.276363870161409E-5 evalInputDelta=8.628742474682172
Fitness changed from -11.95461911107252 to -20.58336158575469
Iteration 7 complete. Error: -20.58336158575469 Total: 5.2128; Orientation: 0.4609; Line Search: 3.5931
Adding measurement 3d999700 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.643e+03, gradient 3.081e-02, dot -0.055; [222d9a55-a633-4700-8028-60aa32ad397c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -20.58336158575469, -0.9563997637586888, -0.4166416240160138, -0.057412278174619205
LBFGS Accumulation History: 3 points
Removed measurement 3d999700 to history. Total: 3
th(0)=-20.58336158575469;dx=-9.410383094378538E-4
Armijo: th(83548.59900503006)=-18.481740652569176; dx=7.869872492329096E-5 evalInputDelta=-2.101620933185515
New Minimum: -20.58336158575469 > -26.02876685710567
WOLF (strong): th(41774.29950251503)=-26.02876685710567; dx=1.9578812279716303E-5 evalInputDelta=5.445405271350978
New Minimum: -26.02876685710567 > -28.25451732065932
END: th(13924.766500838343)=-28.25451732065932; dx=-2.9400902092788786E-4 evalInputDelta=7.67115573490463
Fitness changed from -20.58336158575469 to -28.25451732065932
Iteration 8 complete. Error: -28.25451732065932 Total: 6.4807; Orientation: 0.4626; Line Search: 4.8475
Adding measurement 6c2e80f to history. Total: 3
Accepted: LBFGS Orientation magnitude: 7.193e+03, gradient 2.853e-02, dot 0.119; [222d9a55-a633-4700-8028-60aa32ad397c = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-28.25451732065932;dx=-24.97259089339338
Armijo: th(30000.000000000015)=-6.016242295336947; dx=1.1783702276474181E-4 evalInputDelta=-22.238275025322373
Armijo: th(15000.000000000007)=-6.0200568977784785; dx=2.4166365250720976E-4 evalInputDelta=-22.234460422880844
Armijo: th(5000.000000000003)=-6.055606659062108; dx=7.587305945035632E-4 evalInputDelta=-22.198910661597214
Armijo: th(1250.0000000000007)=-6.132220935840214; dx=0.0028445642648051834

...skipping 6101 bytes...

4613071E-4 evalInputDelta=-1.8795009637528892E-6
WOLFE (weak): th(1.816899789692554E-4)=-32.47413145670239; dx=-7.234432797385482E-4 evalInputDelta=1.8795008642769062E-6
Armijo: th(2.523471930128547E-4)=-32.47412769770056; dx=-7.234880493670476E-4 evalInputDelta=-1.8795009637528892E-6
Armijo: th(2.1701858599105505E-4)=-32.47412957720152; dx=-7.257232547985188E-4 evalInputDelta=0.0
WOLFE (weak): th(1.993542824801552E-4)=-32.47413145670239; dx=-7.252150012350226E-4 evalInputDelta=1.8795008642769062E-6
WOLFE (weak): th(2.0818643423560512E-4)=-32.47413145670239; dx=-7.263019791235905E-4 evalInputDelta=1.8795008642769062E-6
WOLFE (weak): th(2.126025101133301E-4)=-32.47413145670239; dx=-7.120193182317615E-4 evalInputDelta=1.8795008642769062E-6
Armijo: th(2.1481054805219256E-4)=-32.47412769770056; dx=-7.277099688093045E-4 evalInputDelta=-1.8795009637528892E-6
WOLFE (weak): th(2.1370652908276133E-4)=-32.47413145670239; dx=-7.281502925612741E-4 evalInputDelta=1.8795008642769062E-6
Armijo: th(2.1425853856747696E-4)=-32.47412769770056; dx=-7.287972597308518E-4 evalInputDelta=-1.8795009637528892E-6
WOLFE (weak): th(2.1398253382511913E-4)=-32.47413145670239; dx=-7.160346026052827E-4 evalInputDelta=1.8795008642769062E-6
Armijo: th(2.1412053619629805E-4)=-32.47412769770056; dx=-7.252875724488327E-4 evalInputDelta=-1.8795009637528892E-6
Armijo: th(2.1405153501070857E-4)=-32.47412769770056; dx=-7.266895965420943E-4 evalInputDelta=-1.8795009637528892E-6
WOLFE (weak): th(2.1401703441791385E-4)=-32.47413145670239; dx=-7.27718503632838E-4 evalInputDelta=1.8795008642769062E-6
WOLFE (weak): th(2.140342847143112E-4)=-32.47413145670239; dx=-7.284201257041489E-4 evalInputDelta=1.8795008642769062E-6
Armijo: th(2.140429098625099E-4)=-32.47412769770056; dx=-7.280063039529086E-4 evalInputDelta=-1.8795009637528892E-6
Armijo: th(2.1403859728841054E-4)=-32.47412769770056; dx=-7.275216780439606E-4 evalInputDelta=-1.8795009637528892E-6
WOLFE (weak): th(2.1403644100136089E-4)=-32.47413145670239; dx=-7.203212934448919E-4 evalInputDelta=1.8795008642769062E-6
WOLFE (weak): th(2.140375191448857E-4)=-32.47413145670239; dx=-7.213254340840278E-4 evalInputDelta=1.8795008642769062E-6
mu ~= nu (2.140375191448857E-4): th(5.767935840293822E-6)=-32.47413145670239
Fitness changed from -32.47412957720152 to -32.47413145670239
Iteration 14 complete. Error: -32.47413145670239 Total: 36.9522; Orientation: 0.0180; Line Search: 34.6165
Adding measurement 5c87b045 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-32.47413145670239;dx=-7.332156404164785E-4
Armijo: th(4.6113101760901064E-4)=-32.47413145670239; dx=-7.31003988666898E-4 evalInputDelta=0.0
Armijo: th(2.3056550880450532E-4)=-32.47412769770056; dx=-7.274570412922041E-4 evalInputDelta=-3.7590018280297954E-6
Armijo: th(7.685516960150177E-5)=-32.47412769770056; dx=-7.273479766682466E-4 evalInputDelta=-3.7590018280297954E-6
Armijo: th(1.9213792400375442E-5)=-32.47412769770056; dx=-7.304292801417505E-4 evalInputDelta=-3.7590018280297954E-6
WOLFE (weak): th(3.842758480075089E-6)=-32.47413145670239; dx=-7.310815760237256E-4 evalInputDelta=0.0
Armijo: th(1.1528275440225265E-5)=-32.47412769770056; dx=-7.283581528334364E-4 evalInputDelta=-3.7590018280297954E-6
Armijo: th(7.685516960150177E-6)=-32.47412769770056; dx=-7.262493975423941E-4 evalInputDelta=-3.7590018280297954E-6
WOLFE (weak): th(5.764137720112633E-6)=-32.47413145670239; dx=-7.245207443047907E-4 evalInputDelta=0.0
Armijo: th(6.724827340131405E-6)=-32.47412769770056; dx=-7.248956270634248E-4 evalInputDelta=-3.7590018280297954E-6
Armijo: th(6.244482530122019E-6)=-32.47412769770056; dx=-7.18502241544151E-4 evalInputDelta=-3.7590018280297954E-6
Armijo: th(6.004310125117326E-6)=-32.47412769770056; dx=-7.280823751747258E-4 evalInputDelta=-3.7590018280297954E-6
WOLFE (weak): th(5.8842239226149795E-6)=-32.47413145670239; dx=-7.278947847641763E-4 evalInputDelta=0.0
WOLFE (weak): th(5.9442670238661525E-6)=-32.47413145670239; dx=-7.315553091580593E-4 evalInputDelta=0.0
Armijo: th(5.97428857449174E-6)=-32.47412769770056; dx=-7.308085346518266E-4 evalInputDelta=-3.7590018280297954E-6
Armijo: th(5.959277799178946E-6)=-32.47412769770056; dx=-7.171144254238423E-4 evalInputDelta=-3.7590018280297954E-6
Armijo: th(5.951772411522549E-6)=-32.47412769770056; dx=-7.307079163364543E-4 evalInputDelta=-3.7590018280297954E-6
WOLFE (weak): th(5.948019717694351E-6)=-32.47413145670239; dx=-7.228597939872241E-4 evalInputDelta=0.0
Armijo: th(5.9498960646084506E-6)=-32.47412769770056; dx=-7.248315494795686E-4 evalInputDelta=-3.7590018280297954E-6
WOLFE (weak): th(5.948957891151401E-6)=-32.47413145670239; dx=-7.268747985274621E-4 evalInputDelta=0.0
Armijo: th(5.949426977879926E-6)=-32.47412769770056; dx=-7.211973423680278E-4 evalInputDelta=-3.7590018280297954E-6
Armijo: th(5.9491924345156635E-6)=-32.47412957720152; dx=-7.31037185801696E-4 evalInputDelta=-1.8795008642769062E-6
WOLFE (weak): th(5.949075162833533E-6)=-32.47413145670239; dx=-7.248365363614029E-4 evalInputDelta=0.0
WOLFE (weak): th(5.9491337986745986E-6)=-32.47413145670239; dx=-7.251019714454529E-4 evalInputDelta=0.0
mu ~= nu (5.9491337986745986E-6): th(0.0)=-32.47413145670239
Fitness changed from -32.47413145670239 to -32.47413145670239
Static Iteration Total: 32.2380; Orientation: 0.0171; Line Search: 31.0746
Iteration 15 failed. Error: -32.47413145670239
Previous Error: 0.0 -> -32.47413145670239
Retrying iteration 15
Reset training subject: 11370125051258
Adding measurement 703fb19c to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-32.47413145670239;dx=-7.329020136938913E-4
Armijo: th(1.2817083395050747E-5)=-32.47412769770056; dx=-7.208707207699859E-4 evalInputDelta=-3.7590018280297954E-6
Armijo: th(6.4085416975253735E-6)=-32.47412769770056; dx=-7.247264567749776E-4 evalInputDelta=-3.7590018280297954E-6
WOLFE (weak): th(2.136180565841791E-6)=-32.47413145670239; dx=-7.291309353379454E-4 evalInputDelta=0.0
WOLFE (weak): th(4.272361131683582E-6)=-32.47413145670239; dx=-7.332539011817314E-4 evalInputDelta=0.0
WOLFE (weak): th(5.3404514146044775E-6)=-32.47413145670239; dx=-7.307564750878145E-4 evalInputDelta=0.0
WOLFE (weak): th(5.874496556064926E-6)=-32.47413145670239; dx=-7.251522720833647E-4 evalInputDelta=0.0
Armijo: th(6.141519126795149E-6)=-32.47412769770056; dx=-7.190261373138842E-4 evalInputDelta=-3.7590018280297954E-6
Armijo: th(6.008007841430038E-6)=-32.47412769770056; dx=-7.32372120452303E-4 evalInputDelta=-3.7590018280297954E-6
WOLFE (weak): th(5.941252198747482E-6)=-32.47413145670239; dx=-7.30690892898916E-4 evalInputDelta=0.0
Armijo: th(5.974630020088759E-6)=-32.47412769770056; dx=-7.28656876553459E-4 evalInputDelta=-3.7590018280297954E-6
Armijo: th(5.95794110941812E-6)=-32.47412769770056; dx=-7.174349600152438E-4 evalInputDelta=-3.7590018280297954E-6
Armijo: th(5.949596654082801E-6)=-32.47412769770056; dx=-7.314685300631131E-4 evalInputDelta=-3.7590018280297954E-6
WOLFE (weak): th(5.945424426415142E-6)=-32.47413145670239; dx=-7.272000532380364E-4 evalInputDelta=0.0
WOLFE (weak): th(5.947510540248972E-6)=-32.47413145670239; dx=-7.320910844133134E-4 evalInputDelta=0.0
WOLFE (weak): th(5.9485535971658865E-6)=-32.47413145670239; dx=-7.328628597854333E-4 evalInputDelta=0.0
WOLFE (weak): th(5.949075125624344E-6)=-32.47413145670239; dx=-7.313145044604307E-4 evalInputDelta=0.0
Armijo: th(5.949335889853573E-6)=-32.47412957720152; dx=-7.304863229484078E-4 evalInputDelta=-1.8795008642769062E-6
Armijo: th(5.949205507738959E-6)=-32.47412957720152; dx=-7.287877277231082E-4 evalInputDelta=-1.8795008642769062E-6
WOLFE (weak): th(5.949140316681651E-6)=-32.47413145670239; dx=-7.242655673199534E-4 evalInputDelta=0.0
Armijo: th(5.949172912210305E-6)=-32.47412957720152; dx=-7.259325811614115E-4 evalInputDelta=-1.8795008642769062E-6
mu ~= nu (5.949140316681651E-6): th(0.0)=-32.47413145670239
Fitness changed from -32.47413145670239 to -32.47413145670239
Static Iteration Total: 29.5436; Orientation: 0.0173; Line Search: 27.2211
Iteration 16 failed. Error: -32.47413145670239
Previous Error: 0.0 -> -32.47413145670239
Optimization terminated 16
Final threshold in iteration 16: -32.47413145670239 (> -Infinity) after 189.474s (< 3600.000s)

Returns

    -32.47413145670239