BasicOptimizer.scala:89 executed in 85.13 seconds (1.154 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: 307514682137700
Reset training subject: 307516395383400
Adding measurement 109b91ab to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-147.59983732793924;dx=-2.9684983047258484E-5
New Minimum: -147.59983732793924 > -147.59988613258253
END: th(2.154434690031884)=-147.59988613258253; dx=-1.8890621664259964E-5 evalInputDelta=4.880464328493872E-5
Fitness changed from -147.59983732793924 to -147.59988613258253
Iteration 1 complete. Error: -147.59988613258253 Total: 8.0595; Orientation: 0.0627; Line Search: 3.2126
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/121cb740-6ce8-4870-98ac-d9b914d83f7e.jpg)
Adding measurement 3e4f98b8 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-147.59988613258253;dx=-1.8725620398592154E-5
New Minimum: -147.59988613258253 > -147.59998374182067
WOLFE (weak): th(4.641588833612779)=-147.59998374182067; dx=-1.874478108807306E-5 evalInputDelta=9.760923813928457E-5
New Minimum: -147.59998374182067 > -147.60008135099423
WOLFE (weak): th(9.283177667225559)=-147.60008135099423; dx=-1.8737767542646255E-5 evalInputDelta=1.9521841170444532E-4
New Minimum: -147.60008135099423 > -147.60046481497983
WOLFE (weak): th(27.849533001676676)=-147.60046481497983; dx=-1.8705569286314078E-5 evalInputDelta=5.786823973039645E-4
New Minimum: -147.60046481497983 > -147.60219387657762
WOLFE (weak): th(111.3981320067067)=-147.60219387657762; dx=-1.8693942882788494E-5 evalInputDelta=0.002307743995089595
New Minimum: -147.60219387657762 > -147.61145237794764
WOLFE (weak): th(556.9906600335335)=-147.61145237794764; dx=-1.8693129569788626E-5 evalInputDelta=0.011566245365116856
New Minimum: -147.61145237794764 > -147.66927698463758
WOLFE (weak): th(3341.9439602012008)=-147.66927698463758; dx=-1.8694653638053186E-5 evalInputDelta=0.0693908520550508
New Minimum: -147.66927698463758 > -148.08491842038654
WOLFE (weak): th(23393.607721408407)=-148.08491842038654; dx=-1.863262016787143E-5 evalInputDelta=0.4850322878040174
New Minimum: -148.08491842038654 > -151.41964961260064
WOLFE (weak): th(187148.86177126726)=-151.41964961260064; dx=-1.801889655798318E-5 evalInputDelta=3.8197634800181106
New Minimum: -151.41964961260064 > -175.57441028167472
END: th(1684339.7559414054)=-175.57441028167472; dx=-1.079210373130726E-5 evalInputDelta=27.97452414909219
Fitness changed from -147.59988613258253 to -175.57441028167472
Iteration 2 complete. Error: -175.57441028167472 Total: 18.9717; Orientation: 0.0605; Line Search: 16.8319
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/b0572b95-44f0-4478-abf9-c5f7afe37a02.jpg)
Adding measurement 15108b82 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-175.57441028167472;dx=-1.3566437811211172E-5
New Minimum: -175.57441028167472 > -209.0926664707679
END: th(3628800.0000000005)=-209.0926664707679; dx=-4.793730946690725E-6 evalInputDelta=33.518256189093194
Fitness changed from -175.57441028167472 to -209.0926664707679
Iteration 3 complete. Error: -209.0926664707679 Total: 5.1705; Orientation: 0.0626; Line Search: 3.2682
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/96ccffe8-fac6-443a-a2b1-bbfbd2ffe2a1.jpg)
Adding measurement 90fb47e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.485e+04, gradient 3.243e-03, dot -0.420; [6cd5df8c-7d64-4bd4-97b4-1db3af62d2de = 1.000/1.000e+00]
Orientation rejected. Popping history element from -209.0926664707679, -175.57441028167472, -147.59988613258253, -147.59983732793924
LBFGS Accumulation History: 3 points
Removed measurement 90fb47e to history. Total: 3
th(0)=-209.0926664707679;dx=-1.0500697916173256E-5
New Minimum: -209.0926664707679 > -236.17118588108008
WOLF (strong): th(7818012.603187701)=-236.17118588108008; dx=5.669622980504579E-8 evalInputDelta=27.07851941031217
END: th(3909006.3015938504)=-232.70765925011312; dx=-2.400805541652023E-6 evalInputDelta=23.614992779345215
Fitness changed from -209.0926664707679 to -236.17118588108008
Iteration 4 complete. Error: -236.17118588108008 Total: 7.9353; Orientation: 1.1672; Line Search: 4.8607
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/2bea19f5-ac7e-4d78-a851-41b22fe4ebed.jpg)
Adding measurement b410e87 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.037e+03, gradient 3.730e-03, dot -0.148; [6cd5df8c-7d64-4bd4-97b4-1db3af62d2de = 1.000/1.000e+00]
Orientation rejected. Popping history element from -236.17118588108008, -175.57441028167472, -147.59988613258253, -147.59983732793924
LBFGS Accumulation History: 3 points
Removed measurement b410e87 to history. Total: 3
th(0)=-236.17118588108008;dx=-1.3883508138454227E-5
New Minimum: -236.17118588108008 > -248.66678509497208
WOLF (strong): th(8421698.779707028)=-248.66678509497208; dx=4.385509544681491E-6 evalInputDelta=12.495599213892007
New Minimum: -248.66678509497208 > -264.6644674377928
WOLF (strong): th(4210849.389853514)=-264.6644674377928; dx=4.581251671542676E-7 evalInputDelta=28.493281556712702
END: th(1403616.4632845046)=-253.6645842874651; dx=-8.682622577324562E-6 evalInputDelta=17.493398406385012
Fitness changed from -236.17118588108008 to -264.6644674377928
Iteration 5 complete. Error: -264.6644674377928 Total: 9.3774; Orientation: 1.0622; Line Search: 6.4482
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/49ab3eeb-fe7b-4686-80f7-1c6c3b875567.jpg)
Adding measurement 1aee4915 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.977e+04, gradient 2.924e-03, dot -0.278; [6cd5df8c-7d64-4bd4-97b4-1db3af62d2de = 1.000/1.000e+00]
Orientation rejected. Popping history element from -264.6644674377928, -175.57441028167472, -147.59988613258253, -147.59983732793924
LBFGS Accumulation History: 3 points
Removed measurement 1aee4915 to history. Total: 3
th(0)=-264.6644674377928;dx=-8.545017401369471E-6
New Minimum: -264.6644674377928 > -281.0178211175223
END: th(3024000.0000000005)=-281.0178211175223; dx=-1.6572399003290358E-6 evalInputDelta=16.353353679729537
Fitness changed from -264.6644674377928 to -281.0178211175223
Iteration 6 complete. Error: -281.0178211175223 Total: 6.1882; Orientation: 1.0577; Line Search: 3.2782
Adding measurement 1f33e143 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.908e+04, gradient 2.219e-03, dot -0.436; [6cd5df8c-7d64-4bd4-97b4-1db3af62d2de = 1.000/1.000e+00]
Orientation rejected. Popping history element from -281.0178211175223, -175.57441028167472, -147.59988613258253, -147.59983732793924
LBFGS Accumulation History: 3 points
Removed measurement 1f33e143 to history. Total: 3
th(0)=-281.0178211175223;dx=-4.911151424869628E-6
New Minimum: -281.0178211175223 > -294.1943159470718
WOLF (strong): th(6515010.502656418)=-294.1943159470718; dx=8.6383282645095E-8 evalInputDelta=13.176494829549483
END: th(3257505.251328209)=-292.2042419996277; dx=-1.7413320886590944E-6 evalInputDelta=11.18642088210538
Fitness changed from -281.0178211175223 to -294.1943159470718
Iteration 7 complete. Error: -294.1943159470718 Total: 7.4850; Orientation: 1.0271; Line Search: 4.8429
Adding measurement 1de479ad to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.282e+04, gradient 2.871e-03, dot -0.238; [6cd5df8c-7d64-4bd4-97b4-1db3af62d2de = 1.000/1.000e+00]
Orientation rejected. Popping history element from -294.1943159470718, -175.57441028167472, -147.59988613258253, -147.59983732793924
LBFGS Accumulation History: 3 points
Removed measurement 1de479ad to history. Total: 3
th(0)=-294.1943159470718;dx=-8.216380037936454E-6
New Minimum: -294.1943159470718 > -296.04156752014933
WOLF (strong): th(7018082.316422524)=-296.04156752014933; dx=3.819942850769667E-6 evalInputDelta=1.8472515730775285
New Minimum: -296.04156752014933 > -307.6734761517973
WOLF (strong): th(3509041.158211262)=-307.6734761517973; dx=7.544708081036868E-7 evalInputDelta=13.479160204725474
END: th(1169680.3860704207)=-302.7985192170125; dx=-5.185606285213425E-6 evalInputDelta=8.604203269940683
Fitness changed from -294.1943159470718 to -307.6734761517973
Iteration 8 complete. Error: -307.6734761517973 Total: 9.3267; Orientation: 1.0650; Line Search: 6.6739
Adding measurement 17e44b42 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.909e+04, gradient 2.189e-03, dot -0.344; [6cd5df8c-7d64-4bd4-97b4-1db3af62d2de = 1.000/1.000e+00]
Orientation rejected. Popping history element from -307.6734761517973, -175.57441028167472, -147.59988613258253, -147.59983732793924
LBFGS Accumulation History: 3 points
Removed measurement 17e44b42 to history. Total: 3
th(0)=-307.6734761517973;dx=-4.7569912671802665E-6
New Minimum: -307.6734761517973 > -315.7981723126615
END: th(2520000.000000001)=-315.7981723126615; dx=-1.3427096758282114E-6 evalInputDelta=8.124696160864232
Fitness changed from -307.6734761517973 to -315.7981723126615
Iteration 9 complete. Error: -315.7981723126615 Total: 6.3786; Orientation: 1.1700; Line Search: 3.3945
Adding measurement 4304f2be to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.264e+04, gradient 1.641e-03, dot -0.476; [6cd5df8c-7d64-4bd4-97b4-1db3af62d2de = 1.000/1.000e+00]
Orientation rejected. Popping history element from -315.7981723126615, -175.57441028167472, -147.59988613258253, -147.59983732793924
LBFGS Accumulation History: 3 points
Removed measurement 4304f2be to history. Total: 3
th(0)=-315.7981723126615;dx=-2.680667011679718E-6
New Minimum: -315.7981723126615 > -324.3468845195689
END: th(5429175.418880349)=-324.3468845195689; dx=-7.061604879392103E-7 evalInputDelta=8.548712206907396
Fitness changed from -315.7981723126615 to -324.3468845195689
Iteration 10 complete. Error: -324.3468845195689 Total: 5.9579; Orientation: 1.0758; Line Search: 3.2445
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/10e5e03e-c654-4a1e-acb9-c97e3bcc711b.jpg)
Final threshold in iteration 11: -324.3468845195689 (> -Infinity) after 85.131s (< 5400.000s)
Returns
-324.3468845195689