BasicOptimizer.scala:89 executed in 46.05 seconds (1.136 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: 209004794146000
Reset training subject: 209005581906800
Adding measurement 739b1011 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-6.35345986822842;dx=-0.03699706155784577
New Minimum: -6.35345986822842 > -6.423690544359204
WOLFE (weak): th(2.154434690031884)=-6.423690544359204; dx=-0.03714137823140813 evalInputDelta=0.07023067613078382
New Minimum: -6.423690544359204 > -6.494141533951911
WOLFE (weak): th(4.308869380063768)=-6.494141533951911; dx=-0.03693920385096423 evalInputDelta=0.14068166572349128
New Minimum: -6.494141533951911 > -6.776783858039831
WOLFE (weak): th(12.926608140191302)=-6.776783858039831; dx=-0.03714005217683505 evalInputDelta=0.4233239898114114
New Minimum: -6.776783858039831 > -8.064725902531361
WOLFE (weak): th(51.70643256076521)=-8.064725902531361; dx=-0.0377923103341453 evalInputDelta=1.711266034302941
New Minimum: -8.064725902531361 > -15.23685780460707
WOLFE (weak): th(258.53216280382605)=-15.23685780460707; dx=-0.03826926352894136 evalInputDelta=8.88339793637865
New Minimum: -15.23685780460707 > -53.9741709805394
END: th(1551.1929768229563)=-53.9741709805394; dx=-0.025601229679858825 evalInputDelta=47.62071111231098
Fitness changed from -6.35345986822842 to -53.9741709805394
Iteration 1 complete. Error: -53.9741709805394 Total: 7.6926; Orientation: 0.0180; Line Search: 5.4286
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/b34875f7-06a3-4efd-bcd2-42504cca8f4e.jpg)
Adding measurement 7634a730 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-53.9741709805394;dx=-0.049030754120080414
New Minimum: -53.9741709805394 > -146.1760457213145
END: th(3341.943960201201)=-146.1760457213145; dx=-0.017706342985721983 evalInputDelta=92.2018747407751
Fitness changed from -53.9741709805394 to -146.1760457213145
Iteration 2 complete. Error: -146.1760457213145 Total: 2.2429; Orientation: 0.0161; Line Search: 1.4808
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/67e4f320-210d-4ded-94d0-80ccb187864b.jpg)
Adding measurement 78a9ca83 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-146.1760457213145;dx=-0.08831337239793513
New Minimum: -146.1760457213145 > -262.01205124788333
END: th(7200.000000000001)=-262.01205124788333; dx=-0.008047071936881235 evalInputDelta=115.83600552656884
Fitness changed from -146.1760457213145 to -262.01205124788333
Iteration 3 complete. Error: -262.01205124788333 Total: 2.3486; Orientation: 0.0159; Line Search: 1.5695
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d047fa06-ea03-4b16-9545-0836a013240e.jpg)
Adding measurement 62a5530c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.156e+04, gradient 3.487e-01, dot -0.151; [638443a6-a30e-4580-9877-6db65ffd3e08 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -262.01205124788333, -146.1760457213145, -53.9741709805394, -6.35345986822842
LBFGS Accumulation History: 3 points
Removed measurement 62a5530c to history. Total: 3
th(0)=-262.01205124788333;dx=-0.12092950643245136
New Minimum: -262.01205124788333 > -411.05170149853296
END: th(15511.929768229566)=-411.05170149853296; dx=-0.003355426790620347 evalInputDelta=149.03965025064963
Fitness changed from -262.01205124788333 to -411.05170149853296
Iteration 4 complete. Error: -411.05170149853296 Total: 2.5236; Orientation: 0.3221; Line Search: 1.5017
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/2dd0a3e9-c43a-40d5-94ee-f712d7503b1b.jpg)
Adding measurement 7314dcbe to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.141e+03, gradient 3.230e-01, dot -0.086; [638443a6-a30e-4580-9877-6db65ffd3e08 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -411.05170149853296, -146.1760457213145, -53.9741709805394, -6.35345986822842
LBFGS Accumulation History: 3 points
Removed measurement 7314dcbe to history. Total: 3
th(0)=-411.05170149853296;dx=-0.10391013748018432
New Minimum: -411.05170149853296 > -615.2069054363106
END: th(33419.43960201202)=-615.2069054363106; dx=-9.658542979116859E-4 evalInputDelta=204.15520393777769
Fitness changed from -411.05170149853296 to -615.2069054363106
Iteration 5 complete. Error: -615.2069054363106 Total: 2.8383; Orientation: 0.2883; Line Search: 1.5534
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/73fe17a4-954c-443c-954e-4b1433de5bbe.jpg)
Adding measurement 2f42909c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.082e+03, gradient 2.946e-01, dot -0.066; [638443a6-a30e-4580-9877-6db65ffd3e08 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -615.2069054363106, -146.1760457213145, -53.9741709805394, -6.35345986822842
LBFGS Accumulation History: 3 points
Removed measurement 2f42909c to history. Total: 3
th(0)=-615.2069054363106;dx=-0.08650163940744673
New Minimum: -615.2069054363106 > -739.7612438536916
END: th(72000.00000000003)=-739.7612438536916; dx=-0.0010587760705918167 evalInputDelta=124.5543384173809
Fitness changed from -615.2069054363106 to -739.7612438536916
Iteration 6 complete. Error: -739.7612438536916 Total: 2.5380; Orientation: 0.2926; Line Search: 1.5317
Adding measurement 5577b428 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.813e+04, gradient 2.475e-01, dot -0.057; [638443a6-a30e-4580-9877-6db65ffd3e08 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -739.7612438536916, -146.1760457213145, -53.9741709805394, -6.35345986822842
LBFGS Accumulation History: 3 points
Removed measurement 5577b428 to history. Total: 3
th(0)=-739.7612438536916;dx=-0.06111950132113593
New Minimum: -739.7612438536916 > -807.1757315117326
WOLF (strong): th(155119.2976822957)=-807.1757315117326; dx=4.4954237017734124E-5 evalInputDelta=67.41448765804103
New Minimum: -807.1757315117326 > -1219.7422482361294
END: th(77559.64884114785)=-1219.7422482361294; dx=-0.0037499384530643243 evalInputDelta=479.98100438243785
Fitness changed from -739.7612438536916 to -1219.7422482361294
Iteration 7 complete. Error: -1219.7422482361294 Total: 3.7142; Orientation: 0.2998; Line Search: 2.6659
Adding measurement 4c7a7f8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.129e+05, gradient 2.600e-01, dot -0.071; [638443a6-a30e-4580-9877-6db65ffd3e08 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1219.7422482361294, -146.1760457213145, -53.9741709805394, -6.35345986822842
LBFGS Accumulation History: 3 points
Removed measurement 4c7a7f8 to history. Total: 3
th(0)=-1219.7422482361294;dx=-0.06741232542857706
Armijo: th(167097.19801006012)=-946.4517692706766; dx=2.5449221158778607E-4 evalInputDelta=-273.29047896545285
New Minimum: -1219.7422482361294 > -1609.9183963249895
END: th(83548.59900503006)=-1609.9183963249895; dx=-0.004505279778266075 evalInputDelta=390.17614808886015
Fitness changed from -1219.7422482361294 to -1609.9183963249895
Iteration 8 complete. Error: -1609.9183963249895 Total: 3.3222; Orientation: 0.2805; Line Search: 2.3078
Adding measurement 1fee7fbd to history. Total: 3
Accepted: LBFGS Orientation magnitude: 5.571e+04, gradient 2.729e-01, dot 0.090; [638443a6-a30e-4580-9877-6db65ffd3e08 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-1609.9183963249895;dx=-1369.7348861747803
Armijo: th(180000.0000000001)=-539.7877806537794; dx=0.00425409312090403 evalInputDelta=-1070.1306156712103
Armijo: th(90000.00000000004)=-539.7856811021447; dx=0.008514943641621277 evalInputDelta=-1070.1327152228448
Armijo: th(30000.000000000015)=-539.7987952567601; dx=0.02550652473410673 evalInputDelta=-1070.1196010682295
Armijo: th(7500.000000000004)=-539.9013935964447; dx=0.10180005966853568 evalInputDelta=-1070.0170027285449
Armijo: th(1500.0000000000007)=-540.5402236631606; dx=0.5081916230309874 evalInputDelta=-1069.378172661829
Armijo: th(250.0000000000001)=-543.4647499931745; dx=3.051392090905235 evalInputDelta=-1066.453646331815
Armijo: th(35.71428571428573)=-574.0734121554405; dx=20.560453410668124 evalInputDelta=-1035.8449841695492
Armijo: th(4.464285714285716)=-745.6938012945236; dx=110.7557328406501 evalInputDelta=-864.2245950304659
Armijo: th(0.49603174603174627)=-1354.297490814595; dx=121.37615703478906 evalInputDelta=-255.62090551039455
Armijo: th(0.04960317460317463)=-1592.1465068914458; dx=-139.1969783365529 evalInputDelta=-17.77188943354372
Armijo: th(0.004509379509379512)=-1608.7034510398958; dx=-222.7592363701649 evalInputDelta=-1.2149452850937905
Armijo: th(3.7578162578162595E-4)=-1609.8187378480088; dx=-229.12686229042333 evalInputDelta=-0.09965847698072139
Armijo: th(2.890627890627892E-5)=-1609.910747546839; dx=-228.91780961259468 evalInputDelta=-0.007648778150496582
Armijo: th(2.0647342075913514E-6)=-1609.9178406987555; dx=-228.93459464602 evalInputDelta=-5.556262340178364E-4
Armijo: th(1.3764894717275675E-7)=-1609.9183867882464; dx=-228.8744866104155 evalInputDelta=-9.5367431640625E-6
Armijo: th(8.603059198297297E-9)=-1609.9183963249895; dx=-228.61487745565046 evalInputDelta=0.0
Armijo: th(5.060623057821939E-10)=-1609.9183963249895; dx=-227.25791761446337 evalInputDelta=0.0
MIN ALPHA (2.8114572543455216E-11): th(0.0)=-1609.9183963249895
Fitness changed from -1609.9183963249895 to -1609.9183963249895
Static Iteration Total: 15.6933; Orientation: 0.2950; Line Search: 14.6625
Iteration 9 failed. Error: -1609.9183963249895
Previous Error: 0.0 -> -1609.9183963249895
Retrying iteration 9
Reset training subject: 209047707862000
Adding measurement 5be1afce to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-1609.9183963249895;dx=-0.07444475796871142
END: th(2.1544346900318838E-10)=-1609.9183963249895; dx=-0.05863736546105126 evalInputDelta=0.0
Fitness changed from -1609.9183963249895 to -1609.9183963249895
Static Iteration Total: 3.1338; Orientation: 0.0152; Line Search: 1.5631
Iteration 10 failed. Error: -1609.9183963249895
Previous Error: 0.0 -> -1609.9183963249895
Optimization terminated 10
Final threshold in iteration 10: -1609.9183963249895 (> -Infinity) after 46.048s (< 5400.000s)
Returns
-1609.9183963249895