BasicOptimizer.scala:89 executed in 160.38 seconds (1.346 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: 2629075164948
Reset training subject: 2629979678970
Adding measurement 7e4a8ec4 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.23832305166323856;dx=-7.76244287960155E-4
New Minimum: -0.23832305166323856 > -0.23988580614590876
WOLFE (weak): th(2.154434690031884)=-0.23988580614590876; dx=-7.728298049390199E-4 evalInputDelta=0.0015627544826702089
New Minimum: -0.23988580614590876 > -0.24146214427579168
WOLFE (weak): th(4.308869380063768)=-0.24146214427579168; dx=-7.788168015204857E-4 evalInputDelta=0.0031390926125531293
New Minimum: -0.24146214427579168 > -0.24787386920851853
WOLFE (weak): th(12.926608140191302)=-0.24787386920851853; dx=-7.974028726106925E-4 evalInputDelta=0.009550817545279977
New Minimum: -0.24787386920851853 > -0.2767600646967164
WOLFE (weak): th(51.70643256076521)=-0.2767600646967164; dx=-7.955408117548222E-4 evalInputDelta=0.038437013033477824
New Minimum: -0.2767600646967164 > -0.418520322840609
WOLFE (weak): th(258.53216280382605)=-0.418520322840609; dx=-7.046297516478371E-4 evalInputDelta=0.18019727117737047
New Minimum: -0.418520322840609 > -0.9608172209602672
END: th(1551.1929768229563)=-0.9608172209602672; dx=-2.7586727968763894E-4 evalInputDelta=0.7224941692970287
Fitness changed from -0.23832305166323856 to -0.9608172209602672
Iteration 1 complete. Error: -0.9608172209602672 Total: 8.9198; Orientation: 0.0207; Line Search: 6.2960
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 246ecbcf to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.9608172209602672;dx=-5.515321446933259E-4
New Minimum: -0.9608172209602672 > -2.2271213833942842
END: th(3341.943960201201)=-2.2271213833942842; dx=-3.978494330736331E-4 evalInputDelta=1.266304162434017
Fitness changed from -0.9608172209602672 to -2.2271213833942842
Iteration 2 complete. Error: -2.2271213833942842 Total: 2.6934; Orientation: 0.0194; Line Search: 1.8011
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 52679855 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-2.2271213833942842;dx=-0.0014296372699627298
New Minimum: -2.2271213833942842 > -4.058595864788309
END: th(7200.000000000001)=-4.058595864788309; dx=-6.0124152331958404E-5 evalInputDelta=1.8314744813940247
Fitness changed from -2.2271213833942842 to -4.058595864788309
Iteration 3 complete. Error: -4.058595864788309 Total: 2.7027; Orientation: 0.0201; Line Search: 1.8041
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 492808f4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.575e+03, gradient 4.354e-02, dot -0.113; [3dec15f5-e895-4596-b4ae-ebba699797e9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -4.058595864788309, -2.2271213833942842, -0.9608172209602672, -0.23832305166323856
LBFGS Accumulation History: 3 points
Removed measurement 492808f4 to history. Total: 3
th(0)=-4.058595864788309;dx=-0.0018958028719957875
New Minimum: -4.058595864788309 > -5.482758460399565
WOLF (strong): th(15511.929768229566)=-5.482758460399565; dx=3.551022907746919E-5 evalInputDelta=1.4241625956112562
New Minimum: -5.482758460399565 > -6.645433690921134
WOLF (strong): th(7755.964884114783)=-6.645433690921134; dx=6.97141575594317E-5 evalInputDelta=2.5868378261328253
END: th(2585.3216280382608)=-6.6108183310651984; dx=-5.251861149040192E-4 evalInputDelta=2.5522224662768895
Fitness changed from -4.058595864788309 to -6.645433690921134
Iteration 4 complete. Error: -6.645433690921134 Total: 4.9196; Orientation: 0.4672; Line Search: 3.5785
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 45e73985 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.664e+03, gradient 4.738e-02, dot -0.106; [3dec15f5-e895-4596-b4ae-ebba699797e9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.645433690921134, -2.2271213833942842, -0.9608172209602672, -0.23832305166323856
LBFGS Accumulation History: 3 points
Removed measurement 45e73985 to history. Total: 3
th(0)=-6.645433690921134;dx=-0.0022447058709488665
New Minimum: -6.645433690921134 > -9.627925279645126
END: th(5569.9066003353355)=-9.627925279645126; dx=-1.9891362096897876E-5 evalInputDelta=2.982491588723992
Fitness changed from -6.645433690921134 to -9.627925279645126
Iteration 5 complete. Error: -9.627925279645126 Total: 3.1420; Orientation: 0.4739; Line Search: 1.7823
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 26db6873 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.035e+03, gradient 3.912e-02, dot -0.089; [3dec15f5-e895-4596-b4ae-ebba699797e9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -9.627925279645126, -2.2271213833942842, -0.9608172209602672, -0.23832305166323856
LBFGS Accumulation History: 3 points
Removed measurement 26db6873 to history. Total: 3
th(0)=-9.627925279645126;dx=-0.0015302789598522393
New Minimum: -9.627925279645126 > -10.532447814739688
WOLF (strong): th(12000.000000000002)=-10.532447814739688; dx=2.2797517539604404E-4 evalInputDelta=0.9045225350945625
New Minimum: -10.532447814739688 > -12.291251344722417
END: th(6000.000000000001)=-12.291251344722417; dx=-9.26970678050457E-5 evalInputDelta=2.6633260650772907
Fitness changed from -9.627925279645126 to -12.291251344722417
Iteration 6 complete. Error: -12.291251344722417 Total: 4.1453; Orientation: 0.4735; Line Search: 2.7043
Adding measurement 2da74f4c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.056e+03, gradient 4.617e-02, dot -0.081; [3dec15f5-e895-4596-b4ae-ebba699797e9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -12.291251344722417, -2.2271213833942842, -0.9608172209602672, -0.23832305166323856
LBFGS Accumulation History: 3 points
Removed measurement 2da74f4c to history. Total: 3
th(0)=-12.291251344722417;dx=-0.0021281496688994664
Armijo: th(12926.608140191305)=-11.08672340193511; dx=3.0199852008431794E-4 evalInputDelta=-1.2045279427873066
New Minimum: -12.291251344722417 > -14.486886770651038
WOLF (strong): th(6463.304070095653)=-14.486886770651038; dx=1.7290977248111543E-4 evalInputDelta=2.1956354259286215
New Minimum: -14.486886770651038 > -14.744375417267172
END: th(2154.434690031884)=-14.744375417267172; dx=-7.459267206300626E-4 evalInputDelta=2.453124072544755
Fitness changed from -12.291251344722417 to -14.744375417267172
Iteration 7 complete. Error: -14.744375417267172 Total: 4.9107; Orientation: 0.4689; Line Search: 3.5966
Adding measurement 427934a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.245e+03, gradient 3.922e-02, dot -0.100; [3dec15f5-e895-4596-b4ae-ebba699797e9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -14.744375417267172, -2.2271213833942842, -0.9608172209602672, -0.23832305166323856
LBFGS Accumulation History: 3 points
Removed measurement 427934a to history. Total: 3
th(0)=-14.744375417267172;dx=-0.0015378580692915903
New Minimum: -14.744375417267172 > -16.214927031676034
END: th(4641.58883361278)=-16.214927031676034; dx=-3.0193023515447E-4 evalInputDelta=1.470551614408862
Fitness changed from -14.744375417267172 to -16.214927031676034
Iteration 8 complete. Error: -16.214927031676034 Total: 3.1132; Orientation: 0.4693; Line Search: 1.8014
Adding measurement b5f0357 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.193e+03, gradient 4.948e-02, dot -0.080; [3dec15f5-e895-4596-b4ae-ebba699797e9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.214927031676034, -2.2271213833942842, -0.9608172209602672, -0.23832305166323856
LBFGS Accumulation History: 3 points
Removed measurement b5f0357 to history. Total: 3
th(0)=-16.214927031676034;dx=-0.0024480417966365594
Armijo: th(10000.000000000004)=-15.751703563777882; dx=2.1593971698324974E-4 evalInputDelta=-0.4632234678981515
New Minimum:
...skipping 12375 bytes...
: th(6.195088711420015E-9)=-33.3967168781931; dx=-3.0055622267539754 evalInputDelta=1.8275795881095291E-6
Armijo: th(6.2201632744721735E-9)=-33.39671505061351; dx=-3.0055408663449272 evalInputDelta=0.0
WOLFE (weak): th(6.207625992946095E-9)=-33.3967168781931; dx=-3.0055315430924896 evalInputDelta=1.8275795881095291E-6
WOLFE (weak): th(6.213894633709134E-9)=-33.3967168781931; dx=-3.0055363054355704 evalInputDelta=1.8275795881095291E-6
Armijo: th(6.2170289540906535E-9)=-33.39671505061351; dx=-3.005544620394153 evalInputDelta=0.0
WOLFE (weak): th(6.215461793899893E-9)=-33.3967168781931; dx=-3.0055437928754056 evalInputDelta=1.8275795881095291E-6
WOLFE (weak): th(6.2162453739952734E-9)=-33.3967168781931; dx=-3.005546837071873 evalInputDelta=1.8275795881095291E-6
Armijo: th(6.216637164042964E-9)=-33.39671505061351; dx=-3.0055293247960626 evalInputDelta=0.0
WOLFE (weak): th(6.216441269019119E-9)=-33.3967168781931; dx=-3.005520686634404 evalInputDelta=1.8275795881095291E-6
Armijo: th(6.2165392165310415E-9)=-33.39671505061351; dx=-3.0055259360554643 evalInputDelta=0.0
Armijo: th(6.21649024277508E-9)=-33.39671505061351; dx=-3.005555747254492 evalInputDelta=0.0
mu ~= nu (6.216441269019119E-9): th(6.044641333107063E-9)=-33.39672053335196
Fitness changed from -33.39671505061351 to -33.39672053335196
Iteration 20 complete. Error: -33.39672053335196 Total: 33.6845; Orientation: 0.4603; Line Search: 32.3618
<a id="p-17"></a>Iteration 20
<a id="p-16"></a>
Adding measurement 5cffdd8a to history. Total: 4
Rejected: LBFGS Orientation magnitude: 3.990e+07, gradient 4.950e-02, dot -0.114; [3dec15f5-e895-4596-b4ae-ebba699797e9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -33.39672053335196, -33.39671505061351, -2.2271213833942842, -0.9608172209602672, -0.23832305166323856
Rejected: LBFGS Orientation magnitude: 1.470e+07, gradient 4.950e-02, dot -0.148; [3dec15f5-e895-4596-b4ae-ebba699797e9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -33.39672053335196, -33.39671505061351, -2.2271213833942842, -0.9608172209602672
LBFGS Accumulation History: 3 points
Removed measurement 5cffdd8a to history. Total: 4
Removed measurement 120cf939 to history. Total: 3
th(0)=-33.39672053335196;dx=-0.002450515753452319
WOLFE (weak): th(1.3392969473899988E-8)=-33.39672053335196; dx=-0.002450512779860737 evalInputDelta=0.0
WOLFE (weak): th(2.6785938947799976E-8)=-33.39672053335196; dx=-0.00245051199313325 evalInputDelta=0.0
WOLFE (weak): th(8.035781684339992E-8)=-33.39672053335196; dx=-0.002450514311249633 evalInputDelta=0.0
WOLFE (weak): th(3.214312673735997E-7)=-33.39672053335196; dx=-0.0024505139861317297 evalInputDelta=0.0
WOLFE (weak): th(1.6071563368679983E-6)=-33.39672053335196; dx=-0.0024505116222273177 evalInputDelta=0.0
Armijo: th(9.64293802120799E-6)=-33.39671870577258; dx=-0.002450513220460717 evalInputDelta=-1.8275793820521358E-6
Armijo: th(5.625047179037994E-6)=-33.39671870577258; dx=-0.0024505113062236643 evalInputDelta=-1.8275793820521358E-6
Armijo: th(3.6161017579529962E-6)=-33.39671870577258; dx=-0.002450512150364084 evalInputDelta=-1.8275793820521358E-6
Armijo: th(2.6116290474104973E-6)=-33.39671870577258; dx=-0.0024505137898874325 evalInputDelta=-1.8275793820521358E-6
Armijo: th(2.109392692139248E-6)=-33.39671870577258; dx=-0.002450515244196616 evalInputDelta=-1.8275793820521358E-6
Armijo: th(1.858274514503623E-6)=-33.39671870577258; dx=-0.002450515315744716 evalInputDelta=-1.8275793820521358E-6
Armijo: th(1.7327154256858107E-6)=-33.39671870577258; dx=-0.0024505128198938258 evalInputDelta=-1.8275793820521358E-6
WOLFE (weak): th(1.6699358812769045E-6)=-33.39672053335196; dx=-0.0024505140805693775 evalInputDelta=0.0
Armijo: th(1.7013256534813577E-6)=-33.39671870577258; dx=-0.002450514708371159 evalInputDelta=-1.8275793820521358E-6
WOLFE (weak): th(1.685630767379131E-6)=-33.39672053335196; dx=-0.002450512836397896 evalInputDelta=0.0
Armijo: th(1.6934782104302444E-6)=-33.39671870577258; dx=-0.0024505132513220384 evalInputDelta=-1.8275793820521358E-6
WOLFE (weak): th(1.6895544889046877E-6)=-33.39672053335196; dx=-0.002450514154987855 evalInputDelta=0.0
WOLFE (weak): th(1.691516349667466E-6)=-33.39672053335196; dx=-0.002450514396896068 evalInputDelta=0.0
WOLFE (weak): th(1.6924972800488551E-6)=-33.39672053335196; dx=-0.0024505151353682794 evalInputDelta=0.0
WOLFE (weak): th(1.6929877452395499E-6)=-33.39672053335196; dx=-0.002450512251750366 evalInputDelta=0.0
Armijo: th(1.6932329778348971E-6)=-33.39671870577258; dx=-0.002450513398794975 evalInputDelta=-1.8275793820521358E-6
Armijo: th(1.6931103615372236E-6)=-33.39671870577258; dx=-0.0024505114830827477 evalInputDelta=-1.8275793820521358E-6
Armijo: th(1.6930490533883867E-6)=-33.39671870577258; dx=-0.0024505141677778446 evalInputDelta=-1.8275793820521358E-6
WOLFE (weak): th(1.6930183993139683E-6)=-33.39672053335196; dx=-0.0024505113756994046 evalInputDelta=0.0
Armijo: th(1.6930337263511776E-6)=-33.39671870577258; dx=-0.0024505137598832363 evalInputDelta=-1.8275793820521358E-6
mu ~= nu (1.6930183993139683E-6): th(0.0)=-33.39672053335196
Fitness changed from -33.39672053335196 to -33.39672053335196
Static Iteration Total: 26.3045; Orientation: 1.0445; Line Search: 24.3746
Iteration 21 failed. Error: -33.39672053335196
Previous Error: 0.0 -> -33.39672053335196
Retrying iteration 21
Reset training subject: 2767843182139
Adding measurement 2cd801be to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-33.39672053335196;dx=-0.0024505146185020287
Armijo: th(3.6475140808945948E-6)=-33.39671870577258; dx=-0.0024505183152856184 evalInputDelta=-1.8275793820521358E-6
Armijo: th(1.8237570404472974E-6)=-33.39671870577258; dx=-0.002450518509557334 evalInputDelta=-1.8275793820521358E-6
WOLFE (weak): th(6.079190134824325E-7)=-33.39672053335196; dx=-0.0024505176245065157 evalInputDelta=0.0
WOLFE (weak): th(1.215838026964865E-6)=-33.39672053335196; dx=-0.0024505177007605214 evalInputDelta=0.0
WOLFE (weak): th(1.5197975337060813E-6)=-33.39672053335196; dx=-0.002450515420600358 evalInputDelta=0.0
WOLFE (weak): th(1.6717772870766892E-6)=-33.39672053335196; dx=-0.002450517622240046 evalInputDelta=0.0
Armijo: th(1.7477671637619934E-6)=-33.39671870577258; dx=-0.0024505147239439794 evalInputDelta=-1.8275793820521358E-6
Armijo: th(1.7097722254193413E-6)=-33.39671870577258; dx=-0.002450519192575145 evalInputDelta=-1.8275793820521358E-6
WOLFE (weak): th(1.6907747562480154E-6)=-33.39672053335196; dx=-0.002450514592041763 evalInputDelta=0.0
Armijo: th(1.7002734908336784E-6)=-33.39671870577258; dx=-0.002450518396167477 evalInputDelta=-1.8275793820521358E-6
Armijo: th(1.695524123540847E-6)=-33.39671870577258; dx=-0.0024505191957096637 evalInputDelta=-1.8275793820521358E-6
Armijo: th(1.693149439894431E-6)=-33.39671870577258; dx=-0.0024505134464944817 evalInputDelta=-1.8275793820521358E-6
WOLFE (weak): th(1.6919620980712232E-6)=-33.39672053335196; dx=-0.0024505146663048737 evalInputDelta=0.0
WOLFE (weak): th(1.6925557689828271E-6)=-33.39672053335196; dx=-0.0024505145773626555 evalInputDelta=0.0
WOLFE (weak): th(1.6928526044386292E-6)=-33.39672053335196; dx=-0.002450516770864622 evalInputDelta=0.0
WOLFE (weak): th(1.69300102216653E-6)=-33.39672053335196; dx=-0.0024505186417010916 evalInputDelta=0.0
Armijo: th(1.6930752310304805E-6)=-33.39671870577258; dx=-0.0024505158364091393 evalInputDelta=-1.8275793820521358E-6
Armijo: th(1.6930381265985052E-6)=-33.39671870577258; dx=-0.0024505141436219147 evalInputDelta=-1.8275793820521358E-6
WOLFE (weak): th(1.6930195743825177E-6)=-33.39672053335196; dx=-0.0024505177987230045 evalInputDelta=0.0
WOLFE (weak): th(1.6930288504905115E-6)=-33.39672053335196; dx=-0.002450518933660639 evalInputDelta=0.0
mu ~= nu (1.6930288504905115E-6): th(0.0)=-33.39672053335196
Fitness changed from -33.39672053335196 to -33.39672053335196
Static Iteration Total: 21.6079; Orientation: 0.0203; Line Search: 19.8791
Iteration 22 failed. Error: -33.39672053335196
Previous Error: 0.0 -> -33.39672053335196
Optimization terminated 22
Final threshold in iteration 22: -33.39672053335196 (> -Infinity) after 160.376s (< 3600.000s)
Returns
-33.39672053335196