BasicOptimizer.scala:89 executed in 297.22 seconds (3.624 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: 579288319117300
Reset training subject: 579294341916800
Adding measurement 63fa0f1a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-39.639543177896115;dx=-2.1145447446239934E-6
New Minimum: -39.639543177896115 > -39.63954698859828
END: th(2.154434690031884)=-39.63954698859828; dx=-1.8487054249129734E-6 evalInputDelta=3.8107021680389153E-6
Fitness changed from -39.639543177896115 to -39.63954698859828
Iteration 1 complete. Error: -39.63954698859828 Total: 30.0672; Orientation: 0.1477; Line Search: 12.3399
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0c7ecbde-d3b4-47b7-b01e-841a714b24e9.jpg)
Adding measurement 569b0d7 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-39.63954698859828;dx=-1.8495523812575562E-6
New Minimum: -39.63954698859828 > -39.639558420702585
WOLFE (weak): th(4.641588833612779)=-39.639558420702585; dx=-1.8472004014289213E-6 evalInputDelta=1.1432104301434265E-5
New Minimum: -39.639558420702585 > -39.63956794745365
WOLFE (weak): th(9.283177667225559)=-39.63956794745365; dx=-1.8473664373697765E-6 evalInputDelta=2.0958855365904583E-5
New Minimum: -39.63956794745365 > -39.63960414908682
WOLFE (weak): th(27.849533001676676)=-39.63960414908682; dx=-1.846201547182665E-6 evalInputDelta=5.7160488537988385E-5
New Minimum: -39.63960414908682 > -39.63977372471785
WOLFE (weak): th(111.3981320067067)=-39.63977372471785; dx=-1.8454274075410255E-6 evalInputDelta=2.2673611956491868E-4
New Minimum: -39.63977372471785 > -39.640676845634104
WOLFE (weak): th(556.9906600335335)=-39.640676845634104; dx=-1.8441644103617402E-6 evalInputDelta=0.0011298570358206916
New Minimum: -39.640676845634104 > -39.64631421767343
WOLFE (weak): th(3341.9439602012008)=-39.64631421767343; dx=-1.8447872493938948E-6 evalInputDelta=0.0067672290751445985
New Minimum: -39.64631421767343 > -39.68687623216533
WOLFE (weak): th(23393.607721408407)=-39.68687623216533; dx=-1.8417020800321976E-6 evalInputDelta=0.04732924356704871
New Minimum: -39.68687623216533 > -40.01593788476685
WOLFE (weak): th(187148.86177126726)=-40.01593788476685; dx=-1.8190982875572783E-6 evalInputDelta=0.3763908961685658
New Minimum: -40.01593788476685 > -42.8022132922345
END: th(1684339.7559414054)=-42.8022132922345; dx=-1.5648197880976805E-6 evalInputDelta=3.1626663036362146
Fitness changed from -39.63954698859828 to -42.8022132922345
Iteration 2 complete. Error: -42.8022132922345 Total: 69.2360; Orientation: 0.1434; Line Search: 61.7941
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/e126cbd9-c982-4f2b-b360-c7f265d60685.jpg)
Adding measurement 1292c96f to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-42.8022132922345;dx=-1.494330785541921E-6
New Minimum: -42.8022132922345 > -47.667337736555716
END: th(3628800.0000000005)=-47.667337736555716; dx=-9.9022414526175E-7 evalInputDelta=4.865124444321218
Fitness changed from -42.8022132922345 to -47.667337736555716
Iteration 3 complete. Error: -47.667337736555716 Total: 19.0571; Orientation: 0.1335; Line Search: 11.9304
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/85c6862e-96d5-4102-bc69-291d67707528.jpg)
Adding measurement 7dba99c7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.036e+04, gradient 9.755e-04, dot -0.807; [c8e35b91-0224-4222-b031-6276a2b4bd95 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -47.667337736555716, -42.8022132922345, -39.63954698859828, -39.639543177896115
LBFGS Accumulation History: 3 points
Removed measurement 7dba99c7 to history. Total: 3
th(0)=-47.667337736555716;dx=-9.502854597045452E-7
New Minimum: -47.667337736555716 > -53.78291121017011
END: th(7818012.603187701)=-53.78291121017011; dx=-5.09212393056688E-7 evalInputDelta=6.115573473614397
Fitness changed from -47.667337736555716 to -53.78291121017011
Iteration 4 complete. Error: -53.78291121017011 Total: 21.9910; Orientation: 2.5576; Line Search: 12.3113
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/5f504a59-d7cf-4ced-9dbc-8ee897bee9ee.jpg)
Adding measurement 7b69d275 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.403e+03, gradient 8.490e-04, dot -0.591; [c8e35b91-0224-4222-b031-6276a2b4bd95 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -53.78291121017011, -42.8022132922345, -39.63954698859828, -39.639543177896115
LBFGS Accumulation History: 3 points
Removed measurement 7b69d275 to history. Total: 3
th(0)=-53.78291121017011;dx=-7.204295083421338E-7
New Minimum: -53.78291121017011 > -59.971204912111666
END: th(1.6843397559414055E7)=-59.971204912111666; dx=-1.3668834222157438E-7 evalInputDelta=6.188293701941554
Fitness changed from -53.78291121017011 to -59.971204912111666
Iteration 5 complete. Error: -59.971204912111666 Total: 21.9206; Orientation: 2.5030; Line Search: 12.3412
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/5f9c2d20-a502-4327-ac3c-ffc88041da7b.jpg)
Adding measurement 2fdf803d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.145e+04, gradient 1.024e-03, dot -0.326; [c8e35b91-0224-4222-b031-6276a2b4bd95 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.971204912111666, -42.8022132922345, -39.63954698859828, -39.639543177896115
LBFGS Accumulation History: 3 points
Removed measurement 2fdf803d to history. Total: 3
th(0)=-59.971204912111666;dx=-1.0459181629608602E-6
Armijo: th(3.628800000000001E7)=-56.749585736993005; dx=2.568169340191483E-7 evalInputDelta=-3.2216191751186614
New Minimum: -59.971204912111666 > -63.128068716901645
WOLF (strong): th(1.8144000000000004E7)=-63.128068716901645; dx=2.986558570149578E-7 evalInputDelta=3.156863804789978
New Minimum: -63.128068716901645 > -64.6662407913791
END: th(6048000.000000001)=-64.6662407913791; dx=-3.4270020669563573E-7 evalInputDelta=4.695035879267429
Fitness changed from -59.971204912111666 to -64.6662407913791
Iteration 6 complete. Error: -64.6662407913791 Total: 33.3954; Orientation: 2.4239; Line Search: 24.2110
Adding measurement 76508460 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.975e+04, gradient 7.193e-04, dot -0.609; [c8e35b91-0224-4222-b031-6276a2b4bd95 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -64.6662407913791, -42.8022132922345, -39.63954698859828, -39.639543177896115
LBFGS Accumulation History: 3 points
Removed measurement 76508460 to history. Total: 3
th(0)=-64.6662407913791;dx=-5.171534629301418E-7
New Minimum: -64.6662407913791 > -68.91627442533901
END: th(1.3030021005312836E7)=-68.91627442533901; dx=-1.5122089028519324E-7 evalInputDelta=4.250033633959916
Fitness changed from -64.6662407913791 to -68.91627442533901
Iteration 7 complete. Error: -68.91627442533901 Total: 20.5636; Orientation: 2.4438; Line Search: 12.2446
Adding measurement 4cf440e9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.491e+04, gradient 8.359e-04, dot -0.479; [c8e35b91-0224-4222-b031-6276a2b4bd95 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -68.91627442533901, -42.8022132922345, -39.63954698859828, -39.639543177896115
LBFGS Accumulation History: 3 points
Removed measurement 4cf440e9 to history. Total: 3
th(0)=-68.91627442533901;dx=-6.985650814373613E-7
New Minimum: -68.91627442533901 > -69.23650570853383
WOLF (strong): th(2.8072329265690096E7)=-69.23650570853383; dx=1.766896372801618E-7 evalInputDelta=0.32023128319481486
New Minimum: -69.23650570853383 > -71.95320490747379
WOLF (strong): th(1.4036164632845048E7)=-71.95320490747379; dx=9.955743358038288E-8 evalInputDelta=3.0369304821347782
END: th(4678721.544281683)=-71.54334999745983; dx=-3.220800556796287E-7 evalInputDelta=2.627075572120816
Fitness changed from -68.91627442533901 to -71.95320490747379
Iteration 8 complete. Error: -71.95320490747379 Total: 32.0427; Orientation: 2.4399; Line Search: 23.8357
Adding measurement 282633da to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.644e+04, gradient 9.593e-04, dot -0.359; [c8e35b91-0224-4222-b031-6276a2b4bd95 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -71.95320490747379, -42.8022132922345, -39.63954698859828, -39.639543177896115
LBFGS Accumulation History: 3 points
Removed measurement 282633da to history. Total: 3
th(0)=-71.95320490747379;dx=-9.198863222352221E-7
New Minimum: -71.95320490747379 > -76.92524281775597
WOLF (strong): th(1.0080000000000004E7)=-76.92524281775597; dx=5.0574578102158016E-8 evalInputDelta=4.972037910282182
END: th(5040000.000000002)=-75.89121212763963; dx=-4.714907270341549E-7 evalInputDelta=3.9380072201658436
Fitness changed from -71.95320490747379 to -76.92524281775597
Iteration 9 complete. Error: -76.92524281775597 Total: 26.9858; Orientation: 2.5177; Line Search: 18.5435
Adding measurement 57573eb3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.757e+04, gradient 7.500e-04, dot -0.509; [c8e35b91-0224-4222-b031-6276a2b4bd95 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -76.92524281775597, -42.8022132922345, -39.63954698859828, -39.639543177896115
LBFGS Accumulation History: 3 points
Removed measurement 57573eb3 to history. Total: 3
th(0)=-76.92524281775597;dx=-5.619771461884778E-7
New Minimum: -76.92524281775597 > -80.06031804863308
END: th(1.0858350837760698E7)=-80.06031804863308; dx=-1.726833500716086E-8 evalInputDelta=3.1350752308771064
Fitness changed from -76.92524281775597 to -80.06031804863308
Iteration 10 complete. Error: -80.06031804863308 Total: 20.7335; Orientation: 2.4737; Line Search: 12.1398
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/da3dce08-f8c2-4f9a-930d-7c0c48364872.jpg)
Final threshold in iteration 11: -80.06031804863308 (> -Infinity) after 297.220s (< 5400.000s)
Returns
-80.06031804863308