Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Iteration 15 Iteration 15

BasicOptimizer.scala:89 executed in 44.82 seconds (1.102 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: 215833044949000
Reset training subject: 215833666662900
Adding measurement 7668d122 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-93.25209971664177;dx=-0.043297777262638115
New Minimum: -93.25209971664177 > -93.32597329182937
WOLFE (weak): th(2.154434690031884)=-93.32597329182937; dx=-0.04331449942561978 evalInputDelta=0.07387357518760496
New Minimum: -93.32597329182937 > -93.3999242137733
WOLFE (weak): th(4.308869380063768)=-93.3999242137733; dx=-0.04336929807407156 evalInputDelta=0.14782449713153767
New Minimum: -93.3999242137733 > -93.69690938810784
WOLFE (weak): th(12.926608140191302)=-93.69690938810784; dx=-0.04353437662484745 evalInputDelta=0.444809671466075
New Minimum: -93.69690938810784 > -95.04459117494542
WOLFE (weak): th(51.70643256076521)=-95.04459117494542; dx=-0.04351255491242764 evalInputDelta=1.7924914583036582
New Minimum: -95.04459117494542 > -102.35803091768558
WOLFE (weak): th(258.53216280382605)=-102.35803091768558; dx=-0.04348226571936335 evalInputDelta=9.105931201043816
New Minimum: -102.35803091768558 > -148.4964146346648
END: th(1551.1929768229563)=-148.4964146346648; dx=-0.03832765383323473 evalInputDelta=55.244314918023036
Fitness changed from -93.25209971664177 to -148.4964146346648
Iteration 1 complete. Error: -148.4964146346648 Total: 6.0265; Orientation: 0.0157; Line Search: 4.2677
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a185a550-9410-4e1c-81c1-0f579d7c0cf8.jpg)
Adding measurement 306c7063 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-148.4964146346648;dx=-0.05260881671765917
New Minimum: -148.4964146346648 > -257.1465420643377
END: th(3341.943960201201)=-257.1465420643377; dx=-0.02636522288538104 evalInputDelta=108.65012742967292
Fitness changed from -148.4964146346648 to -257.1465420643377
Iteration 2 complete. Error: -257.1465420643377 Total: 2.0673; Orientation: 0.0163; Line Search: 1.4858
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/234c6061-d59b-4de5-8bcb-6a9d03328a76.jpg)
Adding measurement 440b4c3a to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-257.1465420643377;dx=-0.06468624162150735
New Minimum: -257.1465420643377 > -384.37033922482374
END: th(7200.000000000001)=-384.37033922482374; dx=-0.015366163211786403 evalInputDelta=127.22379716048601
Fitness changed from -257.1465420643377 to -384.37033922482374
Iteration 3 complete. Error: -384.37033922482374 Total: 1.7843; Orientation: 0.0159; Line Search: 1.1866
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/98d968a6-ac48-4e63-a59b-bfded206ed50.jpg)
Adding measurement 2b8f2550 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.531e+04, gradient 2.365e-01, dot -0.208; [1206c1ec-d41f-4b97-aded-581268bc3a6b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -384.37033922482374, -257.1465420643377, -148.4964146346648, -93.25209971664177
LBFGS Accumulation History: 3 points
Removed measurement 2b8f2550 to history. Total: 3
th(0)=-384.37033922482374;dx=-0.055852014017013965
New Minimum: -384.37033922482374 > -564.4082974611918
END: th(15511.929768229566)=-564.4082974611918; dx=-0.00802976182375341 evalInputDelta=180.037958236368
Fitness changed from -384.37033922482374 to -564.4082974611918
Iteration 4 complete. Error: -564.4082974611918 Total: 2.0518; Orientation: 0.2896; Line Search: 1.1786
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/0a8eb835-dcb8-4d3f-9c95-03baca51de22.jpg)
Adding measurement 7525a696 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.890e+04, gradient 2.336e-01, dot -0.134; [1206c1ec-d41f-4b97-aded-581268bc3a6b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -564.4082974611918, -257.1465420643377, -148.4964146346648, -93.25209971664177
LBFGS Accumulation History: 3 points
Removed measurement 7525a696 to history. Total: 3
th(0)=-564.4082974611918;dx=-0.054521742272587465
New Minimum: -564.4082974611918 > -726.4118073305424
END: th(33419.43960201202)=-726.4118073305424; dx=-0.0028379350651716595 evalInputDelta=162.00350986935064
Fitness changed from -564.4082974611918 to -726.4118073305424
Iteration 5 complete. Error: -726.4118073305424 Total: 2.0386; Orientation: 0.2911; Line Search: 1.1745
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/54d9c3cd-5f1d-4e32-856f-9da7f7daf82a.jpg)
Adding measurement 3168d8b4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.583e+04, gradient 2.242e-01, dot -0.100; [1206c1ec-d41f-4b97-aded-581268bc3a6b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -726.4118073305424, -257.1465420643377, -148.4964146346648, -93.25209971664177
LBFGS Accumulation History: 3 points
Removed measurement 3168d8b4 to history. Total: 3
th(0)=-726.4118073305424;dx=-0.0501849452138627
New Minimum: -726.4118073305424 > -792.661611323229
WOLF (strong): th(72000.00000000003)=-792.661611323229; dx=1.0677441330020303E-4 evalInputDelta=66.24980399268657
New Minimum: -792.661611323229 > -1000.0117997528441
END: th(36000.000000000015)=-1000.0117997528441; dx=-0.004435071722690499 evalInputDelta=273.59999242230174
Fitness changed from -726.4118073305424 to -1000.0117997528441
Iteration 6 complete. Error: -1000.0117997528441 Total: 2.6557; Orientation: 0.2948; Line Search: 1.7897
Adding measurement 5d4a6d2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.035e+04, gradient 2.169e-01, dot -0.099; [1206c1ec-d41f-4b97-aded-581268bc3a6b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1000.0117997528441, -257.1465420643377, -148.4964146346648, -93.25209971664177
LBFGS Accumulation History: 3 points
Removed measurement 5d4a6d2 to history. Total: 3
th(0)=-1000.0117997528441;dx=-0.04695229415720137
Armijo: th(77559.64884114785)=-989.9638795049848; dx=4.2235082332403286E-4 evalInputDelta=-10.047920247859338
New Minimum: -1000.0117997528441 > -1273.0206971371804
END: th(38779.824420573925)=-1273.0206971371804; dx=-0.00495247501867635 evalInputDelta=273.00889738433625
Fitness changed from -1000.0117997528441 to -1273.0206971371804
Iteration 7 complete. Error: -1273.0206971371804 Total: 3.2383; Orientation: 0.2901; Line Search: 2.3722
Adding measurement ab5979c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.552e+04, gradient 2.147e-01, dot -0.112; [1206c1ec-d41f-4b97-aded-581268bc3a6b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1273.0206971371804, -257.1465420643377, -148.4964146346648, -93.25209971664177
LBFGS Accumulation History: 3 points
Removed measurement ab5979c to history. Total: 3
th(0)=-1273.0206971371804;dx=-0.046053082773508655
Armijo: th(83548.59900503006)=-1182.0381389727108; dx=8.350037612846025E-4 evalInputDelta=-90.98255816446954
New Minimum: -1273.0206971371804 > -1544.6600649518923
END: th(41774.29950251503)=-1544.6600649518923; dx=-0.005036532627982922 evalInputDelta=271.63936781471193
Fitness changed from -1273.0206971371804 to -1544.6600649518923
Iteration 8 complete. Error: -1544.6600649518923 Total: 2.6553; Orientation: 0.2762; Line Search: 1.8456
Adding measurement 5f2be460 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.010e+04, gradient 2.140e-01, dot -0.123; [1206c1ec-d41f-4b97-aded-581268bc3a6b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1544.6600649518923, -257.1465420643377, -148.4964146346648, -93.25209971664177
LBFGS Accumulation History: 3 points
Removed measurement 5f2be460 to history. Total: 3
th(0)=-1544.6600649518923;dx=-0.045707404120476094
Armijo: th(90000.00000000004)=-1342.8904232459224; dx=0.0010978013333731264 evalInputDelta=-201.7696417059699
New Minimum: -1544.6600649518923 > -1783.8945022680475
END: th(45000.00000000002)=-1783.8945022680475; dx=-0.005227414848251596 evalInputDelta=239.2344373161552
Fitness changed from -1544.6600649518923 to -1783.8945022680475
Iteration 9 complete. Error: -1783.8945022680475 Total: 2.7217; Orientation: 0.3156; Line Search: 1.8340
Adding measurement b5e9bf8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.199e+06, gradient 2.191e-01, dot -0.137; [1206c1ec-d41f-4b97-aded-581268bc3a6b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1783.8945022680475, -257.1465420643377, -148.4964146346648, -93.25209971664177
LBFGS Accumulation History: 3 points
Removed measurement b5e9bf8 to history. Total: 3
th(0)=-1783.8945022680475;dx=-0.04788444316185683
Armijo: th(96949.56105143482)=-1447.9715721894077; dx=0.0014220735157430648 evalInputDelta=-335.92293007863987
New Minimum: -1783.8945022680475 > -1971.4455239471492
END: th(48474.78052571741)=-1971.4455239471492; dx=-0.004246332522819002 evalInputDelta=187.55102167910172
Fitness changed from -1783.8945022680475 to -1971.4455239471492
Iteration 10 complete. Error: -1971.4455239471492 Total: 2.6242; Orientation: 0.2930; Line Search: 1.7966
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/7cd04061-078f-4a23-9b37-a2127899ed96.jpg)
Adding measurement 347cd1c1 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.125e+05, gradient 2.163e-01, dot 0.162; [1206c1ec-d41f-4b97-aded-581268bc3a6b = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-1971.4455239471492;dx=-3943.7849374876914
Armijo: th(104435.74875628759)=-299.87821267097286; dx=0.006320596630850247 evalInputDelta=-1671.5673112761765
Armijo: th(52217.874378143795)=-303.48055970204985; dx=0.012590578342821413 evalInputDelta=-1667.9649642450995
Armijo: th(17405.95812604793)=-309.26826493658086; dx=0.037185148549074745 evalInputDelta=-1662.1772590105684
Armijo: th(4351.489531511983)=-318.04123067724265; dx=0.14767481861121798 evalInputDelta=-1653.4042932699067
Armijo: th(870.2979063023965)=-339.82779679239695; dx=0.7106785224399925 evalInputDelta=-1631.6177271547522
Armijo: th(145.04965105039943)=-386.2711267654164; dx=4.044509173745146 evalInputDelta=-1585.1743971817327
Armijo: th(20.72137872148563)=-491.11618223148; dx=24.666486983226022 evalInputDelta=-1480.3293417156692
Armijo: th(2.590172340185704)=-784.07520800115; dx=152.40619435751643 evalInputDelta=-1187.3703159459992
Armijo: th(0.28779692668730045)=-1613.5020370259808; dx=706.9280842299381 evalInputDelta=-357.9434869211684
New Minimum: -1971.4455239471492 > -1997.4866949650818
END: th(0.028779692668730046)=-1997.4866949650818; dx=-472.6045552582971 evalInputDelta=26.041171017932584
Fitness changed from -1971.4455239471492 to -1997.4866949650818
Iteration 11 complete. Error: -1997.4866949650818 Total: 7.7400; Orientation: 0.2673; Line Search: 6.6547
Adding measurement 76423445 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 1.157e+06, gradient 2.164e-01, dot -0.141; [1206c1ec-d41f-4b97-aded-581268bc3a6b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1997.4866949650818, -1971.4455239471492, -257.1465420643377, -148.4964146346648, -93.25209971664177
Rejected: LBFGS Orientation magnitude: 1.521e+06, gradient 2.164e-01, dot -0.176; [1206c1ec-d41f-4b97-aded-581268bc3a6b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1997.4866949650818, -1971.4455239471492, -257.1465420643377, -148.4964146346648
LBFGS Accumulation History: 3 points
Removed measurement 76423445 to history. Total: 4
Removed measurement 347cd1c1 to history. Total: 3
th(0)=-1997.4866949650818;dx=-0.046798225863384314
New Minimum: -1997.4866949650818 > -1997.488143753556
END: th(0.0620039682539683)=-1997.488143753556; dx=-0.035512033054151765 evalInputDelta=0.0014487884741356538
Fitness changed from -1997.4866949650818 to -1997.488143753556
Iteration 12 complete. Error: -1997.488143753556 Total: 2.7192; Orientation: 0.7723; Line Search: 1.2847
Adding measurement 1a3642f0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.788e+06, gradient 2.163e-01, dot -0.142; [1206c1ec-d41f-4b97-aded-581268bc3a6b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1997.488143753556, -257.1465420643377, -148.4964146346648, -93.25209971664177
LBFGS Accumulation History: 3 points
Removed measurement 1a3642f0 to history. Total: 3
th(0)=-1997.488143753556;dx=-0.046741237543667165
New Minimum: -1997.488143753556 > -1997.491055632578
END: th(0.13358350012598497)=-1997.491055632578; dx=-0.035444597280326146 evalInputDelta=0.002911879022121866
Fitness changed from -1997.488143753556 to -1997.491055632578
Iteration 13 complete. Error: -1997.491055632578 Total: 2.3459; Orientation: 0.2774; Line Search: 1.1806
Adding measurement 1fb65972 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.631e+06, gradient 2.163e-01, dot -0.142; [1206c1ec-d41f-4b97-aded-581268bc3a6b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1997.491055632578, -257.1465420643377, -148.4964146346648, -93.25209971664177
LBFGS Accumulation History: 3 points
Removed measurement 1fb65972 to history. Total: 3
th(0)=-1997.491055632578;dx=-0.04676335502040091
New Minimum: -1997.491055632578 > -1997.4973384638392
END: th(0.28779692668730056)=-1997.4973384638392; dx=-0.03548056706502434 evalInputDelta=0.006282831261160027
Fitness changed from -1997.491055632578 to -1997.4973384638392
Iteration 14 complete. Error: -1997.4973384638392 Total: 2.0636; Orientation: 0.2903; Line Search: 1.1930
Adding measurement 77e24c21 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.286e+06, gradient 2.164e-01, dot -0.142; [1206c1ec-d41f-4b97-aded-581268bc3a6b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1997.4973384638392, -257.1465420643377, -148.4964146346648, -93.25209971664177
LBFGS Accumulation History: 3 points
Removed measurement 77e24c21 to history. Total: 3
th(0)=-1997.4973384638392;dx=-0.0467606288836697
New Minimum: -1997.4973384638392 > -1997.5108794542857
END: th(0.6200396825396832)=-1997.5108794542857; dx=-0.035495424034199155 evalInputDelta=0.013540990446472279
Fitness changed from -1997.4973384638392 to -1997.5108794542857
Iteration 15 complete. Error: -1997.5108794542857 Total: 2.0681; Orientation: 0.2860; Line Search: 1.2138
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/d32db2c5-695a-4a8c-a1ad-24c54857aa99.jpg)
Final threshold in iteration 16: -1997.5108794542857 (> -Infinity) after 44.822s (< 5400.000s)

Returns

    -1997.5108794542857