BasicOptimizer.scala:89 executed in 111.49 seconds (1.495 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: 45612651266800
Reset training subject: 45615064888200
Adding measurement 399d4f54 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-49.61518206135491;dx=-1.6993815209789745E-6
New Minimum: -49.61518206135491 > -49.6151855865634
END: th(2.154434690031884)=-49.6151855865634; dx=-1.318608587142276E-6 evalInputDelta=3.5252084913395265E-6
Fitness changed from -49.61518206135491 to -49.6151855865634
Iteration 1 complete. Error: -49.6151855865634 Total: 11.4409; Orientation: 0.0625; Line Search: 4.5439
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/8bd3b87b-c1c1-42eb-a8e9-6d7f00583806.jpg)
Adding measurement e7296c7 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-49.6151855865634;dx=-1.3037322482053104E-6
New Minimum: -49.6151855865634 > -49.61519439958354
WOLFE (weak): th(4.641588833612779)=-49.61519439958354; dx=-1.300483369619209E-6 evalInputDelta=8.813020137665717E-6
New Minimum: -49.61519439958354 > -49.61519968739486
WOLFE (weak): th(9.283177667225559)=-49.61519968739486; dx=-1.301119563675831E-6 evalInputDelta=1.4100831464247676E-5
New Minimum: -49.61519968739486 > -49.615226126443055
WOLFE (weak): th(27.849533001676676)=-49.615226126443055; dx=-1.2993434285783304E-6 evalInputDelta=4.053987965590977E-5
New Minimum: -49.615226126443055 > -49.6153442206863
WOLFE (weak): th(111.3981320067067)=-49.6153442206863; dx=-1.298977874160951E-6 evalInputDelta=1.586341229042887E-4
New Minimum: -49.6153442206863 > -49.61597170180148
WOLFE (weak): th(556.9906600335335)=-49.61597170180148; dx=-1.2983673612482753E-6 evalInputDelta=7.861152380783665E-4
New Minimum: -49.61597170180148 > -49.619895041431526
WOLFE (weak): th(3341.9439602012008)=-49.619895041431526; dx=-1.2980849846421387E-6 evalInputDelta=0.004709454868127239
New Minimum: -49.619895041431526 > -49.64813710515628
WOLFE (weak): th(23393.607721408407)=-49.64813710515628; dx=-1.297171169260644E-6 evalInputDelta=0.03295151859288126
New Minimum: -49.64813710515628 > -49.877302775132655
WOLFE (weak): th(187148.86177126726)=-49.877302775132655; dx=-1.2799791945494819E-6 evalInputDelta=0.26211718856925614
New Minimum: -49.877302775132655 > -51.837244193781146
END: th(1684339.7559414054)=-51.837244193781146; dx=-1.135796489398305E-6 evalInputDelta=2.222058607217747
Fitness changed from -49.6151855865634 to -51.837244193781146
Iteration 2 complete. Error: -51.837244193781146 Total: 25.8854; Orientation: 0.0620; Line Search: 23.2272
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/39470e89-54cc-44ca-ac1b-d53220168166.jpg)
Adding measurement 6ba23358 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-51.837244193781146;dx=-1.1328976075068523E-6
New Minimum: -51.837244193781146 > -55.57876608123826
END: th(3628800.0000000005)=-55.57876608123826; dx=-8.355035820254196E-7 evalInputDelta=3.741521887457111
Fitness changed from -51.837244193781146 to -55.57876608123826
Iteration 3 complete. Error: -55.57876608123826 Total: 7.4379; Orientation: 0.0615; Line Search: 4.7634
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/e4e989ae-4c18-4d64-8dd5-9b175aa2d5ef.jpg)
Adding measurement 2ab6f5e2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.466e+04, gradient 8.888e-04, dot -0.884; [c12a7d3e-0406-4e36-b10c-cfca039db5b8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -55.57876608123826, -51.837244193781146, -49.6151855865634, -49.61518206135491
LBFGS Accumulation History: 3 points
Removed measurement 2ab6f5e2 to history. Total: 3
th(0)=-55.57876608123826;dx=-7.893140062796955E-7
New Minimum: -55.57876608123826 > -61.07975867627196
END: th(7818012.603187701)=-61.07975867627196; dx=-5.380489735317366E-7 evalInputDelta=5.500992595033701
Fitness changed from -55.57876608123826 to -61.07975867627196
Iteration 4 complete. Error: -61.07975867627196 Total: 8.5773; Orientation: 1.0695; Line Search: 4.6671
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/a0b7fca3-c3d6-46d9-830c-a25f176aa84b.jpg)
Adding measurement 471100c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.340e+04, gradient 7.506e-04, dot -0.763; [c12a7d3e-0406-4e36-b10c-cfca039db5b8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -61.07975867627196, -51.837244193781146, -49.6151855865634, -49.61518206135491
LBFGS Accumulation History: 3 points
Removed measurement 471100c to history. Total: 3
th(0)=-61.07975867627196;dx=-5.619639400705284E-7
New Minimum: -61.07975867627196 > -68.69392708905451
END: th(1.6843397559414055E7)=-68.69392708905451; dx=-3.1792755368859994E-7 evalInputDelta=7.614168412782554
Fitness changed from -61.07975867627196 to -68.69392708905451
Iteration 5 complete. Error: -68.69392708905451 Total: 8.3704; Orientation: 1.0270; Line Search: 4.6053
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/17c239b1-06ba-4fa5-ab95-0e3733689d35.jpg)
Adding measurement 5632a28f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.815e+04, gradient 6.877e-04, dot -0.610; [c12a7d3e-0406-4e36-b10c-cfca039db5b8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -68.69392708905451, -51.837244193781146, -49.6151855865634, -49.61518206135491
LBFGS Accumulation History: 3 points
Removed measurement 5632a28f to history. Total: 3
th(0)=-68.69392708905451;dx=-4.709300139548089E-7
New Minimum: -68.69392708905451 > -76.82989924225825
END: th(3.628800000000001E7)=-76.82989924225825; dx=-8.389313347741136E-8 evalInputDelta=8.135972153203738
Fitness changed from -68.69392708905451 to -76.82989924225825
Iteration 6 complete. Error: -76.82989924225825 Total: 8.4443; Orientation: 1.0244; Line Search: 4.7935
Adding measurement 794de31d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.884e+04, gradient 8.452e-04, dot -0.286; [c12a7d3e-0406-4e36-b10c-cfca039db5b8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -76.82989924225825, -51.837244193781146, -49.6151855865634, -49.61518206135491
LBFGS Accumulation History: 3 points
Removed measurement 794de31d to history. Total: 3
th(0)=-76.82989924225825;dx=-7.140151469899051E-7
Armijo: th(7.818012603187701E7)=-69.66226583803544; dx=1.6714004925436192E-7 evalInputDelta=-7.167633404222812
New Minimum: -76.82989924225825 > -79.05633154238187
WOLF (strong): th(3.9090063015938506E7)=-79.05633154238187; dx=2.142072774164713E-7 evalInputDelta=2.2264323001236193
New Minimum: -79.05633154238187 > -82.68882226606254
END: th(1.3030021005312836E7)=-82.68882226606254; dx=-1.5029897068050472E-7 evalInputDelta=5.858923023804294
Fitness changed from -76.82989924225825 to -82.68882226606254
Iteration 7 complete. Error: -82.68882226606254 Total: 12.4105; Orientation: 1.0323; Line Search: 9.2152
Adding measurement 344049ee to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.192e+04, gradient 5.979e-04, dot -0.521; [c12a7d3e-0406-4e36-b10c-cfca039db5b8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -82.68882226606254, -51.837244193781146, -49.6151855865634, -49.61518206135491
LBFGS Accumulation History: 3 points
Removed measurement 344049ee to history. Total: 3
th(0)=-82.68882226606254;dx=-3.5617790533514513E-7
New Minimum: -82.68882226606254 > -87.43367693122879
END: th(2.8072329265690096E7)=-87.43367693122879; dx=-3.236738360829855E-8 evalInputDelta=4.744854665166244
Fitness changed from -82.68882226606254 to -87.43367693122879
Iteration 8 complete. Error: -87.43367693122879 Total: 7.8371; Orientation: 1.0395; Line Search: 4.6792
Adding measurement 6f5907a0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.435e+04, gradient 7.417e-04, dot -0.356; [c12a7d3e-0406-4e36-b10c-cfca039db5b8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -87.43367693122879, -51.837244193781146, -49.6151855865634, -49.61518206135491
LBFGS Accumulation History: 3 points
Removed measurement 6f5907a0 to history. Total: 3
th(0)=-87.43367693122879;dx=-5.501220663938947E-7
Armijo: th(6.048000000000002E7)=-82.30425081824222; dx=1.7791178731863728E-7 evalInputDelta=-5.129426112986565
New Minimum: -87.43367693122879 > -89.4995003587536
WOLF (strong): th(3.024000000000001E7)=-89.4995003587536; dx=1.851658705371757E-7 evalInputDelta=2.065823427524805
New Minimum: -89.4995003587536 > -91.29434982695025
END: th(1.0080000000000004E7)=-91.29434982695025; dx=-1.743243045163403E-7 evalInputDelta=3.860672895721464
Fitness changed from -87.43367693122879 to -91.29434982695025
Iteration 9 complete. Error: -91.29434982695025 Total: 12.6932; Orientation: 1.2730; Line Search: 9.1549
Adding measurement 7f92d431 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.447e+04, gradient 4.859e-04, dot -0.606; [c12a7d3e-0406-4e36-b10c-cfca039db5b8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -91.29434982695025, -51.837244193781146, -49.6151855865634, -49.61518206135491
LBFGS Accumulation History: 3 points
Removed measurement 7f92d431 to history. Total: 3
th(0)=-91.29434982695025;dx=-2.3579324315572932E-7
New Minimum: -91.29434982695025 > -94.94488206938655
END: th(2.1716701675521396E7)=-94.94488206938655; dx=-1.1493778023679348E-7 evalInputDelta=3.6505322424362987
Fitness changed from -91.29434982695025 to -94.94488206938655
Iteration 10 complete. Error: -94.94488206938655 Total: 7.9675; Orientation: 1.0385; Line Search: 4.7092
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/c6165667-c107-4470-b332-e23ccc5d976f.jpg)
Final threshold in iteration 11: -94.94488206938655 (> -Infinity) after 111.486s (< 5400.000s)
Returns
-94.94488206938655