BasicOptimizer.scala:89 executed in 86.35 seconds (1.303 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: 308199646209500
Reset training subject: 308201316139500
Adding measurement 3af3caa5 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-142.0290125321658;dx=-2.796034666812528E-5
New Minimum: -142.0290125321658 > -142.02907049663781
END: th(2.154434690031884)=-142.02907049663781; dx=-2.3766534657098802E-5 evalInputDelta=5.7964472006233336E-5
Fitness changed from -142.0290125321658 to -142.02907049663781
Iteration 1 complete. Error: -142.02907049663781 Total: 8.1700; Orientation: 0.0611; Line Search: 3.3055
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/1d5be5b5-94f8-44d6-bacd-f3ca6d4ad23b.jpg)
Adding measurement 46990937 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-142.02907049663781;dx=-2.3657189431195482E-5
New Minimum: -142.02907049663781 > -142.02919367106225
WOLFE (weak): th(4.641588833612779)=-142.02919367106225; dx=-2.365298946996774E-5 evalInputDelta=1.2317442443077198E-4
New Minimum: -142.02919367106225 > -142.02931684537984
WOLFE (weak): th(9.283177667225559)=-142.02931684537984; dx=-2.364996051847003E-5 evalInputDelta=2.463487420243382E-4
New Minimum: -142.02931684537984 > -142.02981678710168
WOLFE (weak): th(27.849533001676676)=-142.02981678710168; dx=-2.3653130762090573E-5 evalInputDelta=7.462904638657619E-4
New Minimum: -142.02981678710168 > -142.03201940793477
WOLFE (weak): th(111.3981320067067)=-142.03201940793477; dx=-2.3647771281604494E-5 evalInputDelta=0.002948911296954293
New Minimum: -142.03201940793477 > -142.04383617532633
WOLFE (weak): th(556.9906600335335)=-142.04383617532633; dx=-2.3647021118760314E-5 evalInputDelta=0.014765678688519301
New Minimum: -142.04383617532633 > -142.11764155699723
WOLFE (weak): th(3341.9439602012008)=-142.11764155699723; dx=-2.3639611740535156E-5 evalInputDelta=0.08857106035941342
New Minimum: -142.11764155699723 > -142.6481871784334
WOLFE (weak): th(23393.607721408407)=-142.6481871784334; dx=-2.3530150220245938E-5 evalInputDelta=0.6191166817955889
New Minimum: -142.6481871784334 > -146.86929230292463
WOLFE (weak): th(187148.86177126726)=-146.86929230292463; dx=-2.2436737569833422E-5 evalInputDelta=4.84022180628682
New Minimum: -146.86929230292463 > -176.24494261982977
END: th(1684339.7559414054)=-176.24494261982977; dx=-1.2657119088756988E-5 evalInputDelta=34.21587212319196
Fitness changed from -142.02907049663781 to -176.24494261982977
Iteration 2 complete. Error: -176.24494261982977 Total: 18.6914; Orientation: 0.0623; Line Search: 16.8008
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/4c9328af-86ba-4211-b6fe-687cf754d35f.jpg)
Adding measurement 76f33ae to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-176.24494261982977;dx=-1.3544550498483486E-5
New Minimum: -176.24494261982977 > -211.18093594036355
END: th(3628800.0000000005)=-211.18093594036355; dx=-4.821287631640551E-6 evalInputDelta=34.93599332053378
Fitness changed from -176.24494261982977 to -211.18093594036355
Iteration 3 complete. Error: -211.18093594036355 Total: 5.0217; Orientation: 0.0623; Line Search: 3.1408
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d7976650-2af0-4beb-b411-852c4181a6d2.jpg)
Adding measurement 34feb06 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.689e+03, gradient 3.063e-03, dot -0.421; [a901521c-76ea-47fb-b9f4-518daf31c7ca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -211.18093594036355, -176.24494261982977, -142.02907049663781, -142.0290125321658
LBFGS Accumulation History: 3 points
Removed measurement 34feb06 to history. Total: 3
th(0)=-211.18093594036355;dx=-9.351731281898811E-6
New Minimum: -211.18093594036355 > -234.91511716341734
WOLF (strong): th(7818012.603187701)=-234.91511716341734; dx=6.083454646124867E-7 evalInputDelta=23.73418122305378
END: th(3909006.3015938504)=-233.17467906610642; dx=-2.1823415766984976E-6 evalInputDelta=21.993743125742867
Fitness changed from -211.18093594036355 to -234.91511716341734
Iteration 4 complete. Error: -234.91511716341734 Total: 8.1067; Orientation: 1.0615; Line Search: 4.9381
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/7446f593-ab16-417f-bce3-806da85e4346.jpg)
Adding measurement 6e2e9655 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.860e+03, gradient 3.883e-03, dot -0.159; [a901521c-76ea-47fb-b9f4-518daf31c7ca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -234.91511716341734, -176.24494261982977, -142.02907049663781, -142.0290125321658
LBFGS Accumulation History: 3 points
Removed measurement 6e2e9655 to history. Total: 3
th(0)=-234.91511716341734;dx=-1.5046001277782196E-5
Armijo: th(8421698.779707028)=-231.0738734353706; dx=6.610321494996187E-6 evalInputDelta=-3.8412437280467486
New Minimum: -234.91511716341734 > -259.4854197621901
WOLF (strong): th(4210849.389853514)=-259.4854197621901; dx=2.8818111562822266E-6 evalInputDelta=24.57030259877274
END: th(1403616.4632845046)=-253.3328576238964; dx=-8.420521107384407E-6 evalInputDelta=18.417740460479052
Fitness changed from -234.91511716341734 to -259.4854197621901
Iteration 5 complete. Error: -259.4854197621901 Total: 9.6993; Orientation: 1.0368; Line Search: 6.5202
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/4a647280-5215-4619-8f98-b5de91d8a3da.jpg)
Adding measurement 2b68be9e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.187e+04, gradient 3.265e-03, dot -0.204; [a901521c-76ea-47fb-b9f4-518daf31c7ca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -259.4854197621901, -176.24494261982977, -142.02907049663781, -142.0290125321658
LBFGS Accumulation History: 3 points
Removed measurement 2b68be9e to history. Total: 3
th(0)=-259.4854197621901;dx=-1.0636606572065662E-5
New Minimum: -259.4854197621901 > -277.10621033201295
END: th(3024000.0000000005)=-277.10621033201295; dx=-2.550218282334786E-7 evalInputDelta=17.620790569822873
Fitness changed from -259.4854197621901 to -277.10621033201295
Iteration 6 complete. Error: -277.10621033201295 Total: 6.1870; Orientation: 1.0448; Line Search: 3.2588
Adding measurement 2d859989 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.293e+04, gradient 2.351e-03, dot -0.409; [a901521c-76ea-47fb-b9f4-518daf31c7ca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -277.10621033201295, -176.24494261982977, -142.02907049663781, -142.0290125321658
LBFGS Accumulation History: 3 points
Removed measurement 2d859989 to history. Total: 3
th(0)=-277.10621033201295;dx=-5.5152777709284955E-6
New Minimum: -277.10621033201295 > -284.84120487312873
WOLF (strong): th(6515010.502656418)=-284.84120487312873; dx=1.7765449822344487E-6 evalInputDelta=7.734994541115782
New Minimum: -284.84120487312873 > -287.8539705286954
END: th(3257505.251328209)=-287.8539705286954; dx=-9.341801445931245E-7 evalInputDelta=10.747760196682464
Fitness changed from -277.10621033201295 to -287.8539705286954
Iteration 7 complete. Error: -287.8539705286954 Total: 7.4590; Orientation: 1.0346; Line Search: 4.8577
Adding measurement 40fb7795 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.517e+04, gradient 2.190e-03, dot -0.431; [a901521c-76ea-47fb-b9f4-518daf31c7ca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -287.8539705286954, -176.24494261982977, -142.02907049663781, -142.0290125321658
LBFGS Accumulation History: 3 points
Removed measurement 40fb7795 to history. Total: 3
th(0)=-287.8539705286954;dx=-4.785411292426072E-6
New Minimum: -287.8539705286954 > -292.6936557432216
WOLF (strong): th(7018082.316422524)=-292.6936557432216; dx=1.6041935845164526E-6 evalInputDelta=4.839685214526185
New Minimum: -292.6936557432216 > -296.594784666503
END: th(3509041.158211262)=-296.594784666503; dx=-3.5638216912428086E-7 evalInputDelta=8.740814137807604
Fitness changed from -287.8539705286954 to -296.594784666503
Iteration 8 complete. Error: -296.594784666503 Total: 7.6483; Orientation: 1.0343; Line Search: 5.0468
Adding measurement 22f3aa94 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.709e+04, gradient 2.247e-03, dot -0.399; [a901521c-76ea-47fb-b9f4-518daf31c7ca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -296.594784666503, -176.24494261982977, -142.02907049663781, -142.0290125321658
LBFGS Accumulation History: 3 points
Removed measurement 22f3aa94 to history. Total: 3
th(0)=-296.594784666503;dx=-5.04087325173246E-6
Armijo: th(7560000.000000003)=-295.41323628070575; dx=2.5261974708445172E-6 evalInputDelta=-1.1815483857972708
New Minimum: -296.594784666503 > -304.03413538626677
WOLF (strong): th(3780000.0000000014)=-304.03413538626677; dx=6.602812586961933E-7 evalInputDelta=7.439350719763752
END: th(1260000.0000000005)=-301.93764938849114; dx=-2.8663961780669305E-6 evalInputDelta=5.342864721988121
Fitness changed from -296.594784666503 to -304.03413538626677
Iteration 9 complete. Error: -304.03413538626677 Total: 9.2385; Orientation: 1.0308; Line Search: 6.6091
Adding measurement 5c1d1c4b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.590e+04, gradient 2.395e-03, dot -0.335; [a901521c-76ea-47fb-b9f4-518daf31c7ca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -304.03413538626677, -176.24494261982977, -142.02907049663781, -142.0290125321658
LBFGS Accumulation History: 3 points
Removed measurement 5c1d1c4b to history. Total: 3
th(0)=-304.03413538626677;dx=-5.7301421354213E-6
New Minimum: -304.03413538626677 > -312.24942690993254
END: th(2714587.7094401745)=-312.24942690993254; dx=-6.852149266859825E-8 evalInputDelta=8.215291523665769
Fitness changed from -304.03413538626677 to -312.24942690993254
Iteration 10 complete. Error: -312.24942690993254 Total: 5.8383; Orientation: 1.0322; Line Search: 3.1958
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/4d0adf01-bdc3-4071-bb20-806407fc22e5.jpg)
Final threshold in iteration 11: -312.24942690993254 (> -Infinity) after 86.352s (< 5400.000s)
Returns
-312.24942690993254