BasicOptimizer.scala:89 executed in 204.24 seconds (2.768 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: 17771110612671
Reset training subject: 17775703828630
Adding measurement 68251582 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.5882087200880051;dx=-7.465677543624097E-7
New Minimum: -0.5882087200880051 > -0.5882093012332916
END: th(2.154434690031884)=-0.5882093012332916; dx=-6.27300793972189E-7 evalInputDelta=5.811452865600586E-7
Fitness changed from -0.5882087200880051 to -0.5882093012332916
Iteration 1 complete. Error: -0.5882093012332916 Total: 21.2040; Orientation: 0.0440; Line Search: 8.4692
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/aff040ce-7254-48a0-9ad2-66259d8c1d00.jpg)
Adding measurement 19e85372 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.5882093012332916;dx=-6.272949951315301E-7
New Minimum: -0.5882093012332916 > -0.5882109105587006
WOLFE (weak): th(4.641588833612779)=-0.5882109105587006; dx=-6.272818406535942E-7 evalInputDelta=1.6093254089355469E-6
New Minimum: -0.5882109105587006 > -0.5882123559713364
WOLFE (weak): th(9.283177667225559)=-0.5882123559713364; dx=-6.272819099396025E-7 evalInputDelta=3.0547380447387695E-6
New Minimum: -0.5882123559713364 > -0.5882181376218796
WOLFE (weak): th(27.849533001676676)=-0.5882181376218796; dx=-6.272766072093654E-7 evalInputDelta=8.83638858795166E-6
New Minimum: -0.5882181376218796 > -0.5882444083690643
WOLFE (weak): th(111.3981320067067)=-0.5882444083690643; dx=-6.272372386662917E-7 evalInputDelta=3.510713577270508E-5
New Minimum: -0.5882444083690643 > -0.5883841514587402
WOLFE (weak): th(556.9906600335335)=-0.5883841514587402; dx=-6.271311793037847E-7 evalInputDelta=1.748502254486084E-4
New Minimum: -0.5883841514587402 > -0.5892569422721863
WOLFE (weak): th(3341.9439602012008)=-0.5892569422721863; dx=-6.264505714002367E-7 evalInputDelta=0.0010476410388946533
New Minimum: -0.5892569422721863 > -0.5955152660608292
WOLFE (weak): th(23393.607721408407)=-0.5955152660608292; dx=-6.220057716029409E-7 evalInputDelta=0.007305964827537537
New Minimum: -0.5955152660608292 > -0.6448269635438919
WOLFE (weak): th(187148.86177126726)=-0.6448269635438919; dx=-5.827519832917196E-7 evalInputDelta=0.05661766231060028
New Minimum: -0.6448269635438919 > -0.9508553743362427
END: th(1684339.7559414054)=-0.9508553743362427; dx=-2.6582137272707835E-7 evalInputDelta=0.36264607310295105
Fitness changed from -0.5882093012332916 to -0.9508553743362427
Iteration 2 complete. Error: -0.9508553743362427 Total: 48.6396; Orientation: 0.0435; Line Search: 44.4944
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/bd2023f8-2903-4803-b456-54b765addf7d.jpg)
Adding measurement 14a3beef to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.9508553743362427;dx=-2.612323684240643E-7
New Minimum: -0.9508553743362427 > -1.264261282980442
END: th(3628800.0000000005)=-1.264261282980442; dx=-1.0902958581824036E-7 evalInputDelta=0.31340590864419937
Fitness changed from -0.9508553743362427 to -1.264261282980442
Iteration 3 complete. Error: -1.264261282980442 Total: 13.2572; Orientation: 0.0451; Line Search: 8.5717
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/19b76bfd-b66d-4156-a46f-cd3ddcbc096b.jpg)
Adding measurement 3844845d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.707e+03, gradient 3.743e-04, dot -0.598; [f27de4d4-f3cf-490d-ac10-ea0260cb6973 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.264261282980442, -0.9508553743362427, -0.5882093012332916, -0.5882087200880051
LBFGS Accumulation History: 3 points
Removed measurement 3844845d to history. Total: 3
th(0)=-1.264261282980442;dx=-1.4013272198411834E-7
New Minimum: -1.264261282980442 > -1.5450333505868912
END: th(7818012.603187701)=-1.5450333505868912; dx=-3.1050404487473403E-8 evalInputDelta=0.2807720676064491
Fitness changed from -1.264261282980442 to -1.5450333505868912
Iteration 4 complete. Error: -1.5450333505868912 Total: 15.4286; Orientation: 1.0723; Line Search: 9.5540
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/88d48fa0-5f95-4204-bfc5-452aadc368aa.jpg)
Adding measurement 240f57fa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.595e+03, gradient 3.384e-04, dot -0.378; [f27de4d4-f3cf-490d-ac10-ea0260cb6973 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5450333505868912, -0.9508553743362427, -0.5882093012332916, -0.5882087200880051
LBFGS Accumulation History: 3 points
Removed measurement 240f57fa to history. Total: 3
th(0)=-1.5450333505868912;dx=-1.1450420052568288E-7
New Minimum: -1.5450333505868912 > -1.6639950275421143
WOLF (strong): th(1.6843397559414055E7)=-1.6639950275421143; dx=1.8470819128905562E-8 evalInputDelta=0.11896167695522308
New Minimum: -1.6639950275421143 > -1.7158953547477722
WOLF (strong): th(8421698.779707028)=-1.7158953547477722; dx=1.928694567140874E-9 evalInputDelta=0.17086200416088104
END: th(2807232.926569009)=-1.6589866876602173; dx=-5.224440825562971E-8 evalInputDelta=0.11395333707332611
Fitness changed from -1.5450333505868912 to -1.7158953547477722
Iteration 5 complete. Error: -1.7158953547477722 Total: 23.2225; Orientation: 1.0636; Line Search: 17.7306
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/6f7805c3-75f6-4aa7-b646-a8c102a62c79.jpg)
Adding measurement 7fbaebd5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.722e+03, gradient 3.060e-04, dot -0.309; [f27de4d4-f3cf-490d-ac10-ea0260cb6973 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.7158953547477722, -0.9508553743362427, -0.5882093012332916, -0.5882087200880051
LBFGS Accumulation History: 3 points
Removed measurement 7fbaebd5 to history. Total: 3
th(0)=-1.7158953547477722;dx=-9.363401849798366E-8
New Minimum: -1.7158953547477722 > -1.8606920912861824
END: th(6048000.000000001)=-1.8606920912861824; dx=-1.4767011849261106E-8 evalInputDelta=0.1447967365384102
Fitness changed from -1.7158953547477722 to -1.8606920912861824
Iteration 6 complete. Error: -1.8606920912861824 Total: 13.9630; Orientation: 1.0127; Line Search: 8.5942
Adding measurement 37013532 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.212e+03, gradient 2.097e-04, dot -0.487; [f27de4d4-f3cf-490d-ac10-ea0260cb6973 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8606920912861824, -0.9508553743362427, -0.5882093012332916, -0.5882087200880051
LBFGS Accumulation History: 3 points
Removed measurement 37013532 to history. Total: 3
th(0)=-1.8606920912861824;dx=-4.3993084024455525E-8
New Minimum: -1.8606920912861824 > -1.971068486571312
WOLF (strong): th(1.3030021005312836E7)=-1.971068486571312; dx=3.564842303562552E-9 evalInputDelta=0.11037639528512955
END: th(6515010.502656418)=-1.9551193490624428; dx=-1.526353307624092E-8 evalInputDelta=0.09442725777626038
Fitness changed from -1.8606920912861824 to -1.971068486571312
Iteration 7 complete. Error: -1.971068486571312 Total: 18.6638; Orientation: 1.0046; Line Search: 13.3274
Adding measurement 2a6551bb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.809e+03, gradient 2.678e-04, dot -0.246; [f27de4d4-f3cf-490d-ac10-ea0260cb6973 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.971068486571312, -0.9508553743362427, -0.5882093012332916, -0.5882087200880051
LBFGS Accumulation History: 3 points
Removed measurement 2a6551bb to history. Total: 3
th(0)=-1.971068486571312;dx=-7.173283569240156E-8
New Minimum: -1.971068486571312 > -1.9990831762552261
WOLF (strong): th(1.4036164632845048E7)=-1.9990831762552261; dx=2.5539675695102164E-8 evalInputDelta=0.028014689683914185
New Minimum: -1.9990831762552261 > -2.0633206963539124
WOLF (strong): th(7018082.316422524)=-2.0633206963539124; dx=4.90435331456781E-9 evalInputDelta=0.0922522097826004
END: th(2339360.7721408415)=-2.033584326505661; dx=-3.585629084479892E-8 evalInputDelta=0.06251583993434906
Fitness changed from -1.971068486571312 to -2.0633206963539124
Iteration 8 complete. Error: -2.0633206963539124 Total: 22.0443; Orientation: 1.0086; Line Search: 16.9186
Adding measurement 4b85254d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.184e+03, gradient 1.847e-04, dot -0.387; [f27de4d4-f3cf-490d-ac10-ea0260cb6973 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.0633206963539124, -0.9508553743362427, -0.5882093012332916, -0.5882087200880051
LBFGS Accumulation History: 3 points
Removed measurement 4b85254d to history. Total: 3
th(0)=-2.0633206963539124;dx=-3.413232351768487E-8
New Minimum: -2.0633206963539124 > -2.1211702078580856
END: th(5040000.000000002)=-2.1211702078580856; dx=-1.2861105454016322E-8 evalInputDelta=0.05784951150417328
Fitness changed from -2.0633206963539124 to -2.1211702078580856
Iteration 9 complete. Error: -2.1211702078580856 Total: 14.5027; Orientation: 1.0029; Line Search: 9.1036
Adding measurement 4229981d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.413e+03, gradient 1.360e-04, dot -0.535; [f27de4d4-f3cf-490d-ac10-ea0260cb6973 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.1211702078580856, -0.9508553743362427, -0.5882093012332916, -0.5882087200880051
LBFGS Accumulation History: 3 points
Removed measurement 4229981d to history. Total: 3
th(0)=-2.1211702078580856;dx=-1.8498777409190987E-8
New Minimum: -2.1211702078580856 > -2.1828517615795135
END: th(1.0858350837760698E7)=-2.1828517615795135; dx=-5.813817714529289E-9 evalInputDelta=0.06168155372142792
Fitness changed from -2.1211702078580856 to -2.1828517615795135
Iteration 10 complete. Error: -2.1828517615795135 Total: 13.2415; Orientation: 1.0214; Line Search: 8.0846
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/829c067c-6a2c-4c15-bd45-614750f4dea7.jpg)
Final threshold in iteration 11: -2.1828517615795135 (> -Infinity) after 204.237s (< 5400.000s)
Returns
-2.1828517615795135