BasicOptimizer.scala:89 executed in 96.88 seconds (2.017 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
Reset training subject: 288342755795900
Reset training subject: 288344661975300
Adding measurement 7a732b5e to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-51.87605096927051;dx=-5.472183604734636E-6
New Minimum: -51.87605096927051 > -51.87605638853328
END: th(2.154434690031884)=-51.87605638853328; dx=-3.536406948852842E-6 evalInputDelta=5.419262770089972E-6
Fitness changed from -51.87605096927051 to -51.87605638853328
Iteration 1 complete. Error: -51.87605638853328 Total: 9.4662; Orientation: 0.0590; Line Search: 3.6769
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/6fda41de-4923-42fc-b277-5b57c62563f9.jpg)
Adding measurement 3ec9d5ee to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-51.87605638853328;dx=-3.536417201136986E-6
New Minimum: -51.87605638853328 > -51.87607987199876
WOLFE (weak): th(4.641588833612779)=-51.87607987199876; dx=-3.5364295340778545E-6 evalInputDelta=2.3483465483309374E-5
New Minimum: -51.87607987199876 > -51.87609793619574
WOLFE (weak): th(9.283177667225559)=-51.87609793619574; dx=-3.5364244369847155E-6 evalInputDelta=4.15476624624489E-5
New Minimum: -51.87609793619574 > -51.87616116083564
WOLFE (weak): th(27.849533001676676)=-51.87616116083564; dx=-3.536437287313575E-6 evalInputDelta=1.0477230236460855E-4
New Minimum: -51.87616116083564 > -51.876457412407596
WOLFE (weak): th(111.3981320067067)=-51.876457412407596; dx=-3.536415550096176E-6 evalInputDelta=4.010238743177297E-4
New Minimum: -51.876457412407596 > -51.878034381632936
WOLFE (weak): th(556.9906600335335)=-51.878034381632936; dx=-3.5363205375132725E-6 evalInputDelta=0.0019779930996577377
New Minimum: -51.878034381632936 > -51.88787987189734
WOLFE (weak): th(3341.9439602012008)=-51.88787987189734; dx=-3.535191093913538E-6 evalInputDelta=0.01182348336406136
New Minimum: -51.88787987189734 > -51.95871016534286
WOLFE (weak): th(23393.607721408407)=-51.95871016534286; dx=-3.529314249743039E-6 evalInputDelta=0.08265377680957897
New Minimum: -51.95871016534286 > -52.53205433604046
WOLFE (weak): th(187148.86177126726)=-52.53205433604046; dx=-3.4731903675566382E-6 evalInputDelta=0.6559979475071813
New Minimum: -52.53205433604046 > -57.282945547065076
END: th(1684339.7559414054)=-57.282945547065076; dx=-2.8563407754500255E-6 evalInputDelta=5.406889158531797
Fitness changed from -51.87605638853328 to -57.282945547065076
Iteration 2 complete. Error: -57.282945547065076 Total: 22.6640; Orientation: 0.0609; Line Search: 20.2596
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/21ca1d3c-b527-4ae2-8328-e7908e78c3b8.jpg)
Adding measurement 11996600 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-57.282945547065076;dx=-2.5896783455069777E-6
New Minimum: -57.282945547065076 > -64.94093538260054
END: th(3628800.0000000005)=-64.94093538260054; dx=-1.6019567457702293E-6 evalInputDelta=7.657989835535467
Fitness changed from -57.282945547065076 to -64.94093538260054
Iteration 3 complete. Error: -64.94093538260054 Total: 6.1093; Orientation: 0.0584; Line Search: 3.8462
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/7f24124b-16aa-43eb-94a2-938bfecd98fa.jpg)
Adding measurement 5067e096 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.053e+04, gradient 1.243e-03, dot -0.764; [c10f4994-4523-4d3f-b382-5ea76570d8b9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -64.94093538260054, -57.282945547065076, -51.87605638853328, -51.87605096927051
LBFGS Accumulation History: 3 points
Removed measurement 5067e096 to history. Total: 3
th(0)=-64.94093538260054;dx=-1.544407906481653E-6
New Minimum: -64.94093538260054 > -73.51560673790625
END: th(7818012.603187701)=-73.51560673790625; dx=-6.802063618804255E-7 evalInputDelta=8.57467135530571
Fitness changed from -64.94093538260054 to -73.51560673790625
Iteration 4 complete. Error: -73.51560673790625 Total: 7.0428; Orientation: 1.0164; Line Search: 3.7903
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/de0684b8-1c31-43a1-9062-c3cc96720a07.jpg)
Adding measurement 39e4379c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.841e+03, gradient 1.047e-03, dot -0.506; [c10f4994-4523-4d3f-b382-5ea76570d8b9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -73.51560673790625, -57.282945547065076, -51.87605638853328, -51.87605096927051
LBFGS Accumulation History: 3 points
Removed measurement 39e4379c to history. Total: 3
th(0)=-73.51560673790625;dx=-1.0971431334256257E-6
New Minimum: -73.51560673790625 > -80.44340266135119
END: th(1.6843397559414055E7)=-80.44340266135119; dx=-4.5458039075612446E-8 evalInputDelta=6.927795923444933
Fitness changed from -73.51560673790625 to -80.44340266135119
Iteration 5 complete. Error: -80.44340266135119 Total: 7.0944; Orientation: 1.0657; Line Search: 3.8862
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/c37256bf-85d8-482e-9065-f8fc2e010fb9.jpg)
Adding measurement 10033c30 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.034e+03, gradient 1.271e-03, dot -0.217; [c10f4994-4523-4d3f-b382-5ea76570d8b9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -80.44340266135119, -57.282945547065076, -51.87605638853328, -51.87605096927051
LBFGS Accumulation History: 3 points
Removed measurement 10033c30 to history. Total: 3
th(0)=-80.44340266135119;dx=-1.6160311547050342E-6
Armijo: th(3.628800000000001E7)=-74.78029808625139; dx=3.7966169679698623E-7 evalInputDelta=-5.663104575099794
New Minimum: -80.44340266135119 > -83.43484864313206
WOLF (strong): th(1.8144000000000004E7)=-83.43484864313206; dx=5.486000045013236E-7 evalInputDelta=2.9914459817808705
New Minimum: -83.43484864313206 > -86.73469151241059
END: th(6048000.000000001)=-86.73469151241059; dx=-4.1170992303316844E-7 evalInputDelta=6.291288851059406
Fitness changed from -80.44340266135119 to -86.73469151241059
Iteration 6 complete. Error: -86.73469151241059 Total: 10.9045; Orientation: 0.9722; Line Search: 7.6153
Adding measurement 542e4d4d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.583e+04, gradient 8.473e-04, dot -0.494; [c10f4994-4523-4d3f-b382-5ea76570d8b9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -86.73469151241059, -57.282945547065076, -51.87605638853328, -51.87605096927051
LBFGS Accumulation History: 3 points
Removed measurement 542e4d4d to history. Total: 3
th(0)=-86.73469151241059;dx=-7.178873508788382E-7
New Minimum: -86.73469151241059 > -91.24526122448972
END: th(1.3030021005312836E7)=-91.24526122448972; dx=-7.544405526853193E-8 evalInputDelta=4.510569712079132
Fitness changed from -86.73469151241059 to -91.24526122448972
Iteration 7 complete. Error: -91.24526122448972 Total: 7.0908; Orientation: 0.9512; Line Search: 4.0177
Adding measurement 7ba6992 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.803e+04, gradient 9.982e-04, dot -0.363; [c10f4994-4523-4d3f-b382-5ea76570d8b9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -91.24526122448972, -57.282945547065076, -51.87605638853328, -51.87605096927051
LBFGS Accumulation History: 3 points
Removed measurement 7ba6992 to history. Total: 3
th(0)=-91.24526122448972;dx=-9.964595835963943E-7
Armijo: th(2.8072329265690096E7)=-89.1298160859932; dx=3.2686309369574307E-7 evalInputDelta=-2.1154451384965256
New Minimum: -91.24526122448972 > -93.94653188905026
WOLF (strong): th(1.4036164632845048E7)=-93.94653188905026; dx=3.045778142138696E-7 evalInputDelta=2.701270664560539
New Minimum: -93.94653188905026 > -94.54156475713894
END: th(4678721.544281683)=-94.54156475713894; dx=-3.821048968510351E-7 evalInputDelta=3.296303532649219
Fitness changed from -91.24526122448972 to -94.54156475713894
Iteration 8 complete. Error: -94.54156475713894 Total: 10.4313; Orientation: 0.9820; Line Search: 7.5237
Adding measurement 4857c833 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.316e+04, gradient 6.717e-04, dot -0.612; [c10f4994-4523-4d3f-b382-5ea76570d8b9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -94.54156475713894, -57.282945547065076, -51.87605638853328, -51.87605096927051
LBFGS Accumulation History: 3 points
Removed measurement 4857c833 to history. Total: 3
th(0)=-94.54156475713894;dx=-4.5120912350528435E-7
New Minimum: -94.54156475713894 > -97.83696277301895
END: th(1.0080000000000004E7)=-97.83696277301895; dx=-2.2468633542857866E-7 evalInputDelta=3.2953980158800107
Fitness changed from -94.54156475713894 to -97.83696277301895
Iteration 9 complete. Error: -97.83696277301895 Total: 7.1538; Orientation: 0.9897; Line Search: 4.3351
Adding measurement 41efed41 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.518e+04, gradient 7.181e-04, dot -0.537; [c10f4994-4523-4d3f-b382-5ea76570d8b9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -97.83696277301895, -57.282945547065076, -51.87605638853328, -51.87605096927051
LBFGS Accumulation History: 3 points
Removed measurement 41efed41 to history. Total: 3
th(0)=-97.83696277301895;dx=-5.156382067422618E-7
New Minimum: -97.83696277301895 > -100.48773965771882
WOLF (strong): th(2.1716701675521396E7)=-100.48773965771882; dx=4.567829689615577E-8 evalInputDelta=2.650776884699866
New Minimum: -100.48773965771882 > -100.52603784354758
END: th(1.0858350837760698E7)=-100.52603784354758; dx=-6.251084766111395E-8 evalInputDelta=2.689075070528631
Fitness changed from -97.83696277301895 to -100.52603784354758
Iteration 10 complete. Error: -100.52603784354758 Total: 8.6173; Orientation: 0.9764; Line Search: 5.8143
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/86c3a4d1-749e-42b4-9374-9ed4e1088304.jpg)
Final threshold in iteration 11: -100.52603784354758 (> -Infinity) after 96.880s (< 5400.000s)
Returns
-100.52603784354758