BasicOptimizer.scala:89 executed in 94.69 seconds (0.922 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: 288666108377100
Reset training subject: 288668016157200
Adding measurement 1b837a5f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-52.812831454379754;dx=-5.368000837669984E-6
New Minimum: -52.812831454379754 > -52.812836777517035
END: th(2.154434690031884)=-52.812836777517035; dx=-3.504212383377797E-6 evalInputDelta=5.323137280299761E-6
Fitness changed from -52.812831454379754 to -52.812836777517035
Iteration 1 complete. Error: -52.812836777517035 Total: 9.4254; Orientation: 0.0584; Line Search: 3.6995
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/857a676b-594e-49ac-8cb0-775d19f17e36.jpg)
Adding measurement 56ef311c to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-52.812836777517035;dx=-3.5042572303476568E-6
New Minimum: -52.812836777517035 > -52.81285629568251
WOLFE (weak): th(4.641588833612779)=-52.81285629568251; dx=-3.504290545171873E-6 evalInputDelta=1.9518165473186855E-5
New Minimum: -52.81285629568251 > -52.81287403946303
WOLFE (weak): th(9.283177667225559)=-52.81287403946303; dx=-3.504282090001771E-6 evalInputDelta=3.726194599806831E-5
New Minimum: -52.81287403946303 > -52.812937917023575
WOLFE (weak): th(27.849533001676676)=-52.812937917023575; dx=-3.5042675516094438E-6 evalInputDelta=1.0113950654044856E-4
New Minimum: -52.812937917023575 > -52.8132289138217
WOLFE (weak): th(111.3981320067067)=-52.8132289138217; dx=-3.504225365701582E-6 evalInputDelta=3.9213630466861105E-4
New Minimum: -52.8132289138217 > -52.814793881298854
WOLFE (weak): th(556.9906600335335)=-52.814793881298854; dx=-3.504104995417265E-6 evalInputDelta=0.001957103781819569
New Minimum: -52.814793881298854 > -52.82454815482661
WOLFE (weak): th(3341.9439602012008)=-52.82454815482661; dx=-3.502798693596555E-6 evalInputDelta=0.011711377309573834
New Minimum: -52.82454815482661 > -52.894717674828236
WOLFE (weak): th(23393.607721408407)=-52.894717674828236; dx=-3.495711542384231E-6 evalInputDelta=0.0818808973112013
New Minimum: -52.894717674828236 > -53.46227125014808
WOLFE (weak): th(187148.86177126726)=-53.46227125014808; dx=-3.434999796367452E-6 evalInputDelta=0.649434472631043
New Minimum: -53.46227125014808 > -58.11583960128984
END: th(1684339.7559414054)=-58.11583960128984; dx=-2.7647076118867136E-6 evalInputDelta=5.3030028237728075
Fitness changed from -52.812836777517035 to -58.11583960128984
Iteration 2 complete. Error: -58.11583960128984 Total: 21.3134; Orientation: 0.0615; Line Search: 19.1296
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/ce37feb3-9b08-4e42-8d28-b77b8f345878.jpg)
Adding measurement 185c4b5b to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-58.11583960128984;dx=-2.492802646372407E-6
New Minimum: -58.11583960128984 > -65.46960383667937
END: th(3628800.0000000005)=-65.46960383667937; dx=-1.5455060456448624E-6 evalInputDelta=7.3537642353895265
Fitness changed from -58.11583960128984 to -65.46960383667937
Iteration 3 complete. Error: -65.46960383667937 Total: 6.0099; Orientation: 0.0614; Line Search: 3.7499
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/f4885b50-5a81-4456-a9cc-91bbbdf0b679.jpg)
Adding measurement 11925013 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.897e+03, gradient 1.221e-03, dot -0.769; [c061dbb9-71f2-41b8-9da7-76a7d7f65938 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -65.46960383667937, -58.11583960128984, -52.812836777517035, -52.812831454379754
LBFGS Accumulation History: 3 points
Removed measurement 11925013 to history. Total: 3
th(0)=-65.46960383667937;dx=-1.4909219089394168E-6
New Minimum: -65.46960383667937 > -73.82726175081916
END: th(7818012.603187701)=-73.82726175081916; dx=-6.873391814330188E-7 evalInputDelta=8.357657914139793
Fitness changed from -65.46960383667937 to -73.82726175081916
Iteration 4 complete. Error: -73.82726175081916 Total: 7.0783; Orientation: 1.0180; Line Search: 3.6899
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/d8405a3b-98b9-4bf5-a2e3-b124d1694a12.jpg)
Adding measurement 5e6bcd3d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.103e+03, gradient 1.052e-03, dot -0.530; [c061dbb9-71f2-41b8-9da7-76a7d7f65938 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -73.82726175081916, -58.11583960128984, -52.812836777517035, -52.812831454379754
LBFGS Accumulation History: 3 points
Removed measurement 5e6bcd3d to history. Total: 3
th(0)=-73.82726175081916;dx=-1.1065018390731675E-6
New Minimum: -73.82726175081916 > -80.87265277202886
END: th(1.6843397559414055E7)=-80.87265277202886; dx=-5.877203124525023E-8 evalInputDelta=7.045391021209696
Fitness changed from -73.82726175081916 to -80.87265277202886
Iteration 5 complete. Error: -80.87265277202886 Total: 7.2015; Orientation: 1.0310; Line Search: 3.9134
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/bca14702-4c93-4ec1-9151-718a524f854e.jpg)
Adding measurement 14585e3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.257e+03, gradient 1.286e-03, dot -0.220; [c061dbb9-71f2-41b8-9da7-76a7d7f65938 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -80.87265277202886, -58.11583960128984, -52.812836777517035, -52.812831454379754
LBFGS Accumulation History: 3 points
Removed measurement 14585e3 to history. Total: 3
th(0)=-80.87265277202886;dx=-1.6538097748835522E-6
Armijo: th(3.628800000000001E7)=-75.41299479196401; dx=3.708793285797324E-7 evalInputDelta=-5.459657980064847
New Minimum: -80.87265277202886 > -83.9548378860672
WOLF (strong): th(1.8144000000000004E7)=-83.9548378860672; dx=5.504661101922373E-7 evalInputDelta=3.0821851140383387
New Minimum: -83.9548378860672 > -87.27796742337348
END: th(6048000.000000001)=-87.27796742337348; dx=-4.1435481570576235E-7 evalInputDelta=6.405314651344625
Fitness changed from -80.87265277202886 to -87.27796742337348
Iteration 6 complete. Error: -87.27796742337348 Total: 10.7564; Orientation: 1.0266; Line Search: 7.5580
Adding measurement 40b34313 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.648e+04, gradient 8.709e-04, dot -0.495; [c061dbb9-71f2-41b8-9da7-76a7d7f65938 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -87.27796742337348, -58.11583960128984, -52.812836777517035, -52.812831454379754
LBFGS Accumulation History: 3 points
Removed measurement 40b34313 to history. Total: 3
th(0)=-87.27796742337348;dx=-7.584242745201579E-7
New Minimum: -87.27796742337348 > -91.78494168971106
END: th(1.3030021005312836E7)=-91.78494168971106; dx=-4.884930435179264E-8 evalInputDelta=4.506974266337579
Fitness changed from -87.27796742337348 to -91.78494168971106
Iteration 7 complete. Error: -91.78494168971106 Total: 6.6405; Orientation: 0.9493; Line Search: 3.7763
Adding measurement 5b187e3f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.804e+04, gradient 1.048e-03, dot -0.347; [c061dbb9-71f2-41b8-9da7-76a7d7f65938 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -91.78494168971106, -58.11583960128984, -52.812836777517035, -52.812831454379754
LBFGS Accumulation History: 3 points
Removed measurement 5b187e3f to history. Total: 3
th(0)=-91.78494168971106;dx=-1.0990263415473638E-6
Armijo: th(2.8072329265690096E7)=-89.06661369010128; dx=3.29529885172297E-7 evalInputDelta=-2.7183279996097838
New Minimum: -91.78494168971106 > -94.30192886992076
WOLF (strong): th(1.4036164632845048E7)=-94.30192886992076; dx=3.7172826438865573E-7 evalInputDelta=2.5169871802096964
New Minimum: -94.30192886992076 > -95.37505376434646
END: th(4678721.544281683)=-95.37505376434646; dx=-3.899893069671125E-7 evalInputDelta=3.5901120746353996
Fitness changed from -91.78494168971106 to -95.37505376434646
Iteration 8 complete. Error: -95.37505376434646 Total: 10.5828; Orientation: 1.0211; Line Search: 7.7606
Adding measurement 74803e3b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.424e+04, gradient 6.917e-04, dot -0.611; [c061dbb9-71f2-41b8-9da7-76a7d7f65938 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -95.37505376434646, -58.11583960128984, -52.812836777517035, -52.812831454379754
LBFGS Accumulation History: 3 points
Removed measurement 74803e3b to history. Total: 3
th(0)=-95.37505376434646;dx=-4.783930325294698E-7
New Minimum: -95.37505376434646 > -98.72865438915933
END: th(1.0080000000000004E7)=-98.72865438915933; dx=-2.1137788122692372E-7 evalInputDelta=3.35360062481287
Fitness changed from -95.37505376434646 to -98.72865438915933
Iteration 9 complete. Error: -98.72865438915933 Total: 6.8513; Orientation: 1.0207; Line Search: 4.0414
Adding measurement 50f81ace to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.571e+04, gradient 7.579e-04, dot -0.515; [c061dbb9-71f2-41b8-9da7-76a7d7f65938 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -98.72865438915933, -58.11583960128984, -52.812836777517035, -52.812831454379754
LBFGS Accumulation History: 3 points
Removed measurement 50f81ace to history. Total: 3
th(0)=-98.72865438915933;dx=-5.743785046328827E-7
New Minimum: -98.72865438915933 > -100.81394265969297
WOLF (strong): th(2.1716701675521396E7)=-100.81394265969297; dx=8.141921337180575E-8 evalInputDelta=2.0852882705336384
New Minimum: -100.81394265969297 > -101.31220204960668
END: th(1.0858350837760698E7)=-101.31220204960668; dx=-1.7354637708925716E-8 evalInputDelta=2.5835476604473513
Fitness changed from -98.72865438915933 to -101.31220204960668
Iteration 10 complete. Error: -101.31220204960668 Total: 8.5328; Orientation: 0.9812; Line Search: 5.7315
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f7d10370-aa00-496a-a6ca-349fb2a7218a.jpg)
Final threshold in iteration 11: -101.31220204960668 (> -Infinity) after 94.693s (< 5400.000s)
Returns
-101.31220204960668