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 58.73 seconds (1.045 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: 3338165998359
Reset training subject: 3338668110798
Adding measurement 675a7a2 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-487.59279310652465;dx=-11.363022797774823
New Minimum: -487.59279310652465 > -488.69663048787544
WOLFE (weak): th(2.154434690031884)=-488.69663048787544; dx=-11.358052886460722 evalInputDelta=1.103837381350786
New Minimum: -488.69663048787544 > -489.8172043131108
WOLFE (weak): th(4.308869380063768)=-489.8172043131108; dx=-11.297883014435005 evalInputDelta=2.224411206586126
New Minimum: -489.8172043131108 > -495.2142177162895
WOLFE (weak): th(12.926608140191302)=-495.2142177162895; dx=-11.011564285442578 evalInputDelta=7.621424609764858
New Minimum: -495.2142177162895 > -525.8165523468195
END: th(51.70643256076521)=-525.8165523468195; dx=-10.201263682944214 evalInputDelta=38.223759240294896
Fitness changed from -487.59279310652465 to -525.8165523468195
Iteration 1 complete. Error: -525.8165523468195 Total: 4.1555; Orientation: 0.0164; Line Search: 2.6488
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0bb14945-4042-484e-8703-a4861297efe9.jpg)
Adding measurement 60945734 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-525.8165523468195;dx=-14.493975231497801
New Minimum: -525.8165523468195 > -589.0917975778465
END: th(111.39813200670669)=-589.0917975778465; dx=-7.99801099261295 evalInputDelta=63.27524523102693
Fitness changed from -525.8165523468195 to -589.0917975778465
Iteration 2 complete. Error: -589.0917975778465 Total: 1.5688; Orientation: 0.0163; Line Search: 1.0239
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/bed24905-19ea-43cf-a32f-688c853bcee7.jpg)
Adding measurement 2a78a91b to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-589.0917975778465;dx=-12.966373986343873
New Minimum: -589.0917975778465 > -738.3102011284717
END: th(240.0)=-738.3102011284717; dx=-5.390418249674363 evalInputDelta=149.21840355062523
Fitness changed from -589.0917975778465 to -738.3102011284717
Iteration 3 complete. Error: -738.3102011284717 Total: 1.5847; Orientation: 0.0155; Line Search: 1.0908
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d88bbf87-4435-438f-aa05-94a595d5d538.jpg)
Adding measurement 6113b055 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.953e+04, gradient 4.258e+00, dot -0.277; [df264ac0-9378-44b4-baad-f734138d9913 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -738.3102011284717, -589.0917975778465, -525.8165523468195, -487.59279310652465
LBFGS Accumulation History: 3 points
Removed measurement 6113b055 to history. Total: 3
th(0)=-738.3102011284717;dx=-18.123119029258866
New Minimum: -738.3102011284717 > -869.4725718128261
END: th(517.0643256076521)=-869.4725718128261; dx=-2.9727435411424072 evalInputDelta=131.1623706843544
Fitness changed from -738.3102011284717 to -869.4725718128261
Iteration 4 complete. Error: -869.4725718128261 Total: 1.9667; Orientation: 0.4285; Line Search: 1.0327
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/ef7e0ccd-198d-4085-b284-20600f795d67.jpg)
Adding measurement 50174d3b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.495e+04, gradient 4.245e+00, dot -0.165; [df264ac0-9378-44b4-baad-f734138d9913 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -869.4725718128261, -589.0917975778465, -525.8165523468195, -487.59279310652465
LBFGS Accumulation History: 3 points
Removed measurement 50174d3b to history. Total: 3
th(0)=-869.4725718128261;dx=-18.008904883456445
New Minimum: -869.4725718128261 > -1188.8093503794573
END: th(1113.981320067067)=-1188.8093503794573; dx=-1.1245295510794062 evalInputDelta=319.3367785666312
Fitness changed from -869.4725718128261 to -1188.8093503794573
Iteration 5 complete. Error: -1188.8093503794573 Total: 2.5404; Orientation: 0.4590; Line Search: 1.0345
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/dd29b29c-30cd-4559-ab4f-90115688c367.jpg)
Adding measurement 43a12303 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.263e+03, gradient 5.121e+00, dot -0.059; [df264ac0-9378-44b4-baad-f734138d9913 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1188.8093503794573, -589.0917975778465, -525.8165523468195, -487.59279310652465
LBFGS Accumulation History: 3 points
Removed measurement 43a12303 to history. Total: 3
th(0)=-1188.8093503794573;dx=-26.217360520209684
Armijo: th(2400.0)=-843.8608063649297; dx=-0.25730025280950497 evalInputDelta=-344.94854401452767
Armijo: th(1200.0)=-919.0429505498123; dx=-0.9915272147246389 evalInputDelta=-269.766399829645
New Minimum: -1188.8093503794573 > -1191.9996779355567
END: th(400.0)=-1191.9996779355567; dx=-5.116658745394524 evalInputDelta=3.190327556099419
Fitness changed from -1188.8093503794573 to -1191.9996779355567
Iteration 6 complete. Error: -1191.9996779355567 Total: 3.0432; Orientation: 0.4301; Line Search: 2.1083
Adding measurement 567bbba2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.173e+03, gradient 4.256e+00, dot -0.087; [df264ac0-9378-44b4-baad-f734138d9913 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1191.9996779355567, -589.0917975778465, -525.8165523468195, -487.59279310652465
LBFGS Accumulation History: 3 points
Removed measurement 567bbba2 to history. Total: 3
th(0)=-1191.9996779355567;dx=-18.103611596044452
Armijo: th(861.7738760127535)=-1123.7016176608233; dx=-2.4276875493374437 evalInputDelta=-68.29806027473342
New Minimum: -1191.9996779355567 > -1378.3874642379096
END: th(430.88693800637674)=-1378.3874642379096; dx=-5.623559735729288 evalInputDelta=186.38778630235288
Fitness changed from -1191.9996779355567 to -1378.3874642379096
Iteration 7 complete. Error: -1378.3874642379096 Total: 2.4267; Orientation: 0.4181; Line Search: 1.5427
Adding measurement 603e579 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.825e+04, gradient 4.653e+00, dot -0.105; [df264ac0-9378-44b4-baad-f734138d9913 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1378.3874642379096, -589.0917975778465, -525.8165523468195, -487.59279310652465
LBFGS Accumulation History: 3 points
Removed measurement 603e579 to history. Total: 3
th(0)=-1378.3874642379096;dx=-21.647938081867657
Armijo: th(928.3177667225558)=-1276.5454875762282; dx=-2.14033550855197 evalInputDelta=-101.84197666168143
New Minimum: -1378.3874642379096 > -1474.4943327310336
END: th(464.1588833612779)=-1474.4943327310336; dx=-5.951516854567674 evalInputDelta=96.10686849312401
Fitness changed from -1378.3874642379096 to -1474.4943327310336
Iteration 8 complete. Error: -1474.4943327310336 Total: 2.4377; Orientation: 0.4203; Line Search: 1.5539
Adding measurement 2786f5b5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.079e+04, gradient 4.930e+00, dot -0.112; [df264ac0-9378-44b4-baad-f734138d9913 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1474.4943327310336, -589.0917975778465, -525.8165523468195, -487.59279310652465
LBFGS Accumulation History: 3 points
Removed measurement 2786f5b5 to history. Total: 3
th(0)=-1474.4943327310336;dx=-24.292732529723338
New Minimum: -1474.4943327310336 > -1619.6802496055545
END: th(1000.0000000000001)=-1619.6802496055545; dx=-2.6580305566056066 evalInputDelta=145.1859168745209
Fitness changed from -1474.4943327310336 to -1619.6802496055545
Iteration 9 complete. Error: -1619.6802496055545 Total: 1.9041; Orientation: 0.4151; Line Search: 1.0312
Adding measurement 21017717 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.057e+04, gradient 4.201e+00, dot -0.099; [df264ac0-9378-44b4-baad-f734138d9913 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1619.6802496055545, -589.0917975778465, -525.8165523468195, -487.59279310652465
LBFGS Accumulation History: 3 points
Removed measurement 21017717 to history. Total: 3
th(0)=-1619.6802496055545;dx=-17.635972328712704
Armijo: th(2154.434690031884)=-1589.6659030769454; dx=-0.7968541533386886 evalInputDelta=-30.014346528609167
New Minimum: -1619.6802496055545 > 

...skipping 3407 bytes...

h(5801.986042015977)=-1610.6274413505512; dx=-0.30368432090099895 evalInputDelta=-441.21724803916595
New Minimum: -2051.844689389717 > -2067.227985701024
END: th(2900.9930210079883)=-2067.227985701024; dx=-1.1309598017523395 evalInputDelta=15.383296311306822
Fitness changed from -2051.844689389717 to -2067.227985701024
Iteration 14 complete. Error: -2067.227985701024 Total: 2.4385; Orientation: 0.4119; Line Search: 1.5527
Adding measurement 2656c97c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.427e+04, gradient 2.797e+00, dot -0.107; [df264ac0-9378-44b4-baad-f734138d9913 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2067.227985701024, -589.0917975778465, -525.8165523468195, -487.59279310652465
LBFGS Accumulation History: 3 points
Removed measurement 2656c97c to history. Total: 3
th(0)=-2067.227985701024;dx=-7.804907457250884
New Minimum: -2067.227985701024 > -2119.0799068437777
END: th(6250.000000000004)=-2119.0799068437777; dx=-0.36663329570640546 evalInputDelta=51.85192114275378
Fitness changed from -2067.227985701024 to -2119.0799068437777
Iteration 15 complete. Error: -2119.0799068437777 Total: 1.9807; Orientation: 0.4750; Line Search: 1.0335
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/c3891649-0cca-498d-a008-419780960113.jpg)
Adding measurement 2bf6db2e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.748e+04, gradient 2.558e+00, dot -0.072; [df264ac0-9378-44b4-baad-f734138d9913 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2119.0799068437777, -589.0917975778465, -525.8165523468195, -487.59279310652465
LBFGS Accumulation History: 3 points
Removed measurement 2bf6db2e to history. Total: 3
th(0)=-2119.0799068437777;dx=-6.538095404998526
Armijo: th(13465.216812699282)=-1533.731784579044; dx=-0.09437885744695079 evalInputDelta=-585.3481222647338
Armijo: th(6732.608406349641)=-2028.913731097359; dx=-0.3638978705254174 evalInputDelta=-90.16617574641873
New Minimum: -2119.0799068437777 > -2420.583954309482
END: th(2244.202802116547)=-2420.583954309482; dx=-1.6717933226311699 evalInputDelta=301.5040474657044
Fitness changed from -2119.0799068437777 to -2420.583954309482
Iteration 16 complete. Error: -2420.583954309482 Total: 2.9913; Orientation: 0.4128; Line Search: 2.0842
Adding measurement 2a4da0c0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.385e+05, gradient 2.499e+00, dot -0.111; [df264ac0-9378-44b4-baad-f734138d9913 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2420.583954309482, -589.0917975778465, -525.8165523468195, -487.59279310652465
LBFGS Accumulation History: 3 points
Removed measurement 2a4da0c0 to history. Total: 3
th(0)=-2420.583954309482;dx=-6.244429434638817
New Minimum: -2420.583954309482 > -2590.9170409922367
END: th(4834.988368346648)=-2590.9170409922367; dx=-0.6821060741970724 evalInputDelta=170.33308668275458
Fitness changed from -2420.583954309482 to -2590.9170409922367
Iteration 17 complete. Error: -2590.9170409922367 Total: 2.4983; Orientation: 0.9364; Line Search: 1.0971
Adding measurement 4e35156c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.090e+05, gradient 2.430e+00, dot -0.096; [df264ac0-9378-44b4-baad-f734138d9913 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2590.9170409922367, -589.0917975778465, -525.8165523468195, -487.59279310652465
LBFGS Accumulation History: 3 points
Removed measurement 4e35156c to history. Total: 3
th(0)=-2590.9170409922367;dx=-5.894767427860141
Armijo: th(10416.666666666673)=-2051.6638941264655; dx=-0.20244313598276503 evalInputDelta=-539.2531468657712
Armijo: th(5208.333333333337)=-2573.270702815724; dx=-0.6644330391120996 evalInputDelta=-17.646338176512927
New Minimum: -2590.9170409922367 > -2732.5798321365155
END: th(1736.1111111111122)=-2732.5798321365155; dx=-2.024400512137529 evalInputDelta=141.6627911442788
Fitness changed from -2590.9170409922367 to -2732.5798321365155
Iteration 18 complete. Error: -2732.5798321365155 Total: 3.0043; Orientation: 0.4272; Line Search: 2.0945
Adding measurement 46f858e9 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 2.046e+05, gradient 2.317e+00, dot 0.127; [df264ac0-9378-44b4-baad-f734138d9913 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-2732.5798321365155;dx=-60246.4777177934
Armijo: th(3740.3380035275786)=-1551.7695348839031; dx=0.13974657027734677 evalInputDelta=-1180.8102972526124
Armijo: th(1870.1690017637893)=-1549.1391174305165; dx=0.2789354617124899 evalInputDelta=-1183.440714705999
Armijo: th(623.3896672545965)=-1547.9551718167615; dx=0.8587112549634801 evalInputDelta=-1184.624660319754
Armijo: th(155.84741681364912)=-1559.2013308048781; dx=3.3354157609370114 evalInputDelta=-1173.3785013316374
Armijo: th(31.169483362729824)=-1557.0970119134438; dx=15.8943723457553 evalInputDelta=-1175.4828202230717
Armijo: th(5.194913893788304)=-1554.0063028708041; dx=86.74104420972446 evalInputDelta=-1178.5735292657114
Armijo: th(0.7421305562554721)=-1645.085916612646; dx=290.25388262612887 evalInputDelta=-1087.4939155238694
Armijo: th(0.09276631953193401)=-2358.2102657909236; dx=-11015.0590529199 evalInputDelta=-374.3695663455919
Armijo: th(0.010307368836881556)=-2708.591023878706; dx=-32495.721737346197 evalInputDelta=-23.988808257809524
Armijo: th(0.0010307368836881556)=-2731.646830737733; dx=-38507.13102887791 evalInputDelta=-0.9330013987823804
Armijo: th(9.37033530625596E-5)=-2732.4898160887155; dx=-39309.208314320866 evalInputDelta=-0.09001604779996342
Armijo: th(7.8086127552133E-6)=-2732.5734781598235; dx=-39382.30462979338 evalInputDelta=-0.0063539766920257534
Armijo: th(6.006625196317923E-7)=-2732.5798321365155; dx=-39374.21758703059 evalInputDelta=0.0
New Minimum: -2732.5798321365155 > -2732.5803616339063
END: th(4.290446568798516E-8)=-2732.5803616339063; dx=-39403.07126731668 evalInputDelta=5.294973907439271E-4
Fitness changed from -2732.5798321365155 to -2732.5803616339063
Iteration 19 complete. Error: -2732.5803616339063 Total: 8.8653; Orientation: 0.5824; Line Search: 7.8263
Adding measurement 2fc4a6ee to history. Total: 4
Rejected: LBFGS Orientation magnitude: 1.699e+08, gradient 2.315e+00, dot -0.126; [df264ac0-9378-44b4-baad-f734138d9913 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2732.5803616339063, -2732.5798321365155, -589.0917975778465, -525.8165523468195, -487.59279310652465
Rejected: LBFGS Orientation magnitude: 9.427e+08, gradient 2.315e+00, dot -0.130; [df264ac0-9378-44b4-baad-f734138d9913 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2732.5803616339063, -2732.5798321365155, -589.0917975778465, -525.8165523468195
LBFGS Accumulation History: 3 points
Removed measurement 2fc4a6ee to history. Total: 4
Removed measurement 46f858e9 to history. Total: 3
th(0)=-2732.5803616339063;dx=-5.34889161603905
Armijo: th(9.24348692354779E-8)=-2732.5802292595686; dx=-4.612712956588977 evalInputDelta=-1.3237433768154006E-4
Armijo: th(4.621743461773895E-8)=-2732.5803616339063; dx=-4.616089724323275 evalInputDelta=0.0
Armijo: th(1.5405811539246316E-8)=-2732.5802292595686; dx=-4.618718161480455 evalInputDelta=-1.3237433768154006E-4
END: th(3.851452884811579E-9)=-2732.5803616339063; dx=-4.608712875759386 evalInputDelta=0.0
Fitness changed from -2732.5803616339063 to -2732.5803616339063
Static Iteration Total: 4.0642; Orientation: 1.0495; Line Search: 2.5548
Iteration 20 failed. Error: -2732.5803616339063
Previous Error: 0.0 -> -2732.5803616339063
Retrying iteration 20
Reset training subject: 3394913902061
Adding measurement 2a135bbf to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-2732.5803616339063;dx=-5.344282738280161
END: th(8.297703702061439E-9)=-2732.5803616339063; dx=-4.613544214003047 evalInputDelta=0.0
Fitness changed from -2732.5803616339063 to -2732.5803616339063
Static Iteration Total: 1.9841; Orientation: 0.0161; Line Search: 1.0389
Iteration 21 failed. Error: -2732.5803616339063
Previous Error: 0.0 -> -2732.5803616339063
Optimization terminated 21
Final threshold in iteration 21: -2732.5803616339063 (> -Infinity) after 58.733s (< 3600.000s)

Returns

    -2732.5803616339063