Code from BasicOptimizer.scala:75 executed in 121.76 seconds (2.645 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: 928462098055900
Reset training subject: 928467153247900
Adding measurement 7f163047 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=1.569884978234768;dx=-1.4225818591395378E-6
New Minimum: 1.569884978234768 > 1.5698830857872963
WOLFE (weak): th(2.154434690031884)=1.5698830857872963; dx=-1.422580661554349E-6 evalInputDelta=1.8924474716186523E-6
New Minimum: 1.5698830857872963 > 1.5698800310492516
WOLFE (weak): th(4.308869380063768)=1.5698800310492516; dx=-1.4225894437280963E-6 evalInputDelta=4.947185516357422E-6
New Minimum: 1.5698800310492516 > 1.5698681697249413
WOLFE (weak): th(12.926608140191302)=1.5698681697249413; dx=-1.4225696104923345E-6 evalInputDelta=1.6808509826660156E-5
New Minimum: 1.5698681697249413 > 1.5698179677128792
WOLFE (weak): th(51.70643256076521)=1.5698179677128792; dx=-1.4224298335142528E-6 evalInputDelta=6.701052188873291E-5
New Minimum: 1.5698179677128792 > 1.5695496946573257
WOLFE (weak): th(258.53216280382605)=1.5695496946573257; dx=-1.4218745712062928E-6 evalInputDelta=3.352835774421692E-4
New Minimum: 1.5695496946573257 > 1.5678749457001686
WOLFE (weak): th(1551.1929768229563)=1.5678749457001686; dx=-1.4194453382056222E-6 evalInputDelta=0.002010032534599304
New Minimum: 1.5678749457001686 > 1.5558875799179077
WOLFE (weak): th(10858.350837760694)=1.5558875799179077; dx=-1.402437764028835E-6 evalInputDelta=0.013997398316860199
New Minimum: 1.5558875799179077 > 1.4670269638299942
END: th(86866.80670208555)=1.4670269638299942; dx=-1.1661814348803395E-6 evalInputDelta=0.10285801440477371
Fitness changed from 1.569884978234768 to 1.4670269638299942
Iteration 1 complete. Error: 1.4670269638299942 Total: 47.9510; Orientation: 0.0656; Line Search: 35.2622
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/b25b192d-45fb-416c-a117-9c3d7ce15bfa.jpg)
Adding measurement 20f1cd0e to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=1.4670269638299942;dx=-1.20929473
...skipping 2006 bytes...
de: 8.439e+02, gradient 6.986e-04, dot -0.737; [dc9ae281-513e-4364-82f1-e88759f0458e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.4670269638299942, 1.309493601322174, 1.1012274473905563, 0.8863683044910431
LBFGS Accumulation History: 3 points
Removed measurement 20f1cd0e to history. Total: 4
th(0)=0.8863683044910431;dx=-4.880121703181704E-7
New Minimum: 0.8863683044910431 > 0.7480021715164185
END: th(1871488.617712673)=0.7480021715164185; dx=-5.138587396957068E-9 evalInputDelta=0.13836613297462463
Fitness changed from 0.8863683044910431 to 0.7480021715164185
Iteration 5 complete. Error: 0.7480021715164185 Total: 13.8198; Orientation: 1.9283; Line Search: 7.9838
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/87c6aad9-ca18-47d4-8030-f14e9a356c91.jpg)
Adding measurement 26fe8a08 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.047e+03, gradient 7.686e-04, dot -0.664; [dc9ae281-513e-4364-82f1-e88759f0458e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.309493601322174, 1.1012274473905563, 0.8863683044910431, 0.7480021715164185
LBFGS Accumulation History: 3 points
Removed measurement 4fe352a7 to history. Total: 4
th(0)=0.7480021715164185;dx=-5.907251565281254E-7
New Minimum: 0.7480021715164185 > 0.7386727929115295
WOLF (strong): th(4032000.0000000014)=0.7386727929115295; dx=4.0159320212013695E-8 evalInputDelta=0.009329378604888916
New Minimum: 0.7386727929115295 > 0.6351676881313324
WOLF (strong): th(2016000.0000000007)=0.6351676881313324; dx=5.2960572882732126E-8 evalInputDelta=0.11283448338508606
New Minimum: 0.6351676881313324 > 0.5971985161304474
END: th(672000.0000000002)=0.5971985161304474; dx=-7.490049258577461E-8 evalInputDelta=0.15080365538597107
Fitness changed from 0.7480021715164185 to 0.5971985161304474
Iteration 6 complete. Error: 0.5971985161304474 Total: 22.3382; Orientation: 1.9114; Line Search: 16.5777
Final threshold in iteration 7: 0.5971985161304474 (> -Infinity) after 121.763s (< 720.000s)
0.5971985161304474