Code from BasicOptimizer.scala:88 executed in 603.58 seconds (9.933 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: 3722502382854
Reset training subject: 3725926162776
Adding measurement 44ef95f2 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=4.6776420176029205;dx=-2.367346975760286E-7
New Minimum: 4.6776420176029205 > 4.677641838788986
WOLFE (weak): th(2.154434690031884)=4.677641838788986; dx=-2.367347861078144E-7 evalInputDelta=1.7881393432617188E-7
New Minimum: 4.677641838788986 > 4.677641421556473
WOLFE (weak): th(4.308869380063768)=4.677641421556473; dx=-2.3673524512896087E-7 evalInputDelta=5.960464477539062E-7
New Minimum: 4.677641421556473 > 4.677640065550804
WOLFE (weak): th(12.926608140191302)=4.677640065550804; dx=-2.3673508820297608E-7 evalInputDelta=1.952052116394043E-6
New Minimum: 4.677640065550804 > 4.67763414978981
WOLFE (weak): th(51.70643256076521)=4.67763414978981; dx=-2.3672945174735697E-7 evalInputDelta=7.867813110351562E-6
New Minimum: 4.67763414978981 > 4.677602171897888
WOLFE (weak): th(258.53216280382605)=4.677602171897888; dx=-2.3672463877705594E-7 evalInputDelta=3.984570503234863E-5
New Minimum: 4.677602171897888 > 4.67740236222744
WOLFE (weak): th(1551.1929768229563)=4.67740236222744; dx=-2.3669836441327798E-7 evalInputDelta=2.3965537548065186E-4
New Minimum: 4.67740236222744 > 4.675966173410416
WOLFE (weak): th(10858.350837760694)=4.675966173410416; dx=-2.3646868658043705E-7 evalInputDelta=0.0016758441925048828
New Minimum: 4.675966173410416 > 4.66433273255825
WOLFE (weak): th(86866.80670208555)=4.66433273255825; dx=-2.3469470181411508E-7 evalInputDelta=0.013309285044670105
New Minimum: 4.66433273255825 > 4.565940320491791
WOLFE (weak): th(781801.26031877)=4.565940320491791; dx=-2.17059005307366E-7 evalInputDelta=0.11170169711112976
New Minimum: 4.565940320491791 > 4.354244142770767
END: th(7818012.6031877)=4.354244142770767; dx=-8.296043900707979E-8 evalInputDelta=0.3233978748321533
Fitness changed from 4.6776420176029205 to 4.354244142770767
Iteration 1 complete. Error: 4.354244142770767 Total: 48.4184; Orienta
...skipping 18961 bytes...
; dx=-1.151868461851364E-7 evalInputDelta=-2.086162567138672E-7
Armijo: th(0.25164017132553446)=4.181686833500862; dx=-1.151870727100421E-7 evalInputDelta=-2.9802322387695312E-8
WOLFE (weak): th(0.23177384201036066)=4.18168680369854; dx=-1.1518705408094489E-7 evalInputDelta=0.0
WOLFE (weak): th(0.24170700666794756)=4.18168680369854; dx=-1.1518706731205135E-7 evalInputDelta=0.0
Armijo: th(0.24667358899674102)=4.181686952710152; dx=-1.1518685883157645E-7 evalInputDelta=-1.4901161193847656E-7
WOLFE (weak): th(0.2441902978323443)=4.18168680369854; dx=-1.151868588252151E-7 evalInputDelta=0.0
Armijo: th(0.24543194341454266)=4.181686833500862; dx=-1.1518686337795943E-7 evalInputDelta=-2.9802322387695312E-8
WOLFE (weak): th(0.24481112062344348)=4.18168680369854; dx=-1.1518686177268771E-7 evalInputDelta=0.0
Armijo: th(0.24512153201899306)=4.181686833500862; dx=-1.1518686378033259E-7 evalInputDelta=-2.9802322387695312E-8
WOLFE (weak): th(0.2449663263212183)=4.18168680369854; dx=-1.1518686126180638E-7 evalInputDelta=0.0
WOLFE (weak): th(0.24504392917010567)=4.18168680369854; dx=-1.1518686112097185E-7 evalInputDelta=0.0
WOLFE (weak): th(0.24508273059454938)=4.18168680369854; dx=-1.151868614217846E-7 evalInputDelta=0.0
Armijo: th(0.24510213130677122)=4.181686833500862; dx=-1.1518686395057476E-7 evalInputDelta=-2.9802322387695312E-8
WOLFE (weak): th(0.2450924309506603)=4.18168680369854; dx=-1.1518686040098348E-7 evalInputDelta=0.0
WOLFE (weak): th(0.24509728112871576)=4.18168680369854; dx=-1.1518686048927046E-7 evalInputDelta=0.0
Armijo: th(0.2450997062177435)=4.181686833500862; dx=-1.1518686407026162E-7 evalInputDelta=-2.9802322387695312E-8
mu ~= nu (0.24509728112871576): th(0.0)=4.18168680369854
Fitness changed from 4.18168680369854 to 4.18168680369854
Static Iteration Total: 90.6709; Orientation: 0.0126; Line Search: 84.1169
Iteration 9 failed. Error: 4.18168680369854
Previous Error: 0.0 -> 4.18168680369854
Optimization terminated 9
Final threshold in iteration 9: 4.18168680369854 (> -Infinity) after 603.577s (< 3600.000s)
4.18168680369854