BasicOptimizer.scala:89 executed in 131.47 seconds (1.714 gc):
val lineSearchInstance: LineSearchStrategy = lineSearchFactory
val trainer = new IterativeTrainer(trainable)
trainer.setOrientation(orientation())
trainer.setMonitor(new TrainingMonitor() {
override def clear(): Unit = trainingMonitor.clear()
override def log(msg: String): Unit = {
trainingMonitor.log(msg)
BasicOptimizer.this.log(msg)
}
override def onStepFail(currentPoint: Step): Boolean = {
BasicOptimizer.this.onStepFail(trainable.addRef().asInstanceOf[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.addRef().asInstanceOf[Trainable], currentPoint)
trainingMonitor.onStepComplete(currentPoint)
super.onStepComplete(currentPoint)
}
})
trainer.setTimeout(trainingMinutes, TimeUnit.MINUTES)
trainer.setMaxIterations(trainingIterations)
trainer.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
trainer.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
val result = trainer.run.asInstanceOf[lang.Double]
trainer.freeRef()
result
Reset training subject: 34735030826100
Reset training subject: 34737658140000
Adding measurement 690d62e2 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-70.46714935828328;dx=-4.9119598739970986E-6
New Minimum: -70.46714935828328 > -70.46715664229393
END: th(2.154434690031884)=-70.46715664229393; dx=-3.47067042902778E-6 evalInputDelta=7.284010649755146E-6
Fitness changed from -70.46714935828328 to -70.46715664229393
Iteration 1 complete. Error: -70.46715664229393 Total: 13.2575; Orientation: 0.0609; Line Search: 5.6575
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/52bffb9d-7939-45a1-ad00-a02a481cdf6b.jpg)
Adding measurement 28234e51 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-70.46715664229393;dx=-3.444723722069452E-6
New Minimum: -70.46715664229393 > -70.46718092232396
WOLFE (weak): th(4.641588833612779)=-70.46718092232396; dx=-3.443908156197239E-6 evalInputDelta=2.4280030032741706E-5
New Minimum: -70.46718092232396 > -70.46719549033797
WOLFE (weak): th(9.283177667225559)=-70.46719549033797; dx=-3.4416687204725513E-6 evalInputDelta=3.884804404208353E-5
New Minimum: -70.46719549033797 > -70.46726833036283
WOLFE (weak): th(27.849533001676676)=-70.46726833036283; dx=-3.4404336943882695E-6 evalInputDelta=1.1168806889827465E-4
New Minimum: -70.46726833036283 > -70.46760096551932
WOLFE (weak): th(111.3981320067067)=-70.46760096551932; dx=-3.4387995789348643E-6 evalInputDelta=4.4432322539478264E-4
New Minimum: -70.46760096551932 > -70.4693563790602
WOLFE (weak): th(556.9906600335335)=-70.4693563790602; dx=-3.4381625351124768E-6 evalInputDelta=0.0021997367662720535
New Minimum: -70.4693563790602 > -70.48032975757177
WOLFE (weak): th(3341.9439602012008)=-70.48032975757177; dx=-3.4377663428209287E-6 evalInputDelta=0.013173115277837155
New Minimum: -70.48032975757177 > -70.559282854979
WOLFE (weak): th(23393.607721408407)=-70.559282854979; dx=-3.4332358640974E-6 evalInputDelta=0.09212621268507348
New Minimum: -70.559282854979 > -71.19850265544399
WOLFE (weak): th(187148.86177126726)=-71.19850265544399; dx=-3.3721228675100057E-6 evalInputDelta=0.7313460131500591
New Minimum: -71.19850265544399 > -76.42269099903218
END: th(1684339.7559414054)=-76.42269099903218; dx=-2.6696374066736976E-6 evalInputDelta=5.955534356738255
Fitness changed from -70.46715664229393 to -76.42269099903218
Iteration 2 complete. Error: -76.42269099903218 Total: 29.0478; Orientation: 0.0617; Line Search: 25.7186
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/88c70c86-04e5-4795-9395-189e3d6b0b7b.jpg)
Adding measurement 7ef52146 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-76.42269099903218;dx=-2.5523642085949522E-6
New Minimum: -76.42269099903218 > -84.41878957779856
END: th(3628800.0000000005)=-84.41878957779856; dx=-1.380393401877565E-6 evalInputDelta=7.996098578766379
Fitness changed from -76.42269099903218 to -84.41878957779856
Iteration 3 complete. Error: -84.41878957779856 Total: 8.0366; Orientation: 0.0611; Line Search: 5.0567
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/6a388a95-2350-4438-ab7e-8e18f62da12c.jpg)
Adding measurement 206e1fb3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.535e+03, gradient 1.231e-03, dot -0.665; [0f189820-2e6b-4c87-9a51-dad29d422042 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -84.41878957779856, -76.42269099903218, -70.46715664229393, -70.46714935828328
LBFGS Accumulation History: 3 points
Removed measurement 206e1fb3 to history. Total: 3
th(0)=-84.41878957779856;dx=-1.5133622393197047E-6
New Minimum: -84.41878957779856 > -93.59669206320164
END: th(7818012.603187701)=-93.59669206320164; dx=-6.29371454084455E-7 evalInputDelta=9.17790248540308
Fitness changed from -84.41878957779856 to -93.59669206320164
Iteration 4 complete. Error: -93.59669206320164 Total: 9.2332; Orientation: 1.0681; Line Search: 4.9840
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/d9b0e4a8-b17c-41f1-9573-c80522ded79d.jpg)
Adding measurement 6ef4e870 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.240e+04, gradient 1.217e-03, dot -0.492; [0f189820-2e6b-4c87-9a51-dad29d422042 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -93.59669206320164, -76.42269099903218, -70.46715664229393, -70.46714935828328
LBFGS Accumulation History: 3 points
Removed measurement 6ef4e870 to history. Total: 3
th(0)=-93.59669206320164;dx=-1.4797922656123095E-6
New Minimum: -93.59669206320164 > -95.96333764489144
WOLF (strong): th(1.6843397559414055E7)=-95.96333764489144; dx=3.7063016317084616E-7 evalInputDelta=2.366645581689795
New Minimum: -95.96333764489144 > -98.64514891832454
WOLF (strong): th(8421698.779707028)=-98.64514891832454; dx=5.7838738653804425E-8 evalInputDelta=5.048456855122893
END: th(2807232.926569009)=-97.09073839543109; dx=-7.399755179956931E-7 evalInputDelta=3.494046332229445
Fitness changed from -93.59669206320164 to -98.64514891832454
Iteration 5 complete. Error: -98.64514891832454 Total: 14.5890; Orientation: 1.0531; Line Search: 10.3876
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/d7fea8cd-6b6e-49a8-8bd2-980ed4e37ae1.jpg)
Adding measurement 66513aac to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.939e+03, gradient 1.483e-03, dot -0.294; [0f189820-2e6b-4c87-9a51-dad29d422042 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -98.64514891832454, -76.42269099903218, -70.46715664229393, -70.46714935828328
LBFGS Accumulation History: 3 points
Removed measurement 66513aac to history. Total: 3
th(0)=-98.64514891832454;dx=-2.198556990064162E-6
New Minimum: -98.64514891832454 > -104.38098808617559
WOLF (strong): th(6048000.000000001)=-104.38098808617559; dx=4.424120067129866E-7 evalInputDelta=5.735839167851054
END: th(3024000.0000000005)=-104.03216122305813; dx=-8.396181483471871E-7 evalInputDelta=5.387012304733588
Fitness changed from -98.64514891832454 to -104.38098808617559
Iteration 6 complete. Error: -104.38098808617559 Total: 11.9797; Orientation: 1.0294; Line Search: 7.8211
Adding measurement 1a09ebcd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.933e+04, gradient 1.336e-03, dot -0.379; [0f189820-2e6b-4c87-9a51-dad29d422042 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -104.38098808617559, -76.42269099903218, -70.46715664229393, -70.46714935828328
LBFGS Accumulation History: 3 points
Removed measurement 1a09ebcd to history. Total: 3
th(0)=-104.38098808617559;dx=-1.7848693828318983E-6
New Minimum: -104.38098808617559 > -108.293834614823
WOLF (strong): th(6515010.502656418)=-108.293834614823; dx=5.23805040000927E-7 evalInputDelta=3.912846528647407
New Minimum: -108.293834614823 > -108.70334397476898
END: th(3257505.251328209)=-108.70334397476898; dx=-4.866815775156203E-7 evalInputDelta=4.322355888593393
Fitness changed from -104.38098808617559 to -108.70334397476898
Iteration 7 complete. Error: -108.70334397476898 Total: 11.1423; Orientation: 1.0370; Line Search: 7.6612
Adding measurement 43efd3e6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.596e+04, gradient 8.567e-04, dot -0.682; [0f189820-2e6b-4c87-9a51-dad29d422042 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -108.70334397476898, -76.42269099903218, -70.46715664229393, -70.46714935828328
LBFGS Accumulation History: 3 points
Removed measurement 43efd3e6 to history. Total: 3
th(0)=-108.70334397476898;dx=-7.32394961576389E-7
New Minimum: -108.70334397476898 > -112.94109776104077
END: th(7018082.316422524)=-112.94109776104077; dx=-3.823577896694867E-7 evalInputDelta=4.237753786271782
Fitness changed from -108.70334397476898 to -112.94109776104077
Iteration 8 complete. Error: -112.94109776104077 Total: 8.6971; Orientation: 0.9934; Line Search: 5.1299
Adding measurement 5f862e9d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.974e+04, gradient 9.572e-04, dot -0.568; [0f189820-2e6b-4c87-9a51-dad29d422042 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -112.94109776104077, -76.42269099903218, -70.46715664229393, -70.46714935828328
LBFGS Accumulation History: 3 points
Removed measurement 5f862e9d to history. Total: 3
th(0)=-112.94109776104077;dx=-9.156739878276838E-7
New Minimum: -112.94109776104077 > -114.32331211111291
WOLF (strong): th(1.5120000000000006E7)=-114.32331211111291; dx=2.426001882066566E-7 evalInputDelta=1.3822143500721467
New Minimum: -114.32331211111291 > -115.9085957999268
WOLF (strong): th(7560000.000000003)=-115.9085957999268; dx=1.3798694728105781E-8 evalInputDelta=2.967498038886035
END: th(2520000.000000001)=-114.91690288106949; dx=-4.886094026589244E-7 evalInputDelta=1.975805120028724
Fitness changed from -112.94109776104077 to -115.9085957999268
Iteration 9 complete. Error: -115.9085957999268 Total: 13.6896; Orientation: 1.0040; Line Search: 10.0888
Adding measurement 78c36d1f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.715e+04, gradient 1.182e-03, dot -0.393; [0f189820-2e6b-4c87-9a51-dad29d422042 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -115.9085957999268, -76.42269099903218, -70.46715664229393, -70.46714935828328
LBFGS Accumulation History: 3 points
Removed measurement 78c36d1f to history. Total: 3
th(0)=-115.9085957999268;dx=-1.3951435019317728E-6
New Minimum: -115.9085957999268 > -119.58065618264602
WOLF (strong): th(5429175.418880349)=-119.58065618264602; dx=2.0769459960718555E-7 evalInputDelta=3.6720603827192235
END: th(2714587.7094401745)=-119.09085603485124; dx=-6.27835598895596E-7 evalInputDelta=3.182260234924442
Fitness changed from -115.9085957999268 to -119.58065618264602
Iteration 10 complete. Error: -119.58065618264602 Total: 11.3642; Orientation: 1.0019; Line Search: 7.7477
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/d5c79d29-4239-4c4b-bd59-895c671ffb48.jpg)
Final threshold in iteration 11: -119.58065618264602 (> -Infinity) after 131.472s (< 5400.000s)
Returns
-119.58065618264602