Code from BasicOptimizer.scala:88 executed in 365.54 seconds (3.521 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: 3718212076064
Reset training subject: 3721223680899
Adding measurement cf79e50 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=1.8648580461740494;dx=-1.5063782815513868E-7
New Minimum: 1.8648580461740494 > 1.8648576140403748
WOLFE (weak): th(2.154434690031884)=1.8648576140403748; dx=-1.479445035989717E-7 evalInputDelta=4.3213367462158203E-7
New Minimum: 1.8648576140403748 > 1.8648567497730255
WOLFE (weak): th(4.308869380063768)=1.8648567497730255; dx=-1.479473475035196E-7 evalInputDelta=1.296401023864746E-6
New Minimum: 1.8648567497730255 > 1.8648546636104584
WOLFE (weak): th(12.926608140191302)=1.8648546636104584; dx=-1.47905877641343E-7 evalInputDelta=3.382563591003418E-6
New Minimum: 1.8648546636104584 > 1.8648444712162018
WOLFE (weak): th(51.70643256076521)=1.8648444712162018; dx=-1.479468992320523E-7 evalInputDelta=1.3574957847595215E-5
New Minimum: 1.8648444712162018 > 1.8647911548614502
WOLFE (weak): th(258.53216280382605)=1.8647911548614502; dx=-1.4785283925989583E-7 evalInputDelta=6.689131259918213E-5
New Minimum: 1.8647911548614502 > 1.8644556105136871
WOLFE (weak): th(1551.1929768229563)=1.8644556105136871; dx=-1.4793623083618647E-7 evalInputDelta=4.0243566036224365E-4
New Minimum: 1.8644556105136871 > 1.8620424568653107
WOLFE (weak): th(10858.350837760694)=1.8620424568653107; dx=-1.478648726569047E-7 evalInputDelta=0.0028155893087387085
New Minimum: 1.8620424568653107 > 1.8423932790756226
WOLFE (weak): th(86866.80670208555)=1.8423932790756226; dx=-1.4702174488420978E-7 evalInputDelta=0.02246476709842682
New Minimum: 1.8423932790756226 > 1.6709254831075668
END: th(781801.26031877)=1.6709254831075668; dx=-1.3455758876939787E-7 evalInputDelta=0.19393256306648254
Fitness changed from 1.8648580461740494 to 1.6709254831075668
Iteration 1 complete. Error: 1.6709254831075668 Total: 36.9198; Orientation: 0.0144; Line Search: 28.3866
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/bc2d116b-0c16-41c0-aec6-08380ae
...skipping 24473 bytes...
itude: 1.223e+03, gradient 3.306e-05, dot -0.429; [5ea6d9e2-7a90-43b1-af7d-aca70a15a0e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.6288835480809212, 1.325602948665619, 1.6709254831075668, 1.8648580461740494
LBFGS Accumulation History: 3 points
Removed measurement 49a6096c to history. Total: 3
th(0)=-1.6288835480809212;dx=-1.0902364421467136E-9
Armijo: th(1.566894378630859E7)=-1.628676861524582; dx=2.8067021861065614E-10 evalInputDelta=-2.0668655633926392E-4
New Minimum: -1.6288835480809212 > -1.633681744337082
END: th(7834471.893154295)=-1.633681744337082; dx=-4.2665735189459625E-12 evalInputDelta=0.004798196256160736
Fitness changed from -1.6288835480809212 to -1.633681744337082
Iteration 29 complete. Error: -1.633681744337082 Total: 11.7174; Orientation: 0.3258; Line Search: 8.3170
Adding measurement 584b84a1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.234e+03, gradient 3.508e-05, dot -0.402; [5ea6d9e2-7a90-43b1-af7d-aca70a15a0e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.633681744337082, 1.325602948665619, 1.6709254831075668, 1.8648580461740494
LBFGS Accumulation History: 3 points
Removed measurement 584b84a1 to history. Total: 3
th(0)=-1.633681744337082;dx=-1.228989498520981E-9
Armijo: th(1.687885802469138E7)=-1.629265919327736; dx=4.5643910097054673E-10 evalInputDelta=-0.004415825009346008
New Minimum: -1.633681744337082 > -1.6378696039319038
WOLF (strong): th(8439429.01234569)=-1.6378696039319038; dx=2.1159974129767542E-10 evalInputDelta=0.00418785959482193
END: th(2813143.00411523)=-1.6376888230443; dx=-7.744313200842671E-10 evalInputDelta=0.00400707870721817
Fitness changed from -1.633681744337082 to -1.6378696039319038
Iteration 30 complete. Error: -1.6378696039319038 Total: 14.5242; Orientation: 0.3291; Line Search: 11.2778
<a id="p-21"></a>Iteration 30
<a id="p-20"></a>![Iteration 30](etc/34a98802-a31c-439f-ae56-704a5f1e2672.jpg)
Final threshold in iteration 31: -1.6378696039319038 (> -Infinity) after 365.542s (< 3600.000s)
-1.6378696039319038