Code from BasicOptimizer.scala:75 executed in 117.18 seconds (3.910 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: 901442064756100
Reset training subject: 901443044400300
Adding measurement 11ef3bee to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=3.4546397493686527;dx=-1.1036333198207421E-4
New Minimum: 3.4546397493686527 > 3.454443398397416
WOLFE (weak): th(2.154434690031884)=3.454443398397416; dx=-1.0686532928633075E-4 evalInputDelta=1.96350971236825E-4
New Minimum: 3.454443398397416 > 3.4542484779376537
WOLFE (weak): th(4.308869380063768)=3.4542484779376537; dx=-1.0705413799284151E-4 evalInputDelta=3.912714309990406E-4
New Minimum: 3.4542484779376537 > 3.453474992653355
WOLFE (weak): th(12.926608140191302)=3.453474992653355; dx=-1.0332631761548916E-4 evalInputDelta=0.001164756715297699
New Minimum: 3.453474992653355 > 3.4500419166870415
WOLFE (weak): th(51.70643256076521)=3.4500419166870415; dx=-1.0626314062136984E-4 evalInputDelta=0.00459783268161118
New Minimum: 3.4500419166870415 > 3.433039648924023
WOLFE (weak): th(258.53216280382605)=3.433039648924023; dx=-1.0040370868159412E-4 evalInputDelta=0.02160010044462979
New Minimum: 3.433039648924023 > 3.3455800637602806
END: th(1551.1929768229563)=3.3455800637602806; dx=-4.4471377487507386E-5 evalInputDelta=0.10905968560837209
Fitness changed from 3.4546397493686527 to 3.3455800637602806
Iteration 1 complete. Error: 3.3455800637602806 Total: 9.2460; Orientation: 0.0147; Line Search: 6.4836
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/ec64bdd5-99b3-4ba7-97f9-e7a93e62e4c7.jpg)
Adding measurement 5a2c6a67 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=3.3455800637602806;dx=-3.4002567266829814E-5
New Minimum: 3.3455800637602806 > 3.2607637997716665
END: th(3341.943960201201)=3.2607637997716665; dx=-1.6841802385746804E-5 evalInputDelta=0.08481626398861408
Fitness changed from 3.3455800637602806 to 3.2607637997716665
Iteration 2 complete. Error: 3.2607637997716665 Total: 2.7293; Orientation: 0.0143; Line Search: 1.8226
<a id="p-5"></
...skipping 20744 bytes...
204498443215)=2.8945963769219816; dx=-7.520262793978682E-6 evalInputDelta=1.914799213409424E-6
New Minimum: 2.8945963769219816 > 2.8945935014635324
WOLFE (weak): th(0.7973761349532964)=2.8945935014635324; dx=-7.155831034326129E-6 evalInputDelta=4.790257662534714E-6
New Minimum: 2.8945935014635324 > 2.8945800834335387
END: th(3.1895045398131856)=2.8945800834335387; dx=-5.981135928508907E-6 evalInputDelta=1.820828765630722E-5
Fitness changed from 2.894598291721195 to 2.8945800834335387
Iteration 24 complete. Error: 2.8945800834335387 Total: 5.9221; Orientation: 0.4323; Line Search: 4.5980
Adding measurement 5b3eb1dd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.645e-02, gradient 1.030e-02, dot -0.246; [72c7d8da-a29a-42d2-a0a0-fd713eca9bd6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.8945999653078616, 2.8945992467924953, 2.894598291721195, 2.8945800834335387
LBFGS Accumulation History: 3 points
Removed measurement 19bdf520 to history. Total: 4
th(0)=2.8945800834335387;dx=-1.0599422953549467E-4
Armijo: th(6.871579224587706)=2.894645764492452; dx=-6.584527123877981E-6 evalInputDelta=-6.568105891346931E-5
Armijo: th(3.435789612293853)=2.8946651378646493; dx=-6.575651383492622E-6 evalInputDelta=-8.50544311106205E-5
Armijo: th(1.1452632040979511)=2.8946778145618737; dx=-6.56234628261716E-6 evalInputDelta=-9.773112833499908E-5
Armijo: th(0.2863158010244878)=2.894602251239121; dx=2.306128975383956E-4 evalInputDelta=-2.2167805582284927E-5
New Minimum: 2.8945800834335387 > 2.894577459897846
END: th(0.05726316020489756)=2.894577459897846; dx=-2.193189067040598E-6 evalInputDelta=2.623535692691803E-6
Fitness changed from 2.8945800834335387 to 2.894577459897846
Iteration 25 complete. Error: 2.894577459897846 Total: 8.2435; Orientation: 0.4121; Line Search: 6.9561
<a id="p-19"></a>Iteration 25
<a id="p-18"></a>![Iteration 25](etc/c01caac4-b5d5-44a5-b5b3-3f1103906d78.jpg)
Final threshold in iteration 26: 2.894577459897846 (> -Infinity) after 117.183s (< 3600.000s)
2.894577459897846