BasicOptimizer.scala:89 executed in 73.07 seconds (1.219 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: 5906127688891
Reset training subject: 5910088153274
Adding measurement 62f40c4 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.23244430124759674;dx=-5.298316798123333E-7
Armijo: th(2.154434690031884)=-0.23244430124759674; dx=-4.5578652041256244E-7 evalInputDelta=0.0
Armijo: th(1.077217345015942)=-0.23244427144527435; dx=-4.5578782191007974E-7 evalInputDelta=-2.9802322387695312E-8
Armijo: th(0.3590724483386473)=-0.23244427144527435; dx=-4.5579853442854956E-7 evalInputDelta=-2.9802322387695312E-8
Armijo: th(0.08976811208466183)=-0.23244430124759674; dx=-4.5579853446689003E-7 evalInputDelta=0.0
Armijo: th(0.017953622416932366)=-0.23244430124759674; dx=-4.557985345502825E-7 evalInputDelta=0.0
Armijo: th(0.002992270402822061)=-0.23244430124759674; dx=-4.557985344793492E-7 evalInputDelta=0.0
Armijo: th(4.2746720040315154E-4)=-0.23244430124759674; dx=-4.557985345297755E-7 evalInputDelta=0.0
Armijo: th(5.343340005039394E-5)=-0.23244430124759674; dx=-4.557985345110399E-7 evalInputDelta=0.0
END: th(5.9370444500437714E-6)=-0.23244430124759674; dx=-4.557985354402586E-7 evalInputDelta=0.0
Fitness changed from -0.23244430124759674 to -0.23244430124759674
Static Iteration Total: 55.0842; Orientation: 0.0461; Line Search: 42.8233
Iteration 1 failed. Error: -0.23244430124759674
Previous Error: 0.0 -> -0.23244430124759674
Retrying iteration 1
Reset training subject: 5961212148662
Adding measurement 2679432d to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-0.23244430124759674;dx=-5.298316799125709E-7
END: th(1.279097451943557E-5)=-0.23244430124759674; dx=-4.557985346507351E-7 evalInputDelta=0.0
Fitness changed from -0.23244430124759674 to -0.23244430124759674
Static Iteration Total: 17.9823; Orientation: 0.0455; Line Search: 9.4841
Iteration 2 failed. Error: -0.23244430124759674
Previous Error: 0.0 -> -0.23244430124759674
Optimization terminated 2
Final threshold in iteration 2: -0.23244430124759674 (> -Infinity) after 73.067s (< 5400.000s)
Returns
-0.23244430124759674