Code from BasicOptimizer.scala:75 executed in 788.23 seconds (6.282 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: 956518211580600
Reset training subject: 956552321526500
Adding measurement 6386046d to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=4.731674239039421;dx=-4.5958400966923186E-4
New Minimum: 4.731674239039421 > 4.7311853021383286
END: th(2.154434690031884)=4.7311853021383286; dx=-3.721808215711549E-4 evalInputDelta=4.889369010925293E-4
Fitness changed from 4.731674239039421 to 4.7311853021383286
Iteration 1 complete. Error: 4.7311853021383286 Total: 172.4499; Orientation: 0.0149; Line Search: 69.6316
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/60d0a6d8-08da-454d-9012-7989cbc4e2aa.jpg)
Adding measurement 1e8e5f78 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=4.7311853021383286;dx=-3.213685276723288E-4
New Minimum: 4.7311853021383286 > 4.7304767072200775
END: th(4.641588833612779)=4.7304767072200775; dx=-2.253936049788859E-4 evalInputDelta=7.085949182510376E-4
Fitness changed from 4.7311853021383286 to 4.7304767072200775
Iteration 2 complete. Error: 4.7304767072200775 Total: 102.7968; Orientation: 0.0157; Line Search: 68.7706
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/9d52f8e8-8397-4a38-9b57-60b798c88411.jpg)
Adding measurement 4ebaca53 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=4.7304767072200775;dx=-1.8384159159679715E-4
New Minimum: 4.7304767072200775 > 4.729503534734249
END: th(10.000000000000002)=4.729503534734249; dx=-1.347895758800055E-4 evalInputDelta=9.731724858283997E-4
Fitness changed from 4.7304767072200775 to 4.729503534734249
Iteration 3 complete. Error: 4.729503534734249 Total: 103.5250; Orientation: 0.0162; Line Search: 69.4855
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/bed2ee16-2a3a-43b2-b930-e78bfc63baed.jpg)
Adding measurement 40c45d02 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.582e-01, gradient 1.079e-02, dot -0.992; [1c841d44-9762-4aa5-9bac-7c79de89a3fd = 1.000/1.000
...skipping 949 bytes...
Fitness changed from 4.729503534734249 to 4.689379081130028
Iteration 4 complete. Error: 4.689379081130028 Total: 207.6478; Orientation: 0.4957; Line Search: 170.9639
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/01dd3db0-fad9-41a0-8c7f-97611cd0b91c.jpg)
Adding measurement 2d7edd4d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.549e+01, gradient 1.152e-02, dot -0.878; [1c841d44-9762-4aa5-9bac-7c79de89a3fd = 1.000/1.000e+00]
Orientation rejected. Popping history element from 4.7311853021383286, 4.7304767072200775, 4.729503534734249, 4.689379081130028
LBFGS Accumulation History: 3 points
Removed measurement 1e8e5f78 to history. Total: 4
th(0)=4.689379081130028;dx=-1.3282543577826448E-4
New Minimum: 4.689379081130028 > 4.608567297458649
END: th(1113.9813200670674)=4.608567297458649; dx=-1.008925211163477E-4 evalInputDelta=0.08081178367137909
Fitness changed from 4.689379081130028 to 4.608567297458649
Iteration 5 complete. Error: 4.608567297458649 Total: 101.0856; Orientation: 0.4625; Line Search: 67.0188
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/bce7898b-3900-4c06-ac81-0a065fd50197.jpg)
Adding measurement 3dd280c3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.361e+02, gradient 1.608e-02, dot -0.662; [1c841d44-9762-4aa5-9bac-7c79de89a3fd = 1.000/1.000e+00]
Orientation rejected. Popping history element from 4.7304767072200775, 4.729503534734249, 4.689379081130028, 4.608567297458649
LBFGS Accumulation History: 3 points
Removed measurement 4ebaca53 to history. Total: 4
th(0)=4.608567297458649;dx=-2.584774143121449E-4
New Minimum: 4.608567297458649 > 4.437421947717667
END: th(2400.000000000001)=4.437421947717667; dx=-9.74279509560594E-5 evalInputDelta=0.17114534974098206
Fitness changed from 4.608567297458649 to 4.437421947717667
Iteration 6 complete. Error: 4.437421947717667 Total: 100.7264; Orientation: 0.4540; Line Search: 66.9155
Final threshold in iteration 6: 4.437421947717667 (> -Infinity) after 788.231s (< 720.000s)
4.437421947717667