BasicOptimizer.scala:89 executed in 45.24 seconds (0.338 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: 8444119124938
Reset training subject: 8449249625022
Corrupt weights measurement
LBFGS Accumulation History: 0 points
Constructing line search parameters: GD+Trust
th(0)=-14.439925104379654;dx=-3.200774375551714E-6
END: th(2.154434690031884)=-14.439931899309158; dx=-2.830824350116855E-6 evalInputDelta=6.794929504394531E-6
Fitness changed from -14.54826432466507 to -14.54826432466507
Static Iteration Total: 25.4257; Orientation: 0.0215; Line Search: 10.3205
Iteration 1 failed. Error: -14.54826432466507
Previous Error: 0.0 -> -14.54826432466507
Retrying iteration 1
Reset training subject: 8469545068923
Corrupt weights measurement
LBFGS Accumulation History: 0 points
th(0)=-14.439925104379654;dx=-3.2012108785724967E-6
END: th(4.641588833612779)=-14.439940631389618; dx=-2.8314146133470244E-6 evalInputDelta=1.5527009963989258E-5
Fitness changed from -14.54826432466507 to -14.54826432466507
Static Iteration Total: 19.8129; Orientation: 0.0214; Line Search: 10.1391
Iteration 2 failed. Error: -14.54826432466507
Previous Error: 0.0 -> -14.54826432466507
Optimization terminated 2
Final threshold in iteration 2: -14.54826432466507 (> -Infinity) after 45.239s (< 5400.000s)
Returns
-14.54826432466507