Code from BasicOptimizer.scala:88 executed in 299.11 seconds (5.044 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: 20896932477399
Reset training subject: 20900122524171
Adding measurement 68b58537 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=24.613181841908954;dx=-0.044854106939349506
Armijo: th(2.154434690031884)=24.61327894544229; dx=3.6016278326799984E-5 evalInputDelta=-9.710353333503008E-5
Armijo: th(1.077217345015942)=24.613220806699246; dx=4.5255560669995456E-5 evalInputDelta=-3.896479029208422E-5
Armijo: th(0.3590724483386473)=24.613182466011494; dx=3.9242803178751915E-5 evalInputDelta=-6.241025403141975E-7
New Minimum: 24.613181841908954 > 24.612971171038225
WOLF (strong): th(0.08976811208466183)=24.612971171038225; dx=0.020209681819051178 evalInputDelta=2.1067087072879076E-4
END: th(0.017953622416932366)=24.61298923776485; dx=-0.021453930215859333 evalInputDelta=1.926041441038251E-4
Fitness changed from 24.613181841908954 to 24.612971171038225
Iteration 1 complete. Error: 24.612971171038225 Total: 28.5155; Orientation: 0.0041; Line Search: 18.9857
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 699d1698 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=24.612971171038225;dx=-0.008510773048497535
New Minimum: 24.612971171038225 > 24.61291901837103
END: th(0.03867990694677316)=24.61291901837103; dx=-0.0027036262199138803 evalInputDelta=5.2152667194604874E-5
Fitness changed from 24.612971171038225 to 24.61291901837103
Iteration 2 complete. Error: 24.61291901837103 Total: 9.5350; Orientation: 0.0041; Line Search: 6.3546
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 6cd6ef69 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=24.61291901837103;dx=-9.085734762598507E-4
New Minimum: 24.61291901837103 > 24.612911846023053
WOLF (strong): th(0.08333333333333334)=24.612911846023053; dx=3.190184502679223E-4 evalInputDelta=7.172347977757454E-6
END: th(0.0416666666
...skipping 9008 bytes...
evalInputDelta=0.0
Armijo: th(4.572648932444503E-8)=24.61290891515091; dx=2.3425884490439827E-5 evalInputDelta=-3.5762786865234375E-7
WOLFE (weak): th(4.364801253697025E-8)=24.612908557523042; dx=-2.3451128495793415E-5 evalInputDelta=0.0
WOLFE (weak): th(4.468725093070764E-8)=24.612908557523042; dx=-1.8114963692889387E-5 evalInputDelta=0.0
WOLFE (weak): th(4.520687012757634E-8)=24.612908557523042; dx=-1.978053917572575E-5 evalInputDelta=0.0
Armijo: th(4.5466679726010686E-8)=24.61290891515091; dx=2.342338197550452E-5 evalInputDelta=-3.5762786865234375E-7
WOLFE (weak): th(4.533677492679351E-8)=24.612908557523042; dx=-2.29615792188123E-5 evalInputDelta=0.0
WOLFE (weak): th(4.5401727326402096E-8)=24.612908557523042; dx=-2.323213334859557E-5 evalInputDelta=0.0
WOLFE (weak): th(4.543420352620639E-8)=24.612908557523042; dx=-2.419106009311115E-5 evalInputDelta=0.0
Armijo: th(4.545044162610854E-8)=24.61290891515091; dx=1.996775552967844E-5 evalInputDelta=-3.5762786865234375E-7
WOLFE (weak): th(4.544232257615747E-8)=24.612908557523042; dx=-2.259309025768177E-5 evalInputDelta=0.0
WOLFE (weak): th(4.5446382101133006E-8)=24.612908557523042; dx=-2.4073920110765633E-5 evalInputDelta=0.0
WOLFE (weak): th(4.544841186362077E-8)=24.612908557523042; dx=-2.2748424534731635E-5 evalInputDelta=0.0
Armijo: th(4.5449426744864656E-8)=24.61290891515091; dx=2.334105047705753E-5 evalInputDelta=-3.5762786865234375E-7
Armijo: th(4.5448919304242717E-8)=24.61290891515091; dx=2.3860838497427838E-5 evalInputDelta=-3.5762786865234375E-7
Armijo: th(4.5448665583931743E-8)=24.61290891515091; dx=2.2834579722009623E-5 evalInputDelta=-3.5762786865234375E-7
mu ~= nu (4.544841186362077E-8): th(0.0)=24.612908557523042
Fitness changed from 24.612908557523042 to 24.612908557523042
Static Iteration Total: 76.9778; Orientation: 0.0029; Line Search: 70.6164
Iteration 8 failed. Error: 24.612908557523042
Previous Error: 0.0 -> 24.612908557523042
Optimization terminated 8
Final threshold in iteration 8: 24.612908557523042 (> -Infinity) after 299.105s (< 1800.000s)
24.612908557523042