BasicOptimizer.scala:89 executed in 207.96 seconds (2.430 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: 11519375616831
Reset training subject: 11523906084395
Adding measurement 67292ade to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.48670588433742523;dx=-6.258654013507146E-7
New Minimum: -0.48670588433742523 > -0.48670633137226105
END: th(2.154434690031884)=-0.48670633137226105; dx=-5.483343699142904E-7 evalInputDelta=4.470348358154297E-7
Fitness changed from -0.48670588433742523 to -0.48670633137226105
Iteration 1 complete. Error: -0.48670633137226105 Total: 22.0628; Orientation: 0.0451; Line Search: 8.6517
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/336e9653-f987-4db4-bcb1-3a5a8f5e89cc.jpg)
Adding measurement 2c06516b to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.48670633137226105;dx=-5.483348114935584E-7
New Minimum: -0.48670633137226105 > -0.4867076575756073
WOLFE (weak): th(4.641588833612779)=-0.4867076575756073; dx=-5.483212745476504E-7 evalInputDelta=1.3262033462524414E-6
New Minimum: -0.4867076575756073 > -0.48670899868011475
WOLFE (weak): th(9.283177667225559)=-0.48670899868011475; dx=-5.483201051423465E-7 evalInputDelta=2.6673078536987305E-6
New Minimum: -0.48670899868011475 > -0.48671407997608185
WOLFE (weak): th(27.849533001676676)=-0.48671407997608185; dx=-5.483098012537827E-7 evalInputDelta=7.748603820800781E-6
New Minimum: -0.48671407997608185 > -0.486736997961998
WOLFE (weak): th(111.3981320067067)=-0.486736997961998; dx=-5.483035045811046E-7 evalInputDelta=3.0666589736938477E-5
New Minimum: -0.486736997961998 > -0.48685911297798157
WOLFE (weak): th(556.9906600335335)=-0.48685911297798157; dx=-5.482429130557528E-7 evalInputDelta=1.5278160572052002E-4
New Minimum: -0.48685911297798157 > -0.4876221716403961
WOLFE (weak): th(3341.9439602012008)=-0.4876221716403961; dx=-5.477619444848674E-7 evalInputDelta=9.158402681350708E-4
New Minimum: -0.4876221716403961 > -0.4930972307920456
WOLFE (weak): th(23393.607721408407)=-0.4930972307920456; dx=-5.445149225039505E-7 evalInputDelta=0.006390899419784546
New Minimum: -0.4930972307920456 > -0.5366276055574417
WOLFE (weak): th(187148.86177126726)=-0.5366276055574417; dx=-5.17946197786675E-7 evalInputDelta=0.049921274185180664
New Minimum: -0.5366276055574417 > -0.8307162225246429
END: th(1684339.7559414054)=-0.8307162225246429; dx=-2.819244869608915E-7 evalInputDelta=0.3440098911523819
Fitness changed from -0.48670633137226105 to -0.8307162225246429
Iteration 2 complete. Error: -0.8307162225246429 Total: 48.2605; Orientation: 0.0477; Line Search: 43.6235
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/3697888e-fbe7-4ce9-b51f-da66eff680c0.jpg)
Adding measurement 311bc8c4 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.8307162225246429;dx=-2.500347353034367E-7
New Minimum: -0.8307162225246429 > -1.1519028395414352
END: th(3628800.0000000005)=-1.1519028395414352; dx=-1.1846717226733502E-7 evalInputDelta=0.3211866170167923
Fitness changed from -0.8307162225246429 to -1.1519028395414352
Iteration 3 complete. Error: -1.1519028395414352 Total: 13.1942; Orientation: 0.3435; Line Search: 8.4745
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d7c1a6bb-c12e-49ac-9078-3ef037fdc74b.jpg)
Adding measurement 79d75574 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.757e+03, gradient 3.575e-04, dot -0.669; [c1aa6756-44e8-4662-b9b9-64a10a7ffd28 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.1519028395414352, -0.8307162225246429, -0.48670633137226105, -0.48670588433742523
LBFGS Accumulation History: 3 points
Removed measurement 79d75574 to history. Total: 3
th(0)=-1.1519028395414352;dx=-1.277954974606803E-7
New Minimum: -1.1519028395414352 > -1.4428780376911163
END: th(7818012.603187701)=-1.4428780376911163; dx=-3.790374324947801E-8 evalInputDelta=0.2909751981496811
Fitness changed from -1.1519028395414352 to -1.4428780376911163
Iteration 4 complete. Error: -1.4428780376911163 Total: 13.5504; Orientation: 1.0138; Line Search: 8.2266
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/633544dc-379f-42ab-8d32-26ffcebedb2c.jpg)
Adding measurement 73e3cb24 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.554e+03, gradient 3.013e-04, dot -0.449; [c1aa6756-44e8-4662-b9b9-64a10a7ffd28 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.4428780376911163, -0.8307162225246429, -0.48670633137226105, -0.48670588433742523
LBFGS Accumulation History: 3 points
Removed measurement 73e3cb24 to history. Total: 3
th(0)=-1.4428780376911163;dx=-9.078291487449798E-8
New Minimum: -1.4428780376911163 > -1.6025499552488327
WOLF (strong): th(1.6843397559414055E7)=-1.6025499552488327; dx=8.494169244295167E-9 evalInputDelta=0.15967191755771637
New Minimum: -1.6025499552488327 > -1.6111385822296143
END: th(8421698.779707028)=-1.6111385822296143; dx=-7.681878938539832E-9 evalInputDelta=0.16826054453849792
Fitness changed from -1.4428780376911163 to -1.6111385822296143
Iteration 5 complete. Error: -1.6111385822296143 Total: 18.4089; Orientation: 1.4439; Line Search: 12.9525
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/7a5a9320-b7bf-454f-8e5a-55060010f0c4.jpg)
Adding measurement 78f14407 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.792e+03, gradient 2.716e-04, dot -0.382; [c1aa6756-44e8-4662-b9b9-64a10a7ffd28 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.6111385822296143, -0.8307162225246429, -0.48670633137226105, -0.48670588433742523
LBFGS Accumulation History: 3 points
Removed measurement 78f14407 to history. Total: 3
th(0)=-1.6111385822296143;dx=-7.375285329807866E-8
New Minimum: -1.6111385822296143 > -1.6692041754722595
WOLF (strong): th(1.8144000000000004E7)=-1.6692041754722595; dx=2.067180059142697E-8 evalInputDelta=0.058065593242645264
New Minimum: -1.6692041754722595 > -1.742805853486061
WOLF (strong): th(9072000.000000002)=-1.742805853486061; dx=4.5071117613574854E-9 evalInputDelta=0.13166727125644684
END: th(3024000.0000000005)=-1.6954869627952576; dx=-3.880184725510207E-8 evalInputDelta=0.08434838056564331
Fitness changed from -1.6111385822296143 to -1.742805853486061
Iteration 6 complete. Error: -1.742805853486061 Total: 23.2852; Orientation: 1.0103; Line Search: 17.9951
Adding measurement 3a5787e4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.829e+03, gradient 2.453e-04, dot -0.353; [c1aa6756-44e8-4662-b9b9-64a10a7ffd28 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.742805853486061, -0.8307162225246429, -0.48670633137226105, -0.48670588433742523
LBFGS Accumulation History: 3 points
Removed measurement 3a5787e4 to history. Total: 3
th(0)=-1.742805853486061;dx=-6.018896104875695E-8
New Minimum: -1.742805853486061 > -1.843910813331604
END: th(6515010.502656418)=-1.843910813331604; dx=-9.704317697201697E-9 evalInputDelta=0.10110495984554291
Fitness changed from -1.742805853486061 to -1.843910813331604
Iteration 7 complete. Error: -1.843910813331604 Total: 14.4939; Orientation: 1.0211; Line Search: 9.1898
Adding measurement 5f0a3f0c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.190e+03, gradient 1.712e-04, dot -0.520; [c1aa6756-44e8-4662-b9b9-64a10a7ffd28 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.843910813331604, -0.8307162225246429, -0.48670633137226105, -0.48670588433742523
LBFGS Accumulation History: 3 points
Removed measurement 5f0a3f0c to history. Total: 3
th(0)=-1.843910813331604;dx=-2.9324956078438333E-8
New Minimum: -1.843910813331604 > -1.9304961562156677
WOLF (strong): th(1.4036164632845048E7)=-1.9304961562156677; dx=1.3954942114878202E-9 evalInputDelta=0.08658534288406372
END: th(7018082.316422524)=-1.9149023741483688; dx=-1.1595429050266631E-8 evalInputDelta=0.07099156081676483
Fitness changed from -1.843910813331604 to -1.9304961562156677
Iteration 8 complete. Error: -1.9304961562156677 Total: 18.0558; Orientation: 1.0044; Line Search: 12.7934
Adding measurement e855d08 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.915e+03, gradient 2.277e-04, dot -0.275; [c1aa6756-44e8-4662-b9b9-64a10a7ffd28 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.9304961562156677, -0.8307162225246429, -0.48670633137226105, -0.48670588433742523
LBFGS Accumulation History: 3 points
Removed measurement e855d08 to history. Total: 3
th(0)=-1.9304961562156677;dx=-5.184980425298084E-8
New Minimum: -1.9304961562156677 > -1.9452875852584839
WOLF (strong): th(1.5120000000000006E7)=-1.9452875852584839; dx=1.9183475561726654E-8 evalInputDelta=0.014791429042816162
New Minimum: -1.9452875852584839 > -2.000092938542366
WOLF (strong): th(7560000.000000003)=-2.000092938542366; dx=5.367470407826247E-9 evalInputDelta=0.0695967823266983
END: th(2520000.000000001)=-1.979300320148468; dx=-2.6097657291293962E-8 evalInputDelta=0.04880416393280029
Fitness changed from -1.9304961562156677 to -2.000092938542366
Iteration 9 complete. Error: -2.000092938542366 Total: 22.4673; Orientation: 1.0330; Line Search: 16.8892
Adding measurement 6533d3a0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.153e+03, gradient 1.662e-04, dot -0.390; [c1aa6756-44e8-4662-b9b9-64a10a7ffd28 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.000092938542366, -0.8307162225246429, -0.48670633137226105, -0.48670588433742523
LBFGS Accumulation History: 3 points
Removed measurement 6533d3a0 to history. Total: 3
th(0)=-2.000092938542366;dx=-2.7610634292193396E-8
New Minimum: -2.000092938542366 > -2.0494510531425476
END: th(5429175.418880349)=-2.0494510531425476; dx=-9.541649577581276E-9 evalInputDelta=0.04935811460018158
Fitness changed from -2.000092938542366 to -2.0494510531425476
Iteration 10 complete. Error: -2.0494510531425476 Total: 14.1124; Orientation: 1.0136; Line Search: 8.7302
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f5117cf7-52f5-4114-b3ed-cb7091f78eb2.jpg)
Final threshold in iteration 11: -2.0494510531425476 (> -Infinity) after 207.962s (< 5400.000s)
Returns
-2.0494510531425476