BasicOptimizer.scala:89 executed in 735.60 seconds (3.836 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: 24966744888105
Reset training subject: 25015327822484
Adding measurement 14f58529 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-3.315773904323578;dx=-2.10228257210218E-7
Armijo: th(2.154434690031884)=-3.315773904323578; dx=-1.8394663861506465E-7 evalInputDelta=0.0
Armijo: th(1.077217345015942)=-3.315773844718933; dx=-1.8340252901281548E-7 evalInputDelta=-5.9604644775390625E-8
Armijo: th(0.3590724483386473)=-3.315773844718933; dx=-1.8292895052932715E-7 evalInputDelta=-5.9604644775390625E-8
Armijo: th(0.08976811208466183)=-3.315773904323578; dx=-1.829251080084504E-7 evalInputDelta=0.0
Armijo: th(0.017953622416932366)=-3.315773904323578; dx=-1.829312918472837E-7 evalInputDelta=0.0
Armijo: th(0.002992270402822061)=-3.315773904323578; dx=-1.83928250107432E-7 evalInputDelta=0.0
END: th(4.2746720040315154E-4)=-3.315773904323578; dx=-1.8340209741477316E-7 evalInputDelta=0.0
Fitness changed from -3.315773904323578 to -3.315773904323578
Static Iteration Total: 539.0428; Orientation: 0.0923; Line Search: 393.0866
Iteration 1 failed. Error: -3.315773904323578
Previous Error: 0.0 -> -3.315773904323578
Retrying iteration 1
Reset training subject: 25505788091540
Adding measurement 1f9affc4 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-3.315773904323578;dx=-2.3247232388381726E-7
END: th(9.20950165399361E-4)=-3.315773904323578; dx=-2.0352263719071293E-7 evalInputDelta=0.0
Fitness changed from -3.315773904323578 to -3.315773904323578
Static Iteration Total: 196.5556; Orientation: 0.0881; Line Search: 98.5470
Iteration 2 failed. Error: -3.315773904323578
Previous Error: 0.0 -> -3.315773904323578
Optimization terminated 2
Final threshold in iteration 2: -3.315773904323578 (> -Infinity) after 735.599s (< 5400.000s)
Returns
-3.315773904323578