BasicOptimizer.scala:89 executed in 134.83 seconds (1.923 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: 329910816907400
Reset training subject: 329913482827600
Adding measurement 6bc65da6 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-131.41914440643174;dx=-2.8559115915404657E-5
New Minimum: -131.41914440643174 > -131.41919577980389
END: th(2.154434690031884)=-131.41919577980389; dx=-2.1691486803482026E-5 evalInputDelta=5.137337214478066E-5
Fitness changed from -131.41914440643174 to -131.41919577980389
Iteration 1 complete. Error: -131.41919577980389 Total: 12.9002; Orientation: 0.0603; Line Search: 5.0687
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/8a5f3e1c-9a65-4029-8770-4465c4076e0c.jpg)
Adding measurement 50912737 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-131.41919577980389;dx=-2.1578113852453025E-5
New Minimum: -131.41919577980389 > -131.4193058655338
WOLFE (weak): th(4.641588833612779)=-131.4193058655338; dx=-2.1571933151549135E-5 evalInputDelta=1.1008572991499932E-4
New Minimum: -131.4193058655338 > -131.4194232902107
WOLFE (weak): th(9.283177667225559)=-131.4194232902107; dx=-2.1560529907572886E-5 evalInputDelta=2.275104068019118E-4
New Minimum: -131.4194232902107 > -131.4198709708289
WOLFE (weak): th(27.849533001676676)=-131.4198709708289; dx=-2.156337943413067E-5 evalInputDelta=6.751910250102355E-4
New Minimum: -131.4198709708289 > -131.42189652309074
WOLFE (weak): th(111.3981320067067)=-131.42189652309074; dx=-2.154651888094746E-5 evalInputDelta=0.002700743286851548
New Minimum: -131.42189652309074 > -131.43269160297817
WOLFE (weak): th(556.9906600335335)=-131.43269160297817; dx=-2.1545720736827897E-5 evalInputDelta=0.01349582317428144
New Minimum: -131.43269160297817 > -131.50013527369538
WOLFE (weak): th(3341.9439602012008)=-131.50013527369538; dx=-2.1521313923213334E-5 evalInputDelta=0.08093949389149202
New Minimum: -131.50013527369538 > -131.98375796889988
WOLFE (weak): th(23393.607721408407)=-131.98375796889988; dx=-2.1368591710357418E-5 evalInputDelta=0.5645621890959944
New Minimum: -131.98375796889988 > -135.78898447284908
WOLFE (weak): th(187148.86177126726)=-135.78898447284908; dx=-1.9938990825772697E-5 evalInputDelta=4.369788693045194
New Minimum: -135.78898447284908 > -156.71030084756183
END: th(1684339.7559414054)=-156.71030084756183; dx=-6.100131739911146E-6 evalInputDelta=25.29110506775794
Fitness changed from -131.41919577980389 to -156.71030084756183
Iteration 2 complete. Error: -156.71030084756183 Total: 29.3459; Orientation: 0.0615; Line Search: 26.0595
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/7f96960a-bc5c-4f62-8fe6-c55c7dfb481c.jpg)
Adding measurement 167a841b to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-156.71030084756183;dx=-9.886363202433037E-6
New Minimum: -156.71030084756183 > -174.54108400301112
END: th(3628800.0000000005)=-174.54108400301112; dx=-9.478433381857513E-7 evalInputDelta=17.830783155449296
Fitness changed from -156.71030084756183 to -174.54108400301112
Iteration 3 complete. Error: -174.54108400301112 Total: 8.1690; Orientation: 0.0604; Line Search: 5.1015
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/e3a953d5-a54b-4724-9fad-a406d2a11932.jpg)
Adding measurement 692d33a0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.419e+03, gradient 3.061e-03, dot -0.304; [20fbbdaf-0148-446c-b179-916b36367705 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -174.54108400301112, -156.71030084756183, -131.41919577980389, -131.41914440643174
LBFGS Accumulation History: 3 points
Removed measurement 692d33a0 to history. Total: 3
th(0)=-174.54108400301112;dx=-9.355755535417972E-6
Armijo: th(7818012.603187701)=-171.53170956636743; dx=3.4453931769666237E-6 evalInputDelta=-3.0093744366436965
New Minimum: -174.54108400301112 > -184.94588861521916
WOLF (strong): th(3909006.3015938504)=-184.94588861521916; dx=1.6246550988363566E-6 evalInputDelta=10.40480461220804
END: th(1303002.1005312835)=-183.83314438295358; dx=-3.772490227543791E-6 evalInputDelta=9.292060379942455
Fitness changed from -174.54108400301112 to -184.94588861521916
Iteration 4 complete. Error: -184.94588861521916 Total: 14.3341; Orientation: 1.0486; Line Search: 10.2857
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/b2b4c8de-efe5-4758-a00e-710f6caf547e.jpg)
Adding measurement 190a95d3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.683e+03, gradient 3.178e-03, dot -0.219; [20fbbdaf-0148-446c-b179-916b36367705 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -184.94588861521916, -156.71030084756183, -131.41919577980389, -131.41914440643174
LBFGS Accumulation History: 3 points
Removed measurement 190a95d3 to history. Total: 3
th(0)=-184.94588861521916;dx=-1.0092449344414592E-5
New Minimum: -184.94588861521916 > -198.3466584249313
WOLF (strong): th(2807232.926569009)=-198.3466584249313; dx=7.556475358256207E-7 evalInputDelta=13.40076980971213
END: th(1403616.4632845046)=-196.1356545066367; dx=-4.158831378029133E-6 evalInputDelta=11.18976589141755
Fitness changed from -184.94588861521916 to -198.3466584249313
Iteration 5 complete. Error: -198.3466584249313 Total: 12.0658; Orientation: 1.0663; Line Search: 8.0174
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/f598fe12-b329-42cd-9fd3-3d5e683e5488.jpg)
Adding measurement 1ae7870c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.113e+04, gradient 2.478e-03, dot -0.348; [20fbbdaf-0148-446c-b179-916b36367705 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -198.3466584249313, -156.71030084756183, -131.41919577980389, -131.41914440643174
LBFGS Accumulation History: 3 points
Removed measurement 1ae7870c to history. Total: 3
th(0)=-198.3466584249313;dx=-6.1268626056184335E-6
New Minimum: -198.3466584249313 > -206.67720886802365
WOLF (strong): th(3024000.0000000005)=-206.67720886802365; dx=4.911214653966002E-7 evalInputDelta=8.330550443092363
END: th(1512000.0000000002)=-205.41054783371555; dx=-2.4407992662639783E-6 evalInputDelta=7.063889408784263
Fitness changed from -198.3466584249313 to -206.67720886802365
Iteration 6 complete. Error: -206.67720886802365 Total: 12.1508; Orientation: 0.9764; Line Search: 7.7509
Adding measurement 4bd6458e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.641e+04, gradient 2.384e-03, dot -0.400; [20fbbdaf-0148-446c-b179-916b36367705 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -206.67720886802365, -156.71030084756183, -131.41919577980389, -131.41914440643174
LBFGS Accumulation History: 3 points
Removed measurement 4bd6458e to history. Total: 3
th(0)=-206.67720886802365;dx=-5.678401012768432E-6
New Minimum: -206.67720886802365 > -212.8121152594602
WOLF (strong): th(3257505.251328209)=-212.8121152594602; dx=1.4445622256438829E-6 evalInputDelta=6.1349063914365445
New Minimum: -212.8121152594602 > -213.1628578593871
END: th(1628752.6256641045)=-213.1628578593871; dx=-1.6521977006357174E-6 evalInputDelta=6.485648991363433
Fitness changed from -206.67720886802365 to -213.1628578593871
Iteration 7 complete. Error: -213.1628578593871 Total: 11.3371; Orientation: 0.9723; Line Search: 7.6772
Adding measurement 2fd0277c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.124e+04, gradient 1.632e-03, dot -0.643; [20fbbdaf-0148-446c-b179-916b36367705 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -213.1628578593871, -156.71030084756183, -131.41919577980389, -131.41914440643174
LBFGS Accumulation History: 3 points
Removed measurement 2fd0277c to history. Total: 3
th(0)=-213.1628578593871;dx=-2.6623062640667028E-6
New Minimum: -213.1628578593871 > -219.81314451832262
END: th(3509041.158211262)=-219.81314451832262; dx=-1.1137251434921129E-6 evalInputDelta=6.650286658935528
Fitness changed from -213.1628578593871 to -219.81314451832262
Iteration 8 complete. Error: -219.81314451832262 Total: 8.5658; Orientation: 0.9923; Line Search: 5.0500
Adding measurement 35292999 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.190e+04, gradient 1.854e-03, dot -0.506; [20fbbdaf-0148-446c-b179-916b36367705 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -219.81314451832262, -156.71030084756183, -131.41919577980389, -131.41914440643174
LBFGS Accumulation History: 3 points
Removed measurement 35292999 to history. Total: 3
th(0)=-219.81314451832262;dx=-3.4354443819436427E-6
Armijo: th(7560000.000000003)=-219.06882212431623; dx=1.4242790411667382E-6 evalInputDelta=-0.7443223940063888
New Minimum: -219.81314451832262 > -223.9700248172361
WOLF (strong): th(3780000.0000000014)=-223.9700248172361; dx=3.83382172854372E-7 evalInputDelta=4.156880298913478
END: th(1260000.0000000005)=-223.17052006335047; dx=-1.606359792347588E-6 evalInputDelta=3.3573755450278497
Fitness changed from -219.81314451832262 to -223.9700248172361
Iteration 9 complete. Error: -223.9700248172361 Total: 14.0360; Orientation: 1.0592; Line Search: 10.4157
Adding measurement 66e7cfa7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.036e+04, gradient 2.301e-03, dot -0.345; [20fbbdaf-0148-446c-b179-916b36367705 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -223.9700248172361, -156.71030084756183, -131.41919577980389, -131.41914440643174
LBFGS Accumulation History: 3 points
Removed measurement 66e7cfa7 to history. Total: 3
th(0)=-223.9700248172361;dx=-5.282562803369571E-6
New Minimum: -223.9700248172361 > -229.8816426462771
WOLF (strong): th(2714587.7094401745)=-229.8816426462771; dx=9.716072658077617E-7 evalInputDelta=5.911617829041006
END: th(1357293.8547200873)=-229.44753320203102; dx=-2.023604412237872E-6 evalInputDelta=5.47750838479493
Fitness changed from -223.9700248172361 to -229.8816426462771
Iteration 10 complete. Error: -229.8816426462771 Total: 11.4035; Orientation: 0.9672; Line Search: 7.7439
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f052fdd5-a987-4c3d-a478-34b960354d26.jpg)
Final threshold in iteration 11: -229.8816426462771 (> -Infinity) after 134.832s (< 5400.000s)
Returns
-229.8816426462771