BasicOptimizer.scala:89 executed in 139.61 seconds (1.712 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: 71937660596400
Reset training subject: 71940329263600
Adding measurement 39f53acf to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-16.65128523768586;dx=-5.977050818321768E-7
New Minimum: -16.65128523768586 > -16.651286787939576
END: th(2.154434690031884)=-16.651286787939576; dx=-5.078378810960206E-7 evalInputDelta=1.5502537138445405E-6
Fitness changed from -16.65128523768586 to -16.651286787939576
Iteration 1 complete. Error: -16.651286787939576 Total: 13.2186; Orientation: 0.0597; Line Search: 5.2661
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 2fb53a8d to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-16.651286787939576;dx=-5.064849672263318E-7
New Minimum: -16.651286787939576 > -16.651289888446577
WOLFE (weak): th(4.641588833612779)=-16.651289888446577; dx=-5.060807438582189E-7 evalInputDelta=3.1005070013634395E-6
New Minimum: -16.651289888446577 > -16.651292213826444
WOLFE (weak): th(9.283177667225559)=-16.651292213826444; dx=-5.062540540585613E-7 evalInputDelta=5.425886868692942E-6
New Minimum: -16.651292213826444 > -16.65130306559488
WOLFE (weak): th(27.849533001676676)=-16.65130306559488; dx=-5.057877301092007E-7 evalInputDelta=1.6277655305430017E-5
New Minimum: -16.65130306559488 > -16.651350348217655
WOLFE (weak): th(111.3981320067067)=-16.651350348217655; dx=-5.059970529286664E-7 evalInputDelta=6.35602780789668E-5
New Minimum: -16.651350348217655 > -16.65160458690383
WOLFE (weak): th(556.9906600335335)=-16.65160458690383; dx=-5.059360961605548E-7 evalInputDelta=3.177989642537682E-4
New Minimum: -16.65160458690383 > -16.653191940678777
WOLFE (weak): th(3341.9439602012008)=-16.653191940678777; dx=-5.056576463486275E-7 evalInputDelta=0.0019051527392015544
New Minimum: -16.653191940678777 > -16.66458885196599
WOLFE (weak): th(23393.607721408407)=-16.66458885196599; dx=-5.03029533303656E-7 evalInputDelta=0.01330206402641565
New Minimum: -16.66458885196599 > -16.755274004986553
WOLFE (weak): th(187148.86177126726)=-16.755274004986553; dx=-4.785448015840757E-7 evalInputDelta=0.10398721704697778
New Minimum: -16.755274004986553 > -17.308557533659073
END: th(1684339.7559414054)=-17.308557533659073; dx=-1.9809454575210545E-7 evalInputDelta=0.6572707457194973
Fitness changed from -16.651286787939576 to -17.308557533659073
Iteration 2 complete. Error: -17.308557533659073 Total: 29.7709; Orientation: 0.0603; Line Search: 26.6031
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement fee72d0 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-17.308557533659073;dx=-4.89345793313713E-7
New Minimum: -17.308557533659073 > -17.94382785844727
END: th(3628800.0000000005)=-17.94382785844727; dx=-5.65744193717734E-8 evalInputDelta=0.6352703247881983
Fitness changed from -17.308557533659073 to -17.94382785844727
Iteration 3 complete. Error: -17.94382785844727 Total: 8.8276; Orientation: 0.0608; Line Search: 5.7038
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 1358a465 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.309e+03, gradient 7.541e-04, dot -0.521; [829f51c4-3391-4936-a6a9-63c65f9127cd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -17.94382785844727, -17.308557533659073, -16.651286787939576, -16.65128523768586
LBFGS Accumulation History: 3 points
Removed measurement 1358a465 to history. Total: 3
th(0)=-17.94382785844727;dx=-5.681654848409405E-7
New Minimum: -17.94382785844727 > -18.606223875290326
WOLF (strong): th(7818012.603187701)=-18.606223875290326; dx=1.4876622947448495E-8 evalInputDelta=0.6623960168430543
New Minimum: -18.606223875290326 > -18.85568017618135
WOLF (strong): th(3909006.3015938504)=-18.85568017618135; dx=6.935969847800922E-8 evalInputDelta=0.9118523177340805
END: th(1303002.1005312835)=-18.657727380847316; dx=-3.500940871470738E-7 evalInputDelta=0.7138995224000446
Fitness changed from -17.94382785844727 to -18.85568017618135
Iteration 4 complete. Error: -18.85568017618135 Total: 15.5436; Orientation: 1.2343; Line Search: 10.8129
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 4e4a1132 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.191e+03, gradient 8.041e-04, dot -0.290; [829f51c4-3391-4936-a6a9-63c65f9127cd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -18.85568017618135, -17.308557533659073, -16.651286787939576, -16.65128523768586
LBFGS Accumulation History: 3 points
Removed measurement 4e4a1132 to history. Total: 3
th(0)=-18.85568017618135;dx=-6.464801259129443E-7
New Minimum: -18.85568017618135 > -19.85278409482688
WOLF (strong): th(2807232.926569009)=-19.85278409482688; dx=9.265371646395146E-8 evalInputDelta=0.9971039186455286
END: th(1403616.4632845046)=-19.704354922167273; dx=-3.3696974910447285E-7 evalInputDelta=0.848674745985921
Fitness changed from -18.85568017618135 to -19.85278409482688
Iteration 5 complete. Error: -19.85278409482688 Total: 11.8086; Orientation: 1.0424; Line Search: 7.7478
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 6f5fbf6f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.617e+03, gradient 7.357e-04, dot -0.460; [829f51c4-3391-4936-a6a9-63c65f9127cd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -19.85278409482688, -17.308557533659073, -16.651286787939576, -16.65128523768586
LBFGS Accumulation History: 3 points
Removed measurement 6f5fbf6f to history. Total: 3
th(0)=-19.85278409482688;dx=-5.407038943953981E-7
New Minimum: -19.85278409482688 > -20.335787550318265
WOLF (strong): th(3024000.0000000005)=-20.335787550318265; dx=1.6236719884781496E-7 evalInputDelta=0.4830034554913851
New Minimum: -20.335787550318265 > -20.47884547030471
END: th(1512000.0000000002)=-20.47884547030471; dx=-1.0157429223356423E-7 evalInputDelta=0.6260613754778284
Fitness changed from -19.85278409482688 to -20.47884547030471
Iteration 6 complete. Error: -20.47884547030471 Total: 12.0048; Orientation: 1.0512; Line Search: 7.8512
Adding measurement 28ad7268 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.595e+04, gradient 5.694e-04, dot -0.683; [829f51c4-3391-4936-a6a9-63c65f9127cd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -20.47884547030471, -17.308557533659073, -16.651286787939576, -16.65128523768586
LBFGS Accumulation History: 3 points
Removed measurement 28ad7268 to history. Total: 3
th(0)=-20.47884547030471;dx=-3.241366888834613E-7
New Minimum: -20.47884547030471 > -20.832560106567623
WOLF (strong): th(3257505.251328209)=-20.832560106567623; dx=1.4550100559954443E-10 evalInputDelta=0.35371463626291444
END: th(1628752.6256641045)=-20.802212159393562; dx=-6.004296501248195E-8 evalInputDelta=0.3233666890888536
Fitness changed from -20.47884547030471 to -20.832560106567623
Iteration 7 complete. Error: -20.832560106567623 Total: 11.4187; Orientation: 0.9650; Line Search: 7.7601
Adding measurement 15600516 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.199e+04, gradient 7.452e-04, dot -0.437; [829f51c4-3391-4936-a6a9-63c65f9127cd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -20.832560106567623, -17.308557533659073, -16.651286787939576, -16.65128523768586
LBFGS Accumulation History: 3 points
Removed measurement 15600516 to history. Total: 3
th(0)=-20.832560106567623;dx=-5.553205704221126E-7
New Minimum: -20.832560106567623 > -21.212294747152153
WOLF (strong): th(3509041.158211262)=-21.212294747152153; dx=1.9231662623196369E-7 evalInputDelta=0.3797346405845303
New Minimum: -21.212294747152153 > -21.511511438867235
END: th(1754520.579105631)=-21.511511438867235; dx=-6.261069485570715E-9 evalInputDelta=0.6789513322996115
Fitness changed from -20.832560106567623 to -21.511511438867235
Iteration 8 complete. Error: -21.511511438867235 Total: 11.2769; Orientation: 0.9565; Line Search: 7.7546
Adding measurement 7f002ae to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.957e+04, gradient 6.202e-04, dot -0.589; [829f51c4-3391-4936-a6a9-63c65f9127cd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -21.511511438867235, -17.308557533659073, -16.651286787939576, -16.65128523768586
LBFGS Accumulation History: 3 points
Removed measurement 7f002ae to history. Total: 3
th(0)=-21.511511438867235;dx=-3.8416611002480997E-7
New Minimum: -21.511511438867235 > -21.623557219111962
WOLF (strong): th(3780000.0000000014)=-21.623557219111962; dx=8.687085382317005E-8 evalInputDelta=0.11204578024472767
New Minimum: -21.623557219111962 > -21.811869813312246
WOLF (strong): th(1890000.0000000007)=-21.811869813312246; dx=4.505902234065461E-8 evalInputDelta=0.3003583744450111
END: th(630000.0000000002)=-21.732651149532668; dx=-2.2152341460648193E-7 evalInputDelta=0.22113971066543314
Fitness changed from -21.511511438867235 to -21.811869813312246
Iteration 9 complete. Error: -21.811869813312246 Total: 13.8559; Orientation: 1.0413; Line Search: 10.4278
Adding measurement 536ccfd0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.905e+04, gradient 6.915e-04, dot -0.505; [829f51c4-3391-4936-a6a9-63c65f9127cd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -21.811869813312246, -17.308557533659073, -16.651286787939576, -16.65128523768586
LBFGS Accumulation History: 3 points
Removed measurement 536ccfd0 to history. Total: 3
th(0)=-21.811869813312246;dx=-4.782087156624654E-7
New Minimum: -21.811869813312246 > -22.207569478429
WOLF (strong): th(1357293.8547200873)=-22.207569478429; dx=2.7129147052381416E-8 evalInputDelta=0.39569966511675503
END: th(678646.9273600436)=-22.117532368676915; dx=-2.8933604790591553E-7 evalInputDelta=0.3056625553646697
Fitness changed from -21.811869813312246 to -22.207569478429
Iteration 10 complete. Error: -22.207569478429 Total: 11.3448; Orientation: 0.9533; Line Search: 7.7607
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -22.207569478429 (> -Infinity) after 139.606s (< 5400.000s)
Returns
-22.207569478429