BasicOptimizer.scala:89 executed in 35.03 seconds (0.577 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: 46195305438300
Reset training subject: 46197698759700
Adding measurement 72f12e59 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-49.41448082406091;dx=-1.6906065571101642E-6
Armijo: th(2.154434690031884)=-49.41448082406091; dx=-1.2903903210988279E-6 evalInputDelta=0.0
Armijo: th(1.077217345015942)=-49.41448082406091; dx=-1.2909148995453018E-6 evalInputDelta=0.0
Armijo: th(0.3590724483386473)=-49.41448082406091; dx=-1.291458684738275E-6 evalInputDelta=0.0
Armijo: th(0.08976811208466183)=-49.41448082406091; dx=-1.2911660543045299E-6 evalInputDelta=0.0
Armijo: th(0.017953622416932366)=-49.41448082406091; dx=-1.2908309122140172E-6 evalInputDelta=0.0
Armijo: th(0.002992270402822061)=-49.41448082406091; dx=-1.2915043766128692E-6 evalInputDelta=0.0
END: th(4.2746720040315154E-4)=-49.41448082406091; dx=-1.291357564397183E-6 evalInputDelta=0.0
Fitness changed from -49.41448082406091 to -49.41448082406091
Static Iteration Total: 25.8098; Orientation: 0.0613; Line Search: 18.9041
Iteration 1 failed. Error: -49.41448082406091
Previous Error: 0.0 -> -49.41448082406091
Retrying iteration 1
Reset training subject: 46221115441800
Adding measurement 1bea0b44 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-49.41448082406091;dx=-1.691524761363138E-6
END: th(9.20950165399361E-4)=-49.41448082406091; dx=-1.291341584471727E-6 evalInputDelta=0.0
Fitness changed from -49.41448082406091 to -49.41448082406091
Static Iteration Total: 9.2209; Orientation: 0.0619; Line Search: 4.7584
Iteration 2 failed. Error: -49.41448082406091
Previous Error: 0.0 -> -49.41448082406091
Optimization terminated 2
Final threshold in iteration 2: -49.41448082406091 (> -Infinity) after 35.031s (< 5400.000s)
Returns
-49.41448082406091