BasicOptimizer.scala:89 executed in 35.32 seconds (0.453 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: 40744149298600
Reset training subject: 40746501910700
Adding measurement 2390a4c1 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-49.808390937956545;dx=-1.7338510558830431E-6
Armijo: th(2.154434690031884)=-49.808390937956545; dx=-1.3371387871781995E-6 evalInputDelta=0.0
Armijo: th(1.077217345015942)=-49.808390937956545; dx=-1.3371167828522998E-6 evalInputDelta=0.0
Armijo: th(0.3590724483386473)=-49.808390937956545; dx=-1.3354014528350133E-6 evalInputDelta=0.0
Armijo: th(0.08976811208466183)=-49.808390937956545; dx=-1.3371449060162164E-6 evalInputDelta=0.0
Armijo: th(0.017953622416932366)=-49.808390937956545; dx=-1.3369790361003976E-6 evalInputDelta=0.0
Armijo: th(0.002992270402822061)=-49.808390937956545; dx=-1.335657620913471E-6 evalInputDelta=0.0
END: th(4.2746720040315154E-4)=-49.808390937956545; dx=-1.3356000897662673E-6 evalInputDelta=0.0
Fitness changed from -49.808390937956545 to -49.808390937956545
Static Iteration Total: 25.9444; Orientation: 0.0637; Line Search: 19.0038
Iteration 1 failed. Error: -49.808390937956545
Previous Error: 0.0 -> -49.808390937956545
Retrying iteration 1
Reset training subject: 40770093845400
Adding measurement 307bc7a2 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-49.808390937956545;dx=-1.7335837156031024E-6
END: th(9.20950165399361E-4)=-49.808390937956545; dx=-1.3359468988576948E-6 evalInputDelta=0.0
Fitness changed from -49.808390937956545 to -49.808390937956545
Static Iteration Total: 9.3796; Orientation: 0.0639; Line Search: 4.8494
Iteration 2 failed. Error: -49.808390937956545
Previous Error: 0.0 -> -49.808390937956545
Optimization terminated 2
Final threshold in iteration 2: -49.808390937956545 (> -Infinity) after 35.325s (< 5400.000s)
Returns
-49.808390937956545