BasicOptimizer.scala:89 executed in 132.87 seconds (1.617 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: 332790276693800
Reset training subject: 332793069499600
Adding measurement 77e879f0 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-119.33974841495085;dx=-2.5984625194876386E-5
New Minimum: -119.33974841495085 > -119.33979286540934
END: th(2.154434690031884)=-119.33979286540934; dx=-2.0214652458178234E-5 evalInputDelta=4.4450458489109224E-5
Fitness changed from -119.33974841495085 to -119.33979286540934
Iteration 1 complete. Error: -119.33979286540934 Total: 13.0766; Orientation: 0.0613; Line Search: 5.0972
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/b4deae8d-75a2-4cae-8dfe-23a4897e3b1d.jpg)
Adding measurement 3bfe07ff to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-119.33979286540934;dx=-2.0094166174297393E-5
New Minimum: -119.33979286540934 > -119.33989793006357
WOLFE (weak): th(4.641588833612779)=-119.33989793006357; dx=-2.0091567472719116E-5 evalInputDelta=1.0506465423532063E-4
New Minimum: -119.33989793006357 > -119.34000703556816
WOLFE (weak): th(9.283177667225559)=-119.34000703556816; dx=-2.0085876140515103E-5 evalInputDelta=2.1417015882718715E-4
New Minimum: -119.34000703556816 > -119.34042325194739
WOLFE (weak): th(27.849533001676676)=-119.34042325194739; dx=-2.0086044064932866E-5 evalInputDelta=6.303865380488105E-4
New Minimum: -119.34042325194739 > -119.34233055504018
WOLFE (weak): th(111.3981320067067)=-119.34233055504018; dx=-2.0080328171727458E-5 evalInputDelta=0.0025376896308415553
New Minimum: -119.34233055504018 > -119.35245249034989
WOLFE (weak): th(556.9906600335335)=-119.35245249034989; dx=-2.0071534877992834E-5 evalInputDelta=0.012659624940553726
New Minimum: -119.35245249034989 > -119.41569009996377
WOLFE (weak): th(3341.9439602012008)=-119.41569009996377; dx=-2.0055098337060137E-5 evalInputDelta=0.0758972345544322
New Minimum: -119.41569009996377 > -119.86937237981067
WOLFE (weak): th(23393.607721408407)=-119.86937237981067; dx=-1.9929794185992054E-5 evalInputDelta=0.529579514401334
New Minimum: -119.86937237981067 > -123.44749765791624
WOLFE (weak): th(187148.86177126726)=-123.44749765791624; dx=-1.8659286704478733E-5 evalInputDelta=4.107704792506908
New Minimum: -123.44749765791624 > -143.56130976221309
END: th(1684339.7559414054)=-143.56130976221309; dx=-5.986089588614453E-6 evalInputDelta=24.22151689680375
Fitness changed from -119.33979286540934 to -143.56130976221309
Iteration 2 complete. Error: -143.56130976221309 Total: 28.6345; Orientation: 0.0613; Line Search: 25.4277
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/4e969eb3-273e-45c1-a53f-677d4c908f7b.jpg)
Adding measurement 2e0f1b2c to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-143.56130976221309;dx=-9.547875656523076E-6
New Minimum: -143.56130976221309 > -160.94560779434164
END: th(3628800.0000000005)=-160.94560779434164; dx=-9.102966537407716E-7 evalInputDelta=17.384298032128555
Fitness changed from -143.56130976221309 to -160.94560779434164
Iteration 3 complete. Error: -160.94560779434164 Total: 8.0931; Orientation: 0.0575; Line Search: 4.8790
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/9aedd889-0fca-4569-91fa-fa1e7fb0f372.jpg)
Adding measurement 5d7cec4e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.475e+03, gradient 3.094e-03, dot -0.297; [eaa6181f-113f-4807-aa86-155557db02f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -160.94560779434164, -143.56130976221309, -119.33979286540934, -119.33974841495085
LBFGS Accumulation History: 3 points
Removed measurement 5d7cec4e to history. Total: 3
th(0)=-160.94560779434164;dx=-9.57159534430821E-6
Armijo: th(7818012.603187701)=-155.2055342772095; dx=3.6277777991068196E-6 evalInputDelta=-5.740073517132146
New Minimum: -160.94560779434164 > -170.2606790970051
WOLF (strong): th(3909006.3015938504)=-170.2606790970051; dx=2.106359275928983E-6 evalInputDelta=9.315071302663455
New Minimum: -170.2606790970051 > -170.35782531952313
END: th(1303002.1005312835)=-170.35782531952313; dx=-3.63465702087016E-6 evalInputDelta=9.41221752518149
Fitness changed from -160.94560779434164 to -170.35782531952313
Iteration 4 complete. Error: -170.35782531952313 Total: 14.3282; Orientation: 1.0406; Line Search: 10.1205
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/e73331b1-ce50-4d4f-9a45-243b19ac3904.jpg)
Adding measurement 5d81a431 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.948e+03, gradient 2.138e-03, dot -0.557; [eaa6181f-113f-4807-aa86-155557db02f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -170.35782531952313, -143.56130976221309, -119.33979286540934, -119.33974841495085
LBFGS Accumulation History: 3 points
Removed measurement 5d81a431 to history. Total: 3
th(0)=-170.35782531952313;dx=-4.570728387324757E-6
New Minimum: -170.35782531952313 > -180.2429952164796
END: th(2807232.926569009)=-180.2429952164796; dx=-2.1621896345958827E-6 evalInputDelta=9.885169896956484
Fitness changed from -170.35782531952313 to -180.2429952164796
Iteration 5 complete. Error: -180.2429952164796 Total: 9.1820; Orientation: 1.0361; Line Search: 5.2255
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/8ef1d1dd-9088-4b93-a1fe-8c80edd4cdc3.jpg)
Adding measurement 6679e090 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.484e+04, gradient 2.155e-03, dot -0.563; [eaa6181f-113f-4807-aa86-155557db02f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -180.2429952164796, -143.56130976221309, -119.33979286540934, -119.33974841495085
LBFGS Accumulation History: 3 points
Removed measurement 6679e090 to history. Total: 3
th(0)=-180.2429952164796;dx=-4.641243968887642E-6
New Minimum: -180.2429952164796 > -187.67672186817407
WOLF (strong): th(6048000.000000001)=-187.67672186817407; dx=4.0137416906825114E-7 evalInputDelta=7.433726651694457
New Minimum: -187.67672186817407 > -187.81047620675577
END: th(3024000.0000000005)=-187.81047620675577; dx=-8.265001199790337E-7 evalInputDelta=7.567480990276152
Fitness changed from -180.2429952164796 to -187.81047620675577
Iteration 6 complete. Error: -187.81047620675577 Total: 11.7153; Orientation: 0.9743; Line Search: 7.7670
Adding measurement d90c0fd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.687e+04, gradient 2.382e-03, dot -0.457; [eaa6181f-113f-4807-aa86-155557db02f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -187.81047620675577, -143.56130976221309, -119.33979286540934, -119.33974841495085
LBFGS Accumulation History: 3 points
Removed measurement d90c0fd to history. Total: 3
th(0)=-187.81047620675577;dx=-5.674616033192375E-6
Armijo: th(6515010.502656418)=-186.26001960530135; dx=2.4206994557115507E-6 evalInputDelta=-1.5504566014544139
New Minimum: -187.81047620675577 > -194.1105395676667
WOLF (strong): th(3257505.251328209)=-194.1105395676667; dx=1.0001101510673625E-6 evalInputDelta=6.30006336091094
END: th(1085835.0837760696)=-192.92250615544665; dx=-2.9100754226822388E-6 evalInputDelta=5.112029948690889
Fitness changed from -187.81047620675577 to -194.1105395676667
Iteration 7 complete. Error: -194.1105395676667 Total: 13.9780; Orientation: 1.0216; Line Search: 10.5787
Adding measurement 587254a0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.595e+04, gradient 2.742e-03, dot -0.324; [eaa6181f-113f-4807-aa86-155557db02f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -194.1105395676667, -143.56130976221309, -119.33979286540934, -119.33974841495085
LBFGS Accumulation History: 3 points
Removed measurement 587254a0 to history. Total: 3
th(0)=-194.1105395676667;dx=-7.504818257909346E-6
New Minimum: -194.1105395676667 > -201.84940492142383
WOLF (strong): th(2339360.772140841)=-201.84940492142383; dx=8.543245261806949E-7 evalInputDelta=7.73886535375712
END: th(1169680.3860704205)=-200.8900362415912; dx=-2.897627530188124E-6 evalInputDelta=6.779496673924484
Fitness changed from -194.1105395676667 to -201.84940492142383
Iteration 8 complete. Error: -201.84940492142383 Total: 11.1277; Orientation: 1.0950; Line Search: 7.6503
Adding measurement af57c89 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.290e+04, gradient 2.203e-03, dot -0.457; [eaa6181f-113f-4807-aa86-155557db02f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -201.84940492142383, -143.56130976221309, -119.33979286540934, -119.33974841495085
LBFGS Accumulation History: 3 points
Removed measurement af57c89 to history. Total: 3
th(0)=-201.84940492142383;dx=-4.850854568822943E-6
New Minimum: -201.84940492142383 > -207.96813805745427
WOLF (strong): th(2520000.0000000005)=-207.96813805745427; dx=1.4093374101171306E-7 evalInputDelta=6.118733136030443
END: th(1260000.0000000002)=-206.74210258832412; dx=-2.2621210581752544E-6 evalInputDelta=4.89269766690029
Fitness changed from -201.84940492142383 to -207.96813805745427
Iteration 9 complete. Error: -207.96813805745427 Total: 11.0823; Orientation: 1.0039; Line Search: 7.5928
Adding measurement 7decd115 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.491e+04, gradient 2.076e-03, dot -0.467; [eaa6181f-113f-4807-aa86-155557db02f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -207.96813805745427, -143.56130976221309, -119.33979286540934, -119.33974841495085
LBFGS Accumulation History: 3 points
Removed measurement 7decd115 to history. Total: 3
th(0)=-207.96813805745427;dx=-4.289541519487757E-6
New Minimum: -207.96813805745427 > -212.7795086147414
WOLF (strong): th(2714587.709440174)=-212.7795086147414; dx=5.248410281380018E-7 evalInputDelta=4.81137055728712
END: th(1357293.854720087)=-212.29638652798383; dx=-1.6059936335924547E-6 evalInputDelta=4.328248470529559
Fitness changed from -207.96813805745427 to -212.7795086147414
Iteration 10 complete. Error: -212.7795086147414 Total: 11.2163; Orientation: 0.9666; Line Search: 7.7124
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/7abe98d9-37e5-4c49-a8fc-5e7327d82c01.jpg)
Final threshold in iteration 11: -212.7795086147414 (> -Infinity) after 132.871s (< 5400.000s)
Returns
-212.7795086147414