Code from BasicOptimizer.scala:88 executed in 394.89 seconds (2.404 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: 6303653701455
Reset training subject: 6313604532336
Adding measurement 5c2416bf to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=1.546617865562439;dx=-4.3474097497441774E-8
Armijo: th(2.154434690031884)=1.546617865562439; dx=-4.331408487452656E-8 evalInputDelta=0.0
Armijo: th(1.077217345015942)=1.546617865562439; dx=-4.331013714337853E-8 evalInputDelta=0.0
Armijo: th(0.3590724483386473)=1.546617865562439; dx=-4.3298212089717084E-8 evalInputDelta=0.0
Armijo: th(0.08976811208466183)=1.546617865562439; dx=-4.3317576900466533E-8 evalInputDelta=0.0
Armijo: th(0.017953622416932366)=1.546617865562439; dx=-4.331603747725872E-8 evalInputDelta=0.0
Armijo: th(0.002992270402822061)=1.546617865562439; dx=-4.3284016929211525E-8 evalInputDelta=0.0
WOLFE (weak): th(4.2746720040315154E-4)=1.546617865562439; dx=-4.3318266100157004E-8 evalInputDelta=0.0
WOLFE (weak): th(0.0017098688016126062)=1.546617865562439; dx=-4.332051355514173E-8 evalInputDelta=0.0
WOLFE (weak): th(0.0023510696022173336)=1.546617865562439; dx=-4.331686207732152E-8 evalInputDelta=0.0
Armijo: th(0.0026716700025196972)=1.546617865562439; dx=-4.3319382890490735E-8 evalInputDelta=0.0
WOLFE (weak): th(0.0025113698023685157)=1.546617865562439; dx=-4.330667777102559E-8 evalInputDelta=0.0
Armijo: th(0.0025915199024441064)=1.546617865562439; dx=-4.3323175138072217E-8 evalInputDelta=0.0
WOLFE (weak): th(0.0025514448524063113)=1.546617865562439; dx=-4.331789894253048E-8 evalInputDelta=0.0
Armijo: th(0.002571482377425209)=1.546617865562439; dx=-4.331133289632836E-8 evalInputDelta=0.0
Armijo: th(0.00256146361491576)=1.546617865562439; dx=-4.331984699472179E-8 evalInputDelta=0.0
Armijo: th(0.0025564542336610355)=1.546617865562439; dx=-4.331452744238582E-8 evalInputDelta=0.0
Armijo: th(0.0025539495430336734)=1.546617865562439; dx=-4.3313244125583484E-8 evalInputDelta=0.0
WOLFE (weak): th(0.0025526971977199923)=1.546617865562439; dx=-4.330798236912206E-8 evalInputDelta=0.0
WOLFE (weak): th(0.
...skipping 1478 bytes...
0980349888)=1.546617865562439; dx=-4.33066922467385E-8 evalInputDelta=0.0
Armijo: th(0.013754792483624906)=1.546617865562439; dx=-4.330891366132539E-8 evalInputDelta=0.0
WOLFE (weak): th(0.012379313235262417)=1.546617865562439; dx=-4.330735972347265E-8 evalInputDelta=0.0
Armijo: th(0.013067052859443661)=1.546617865562439; dx=-4.3306874653021915E-8 evalInputDelta=0.0
WOLFE (weak): th(0.012723183047353039)=1.546617865562439; dx=-4.3310762247763774E-8 evalInputDelta=0.0
Armijo: th(0.012895117953398351)=1.546617865562439; dx=-4.330984141062397E-8 evalInputDelta=0.0
Armijo: th(0.012809150500375694)=1.546617865562439; dx=-4.3306229675930665E-8 evalInputDelta=0.0
WOLFE (weak): th(0.012766166773864367)=1.546617865562439; dx=-4.3302672288647655E-8 evalInputDelta=0.0
Armijo: th(0.01278765863712003)=1.546617865562439; dx=-4.33117181098308E-8 evalInputDelta=0.0
Armijo: th(0.012776912705492199)=1.546617865562439; dx=-4.33091410471896E-8 evalInputDelta=0.0
Armijo: th(0.012771539739678282)=1.546617865562439; dx=-4.330596108487614E-8 evalInputDelta=0.0
WOLFE (weak): th(0.012768853256771325)=1.546617865562439; dx=-4.3307881541484736E-8 evalInputDelta=0.0
WOLFE (weak): th(0.012770196498224803)=1.546617865562439; dx=-4.330993627870546E-8 evalInputDelta=0.0
Armijo: th(0.012770868118951543)=1.546617865562439; dx=-4.331272293770094E-8 evalInputDelta=0.0
Armijo: th(0.012770532308588173)=1.546617865562439; dx=-4.330170418394403E-8 evalInputDelta=0.0
WOLFE (weak): th(0.012770364403406488)=1.546617865562439; dx=-4.330930564571111E-8 evalInputDelta=0.0
Armijo: th(0.01277044835599733)=1.546617865562439; dx=-4.331357855695042E-8 evalInputDelta=0.0
mu ~= nu (0.012770364403406488): th(0.0)=1.546617865562439
Fitness changed from 1.546617865562439 to 1.546617865562439
Static Iteration Total: 179.5855; Orientation: 0.0377; Line Search: 164.9661
Iteration 2 failed. Error: 1.546617865562439
Previous Error: 0.0 -> 1.546617865562439
Optimization terminated 2
Final threshold in iteration 2: 1.546617865562439 (> -Infinity) after 394.885s (< 3600.000s)
1.546617865562439