BasicOptimizer.scala:89 executed in 204.80 seconds (1.865 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: 6427609610842
Reset training subject: 6432115914157
Adding measurement 30feb5f9 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.3234904259443283;dx=-7.087728512788681E-7
New Minimum: -0.3234904259443283 > -0.3234906792640686
END: th(2.154434690031884)=-0.3234906792640686; dx=-6.237787452666389E-7 evalInputDelta=2.5331974029541016E-7
Fitness changed from -0.3234904259443283 to -0.3234906792640686
Iteration 1 complete. Error: -0.3234906792640686 Total: 21.9494; Orientation: 0.0461; Line Search: 8.7450
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/aab7cc73-27b1-400d-a822-af502828f2bd.jpg)
Adding measurement 4212ff72 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.3234906792640686;dx=-6.237677440996883E-7
New Minimum: -0.3234906792640686 > -0.3234921842813492
WOLFE (weak): th(4.641588833612779)=-0.3234921842813492; dx=-6.237376500380557E-7 evalInputDelta=1.5050172805786133E-6
New Minimum: -0.3234921842813492 > -0.3234938979148865
WOLFE (weak): th(9.283177667225559)=-0.3234938979148865; dx=-6.237386025362211E-7 evalInputDelta=3.2186508178710938E-6
New Minimum: -0.3234938979148865 > -0.32349976897239685
WOLFE (weak): th(27.849533001676676)=-0.32349976897239685; dx=-6.237356005155352E-7 evalInputDelta=9.08970832824707E-6
New Minimum: -0.32349976897239685 > -0.3235258609056473
WOLFE (weak): th(111.3981320067067)=-0.3235258609056473; dx=-6.237202725338668E-7 evalInputDelta=3.5181641578674316E-5
New Minimum: -0.3235258609056473 > -0.3236648142337799
WOLFE (weak): th(556.9906600335335)=-0.3236648142337799; dx=-6.236305376504899E-7 evalInputDelta=1.741349697113037E-4
New Minimum: -0.3236648142337799 > -0.3245326727628708
WOLFE (weak): th(3341.9439602012008)=-0.3245326727628708; dx=-6.229698135438189E-7 evalInputDelta=0.001041993498802185
New Minimum: -0.3245326727628708 > -0.3307534456253052
WOLFE (weak): th(23393.607721408407)=-0.3307534456253052; dx=-6.179427910133617E-7 evalInputDelta=0.007262766361236572
New Minimum: -0.3307534456253052 > -0.3796507716178894
WOLFE (weak): th(187148.86177126726)=-0.3796507716178894; dx=-5.764659162091616E-7 evalInputDelta=0.0561600923538208
New Minimum: -0.3796507716178894 > -0.6851250976324081
END: th(1684339.7559414054)=-0.6851250976324081; dx=-2.6916326771247414E-7 evalInputDelta=0.36163441836833954
Fitness changed from -0.3234906792640686 to -0.6851250976324081
Iteration 2 complete. Error: -0.6851250976324081 Total: 45.8253; Orientation: 0.0440; Line Search: 41.3583
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/d8167482-a4ed-4e56-ad08-eff0e5bc3d9e.jpg)
Adding measurement 2d5f76f8 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.6851250976324081;dx=-2.60161401491667E-7
New Minimum: -0.6851250976324081 > -0.9990570396184921
END: th(3628800.0000000005)=-0.9990570396184921; dx=-1.1089146611410996E-7 evalInputDelta=0.313931941986084
Fitness changed from -0.6851250976324081 to -0.9990570396184921
Iteration 3 complete. Error: -0.9990570396184921 Total: 13.4361; Orientation: 0.0458; Line Search: 9.0900
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/e46583a2-b79f-449e-bd7b-68c4dca06ba0.jpg)
Adding measurement 59211fb4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.709e+03, gradient 3.698e-04, dot -0.608; [a52dcd27-6680-46c0-a767-3f61ff7452b3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.9990570396184921, -0.6851250976324081, -0.3234906792640686, -0.3234904259443283
LBFGS Accumulation History: 3 points
Removed measurement 59211fb4 to history. Total: 3
th(0)=-0.9990570396184921;dx=-1.3676199464042472E-7
New Minimum: -0.9990570396184921 > -1.2976179867982864
END: th(7818012.603187701)=-1.2976179867982864; dx=-3.694133531231255E-8 evalInputDelta=0.2985609471797943
Fitness changed from -0.9990570396184921 to -1.2976179867982864
Iteration 4 complete. Error: -1.2976179867982864 Total: 14.0673; Orientation: 1.0178; Line Search: 8.5420
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/ad001d22-aeca-496f-8305-e4112aa0f9ec.jpg)
Adding measurement 63f89f20 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.785e+03, gradient 3.202e-04, dot -0.432; [a52dcd27-6680-46c0-a767-3f61ff7452b3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.2976179867982864, -0.6851250976324081, -0.3234906792640686, -0.3234904259443283
LBFGS Accumulation History: 3 points
Removed measurement 63f89f20 to history. Total: 3
th(0)=-1.2976179867982864;dx=-1.0254773247445627E-7
New Minimum: -1.2976179867982864 > -1.47038072347641
WOLF (strong): th(1.6843397559414055E7)=-1.47038072347641; dx=1.3872599192792111E-8 evalInputDelta=0.17276273667812347
New Minimum: -1.47038072347641 > -1.4901495724916458
END: th(8421698.779707028)=-1.4901495724916458; dx=-9.306459434643454E-9 evalInputDelta=0.19253158569335938
Fitness changed from -1.2976179867982864 to -1.4901495724916458
Iteration 5 complete. Error: -1.4901495724916458 Total: 17.7371; Orientation: 1.0123; Line Search: 12.7564
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/81ef3b72-44f4-4b30-8e1e-ace4ff8e5c7b.jpg)
Adding measurement 5f9927ce to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.095e+03, gradient 2.798e-04, dot -0.396; [a52dcd27-6680-46c0-a767-3f61ff7452b3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.4901495724916458, -0.6851250976324081, -0.3234906792640686, -0.3234904259443283
LBFGS Accumulation History: 3 points
Removed measurement 5f9927ce to history. Total: 3
th(0)=-1.4901495724916458;dx=-7.82806997839776E-8
New Minimum: -1.4901495724916458 > -1.5668488144874573
WOLF (strong): th(1.8144000000000004E7)=-1.5668488144874573; dx=2.525996588449382E-8 evalInputDelta=0.07669924199581146
New Minimum: -1.5668488144874573 > -1.643171176314354
WOLF (strong): th(9072000.000000002)=-1.643171176314354; dx=2.4434240812560107E-10 evalInputDelta=0.15302160382270813
END: th(3024000.0000000005)=-1.5813793390989304; dx=-4.353384973681546E-8 evalInputDelta=0.09122976660728455
Fitness changed from -1.4901495724916458 to -1.643171176314354
Iteration 6 complete. Error: -1.643171176314354 Total: 22.4699; Orientation: 1.0518; Line Search: 16.4830
Adding measurement 2fc3fdda to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.191e+03, gradient 2.479e-04, dot -0.373; [a52dcd27-6680-46c0-a767-3f61ff7452b3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.643171176314354, -0.6851250976324081, -0.3234906792640686, -0.3234904259443283
LBFGS Accumulation History: 3 points
Removed measurement 2fc3fdda to history. Total: 3
th(0)=-1.643171176314354;dx=-6.14657698425281E-8
New Minimum: -1.643171176314354 > -1.7519001960754395
END: th(6515010.502656418)=-1.7519001960754395; dx=-1.243047947019652E-8 evalInputDelta=0.10872901976108551
Fitness changed from -1.643171176314354 to -1.7519001960754395
Iteration 7 complete. Error: -1.7519001960754395 Total: 14.4421; Orientation: 1.0031; Line Search: 9.0778
Adding measurement 180b9632 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.564e+03, gradient 1.802e-04, dot -0.523; [a52dcd27-6680-46c0-a767-3f61ff7452b3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.7519001960754395, -0.6851250976324081, -0.3234906792640686, -0.3234904259443283
LBFGS Accumulation History: 3 points
Removed measurement 180b9632 to history. Total: 3
th(0)=-1.7519001960754395;dx=-3.24652066749065E-8
New Minimum: -1.7519001960754395 > -1.8467896580696106
WOLF (strong): th(1.4036164632845048E7)=-1.8467896580696106; dx=1.5174941171294635E-9 evalInputDelta=0.09488946199417114
END: th(7018082.316422524)=-1.8294699788093567; dx=-1.2551643211911345E-8 evalInputDelta=0.07756978273391724
Fitness changed from -1.7519001960754395 to -1.8467896580696106
Iteration 8 complete. Error: -1.8467896580696106 Total: 18.1290; Orientation: 1.0265; Line Search: 12.8491
Adding measurement 7c44570c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.182e+03, gradient 2.474e-04, dot -0.261; [a52dcd27-6680-46c0-a767-3f61ff7452b3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8467896580696106, -0.6851250976324081, -0.3234906792640686, -0.3234904259443283
LBFGS Accumulation History: 3 points
Removed measurement 7c44570c to history. Total: 3
th(0)=-1.8467896580696106;dx=-6.122904993646597E-8
New Minimum: -1.8467896580696106 > -1.8618883043527603
WOLF (strong): th(1.5120000000000006E7)=-1.8618883043527603; dx=2.227849888408927E-8 evalInputDelta=0.01509864628314972
New Minimum: -1.8618883043527603 > -1.9243229106068611
WOLF (strong): th(7560000.000000003)=-1.9243229106068611; dx=6.469518675992441E-9 evalInputDelta=0.07753325253725052
END: th(2520000.000000001)=-1.9030746072530746; dx=-2.894739119789196E-8 evalInputDelta=0.05628494918346405
Fitness changed from -1.8467896580696106 to -1.9243229106068611
Iteration 9 complete. Error: -1.9243229106068611 Total: 22.9749; Orientation: 1.0131; Line Search: 17.7475
Adding measurement 5fb4ab39 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.434e+03, gradient 1.784e-04, dot -0.375; [a52dcd27-6680-46c0-a767-3f61ff7452b3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.9243229106068611, -0.6851250976324081, -0.3234906792640686, -0.3234904259443283
LBFGS Accumulation History: 3 points
Removed measurement 5fb4ab39 to history. Total: 3
th(0)=-1.9243229106068611;dx=-3.181719056562492E-8
New Minimum: -1.9243229106068611 > -1.9807662516832352
END: th(5429175.418880349)=-1.9807662516832352; dx=-1.0591595570447581E-8 evalInputDelta=0.056443341076374054
Fitness changed from -1.9243229106068611 to -1.9807662516832352
Iteration 10 complete. Error: -1.9807662516832352 Total: 13.6943; Orientation: 1.0218; Line Search: 8.5938
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/6c8687cd-cdfd-41ba-a27d-4d38e7142f02.jpg)
Final threshold in iteration 11: -1.9807662516832352 (> -Infinity) after 204.797s (< 5400.000s)
Returns
-1.9807662516832352