BasicOptimizer.scala:89 executed in 141.03 seconds (1.971 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: 112426520417000
Reset training subject: 112429190789500
Adding measurement 4d99ea5f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-18.17232481621948;dx=-1.5697781970236172E-6
New Minimum: -18.17232481621948 > -18.17232772464653
END: th(2.154434690031884)=-18.17232772464653; dx=-1.2866618507958895E-6 evalInputDelta=2.9084270494195152E-6
Fitness changed from -18.17232481621948 to -18.17232772464653
Iteration 1 complete. Error: -18.17232772464653 Total: 13.4114; Orientation: 0.0608; Line Search: 5.4458
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 289e8600 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-18.17232772464653;dx=-1.2861391614171882E-6
New Minimum: -18.17232772464653 > -18.172334704869545
WOLFE (weak): th(4.641588833612779)=-18.172334704869545; dx=-1.2864652070682238E-6 evalInputDelta=6.980223016483933E-6
New Minimum: -18.172334704869545 > -18.172341103404953
WOLFE (weak): th(9.283177667225559)=-18.172341103404953; dx=-1.285914208383222E-6 evalInputDelta=1.3378758424664738E-5
New Minimum: -18.172341103404953 > -18.17236786089226
WOLFE (weak): th(27.849533001676676)=-18.17236786089226; dx=-1.2848048539874817E-6 evalInputDelta=4.013624572962726E-5
New Minimum: -18.17236786089226 > -18.17248594237652
WOLFE (weak): th(111.3981320067067)=-18.17248594237652; dx=-1.2839515920267659E-6 evalInputDelta=1.5821772999302652E-4
New Minimum: -18.17248594237652 > -18.173120544501888
WOLFE (weak): th(556.9906600335335)=-18.173120544501888; dx=-1.2836912630854549E-6 evalInputDelta=7.928198553592836E-4
New Minimum: -18.173120544501888 > -18.1770812174129
WOLFE (weak): th(3341.9439602012008)=-18.1770812174129; dx=-1.2837775603356485E-6 evalInputDelta=0.004753492766372602
New Minimum: -18.1770812174129 > -18.205592367499285
WOLFE (weak): th(23393.607721408407)=-18.205592367499285; dx=-1.2822877221463289E-6 evalInputDelta=0.033264642852756765
New Minimum: -18.205592367499285 > -18.436989764119563
WOLFE (weak): th(187148.86177126726)=-18.436989764119563; dx=-1.2677844092527483E-6 evalInputDelta=0.2646620394730341
New Minimum: -18.436989764119563 > -20.373151284025308
END: th(1684339.7559414054)=-20.373151284025308; dx=-1.0569282283107657E-6 evalInputDelta=2.2008235593787795
Fitness changed from -18.17232772464653 to -20.373151284025308
Iteration 2 complete. Error: -20.373151284025308 Total: 32.8804; Orientation: 0.0617; Line Search: 29.8061
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 2a0fd3ea to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-20.373151284025308;dx=-1.1044276681364928E-6
New Minimum: -20.373151284025308 > -23.854537095970073
END: th(3628800.0000000005)=-23.854537095970073; dx=-6.822706457485907E-7 evalInputDelta=3.481385811944765
Fitness changed from -20.373151284025308 to -23.854537095970073
Iteration 3 complete. Error: -23.854537095970073 Total: 8.4310; Orientation: 0.0550; Line Search: 5.2405
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 34a0bbd9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.108e+04, gradient 8.711e-04, dot -0.723; [f1c9eb83-b6d1-4993-b2c0-7a0c9ad4fec1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -23.854537095970073, -20.373151284025308, -18.17232772464653, -18.17232481621948
LBFGS Accumulation History: 3 points
Removed measurement 34a0bbd9 to history. Total: 3
th(0)=-23.854537095970073;dx=-7.570857006832134E-7
New Minimum: -23.854537095970073 > -28.47076999083371
END: th(7818012.603187701)=-28.47076999083371; dx=-3.60648906126776E-7 evalInputDelta=4.616232894863636
Fitness changed from -23.854537095970073 to -28.47076999083371
Iteration 4 complete. Error: -28.47076999083371 Total: 10.9953; Orientation: 1.0973; Line Search: 6.5592
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 5c81e27d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.241e+04, gradient 7.879e-04, dot -0.518; [f1c9eb83-b6d1-4993-b2c0-7a0c9ad4fec1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -28.47076999083371, -20.373151284025308, -18.17232772464653, -18.17232481621948
LBFGS Accumulation History: 3 points
Removed measurement 5c81e27d to history. Total: 3
th(0)=-28.47076999083371;dx=-6.19258544332242E-7
New Minimum: -28.47076999083371 > -33.54023246607668
END: th(1.6843397559414055E7)=-33.54023246607668; dx=-1.1829654162494216E-7 evalInputDelta=5.069462475242972
Fitness changed from -28.47076999083371 to -33.54023246607668
Iteration 5 complete. Error: -33.54023246607668 Total: 14.7766; Orientation: 1.6839; Line Search: 7.3435
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 51f5fd74 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.387e+04, gradient 8.341e-04, dot -0.312; [f1c9eb83-b6d1-4993-b2c0-7a0c9ad4fec1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -33.54023246607668, -20.373151284025308, -18.17232772464653, -18.17232481621948
LBFGS Accumulation History: 3 points
Removed measurement 51f5fd74 to history. Total: 3
th(0)=-33.54023246607668;dx=-6.942446225455496E-7
New Minimum: -33.54023246607668 > -36.79471788247462
WOLF (strong): th(3.628800000000001E7)=-36.79471788247462; dx=4.8155095953897976E-8 evalInputDelta=3.254485416397941
New Minimum: -36.79471788247462 > -37.90270428853656
WOLF (strong): th(1.8144000000000004E7)=-37.90270428853656; dx=1.9109784503886448E-8 evalInputDelta=4.362471822459881
END: th(6048000.000000001)=-36.85512229515316; dx=-3.049400654398481E-7 evalInputDelta=3.3148898290764777
Fitness changed from -33.54023246607668 to -37.90270428853656
Iteration 6 complete. Error: -37.90270428853656 Total: 14.8287; Orientation: 1.0138; Line Search: 10.4863
Adding measurement 7cc87819 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.716e+04, gradient 8.166e-04, dot -0.273; [f1c9eb83-b6d1-4993-b2c0-7a0c9ad4fec1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -37.90270428853656, -20.373151284025308, -18.17232772464653, -18.17232481621948
LBFGS Accumulation History: 3 points
Removed measurement 7cc87819 to history. Total: 3
th(0)=-37.90270428853656;dx=-6.666136704603236E-7
New Minimum: -37.90270428853656 > -42.74622507837769
END: th(1.3030021005312836E7)=-42.74622507837769; dx=-4.4151413702771476E-8 evalInputDelta=4.843520789841129
Fitness changed from -37.90270428853656 to -42.74622507837769
Iteration 7 complete. Error: -42.74622507837769 Total: 9.0880; Orientation: 1.0334; Line Search: 5.4276
Adding measurement 759c0bff to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.538e+04, gradient 6.655e-04, dot -0.382; [f1c9eb83-b6d1-4993-b2c0-7a0c9ad4fec1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -42.74622507837769, -20.373151284025308, -18.17232772464653, -18.17232481621948
LBFGS Accumulation History: 3 points
Removed measurement 759c0bff to history. Total: 3
th(0)=-42.74622507837769;dx=-4.4201067076633413E-7
New Minimum: -42.74622507837769 > -45.03730796937947
WOLF (strong): th(2.8072329265690096E7)=-45.03730796937947; dx=6.839006252494492E-8 evalInputDelta=2.2910828910017784
New Minimum: -45.03730796937947 > -45.839556836847805
END: th(1.4036164632845048E7)=-45.839556836847805; dx=-2.0696617290079698E-8 evalInputDelta=3.0933317584701143
Fitness changed from -42.74622507837769 to -45.839556836847805
Iteration 8 complete. Error: -45.839556836847805 Total: 12.5606; Orientation: 1.3181; Line Search: 8.6921
Adding measurement 6e48ac42 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.103e+04, gradient 6.589e-04, dot -0.386; [f1c9eb83-b6d1-4993-b2c0-7a0c9ad4fec1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -45.839556836847805, -20.373151284025308, -18.17232772464653, -18.17232481621948
LBFGS Accumulation History: 3 points
Removed measurement 6e48ac42 to history. Total: 3
th(0)=-45.839556836847805;dx=-4.338422901557763E-7
New Minimum: -45.839556836847805 > -46.97026114176406
WOLF (strong): th(3.024000000000001E7)=-46.97026114176406; dx=8.061153474188467E-8 evalInputDelta=1.1307043049162573
New Minimum: -46.97026114176406 > -48.404949119597646
WOLF (strong): th(1.5120000000000006E7)=-48.404949119597646; dx=3.7992047780994525E-8 evalInputDelta=2.5653922827498405
END: th(5040000.000000002)=-47.72062244284991; dx=-2.4117941396419315E-7 evalInputDelta=1.8810656060021032
Fitness changed from -45.839556836847805 to -48.404949119597646
Iteration 9 complete. Error: -48.404949119597646 Total: 14.3951; Orientation: 1.0408; Line Search: 10.8350
Adding measurement 4b6b9bd8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.313e+04, gradient 6.752e-04, dot -0.351; [f1c9eb83-b6d1-4993-b2c0-7a0c9ad4fec1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -48.404949119597646, -20.373151284025308, -18.17232772464653, -18.17232481621948
LBFGS Accumulation History: 3 points
Removed measurement 4b6b9bd8 to history. Total: 3
th(0)=-48.404949119597646;dx=-4.5468735783750737E-7
New Minimum: -48.404949119597646 > -51.269194054784364
END: th(1.0858350837760698E7)=-51.269194054784364; dx=-2.7626161714565346E-8 evalInputDelta=2.8642449351867185
Fitness changed from -48.404949119597646 to -51.269194054784364
Iteration 10 complete. Error: -51.269194054784364 Total: 9.1752; Orientation: 1.0299; Line Search: 5.3527
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -51.269194054784364 (> -Infinity) after 141.028s (< 5400.000s)
Returns
-51.269194054784364