BasicOptimizer.scala:89 executed in 12.35 seconds (0.636 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: 680525331620500
Reset training subject: 680525535920400
Adding measurement 6cbd1dce to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-20.984797469918924;dx=-0.024012638646876076
New Minimum: -20.984797469918924 > -21.082274801145527
WOLFE (weak): th(2.154434690031884)=-21.082274801145527; dx=-0.024162082979180613 evalInputDelta=0.09747733122660307
New Minimum: -21.082274801145527 > -21.180307073195227
WOLFE (weak): th(4.308869380063768)=-21.180307073195227; dx=-0.02420127803999817 evalInputDelta=0.19550960327630307
New Minimum: -21.180307073195227 > -21.57736622376088
WOLFE (weak): th(12.926608140191302)=-21.57736622376088; dx=-0.024550230558895596 evalInputDelta=0.592568753841956
New Minimum: -21.57736622376088 > -23.449502135239992
WOLFE (weak): th(51.70643256076521)=-23.449502135239992; dx=-0.02600752429069598 evalInputDelta=2.4647046653210687
New Minimum: -23.449502135239992 > -34.992041854742666
WOLFE (weak): th(258.53216280382605)=-34.992041854742666; dx=-0.02757408330702698 evalInputDelta=14.007244384823743
New Minimum: -34.992041854742666 > -109.16707021235845
END: th(1551.1929768229563)=-109.16707021235845; dx=-0.013830852028529947 evalInputDelta=88.18227274243952
Fitness changed from -20.984797469918924 to -109.16707021235845
Iteration 1 complete. Error: -109.16707021235845 Total: 1.7285; Orientation: 0.0022; Line Search: 1.1842
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/113cb086-f0cd-4621-8455-9e5be3e46459.jpg)
Adding measurement 33ee2d04 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-109.16707021235845;dx=-0.03933647911677733
New Minimum: -109.16707021235845 > -288.93050364663816
END: th(3341.943960201201)=-288.93050364663816; dx=-0.005254005737321399 evalInputDelta=179.7634334342797
Fitness changed from -109.16707021235845 to -288.93050364663816
Iteration 2 complete. Error: -288.93050364663816 Total: 0.5259; Orientation: 0.0021; Line Search: 0.3354
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/8a0c4705-dd98-4306-b610-8648e0aef0a3.jpg)
Adding measurement 32d7b22b to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-288.93050364663816;dx=-0.0719138893983176
New Minimum: -288.93050364663816 > -429.69885894077026
WOLF (strong): th(7200.000000000001)=-429.69885894077026; dx=6.723112542164264E-4 evalInputDelta=140.7683552941321
New Minimum: -429.69885894077026 > -448.4685747073032
WOLF (strong): th(3600.0000000000005)=-448.4685747073032; dx=0.0043347504434242245 evalInputDelta=159.53807106066506
END: th(1200.0000000000002)=-422.9358513711033; dx=-0.02306992548212182 evalInputDelta=134.00534772446514
Fitness changed from -288.93050364663816 to -448.4685747073032
Iteration 3 complete. Error: -448.4685747073032 Total: 0.8886; Orientation: 0.0021; Line Search: 0.7037
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/31dcdf50-8157-40de-8ef8-1f437b68b73e.jpg)
Adding measurement 2fd7aca9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.760e+03, gradient 2.997e-01, dot -0.269; [d2181110-2a4c-40a5-9346-be885187ee88 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -448.4685747073032, -288.93050364663816, -109.16707021235845, -20.984797469918924
LBFGS Accumulation History: 3 points
Removed measurement 2fd7aca9 to history. Total: 3
th(0)=-448.4685747073032;dx=-0.0897506644113999
New Minimum: -448.4685747073032 > -668.0536795422954
END: th(2585.321628038261)=-668.0536795422954; dx=-0.007418868271438298 evalInputDelta=219.5851048349922
Fitness changed from -448.4685747073032 to -668.0536795422954
Iteration 4 complete. Error: -668.0536795422954 Total: 0.5671; Orientation: 0.0363; Line Search: 0.3399
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/25a9f60d-c161-4fe5-9fb8-26e2af0e3dd1.jpg)
Adding measurement 4449a9a0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.437e+03, gradient 2.790e-01, dot -0.236; [d2181110-2a4c-40a5-9346-be885187ee88 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -668.0536795422954, -288.93050364663816, -109.16707021235845, -20.984797469918924
LBFGS Accumulation History: 3 points
Removed measurement 4449a9a0 to history. Total: 3
th(0)=-668.0536795422954;dx=-0.07727213796833315
New Minimum: -668.0536795422954 > -826.6833205647735
WOLF (strong): th(5569.906600335336)=-826.6833205647735; dx=0.00720424341419545 evalInputDelta=158.62964102247804
New Minimum: -826.6833205647735 > -853.4999633860566
WOLF (strong): th(2784.953300167668)=-853.4999633860566; dx=0.002030053894380383 evalInputDelta=185.4462838437612
END: th(928.317766722556)=-784.3185736676137; dx=-0.03904910237919972 evalInputDelta=116.26489412531828
Fitness changed from -668.0536795422954 to -853.4999633860566
Iteration 5 complete. Error: -853.4999633860566 Total: 0.8918; Orientation: 0.0388; Line Search: 0.6697
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/1752d82d-f935-4840-87f4-afad3931227f.jpg)
Adding measurement 52a04f9d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.627e+04, gradient 3.021e-01, dot -0.281; [d2181110-2a4c-40a5-9346-be885187ee88 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -853.4999633860566, -288.93050364663816, -109.16707021235845, -20.984797469918924
LBFGS Accumulation History: 3 points
Removed measurement 52a04f9d to history. Total: 3
th(0)=-853.4999633860566;dx=-0.0906584914767514
New Minimum: -853.4999633860566 > -1024.9745118782223
END: th(2000.0000000000007)=-1024.9745118782223; dx=-0.0029964855076746654 evalInputDelta=171.4745484921657
Fitness changed from -853.4999633860566 to -1024.9745118782223
Iteration 6 complete. Error: -1024.9745118782223 Total: 0.8756; Orientation: 0.0388; Line Search: 0.6459
Adding measurement 53a9ba55 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.519e+04, gradient 2.612e-01, dot -0.305; [d2181110-2a4c-40a5-9346-be885187ee88 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1024.9745118782223, -288.93050364663816, -109.16707021235845, -20.984797469918924
LBFGS Accumulation History: 3 points
Removed measurement 53a9ba55 to history. Total: 3
th(0)=-1024.9745118782223;dx=-0.06765616850169857
New Minimum: -1024.9745118782223 > -1169.8107752965861
WOLF (strong): th(4308.869380063769)=-1169.8107752965861; dx=0.007810630447806774 evalInputDelta=144.83626341836384
New Minimum: -1169.8107752965861 > -1177.5018577480037
END: th(2154.4346900318847)=-1177.5018577480037; dx=-0.0035571546841006857 evalInputDelta=152.52734586978136
Fitness changed from -1024.9745118782223 to -1177.5018577480037
Iteration 7 complete. Error: -1177.5018577480037 Total: 0.7368; Orientation: 0.0488; Line Search: 0.4994
Adding measurement 37e2dd14 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.781e+04, gradient 2.627e-01, dot -0.324; [d2181110-2a4c-40a5-9346-be885187ee88 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1177.5018577480037, -288.93050364663816, -109.16707021235845, -20.984797469918924
LBFGS Accumulation History: 3 points
Removed measurement 37e2dd14 to history. Total: 3
th(0)=-1177.5018577480037;dx=-0.06866786956783527
New Minimum: -1177.5018577480037 > -1332.9020969298533
END: th(4641.588833612781)=-1332.9020969298533; dx=-3.8075878559180106E-4 evalInputDelta=155.40023918184966
Fitness changed from -1177.5018577480037 to -1332.9020969298533
Iteration 8 complete. Error: -1332.9020969298533 Total: 0.5440; Orientation: 0.0375; Line Search: 0.3398
Adding measurement 7b5caeda to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.334e+04, gradient 2.665e-01, dot -0.306; [d2181110-2a4c-40a5-9346-be885187ee88 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1332.9020969298533, -288.93050364663816, -109.16707021235845, -20.984797469918924
LBFGS Accumulation History: 3 points
Removed measurement 7b5caeda to history. Total: 3
th(0)=-1332.9020969298533;dx=-0.07059303294103811
New Minimum: -1332.9020969298533 > -1563.7906669372344
WOLF (strong): th(10000.000000000005)=-1563.7906669372344; dx=0.009899412518022241 evalInputDelta=230.88857000738108
New Minimum: -1563.7906669372344 > -1653.2368251403063
WOLF (strong): th(5000.000000000003)=-1653.2368251403063; dx=0.0022106817485107923 evalInputDelta=320.334728210453
END: th(1666.6666666666677)=-1529.9767155090956; dx=-0.044635487610081556 evalInputDelta=197.07461857924227
Fitness changed from -1332.9020969298533 to -1653.2368251403063
Iteration 9 complete. Error: -1653.2368251403063 Total: 0.8847; Orientation: 0.0386; Line Search: 0.6757
Adding measurement 378da171 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.125e+04, gradient 2.886e-01, dot -0.278; [d2181110-2a4c-40a5-9346-be885187ee88 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1653.2368251403063, -288.93050364663816, -109.16707021235845, -20.984797469918924
LBFGS Accumulation History: 3 points
Removed measurement 378da171 to history. Total: 3
th(0)=-1653.2368251403063;dx=-0.08134449521471254
New Minimum: -1653.2368251403063 > -1899.7578793098871
WOLF (strong): th(3590.724483386475)=-1899.7578793098871; dx=0.0019607493590582314 evalInputDelta=246.5210541695808
END: th(1795.3622416932376)=-1856.8207371741623; dx=-0.027188328718527124 evalInputDelta=203.583912033856
Fitness changed from -1653.2368251403063 to -1899.7578793098871
Iteration 10 complete. Error: -1899.7578793098871 Total: 0.7101; Orientation: 0.0380; Line Search: 0.4984
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/79a69e9a-a2ea-4b1b-99bc-69f0f8be1b2e.jpg)
Adding measurement aae855d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.402e+04, gradient 2.605e-01, dot -0.287; [d2181110-2a4c-40a5-9346-be885187ee88 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1899.7578793098871, -288.93050364663816, -109.16707021235845, -20.984797469918924
LBFGS Accumulation History: 3 points
Removed measurement aae855d to history. Total: 3
th(0)=-1899.7578793098871;dx=-0.06727942474131537
New Minimum: -1899.7578793098871 > -2108.5754669918742
WOLF (strong): th(3867.9906946773185)=-2108.5754669918742; dx=0.004255654648593272 evalInputDelta=208.8175876819871
END: th(1933.9953473386593)=-2072.3548200054934; dx=-0.022871629405849032 evalInputDelta=172.59694069560624
Fitness changed from -1899.7578793098871 to -2108.5754669918742
Iteration 11 complete. Error: -2108.5754669918742 Total: 0.7303; Orientation: 0.0372; Line Search: 0.5080
Adding measurement 3a22560a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.462e+04, gradient 2.445e-01, dot -0.288; [d2181110-2a4c-40a5-9346-be885187ee88 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2108.5754669918742, -288.93050364663816, -109.16707021235845, -20.984797469918924
LBFGS Accumulation History: 3 points
Removed measurement 3a22560a to history. Total: 3
th(0)=-2108.5754669918742;dx=-0.0593636522602083
New Minimum: -2108.5754669918742 > -2299.7462903546557
WOLF (strong): th(4166.66666666667)=-2299.7462903546557; dx=0.0029714643589306908 evalInputDelta=191.17082336278145
END: th(2083.333333333335)=-2269.7839104196682; dx=-0.020087767769791647 evalInputDelta=161.208443427794
Fitness changed from -2108.5754669918742 to -2299.7462903546557
Iteration 12 complete. Error: -2299.7462903546557 Total: 0.7237; Orientation: 0.0375; Line Search: 0.5139
Adding measurement 369b6db9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.893e+04, gradient 2.273e-01, dot -0.301; [d2181110-2a4c-40a5-9346-be885187ee88 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2299.7462903546557, -288.93050364663816, -109.16707021235845, -20.984797469918924
LBFGS Accumulation History: 3 points
Removed measurement 369b6db9 to history. Total: 3
th(0)=-2299.7462903546557;dx=-0.05133788669832019
New Minimum: -2299.7462903546557 > -2478.68221036905
WOLF (strong): th(4488.405604233095)=-2478.68221036905; dx=0.004770904140668865 evalInputDelta=178.93592001439447
END: th(2244.2028021165474)=-2456.3318179757393; dx=-0.019250110225875246 evalInputDelta=156.58552762108366
Fitness changed from -2299.7462903546557 to -2478.68221036905
Iteration 13 complete. Error: -2478.68221036905 Total: 0.7103; Orientation: 0.0365; Line Search: 0.5038
Adding measurement 555467da to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.715e+04, gradient 2.260e-01, dot -0.273; [d2181110-2a4c-40a5-9346-be885187ee88 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2478.68221036905, -288.93050364663816, -109.16707021235845, -20.984797469918924
LBFGS Accumulation History: 3 points
Removed measurement 555467da to history. Total: 3
th(0)=-2478.68221036905;dx=-0.05065696487691581
New Minimum: -2478.68221036905 > -2633.6743344612673
WOLF (strong): th(4834.988368346649)=-2633.6743344612673; dx=0.007216668146616978 evalInputDelta=154.99212409221718
END: th(2417.4941841733244)=-2628.501759558095; dx=-0.012678226712459367 evalInputDelta=149.81954918904466
Fitness changed from -2478.68221036905 to -2633.6743344612673
Iteration 14 complete. Error: -2633.6743344612673 Total: 0.7099; Orientation: 0.0389; Line Search: 0.5044
Adding measurement a18b08e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.978e+04, gradient 2.183e-01, dot -0.267; [d2181110-2a4c-40a5-9346-be885187ee88 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2633.6743344612673, -288.93050364663816, -109.16707021235845, -20.984797469918924
LBFGS Accumulation History: 3 points
Removed measurement a18b08e to history. Total: 3
th(0)=-2633.6743344612673;dx=-0.047513776508267616
New Minimum: -2633.6743344612673 > -2820.19795404507
WOLF (strong): th(5208.333333333338)=-2820.19795404507; dx=0.00827945082379709 evalInputDelta=186.52361958380288
END: th(2604.166666666669)=-2800.0225891945943; dx=-0.017590051387314613 evalInputDelta=166.34825473332694
Fitness changed from -2633.6743344612673 to -2820.19795404507
Iteration 15 complete. Error: -2820.19795404507 Total: 1.1085; Orientation: 0.3844; Line Search: 0.5555
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/99e503c7-f65f-43ff-912d-35b651f0ce0d.jpg)
Final threshold in iteration 16: -2820.19795404507 (> -Infinity) after 12.353s (< 5400.000s)
Returns
-2820.19795404507