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 110.10 seconds (1.892 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: 2579787983205
Reset training subject: 2580703287642
Adding measurement 151fd241 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-13.624470247324352;dx=-0.014667196823181976
New Minimum: -13.624470247324352 > -13.658535355696092
WOLFE (weak): th(2.154434690031884)=-13.658535355696092; dx=-0.01473084192608292 evalInputDelta=0.03406510837174004
New Minimum: -13.658535355696092 > -13.69301069302148
WOLFE (weak): th(4.308869380063768)=-13.69301069302148; dx=-0.01504390464510455 evalInputDelta=0.0685404456971277
New Minimum: -13.69301069302148 > -13.833985001556234
WOLFE (weak): th(12.926608140191302)=-13.833985001556234; dx=-0.015213050164800842 evalInputDelta=0.2095147542318827
New Minimum: -13.833985001556234 > -14.540876341447214
WOLFE (weak): th(51.70643256076521)=-14.540876341447214; dx=-0.017353064275956512 evalInputDelta=0.9164060941228627
New Minimum: -14.540876341447214 > -19.364715766622453
WOLFE (weak): th(258.53216280382605)=-19.364715766622453; dx=-0.023254468400933034 evalInputDelta=5.740245519298101
New Minimum: -19.364715766622453 > -34.92882958317308
END: th(1551.1929768229563)=-34.92882958317308; dx=-0.006654386627611919 evalInputDelta=21.30435933584873
Fitness changed from -13.624470247324352 to -34.92882958317308
Iteration 1 complete. Error: -34.92882958317308 Total: 9.3018; Orientation: 0.0198; Line Search: 6.5052
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/fe8eb507-5462-4f55-b89a-6d6cda4b4a49.jpg)
Adding measurement 706e3aec to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-34.92882958317308;dx=-0.09971788802853268
New Minimum: -34.92882958317308 > -105.77223159321152
END: th(3341.943960201201)=-105.77223159321152; dx=-0.004301880782314324 evalInputDelta=70.84340201003843
Fitness changed from -34.92882958317308 to -105.77223159321152
Iteration 2 complete. Error: -105.77223159321152 Total: 3.9075; Orientation: 0.0206; Line Search: 2.9768
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/575d0044-6dc9-44bb-9782-bef92fcd765f.jpg)
Adding measurement 44f2cc6e to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-105.77223159321152;dx=-0.30538951534067466
New Minimum: -105.77223159321152 > -204.98334433858955
WOLF (strong): th(7200.000000000001)=-204.98334433858955; dx=0.00595587853193004 evalInputDelta=99.21111274537803
New Minimum: -204.98334433858955 > -258.3175223085572
END: th(3600.0000000000005)=-258.3175223085572; dx=-0.004183694299930499 evalInputDelta=152.5452907153457
Fitness changed from -105.77223159321152 to -258.3175223085572
Iteration 3 complete. Error: -258.3175223085572 Total: 3.7791; Orientation: 0.0213; Line Search: 2.8434
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/1b964bbd-6bb7-48db-9cb0-644242d1cba9.jpg)
Adding measurement 3e9033c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.108e+03, gradient 6.546e-01, dot -0.040; [45b372ed-2b94-4ba9-991d-60a42ff50107 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -258.3175223085572, -105.77223159321152, -34.92882958317308, -13.624470247324352
LBFGS Accumulation History: 3 points
Removed measurement 3e9033c to history. Total: 3
th(0)=-258.3175223085572;dx=-0.42041060312122713
New Minimum: -258.3175223085572 > -321.9265070865555
WOLF (strong): th(7755.964884114783)=-321.9265070865555; dx=0.009085032513445532 evalInputDelta=63.60898477799827
New Minimum: -321.9265070865555 > -464.763571873077
WOLF (strong): th(3877.9824420573914)=-464.763571873077; dx=0.009862845883724323 evalInputDelta=206.4460495645198
New Minimum: -464.763571873077 > -498.1029130543114
END: th(1292.6608140191304)=-498.1029130543114; dx=-0.07342256122196536 evalInputDelta=239.78539074575417
Fitness changed from -258.3175223085572 to -498.1029130543114
Iteration 4 complete. Error: -498.1029130543114 Total: 5.1266; Orientation: 0.4655; Line Search: 3.7526
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/b23d379f-adca-49da-af03-4c357d50f189.jpg)
Adding measurement 50ea843e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.265e+04, gradient 6.011e-01, dot -0.061; [45b372ed-2b94-4ba9-991d-60a42ff50107 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -498.1029130543114, -105.77223159321152, -34.92882958317308, -13.624470247324352
LBFGS Accumulation History: 3 points
Removed measurement 50ea843e to history. Total: 3
th(0)=-498.1029130543114;dx=-0.35635060296064125
New Minimum: -498.1029130543114 > -662.3303058984243
WOLF (strong): th(2784.9533001676677)=-662.3303058984243; dx=0.01299853385601798 evalInputDelta=164.2273928441129
New Minimum: -662.3303058984243 > -701.6865406367367
END: th(1392.4766500838339)=-701.6865406367367; dx=-0.05475265506631986 evalInputDelta=203.58362758242532
Fitness changed from -498.1029130543114 to -701.6865406367367
Iteration 5 complete. Error: -701.6865406367367 Total: 4.1994; Orientation: 0.4678; Line Search: 2.8164
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/1c117d57-44f5-4e20-b58c-c99ccaf4c41f.jpg)
Adding measurement c74319d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.239e+04, gradient 7.119e-01, dot -0.050; [45b372ed-2b94-4ba9-991d-60a42ff50107 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -701.6865406367367, -105.77223159321152, -34.92882958317308, -13.624470247324352
LBFGS Accumulation History: 3 points
Removed measurement c74319d to history. Total: 3
th(0)=-701.6865406367367;dx=-0.5023323721759694
New Minimum: -701.6865406367367 > -817.4219665317572
WOLF (strong): th(3000.0000000000005)=-817.4219665317572; dx=0.0253190420631835 evalInputDelta=115.73542589502051
New Minimum: -817.4219665317572 > -881.5112820593456
END: th(1500.0000000000002)=-881.5112820593456; dx=-0.022748210458233234 evalInputDelta=179.8247414226089
Fitness changed from -701.6865406367367 to -881.5112820593456
Iteration 6 complete. Error: -881.5112820593456 Total: 4.1537; Orientation: 0.4563; Line Search: 2.7820
Adding measurement 4c5f9811 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.171e+04, gradient 8.548e-01, dot -0.040; [45b372ed-2b94-4ba9-991d-60a42ff50107 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -881.5112820593456, -105.77223159321152, -34.92882958317308, -13.624470247324352
LBFGS Accumulation History: 3 points
Removed measurement 4c5f9811 to history. Total: 3
th(0)=-881.5112820593456;dx=-0.7248427485350812
New Minimum: -881.5112820593456 > -937.2574400951711
WOLF (strong): th(3231.6520350478263)=-937.2574400951711; dx=0.03882286214736951 evalInputDelta=55.74615803582549
New Minimum: -937.2574400951711 > -1070.2459588794193
WOLF (strong): th(1615.8260175239132)=-1070.2459588794193; dx=0.012054016504200033 evalInputDelta=188.73467682007367
END: th(538.608672507971)=-1069.9550240890248; dx=-0.16428292973570402 evalInputDelta=188.44374202967924
Fitness changed from -881.5112820593456 to -1070.2459588794193
Iteration 7 complete. Error: -1070.2459588794193 Total: 5.0907; Orientation: 0.4600; Line Search: 3.7611
Adding measurement 4ae0a09a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.321e+04, gradient 8.799e-01, dot -0.056; [45b372ed-2b94-4ba9-991d-60a42ff50107 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1070.2459588794193, -105.77223159321152, -34.92882958317308, -13.624470247324352
LBFGS Accumulation History: 3 points
Removed measurement 4ae0a09a to history. Total: 3
th(0)=-1070.2459588794193;dx=-0.7664387106114361
New Minimum: -1070.2459588794193 > -1356.4085123660402
END: th(1160.397208403195)=-1356.4085123660402; dx=-0.057320992908860204 evalInputDelta=286.16255348662094
Fitness changed from -1070.2459588794193 to -1356.4085123660402
Iteration 8 complete. Error: -1356.4085123660402 Total: 3.1956; Orientation: 0.4599; Line Search: 1.8566
Adding measurement 64f6870e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.227e+04, gradient 7.902e-01, dot -0.058; [45b372ed-2b94-4ba9-991d-60a42ff50107 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1356.4085123660402, -105.772231593

...skipping 4319 bytes...

7
END: th(374.0338003527579)=-2185.3704005595087; dx=-0.333438653440548 evalInputDelta=179.52795168367038
Fitness changed from -2005.8424488758383 to -2185.3704005595087
Iteration 13 complete. Error: -2185.3704005595087 Total: 5.1319; Orientation: 0.4636; Line Search: 3.7913
Adding measurement 6ccbeb68 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.208e+07, gradient 6.979e-01, dot -0.098; [45b372ed-2b94-4ba9-991d-60a42ff50107 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2185.3704005595087, -105.77223159321152, -34.92882958317308, -13.624470247324352
LBFGS Accumulation History: 3 points
Removed measurement 6ccbeb68 to history. Total: 3
th(0)=-2185.3704005595087;dx=-0.4827175721354423
New Minimum: -2185.3704005595087 > -2321.218805756049
END: th(805.8313947244415)=-2321.218805756049; dx=-0.16407298649359758 evalInputDelta=135.84840519654017
Fitness changed from -2185.3704005595087 to -2321.218805756049
Iteration 14 complete. Error: -2321.218805756049 Total: 3.2120; Orientation: 0.4779; Line Search: 1.8502
Adding measurement 5b14cc91 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.247e+05, gradient 7.803e-01, dot -0.076; [45b372ed-2b94-4ba9-991d-60a42ff50107 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2321.218805756049, -105.77223159321152, -34.92882958317308, -13.624470247324352
LBFGS Accumulation History: 3 points
Removed measurement 5b14cc91 to history. Total: 3
th(0)=-2321.218805756049;dx=-0.605178532290457
Armijo: th(1736.1111111111127)=-2305.2055179781873; dx=0.06013614197958722 evalInputDelta=-16.01328777786148
New Minimum: -2321.218805756049 > -2413.8363881133714
END: th(868.0555555555563)=-2413.8363881133714; dx=-0.011860175875830561 evalInputDelta=92.61758235732259
Fitness changed from -2321.218805756049 to -2413.8363881133714
Iteration 15 complete. Error: -2413.8363881133714 Total: 5.1715; Orientation: 0.5083; Line Search: 3.7982
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/c1a21bf9-8251-4caf-a7b8-4313524592f9.jpg)
Adding measurement b5b5b43 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.217e+05, gradient 9.348e-01, dot -0.071; [45b372ed-2b94-4ba9-991d-60a42ff50107 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2413.8363881133714, -105.77223159321152, -34.92882958317308, -13.624470247324352
LBFGS Accumulation History: 3 points
Removed measurement b5b5b43 to history. Total: 3
th(0)=-2413.8363881133714;dx=-0.8693062535417644
Armijo: th(1870.1690017637898)=-2213.689184013212; dx=0.20507528527968244 evalInputDelta=-200.14720410015934
New Minimum: -2413.8363881133714 > -2480.8345821654975
WOLF (strong): th(935.0845008818949)=-2480.8345821654975; dx=0.2017118179131181 evalInputDelta=66.99819405212611
New Minimum: -2480.8345821654975 > -2542.419955643376
END: th(311.6948336272983)=-2542.419955643376; dx=-0.2995399333462466 evalInputDelta=128.58356753000453
Fitness changed from -2413.8363881133714 to -2542.419955643376
Iteration 16 complete. Error: -2542.419955643376 Total: 5.1336; Orientation: 0.4711; Line Search: 3.7422
Adding measurement 2a62f2f7 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 6.999e+04, gradient 6.772e-01, dot 0.129; [45b372ed-2b94-4ba9-991d-60a42ff50107 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-2542.419955643376;dx=-6182.109271454047
Armijo: th(671.526162270368)=-331.6980147908607; dx=0.0773421561098123 evalInputDelta=-2210.721940852515
Armijo: th(335.763081135184)=-321.41648293676263; dx=0.1492954845183802 evalInputDelta=-2221.003472706613
Armijo: th(111.92102704506134)=-309.5391167912822; dx=0.37670545816482853 evalInputDelta=-2232.880838852094
Armijo: th(27.980256761265334)=-308.4697405331185; dx=1.5244590685535662 evalInputDelta=-2233.9502151102574
Armijo: th(5.596051352253067)=-380.9209993082892; dx=4.1025549872969735 evalInputDelta=-2161.498956335087
Armijo: th(0.9326752253755112)=-937.3790259614095; dx=197.2765229590616 evalInputDelta=-1605.0409296819664
Armijo: th(0.1332393179107873)=-1747.4044127747711; dx=1525.0078059491607 evalInputDelta=-795.0155428686048
Armijo: th(0.016654914738848413)=-2507.390557137429; dx=2556.6845327552555 evalInputDelta=-35.02939850594703
New Minimum: -2542.419955643376 > -2550.5151269028206
END: th(0.001850546082094268)=-2550.5151269028206; dx=-3452.4113485129446 evalInputDelta=8.095171259444669
Fitness changed from -2542.419955643376 to -2550.5151269028206
Iteration 17 complete. Error: -2550.5151269028206 Total: 10.7904; Orientation: 0.4644; Line Search: 9.4409
Adding measurement 10844a5c to history. Total: 4
Accepted: LBFGS Orientation magnitude: 3.921e+04, gradient 6.800e-01, dot 0.102; [45b372ed-2b94-4ba9-991d-60a42ff50107 = 1.000/1.000e+00]
th(0)=-2550.5151269028206;dx=-2746.5318753841507
New Minimum: -2550.5151269028206 > -2554.698920816932
END: th(0.003986880674766481)=-2554.698920816932; dx=-1038.1175912583021 evalInputDelta=4.1837939141114475
Fitness changed from -2550.5151269028206 to -2554.698920816932
Iteration 18 complete. Error: -2554.698920816932 Total: 3.3061; Orientation: 0.5840; Line Search: 1.8638
Adding measurement 60c676fe to history. Total: 5
Accepted: LBFGS Orientation magnitude: 3.125e+04, gradient 6.909e-01, dot 0.062; [45b372ed-2b94-4ba9-991d-60a42ff50107 = 1.000/1.000e+00]
th(0)=-2554.698920816932;dx=-1328.9688835324519
Armijo: th(0.008589474030734632)=-2549.7513562284785; dx=118.12920588006506 evalInputDelta=-4.947564588453588
Armijo: th(0.004294737015367316)=-2553.756621855012; dx=-290.4467389741569 evalInputDelta=-0.9422989619201871
New Minimum: -2554.698920816932 > -2554.7800005764825
END: th(0.0014315790051224386)=-2554.7800005764825; dx=-502.69051962374937 evalInputDelta=0.08107975955044822
Fitness changed from -2554.698920816932 to -2554.7800005764825
Iteration 19 complete. Error: -2554.7800005764825 Total: 5.3180; Orientation: 0.6742; Line Search: 3.7702
Adding measurement 67b1cfaa to history. Total: 6
Accepted: LBFGS Orientation magnitude: 2.934e+04, gradient 6.930e-01, dot 0.052; [45b372ed-2b94-4ba9-991d-60a42ff50107 = 1.000/1.000e+00]
th(0)=-2554.7800005764825;dx=-1057.5113724028538
Armijo: th(0.0030842434701571137)=-2553.5931749829447; dx=-227.4375965017718 evalInputDelta=-1.186825593537833
Armijo: th(0.0015421217350785569)=-2554.3832339006567; dx=-336.1579844158439 evalInputDelta=-0.39676667582580194
Armijo: th(5.140405783595189E-4)=-2554.6844115358863; dx=-430.98940178616874 evalInputDelta=-0.09558904059622364
Armijo: th(1.2851014458987973E-4)=-2554.760858669803; dx=-457.9946767558491 evalInputDelta=-0.019141906679578824
Armijo: th(2.5702028917975947E-5)=-2554.7763428983926; dx=-480.3165271477832 evalInputDelta=-0.003657678089894034
Armijo: th(4.283671486329324E-6)=-2554.7792690412834; dx=-479.240522596034 evalInputDelta=-7.315351990655472E-4
Armijo: th(6.119530694756177E-7)=-2554.7798786539643; dx=-447.7535577880028 evalInputDelta=-1.2192251824671985E-4
Armijo: th(7.649413368445222E-8)=-2554.7800005764825; dx=-432.73276461518486 evalInputDelta=0.0
Armijo: th(8.499348187161357E-9)=-2554.7800005764825; dx=-429.52322080830317 evalInputDelta=0.0
Armijo: th(8.499348187161357E-10)=-2554.7800005764825; dx=-445.1031362004486 evalInputDelta=0.0
MIN ALPHA (7.726680170146688E-11): th(0.0)=-2554.7800005764825
Fitness changed from -2554.7800005764825 to -2554.7800005764825
Static Iteration Total: 12.8762; Orientation: 0.8088; Line Search: 11.1941
Iteration 20 failed. Error: -2554.7800005764825
Previous Error: 0.0 -> -2554.7800005764825
Retrying iteration 20
Reset training subject: 2686238835377
Adding measurement 28057315 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-2554.7800005764825;dx=-0.47516448642298936
END: th(2.1544346900318838E-10)=-2554.7800005764825; dx=-0.4270486163893983 evalInputDelta=0.0
Fitness changed from -2554.7800005764825 to -2554.7800005764825
Static Iteration Total: 3.6471; Orientation: 0.0194; Line Search: 1.8665
Iteration 21 failed. Error: -2554.7800005764825
Previous Error: 0.0 -> -2554.7800005764825
Optimization terminated 21
Final threshold in iteration 21: -2554.7800005764825 (> -Infinity) after 110.098s (< 3600.000s)

Returns

    -2554.7800005764825