BasicOptimizer.scala:89 executed in 35.94 seconds (0.396 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: 40065363729500
Reset training subject: 40067912534400
Adding measurement 6acffb2d to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-73.67609082654624;dx=-1.5293760679948949E-6
Armijo: th(2.154434690031884)=-73.67609082654624; dx=-1.2980487600511912E-6 evalInputDelta=0.0
Armijo: th(1.077217345015942)=-73.67609082654624; dx=-1.2984166713962318E-6 evalInputDelta=0.0
Armijo: th(0.3590724483386473)=-73.67609082654624; dx=-1.2980736132964558E-6 evalInputDelta=0.0
Armijo: th(0.08976811208466183)=-73.67609082654624; dx=-1.2972150543457413E-6 evalInputDelta=0.0
Armijo: th(0.017953622416932366)=-73.67609082654624; dx=-1.2967509253139047E-6 evalInputDelta=0.0
END: th(0.002992270402822061)=-73.67609082654624; dx=-1.298601868320024E-6 evalInputDelta=0.0
Fitness changed from -73.67609082654624 to -73.67609082654624
Static Iteration Total: 23.7075; Orientation: 0.1097; Line Search: 16.6235
Iteration 1 failed. Error: -73.67609082654624
Previous Error: 0.0 -> -73.67609082654624
Retrying iteration 1
Reset training subject: 40089071745800
Adding measurement 1179fc8c to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-73.67609082654624;dx=-1.529527989884138E-6
Armijo: th(0.006446651157795527)=-73.67609082654624; dx=-1.297734434982124E-6 evalInputDelta=0.0
END: th(0.0032233255788977635)=-73.67609082654624; dx=-1.2974264918627676E-6 evalInputDelta=0.0
Fitness changed from -73.67609082654624 to -73.67609082654624
Static Iteration Total: 12.2189; Orientation: 0.0532; Line Search: 7.5050
Iteration 2 failed. Error: -73.67609082654624
Previous Error: 0.0 -> -73.67609082654624
Optimization terminated 2
Final threshold in iteration 2: -73.67609082654624 (> -Infinity) after 35.926s (< 5400.000s)
Returns
-73.67609082654624