BasicOptimizer.scala:88 executed in 1495.45 seconds (10.667 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: 6557629308283
Reset training subject: 6603029371540
Adding measurement 54d1a5ae to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=14.834024874367381;dx=-4.3284707982284564E-8
Armijo: th(2.154434690031884)=14.834024874367381; dx=-3.946574066964903E-8 evalInputDelta=0.0
Armijo: th(1.077217345015942)=14.834024874367381; dx=-4.289862081507853E-8 evalInputDelta=0.0
Armijo: th(0.3590724483386473)=14.834024874367381; dx=-4.2898620811479484E-8 evalInputDelta=0.0
Armijo: th(0.08976811208466183)=14.834024874367381; dx=-3.601750139905542E-8 evalInputDelta=0.0
END: th(0.017953622416932366)=14.834024874367381; dx=-3.699466484332221E-8 evalInputDelta=0.0
Fitness changed from 14.834024874367381 to 14.834024874367381
Static Iteration Total: 416.4120; Orientation: 0.5646; Line Search: 280.7237
Iteration 1 failed. Error: 14.834024874367381
Previous Error: 0.0 -> 14.834024874367381
Retrying iteration 1
Reset training subject: 6974041566392
Adding measurement 22cd592e to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=14.834024874367381;dx=-3.9848559967882814E-8
Armijo: th(0.03867990694677316)=14.834024874367381; dx=-3.946574067109462E-8 evalInputDelta=0.0
WOLFE (weak): th(0.01933995347338658)=14.834024874367381; dx=-3.946574066953661E-8 evalInputDelta=0.0
Armijo: th(0.02900993021007987)=14.834024874367381; dx=-3.946574066900589E-8 evalInputDelta=0.0
Armijo: th(0.024174941841733223)=14.834024874367381; dx=-4.289862081851797E-8 evalInputDelta=0.0
WOLFE (weak): th(0.0217574476575599)=14.834024874367381; dx=-4.289862081785832E-8 evalInputDelta=0.0
Armijo: th(0.022966194749646562)=14.834024874367381; dx=-4.2898620820491835E-8 evalInputDelta=0.0
Armijo: th(0.022361821203603232)=14.834024874367381; dx=-4.2898620820238976E-8 evalInputDelta=0.0
WOLFE (weak): th(0.022059634430581565)=14.834024874367381; dx=-3.601750140456776E-8 evalInputDelta=0.0
WOLFE (weak): th(0.0222107278170924)=14.834024874367381; dx=-4.289862081984368E-8 evalInputDelta=0.0
WOLFE (weak): th(0.022286274510347814)=14.834024874367381; dx=-3.9465740670192255E-8 evalInputDelta=0.0
Armijo: th(0.022324047856975525)=14.834024874367381; dx=-3.82479974516748E-8 evalInputDelta=0.0
Armijo: th(0.02230516118366167)=14.834024874367381; dx=-4.2898620819149937E-8 evalInputDelta=0.0
Armijo: th(0.022295717847004744)=14.834024874367381; dx=-4.289862081947773E-8 evalInputDelta=0.0
Armijo: th(0.02229099617867628)=14.834024874367381; dx=-3.824799745041585E-8 evalInputDelta=0.0
WOLFE (weak): th(0.022288635344512045)=14.834024874367381; dx=-3.8247997449013716E-8 evalInputDelta=0.0
Armijo: th(0.02228981576159416)=14.834024874367381; dx=-4.2898620822171356E-8 evalInputDelta=0.0
Armijo: th(0.022289225553053103)=14.834024874367381; dx=-4.289862081928098E-8 evalInputDelta=0.0
Armijo: th(0.022288930448782572)=14.834024874367381; dx=-4.2898620821536465E-8 evalInputDelta=0.0
WOLFE (weak): th(0.02228878289664731)=14.834024874367381; dx=-4.2898620820013024E-8 evalInputDelta=0.0
mu ~= nu (0.02228878289664731): th(0.0)=14.834024874367381
Fitness changed from 14.834024874367381 to 14.834024874367381
Static Iteration Total: 1079.0211; Orientation: 0.5551; Line Search: 988.7085
Iteration 2 failed. Error: 14.834024874367381
Previous Error: 0.0 -> 14.834024874367381
Optimization terminated 2
Final threshold in iteration 2: 14.834024874367381 (> -Infinity) after 1495.433s (< 10800.000s)
Returns
14.834024874367381