Code from BasicOptimizer.scala:75 executed in 951.10 seconds (8.040 gc):
val lineSearchInstance: LineSearchStrategy = lineSearchFactory
IterativeTrainer.wrap(trainable)
.setOrientation(orientation())
.setMonitor(new TrainingMonitor() {
override def clear(): Unit = trainingMonitor.clear()
override def log(msg: String): Unit = trainingMonitor.log(msg)
override def onStepFail(currentPoint: Step): Boolean = {
BasicOptimizer.this.onStepFail(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, currentPoint)
trainingMonitor.onStepComplete(currentPoint)
super.onStepComplete(currentPoint)
}
})
.setTimeout(trainingMinutes, TimeUnit.MINUTES)
.setMaxIterations(trainingIterations)
.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
.runAndFree
.asInstanceOf[lang.Double]
Reset training subject: 1071118352219800
Reset training subject: 1071125799843899
Adding measurement 2b3242a5 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=0.8197377360241291;dx=-3.0918263643269953E-7
New Minimum: 0.8197377360241291 > 0.8197374899355268
WOLFE (weak): th(2.154434690031884)=0.8197374899355268; dx=-3.0518463891555333E-7 evalInputDelta=2.4608860238473085E-7
New Minimum: 0.8197374899355268 > 0.819736893889079
WOLFE (weak): th(4.308869380063768)=0.819736893889079; dx=-3.0518448731294565E-7 evalInputDelta=8.421350501386371E-7
New Minimum: 0.819736893889079 > 0.8197346510448766
WOLFE (weak): th(12.926608140191302)=0.8197346510448766; dx=-3.051843581565514E-7 evalInputDelta=3.084979252498954E-6
New Minimum: 0.8197346510448766 > 0.8197250574348662
WOLFE (weak): th(51.70643256076521)=0.8197250574348662; dx=-3.05180942948774E-7 evalInputDelta=1.2678589262904438E-5
New Minimum: 0.8197250574348662 > 0.8196742202529561
WOLFE (weak): th(258.53216280382605)=0.8196742202529561; dx=-3.051783240486062E-7 evalInputDelta=6.351577117302831E-5
New Minimum: 0.8196742202529561 > 0.8193563397582988
WOLFE (weak): th(1551.1929768229563)=0.8193563397582988; dx=-3.0504745470540255E-7 evalInputDelta=3.8139626583033603E-4
New Minimum: 0.8193563397582988 > 0.8170712110553431
WOLFE (weak): th(10858.350837760694)=0.8170712110553431; dx=-3.043013020604832E-7 evalInputDelta=0.002666524968786055
New Minimum: 0.8170712110553431 > 0.7987270306656871
WOLFE (weak): th(86866.80670208555)=0.7987270306656871; dx=-2.969677267859602E-7 evalInputDelta=0.021010705358442072
New Minimum: 0.7987270306656871 > 0.6573084602852555
END: th(781801.26031877)=0.6573084602852555; dx=-2.3428102651473707E-7 evalInputDelta=0.16242927573887367
Fitness changed from 0.8197377360241291 to 0.6573084602852555
Iteration 1 complete. Error: 0.6573084602852555 Total: 96.9198; Orientation: 0.0129; Line Search: 74.1380
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/8
...skipping 24862 bytes...
asurement 2e847e71 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.560e+03, gradient 1.531e-04, dot -0.781; [02a7fb3d-18db-4c31-aac6-4759b7e0089a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.3234192634416577, -0.3412005792271824, -0.34999778760179945, -0.35575101568015954
LBFGS Accumulation History: 3 points
Removed measurement 2b06681c to history. Total: 4
th(0)=-0.35575101568015954;dx=-2.3436931059124995E-8
Armijo: th(8813780.879798582)=-0.31690546081268334; dx=-6.800359885585815E-9 evalInputDelta=-0.038845554867476206
New Minimum: -0.35575101568015954 > -0.3605651726357513
END: th(4406890.439899291)=-0.3605651726357513; dx=-1.2231648381760848E-8 evalInputDelta=0.004814156955591731
Fitness changed from -0.35575101568015954 to -0.3605651726357513
Iteration 29 complete. Error: -0.3605651726357513 Total: 29.6640; Orientation: 0.3799; Line Search: 21.7469
Adding measurement dd77e0d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.356e+03, gradient 1.601e-04, dot -0.728; [02a7fb3d-18db-4c31-aac6-4759b7e0089a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.3412005792271824, -0.34999778760179945, -0.35575101568015954, -0.3605651726357513
LBFGS Accumulation History: 3 points
Removed measurement 36cdcae0 to history. Total: 4
th(0)=-0.3605651726357513;dx=-2.5643351775128803E-8
Armijo: th(9494357.638888901)=-0.2939529005134207; dx=-2.680733791588467E-9 evalInputDelta=-0.06661227212233056
New Minimum: -0.3605651726357513 > -0.3611959754676244
END: th(4747178.819444451)=-0.3611959754676244; dx=-9.987537202794917E-9 evalInputDelta=6.308028318731118E-4
Fitness changed from -0.3605651726357513 to -0.3611959754676244
Iteration 30 complete. Error: -0.3611959754676244 Total: 29.9706; Orientation: 0.3795; Line Search: 22.2143
<a id="p-21"></a>Iteration 30
<a id="p-20"></a>![Iteration 30](etc/9aa86a4c-83a0-4ad5-974b-8fc82e9a64ef.jpg)
Final threshold in iteration 31: -0.3611959754676244 (> -Infinity) after 951.093s (< 3600.000s)
-0.3611959754676244