Code from BasicOptimizer.scala:88 executed in 389.80 seconds (2.108 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: 9363294189980
Reset training subject: 9370922830487
Adding measurement 7ebab0cc to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=1.516938865184784;dx=-4.276826002761204E-8
Armijo: th(2.154434690031884)=1.5169388949871063; dx=-4.2690538636309414E-8 evalInputDelta=-2.9802322387695312E-8
Armijo: th(1.077217345015942)=1.5169388949871063; dx=-4.269870965955444E-8 evalInputDelta=-2.9802322387695312E-8
Armijo: th(0.3590724483386473)=1.516938865184784; dx=-4.2688004273633364E-8 evalInputDelta=0.0
Armijo: th(0.08976811208466183)=1.516938865184784; dx=-4.2702564987113134E-8 evalInputDelta=0.0
Armijo: th(0.017953622416932366)=1.516938865184784; dx=-4.269917903066518E-8 evalInputDelta=0.0
Armijo: th(0.002992270402822061)=1.516938865184784; dx=-4.269666589029027E-8 evalInputDelta=0.0
WOLFE (weak): th(4.2746720040315154E-4)=1.516938865184784; dx=-4.270119999682781E-8 evalInputDelta=0.0
WOLFE (weak): th(0.0017098688016126062)=1.516938865184784; dx=-4.268383518428504E-8 evalInputDelta=0.0
WOLFE (weak): th(0.0023510696022173336)=1.516938865184784; dx=-4.2693879210376577E-8 evalInputDelta=0.0
Armijo: th(0.0026716700025196972)=1.516938865184784; dx=-4.2698865889865654E-8 evalInputDelta=0.0
WOLFE (weak): th(0.0025113698023685157)=1.516938865184784; dx=-4.269593056341871E-8 evalInputDelta=0.0
WOLFE (weak): th(0.0025915199024441064)=1.516938865184784; dx=-4.2693257172801315E-8 evalInputDelta=0.0
Armijo: th(0.0026315949524819016)=1.516938865184784; dx=-4.269352293506281E-8 evalInputDelta=0.0
Armijo: th(0.002611557427463004)=1.516938865184784; dx=-4.269564688946559E-8 evalInputDelta=0.0
Armijo: th(0.0026015386649535554)=1.516938865184784; dx=-4.270273746400382E-8 evalInputDelta=0.0
Armijo: th(0.002596529283698831)=1.516938865184784; dx=-4.2697885001850564E-8 evalInputDelta=0.0
WOLFE (weak): th(0.002594024593071469)=1.516938865184784; dx=-4.269808044214548E-8 evalInputDelta=0.0
WOLFE (weak): th(0.00259527693838515)=1.516938865184784; dx=-4.26843588536681
...skipping 1518 bytes...
16938865184784; dx=-4.2703972194197524E-8 evalInputDelta=0.0
Armijo: th(0.013981811983167551)=1.516938865184784; dx=-4.271264457446543E-8 evalInputDelta=0.0
WOLFE (weak): th(0.012583630784850797)=1.516938865184784; dx=-4.2714098493782614E-8 evalInputDelta=0.0
Armijo: th(0.013282721384009174)=1.516938865184784; dx=-4.271046483972368E-8 evalInputDelta=0.0
WOLFE (weak): th(0.012933176084429985)=1.516938865184784; dx=-4.271521614167328E-8 evalInputDelta=0.0
Armijo: th(0.013107948734219579)=1.516938865184784; dx=-4.271263652765283E-8 evalInputDelta=0.0
Armijo: th(0.013020562409324782)=1.516938865184784; dx=-4.2710819207758226E-8 evalInputDelta=0.0
Armijo: th(0.012976869246877383)=1.516938865184784; dx=-4.270997792016087E-8 evalInputDelta=0.0
WOLFE (weak): th(0.012955022665653685)=1.516938865184784; dx=-4.2706174887710396E-8 evalInputDelta=0.0
WOLFE (weak): th(0.012965945956265535)=1.516938865184784; dx=-4.271351353393884E-8 evalInputDelta=0.0
WOLFE (weak): th(0.01297140760157146)=1.516938865184784; dx=-4.270009463082019E-8 evalInputDelta=0.0
WOLFE (weak): th(0.012974138424224423)=1.516938865184784; dx=-4.271006790572259E-8 evalInputDelta=0.0
WOLFE (weak): th(0.012975503835550902)=1.516938865184784; dx=-4.271382393727024E-8 evalInputDelta=0.0
Armijo: th(0.012976186541214144)=1.516938865184784; dx=-4.271311637604776E-8 evalInputDelta=0.0
Armijo: th(0.012975845188382523)=1.516938865184784; dx=-4.270620674276812E-8 evalInputDelta=0.0
Armijo: th(0.012975674511966712)=1.516938865184784; dx=-4.271118168448981E-8 evalInputDelta=0.0
WOLFE (weak): th(0.012975589173758807)=1.516938865184784; dx=-4.271717769724474E-8 evalInputDelta=0.0
mu ~= nu (0.012975589173758807): th(0.0)=1.516938865184784
Fitness changed from 1.516938865184784 to 1.516938865184784
Static Iteration Total: 179.1714; Orientation: 0.0393; Line Search: 163.9437
Iteration 2 failed. Error: 1.516938865184784
Previous Error: 0.0 -> 1.516938865184784
Optimization terminated 2
Final threshold in iteration 2: 1.516938865184784 (> -Infinity) after 389.799s (< 3600.000s)
1.516938865184784