Code from BasicOptimizer.scala:75 executed in 57.82 seconds (1.728 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: 923521649867500
Reset training subject: 923522551384000
Adding measurement 34a733f1 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=3.264231897890568;dx=-1.645683193453778E-5
New Minimum: 3.264231897890568 > 3.264205940067768
WOLFE (weak): th(2.154434690031884)=3.264205940067768; dx=-1.646248070462759E-5 evalInputDelta=2.5957822799682617E-5
New Minimum: 3.264205940067768 > 3.2641799710690975
WOLFE (weak): th(4.308869380063768)=3.2641799710690975; dx=-1.646377065277513E-5 evalInputDelta=5.192682147026062E-5
New Minimum: 3.2641799710690975 > 3.2640758864581585
WOLFE (weak): th(12.926608140191302)=3.2640758864581585; dx=-1.6484576669130962E-5 evalInputDelta=1.560114324092865E-4
New Minimum: 3.2640758864581585 > 3.2636052146553993
WOLFE (weak): th(51.70643256076521)=3.2636052146553993; dx=-1.662033248076984E-5 evalInputDelta=6.26683235168457E-4
New Minimum: 3.2636052146553993 > 3.261023424565792
WOLFE (weak): th(258.53216280382605)=3.261023424565792; dx=-1.755295036337559E-5 evalInputDelta=0.003208473324775696
New Minimum: 3.261023424565792 > 3.243608057498932
WOLFE (weak): th(1551.1929768229563)=3.243608057498932; dx=-1.5049830318176754E-5 evalInputDelta=0.020623840391635895
New Minimum: 3.243608057498932 > 3.165475819259882
END: th(10858.350837760694)=3.165475819259882; dx=-1.0277965061063445E-5 evalInputDelta=0.0987560786306858
Fitness changed from 3.264231897890568 to 3.165475819259882
Iteration 1 complete. Error: 3.165475819259882 Total: 10.1551; Orientation: 0.0042; Line Search: 7.3311
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/709d50db-b096-4f7c-88c5-5095d479d7fc.jpg)
Adding measurement 48cfa43d to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=3.165475819259882;dx=-1.1058427171465555E-5
New Minimum: 3.165475819259882 > 3.014234982430935
END: th(23393.607721408407)=3.014234982430935; dx=-6.713922216478062E-6 evalInputDelta=0.15124083682894707
Fitness changed from
...skipping 10211 bytes...
omplete. Error: 1.4682716578245163 Total: 5.2777; Orientation: 0.1110; Line Search: 4.4069
Adding measurement 42138a26 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.113e+02, gradient 4.598e-04, dot -0.839; [bf22a1a8-2d35-404c-9936-097d01744424 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.6422287374734879, 1.5587328672409058, 1.498229831457138, 1.4682716578245163
LBFGS Accumulation History: 3 points
Removed measurement 33627f05 to history. Total: 4
th(0)=1.4682716578245163;dx=-2.11394169376807E-7
New Minimum: 1.4682716578245163 > 1.427802562713623
END: th(406139.02294111834)=1.427802562713623; dx=-1.0169931178345361E-7 evalInputDelta=0.04046909511089325
Fitness changed from 1.4682716578245163 to 1.427802562713623
Iteration 14 complete. Error: 1.427802562713623 Total: 2.8449; Orientation: 0.1139; Line Search: 1.8288
Adding measurement 61f238e9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.297e+02, gradient 4.443e-04, dot -0.766; [bf22a1a8-2d35-404c-9936-097d01744424 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.5587328672409058, 1.498229831457138, 1.4682716578245163, 1.427802562713623
LBFGS Accumulation History: 3 points
Removed measurement 1b6112ab to history. Total: 4
th(0)=1.427802562713623;dx=-1.9739446362535872E-7
New Minimum: 1.427802562713623 > 1.4080356657505035
WOLF (strong): th(875000.0000000005)=1.4080356657505035; dx=4.22582089169987E-9 evalInputDelta=0.019766896963119507
New Minimum: 1.4080356657505035 > 1.4005369544029236
END: th(437500.00000000023)=1.4005369544029236; dx=-4.2160146325091406E-8 evalInputDelta=0.027265608310699463
Fitness changed from 1.427802562713623 to 1.4005369544029236
Iteration 15 complete. Error: 1.4005369544029236 Total: 3.7326; Orientation: 0.1174; Line Search: 2.7031
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/54fc35fa-9072-4622-93ca-665fdd8256f0.jpg)
Final threshold in iteration 16: 1.4005369544029236 (> -Infinity) after 57.820s (< 1800.000s)
1.4005369544029236