BasicOptimizer.scala:89 executed in 2227.57 seconds (11.596 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: 14272516408213
Reset training subject: 14323221304697
Adding measurement 41980ac9 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-4.3206727504730225;dx=-3.0449743655430463E-7
New Minimum: -4.3206727504730225 > -4.3206731379032135
END: th(2.154434690031884)=-4.3206731379032135; dx=-2.728741679643886E-7 evalInputDelta=3.8743019104003906E-7
Fitness changed from -4.3206727504730225 to -4.3206731379032135
Iteration 1 complete. Error: -4.3206731379032135 Total: 246.2820; Orientation: 0.0893; Line Search: 98.0423
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/593663fb-259b-42b5-80ff-9776832f690e.jpg)
Adding measurement 19feff00 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-4.3206731379032135;dx=-2.706143336166619E-7
New Minimum: -4.3206731379032135 > -4.320675104856491
WOLFE (weak): th(4.641588833612779)=-4.320675104856491; dx=-2.703087282994077E-7 evalInputDelta=1.9669532775878906E-6
New Minimum: -4.320675104856491 > -4.320676326751709
WOLFE (weak): th(9.283177667225559)=-4.320676326751709; dx=-2.702277233311502E-7 evalInputDelta=3.1888484954833984E-6
New Minimum: -4.320676326751709 > -4.320681840181351
WOLFE (weak): th(27.849533001676676)=-4.320681840181351; dx=-2.7206870466935697E-7 evalInputDelta=8.702278137207031E-6
New Minimum: -4.320681840181351 > -4.320707455277443
WOLFE (weak): th(111.3981320067067)=-4.320707455277443; dx=-2.4424272201079225E-7 evalInputDelta=3.431737422943115E-5
New Minimum: -4.320707455277443 > -4.320843085646629
WOLFE (weak): th(556.9906600335335)=-4.320843085646629; dx=-2.682287403776746E-7 evalInputDelta=1.6994774341583252E-4
New Minimum: -4.320843085646629 > -4.321691736578941
WOLFE (weak): th(3341.9439602012008)=-4.321691736578941; dx=-2.712012634827656E-7 evalInputDelta=0.0010185986757278442
New Minimum: -4.321691736578941 > -4.327790126204491
WOLFE (weak): th(23393.607721408407)=-4.327790126204491; dx=-2.6908411737947847E-7 evalInputDelta=0.007116988301277161
New Minimum: -4.327790126204491 > -4.376912549138069
WOLFE (weak): th(187148.86177126726)=-4.376912549138069; dx=-2.622880140721558E-7 evalInputDelta=0.05623941123485565
New Minimum: -4.376912549138069 > -4.7614538967609406
END: th(1684339.7559414054)=-4.7614538967609406; dx=-1.9372930724957204E-7 evalInputDelta=0.44078075885772705
Fitness changed from -4.3206731379032135 to -4.7614538967609406
Iteration 2 complete. Error: -4.7614538967609406 Total: 537.6943; Orientation: 0.0873; Line Search: 487.4542
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/57c3dc1e-436b-4c79-aaa7-4feb9c6069b6.jpg)
Adding measurement 3e4242fb to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-4.7614538967609406;dx=-1.7060950890068976E-7
New Minimum: -4.7614538967609406 > -5.308994472026825
END: th(3628800.0000000005)=-5.308994472026825; dx=-1.0357912648389281E-7 evalInputDelta=0.5475405752658844
Fitness changed from -4.7614538967609406 to -5.308994472026825
Iteration 3 complete. Error: -5.308994472026825 Total: 150.1263; Orientation: 0.0896; Line Search: 99.2516
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d95cd13f-9e65-4012-be2f-6ea372631c01.jpg)
Adding measurement 48f59795 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.475e+03, gradient 3.013e-04, dot -0.807; [fa95ef5e-2724-4835-851d-2d56c3608ceb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.308994472026825, -4.7614538967609406, -4.3206731379032135, -4.3206727504730225
LBFGS Accumulation History: 3 points
Removed measurement 48f59795 to history. Total: 3
th(0)=-5.308994472026825;dx=-8.98070389896955E-8
New Minimum: -5.308994472026825 > -5.926093801856041
END: th(7818012.603187701)=-5.926093801856041; dx=-5.2762798196710944E-8 evalInputDelta=0.617099329829216
Fitness changed from -5.308994472026825 to -5.926093801856041
Iteration 4 complete. Error: -5.926093801856041 Total: 149.5568; Orientation: 2.2981; Line Search: 97.2211
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/870751df-7dd0-42f4-81b6-bd02b55cae11.jpg)
Adding measurement 5d418a30 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.936e+03, gradient 2.226e-04, dot -0.778; [fa95ef5e-2724-4835-851d-2d56c3608ceb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.926093801856041, -4.7614538967609406, -4.3206731379032135, -4.3206727504730225
LBFGS Accumulation History: 3 points
Removed measurement 5d418a30 to history. Total: 3
th(0)=-5.926093801856041;dx=-4.9507058905469155E-8
New Minimum: -5.926093801856041 > -6.561333581805229
END: th(1.6843397559414055E7)=-6.561333581805229; dx=-2.2606446036056843E-8 evalInputDelta=0.6352397799491882
Fitness changed from -5.926093801856041 to -6.561333581805229
Iteration 5 complete. Error: -6.561333581805229 Total: 149.8621; Orientation: 2.2863; Line Search: 98.0721
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/43529c16-041e-4f21-823f-b871fd577495.jpg)
Adding measurement 191afb96 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.360e+03, gradient 1.784e-04, dot -0.606; [fa95ef5e-2724-4835-851d-2d56c3608ceb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.561333581805229, -4.7614538967609406, -4.3206731379032135, -4.3206727504730225
LBFGS Accumulation History: 3 points
Removed measurement 191afb96 to history. Total: 3
th(0)=-6.561333581805229;dx=-3.181013936910234E-8
New Minimum: -6.561333581805229 > -7.02909542620182
END: th(3.628800000000001E7)=-7.02909542620182; dx=-4.4357300469555386E-9 evalInputDelta=0.4677618443965912
Fitness changed from -6.561333581805229 to -7.02909542620182
Iteration 6 complete. Error: -7.02909542620182 Total: 149.8017; Orientation: 2.2237; Line Search: 97.6382
Adding measurement 3970f864 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.048e+03, gradient 1.965e-04, dot -0.258; [fa95ef5e-2724-4835-851d-2d56c3608ceb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.02909542620182, -4.7614538967609406, -4.3206731379032135, -4.3206727504730225
LBFGS Accumulation History: 3 points
Removed measurement 3970f864 to history. Total: 3
th(0)=-7.02909542620182;dx=-3.85937990654358E-8
Armijo: th(7.818012603187701E7)=-6.73800727725029; dx=8.078374681911843E-9 evalInputDelta=-0.29108814895153046
New Minimum: -7.02909542620182 > -7.115745276212692
WOLF (strong): th(3.9090063015938506E7)=-7.115745276212692; dx=4.352528829693115E-9 evalInputDelta=0.08664985001087189
New Minimum: -7.115745276212692 > -7.171539902687073
END: th(1.3030021005312836E7)=-7.171539902687073; dx=-9.660783771105728E-10 evalInputDelta=0.14244447648525238
Fitness changed from -7.02909542620182 to -7.171539902687073
Iteration 7 complete. Error: -7.171539902687073 Total: 248.1892; Orientation: 2.2721; Line Search: 196.2477
Adding measurement 3a466979 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.130e+03, gradient 2.490e-04, dot -0.195; [fa95ef5e-2724-4835-851d-2d56c3608ceb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.171539902687073, -4.7614538967609406, -4.3206731379032135, -4.3206727504730225
LBFGS Accumulation History: 3 points
Removed measurement 3a466979 to history. Total: 3
th(0)=-7.171539902687073;dx=-6.286514327918594E-8
Armijo: th(2.8072329265690096E7)=-7.147121027112007; dx=6.682603215938773E-9 evalInputDelta=-0.024418875575065613
New Minimum: -7.171539902687073 > -7.273726373910904
WOLF (strong): th(1.4036164632845048E7)=-7.273726373910904; dx=4.14535681765059E-9 evalInputDelta=0.10218647122383118
New Minimum: -7.273726373910904 > -7.298029214143753
END: th(4678721.544281683)=-7.298029214143753; dx=-5.63437104958048E-10 evalInputDelta=0.1264893114566803
Fitness changed from -7.171539902687073 to -7.298029214143753
Iteration 8 complete. Error: -7.298029214143753 Total: 247.4509; Orientation: 2.2819; Line Search: 196.1828
Adding measurement 554a650d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.308e+03, gradient 1.191e-04, dot -0.428; [fa95ef5e-2724-4835-851d-2d56c3608ceb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.298029214143753, -4.7614538967609406, -4.3206731379032135, -4.3206727504730225
LBFGS Accumulation History: 3 points
Removed measurement 554a650d to history. Total: 3
th(0)=-7.298029214143753;dx=-1.4174311409767089E-8
New Minimum: -7.298029214143753 > -7.377836063504219
END: th(1.0080000000000004E7)=-7.377836063504219; dx=-1.1813450646872603E-9 evalInputDelta=0.079806849360466
Fitness changed from -7.298029214143753 to -7.377836063504219
Iteration 9 complete. Error: -7.377836063504219 Total: 149.9629; Orientation: 2.4125; Line Search: 98.8454
Adding measurement 7bb5cad2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.347e+03, gradient 1.559e-04, dot -0.313; [fa95ef5e-2724-4835-851d-2d56c3608ceb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.377836063504219, -4.7614538967609406, -4.3206731379032135, -4.3206727504730225
LBFGS Accumulation History: 3 points
Removed measurement 7bb5cad2 to history. Total: 3
th(0)=-7.377836063504219;dx=-2.4289093199110777E-8
New Minimum: -7.377836063504219 > -7.4197812378406525
WOLF (strong): th(2.1716701675521396E7)=-7.4197812378406525; dx=2.416375334926814E-9 evalInputDelta=0.04194517433643341
New Minimum: -7.4197812378406525 > -7.441629692912102
END: th(1.0858350837760698E7)=-7.441629692912102; dx=-8.316137614270315E-10 evalInputDelta=0.06379362940788269
Fitness changed from -7.377836063504219 to -7.441629692912102
Iteration 10 complete. Error: -7.441629692912102 Total: 197.5671; Orientation: 2.2978; Line Search: 147.0970
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/3aebd046-9eef-48cd-8cd3-d7ae3a687479.jpg)
Final threshold in iteration 11: -7.441629692912102 (> -Infinity) after 2227.569s (< 5400.000s)
Returns
-7.441629692912102