BasicOptimizer.scala:89 executed in 278.94 seconds (4.035 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: 643754708482000
Reset training subject: 643760487528600
Adding measurement 5ec527ac to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-37.26751376566781;dx=-1.8836428455668403E-6
New Minimum: -37.26751376566781 > -37.26751579229208
END: th(2.154434690031884)=-37.26751579229208; dx=-1.6387266450281305E-6 evalInputDelta=2.0266242728439465E-6
Fitness changed from -37.26751376566781 to -37.26751579229208
Iteration 1 complete. Error: -37.26751579229208 Total: 28.5528; Orientation: 0.1414; Line Search: 11.2601
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/aa078b65-fa8d-4922-a441-ead794dee235.jpg)
Adding measurement 4e26bfe0 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-37.26751579229208;dx=-1.6358427408988164E-6
New Minimum: -37.26751579229208 > -37.26752795203543
WOLFE (weak): th(4.641588833612779)=-37.26752795203543; dx=-1.6355372236286612E-6 evalInputDelta=1.215974334911607E-5
New Minimum: -37.26752795203543 > -37.26753605852878
WOLFE (weak): th(9.283177667225559)=-37.26753605852878; dx=-1.635509929836181E-6 evalInputDelta=2.0266236703037066E-5
New Minimum: -37.26753605852878 > -37.267568484484585
WOLFE (weak): th(27.849533001676676)=-37.267568484484585; dx=-1.6348230052222114E-6 evalInputDelta=5.269219250436663E-5
New Minimum: -37.267568484484585 > -37.26772048077631
WOLFE (weak): th(111.3981320067067)=-37.26772048077631; dx=-1.6346240233268783E-6 evalInputDelta=2.0468848423149666E-4
New Minimum: -37.26772048077631 > -37.26852909062698
WOLFE (weak): th(556.9906600335335)=-37.26852909062698; dx=-1.6340532016548875E-6 evalInputDelta=0.0010132983348967173
New Minimum: -37.26852909062698 > -37.273583011333294
WOLFE (weak): th(3341.9439602012008)=-37.273583011333294; dx=-1.6341290390777093E-6 evalInputDelta=0.006067219041213434
New Minimum: -37.273583011333294 > -37.30993119291877
WOLFE (weak): th(23393.607721408407)=-37.30993119291877; dx=-1.6313380415019024E-6 evalInputDelta=0.04241540062668747
New Minimum: -37.30993119291877 > -37.60458765786868
WOLFE (weak): th(187148.86177126726)=-37.60458765786868; dx=-1.609906501242897E-6 evalInputDelta=0.33707186557659696
New Minimum: -37.60458765786868 > -40.079235608883394
END: th(1684339.7559414054)=-40.079235608883394; dx=-1.3580674884092236E-6 evalInputDelta=2.8117198165913138
Fitness changed from -37.26751579229208 to -40.079235608883394
Iteration 2 complete. Error: -40.079235608883394 Total: 65.5686; Orientation: 0.1484; Line Search: 58.6147
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/c0ac7781-e620-480d-a12f-2036cbe53685.jpg)
Adding measurement 1cd85a51 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-40.079235608883394;dx=-1.270883728599299E-6
New Minimum: -40.079235608883394 > -44.185122351959976
END: th(3628800.0000000005)=-44.185122351959976; dx=-7.980071427943761E-7 evalInputDelta=4.1058867430765815
Fitness changed from -40.079235608883394 to -44.185122351959976
Iteration 3 complete. Error: -44.185122351959976 Total: 18.4615; Orientation: 0.1335; Line Search: 11.6040
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d05b40ee-d583-439d-b325-c6b21496977c.jpg)
Adding measurement 7f75193b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.505e+03, gradient 8.776e-04, dot -0.772; [7ea449e8-f07b-4f94-bd63-e888f04060d0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.185122351959976, -40.079235608883394, -37.26751579229208, -37.26751376566781
LBFGS Accumulation History: 3 points
Removed measurement 7f75193b to history. Total: 3
th(0)=-44.185122351959976;dx=-7.70026823099112E-7
New Minimum: -44.185122351959976 > -49.23602711871381
END: th(7818012.603187701)=-49.23602711871381; dx=-4.23023564426615E-7 evalInputDelta=5.050904766753831
Fitness changed from -44.185122351959976 to -49.23602711871381
Iteration 4 complete. Error: -49.23602711871381 Total: 22.2565; Orientation: 2.5126; Line Search: 12.4737
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/14b49d73-eb09-4324-9427-632fd6772c6c.jpg)
Adding measurement 2697cd8f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.241e+03, gradient 7.894e-04, dot -0.597; [7ea449e8-f07b-4f94-bd63-e888f04060d0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -49.23602711871381, -40.079235608883394, -37.26751579229208, -37.26751376566781
LBFGS Accumulation History: 3 points
Removed measurement 2697cd8f to history. Total: 3
th(0)=-49.23602711871381;dx=-6.229101625427322E-7
New Minimum: -49.23602711871381 > -54.433069904156646
END: th(1.6843397559414055E7)=-54.433069904156646; dx=-1.0983877369566065E-7 evalInputDelta=5.197042785442839
Fitness changed from -49.23602711871381 to -54.433069904156646
Iteration 5 complete. Error: -54.433069904156646 Total: 21.0839; Orientation: 2.4300; Line Search: 11.6710
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/a5e81f1a-4774-4500-a93c-00f4a08ac6e1.jpg)
Adding measurement ab0a2bb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.014e+04, gradient 1.008e-03, dot -0.305; [7ea449e8-f07b-4f94-bd63-e888f04060d0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -54.433069904156646, -40.079235608883394, -37.26751579229208, -37.26751376566781
LBFGS Accumulation History: 3 points
Removed measurement ab0a2bb to history. Total: 3
th(0)=-54.433069904156646;dx=-1.015148211542019E-6
Armijo: th(3.628800000000001E7)=-50.73414907565262; dx=2.1414442306039598E-7 evalInputDelta=-3.698920828504029
New Minimum: -54.433069904156646 > -56.65300630786297
WOLF (strong): th(1.8144000000000004E7)=-56.65300630786297; dx=3.2033843930959856E-7 evalInputDelta=2.2199364037063205
New Minimum: -56.65300630786297 > -58.92191121767651
END: th(6048000.000000001)=-58.92191121767651; dx=-2.767013217171064E-7 evalInputDelta=4.488841313519863
Fitness changed from -54.433069904156646 to -58.92191121767651
Iteration 6 complete. Error: -58.92191121767651 Total: 32.1771; Orientation: 2.3742; Line Search: 23.0978
Adding measurement 1ccb8713 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.097e+04, gradient 7.059e-04, dot -0.608; [7ea449e8-f07b-4f94-bd63-e888f04060d0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -58.92191121767651, -40.079235608883394, -37.26751579229208, -37.26751376566781
LBFGS Accumulation History: 3 points
Removed measurement 1ccb8713 to history. Total: 3
th(0)=-58.92191121767651;dx=-4.979033164481063E-7
New Minimum: -58.92191121767651 > -62.732407277253394
END: th(1.3030021005312836E7)=-62.732407277253394; dx=-1.088172240071226E-7 evalInputDelta=3.8104960595768844
Fitness changed from -58.92191121767651 to -62.732407277253394
Iteration 7 complete. Error: -62.732407277253394 Total: 19.6146; Orientation: 2.3940; Line Search: 11.5216
Adding measurement 7fe5bd2e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.614e+04, gradient 8.611e-04, dot -0.448; [7ea449e8-f07b-4f94-bd63-e888f04060d0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -62.732407277253394, -40.079235608883394, -37.26751579229208, -37.26751376566781
LBFGS Accumulation History: 3 points
Removed measurement 7fe5bd2e to history. Total: 3
th(0)=-62.732407277253394;dx=-7.41205459339519E-7
Armijo: th(2.8072329265690096E7)=-61.76620827044889; dx=2.0149912357610395E-7 evalInputDelta=-0.9661990068045014
New Minimum: -62.732407277253394 > -65.31025608165471
WOLF (strong): th(1.4036164632845048E7)=-65.31025608165471; dx=1.7997483366177662E-7 evalInputDelta=2.57784880440132
New Minimum: -65.31025608165471 > -65.50895134071833
END: th(4678721.544281683)=-65.50895134071833; dx=-3.12938115532506E-7 evalInputDelta=2.7765440634649323
Fitness changed from -62.732407277253394 to -65.50895134071833
Iteration 8 complete. Error: -65.50895134071833 Total: 30.9999; Orientation: 2.4275; Line Search: 23.0313
Adding measurement 45cc2f13 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.643e+04, gradient 5.978e-04, dot -0.722; [7ea449e8-f07b-4f94-bd63-e888f04060d0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -65.50895134071833, -40.079235608883394, -37.26751579229208, -37.26751376566781
LBFGS Accumulation History: 3 points
Removed measurement 45cc2f13 to history. Total: 3
th(0)=-65.50895134071833;dx=-3.5727270568243723E-7
New Minimum: -65.50895134071833 > -68.61721100826969
END: th(1.0080000000000004E7)=-68.61721100826969; dx=-2.279317089824708E-7 evalInputDelta=3.1082596675513656
Fitness changed from -65.50895134071833 to -68.61721100826969
Iteration 9 complete. Error: -68.61721100826969 Total: 19.5937; Orientation: 2.4272; Line Search: 11.4198
Adding measurement 680271d5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.295e+04, gradient 6.334e-04, dot -0.656; [7ea449e8-f07b-4f94-bd63-e888f04060d0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -68.61721100826969, -40.079235608883394, -37.26751579229208, -37.26751376566781
LBFGS Accumulation History: 3 points
Removed measurement 680271d5 to history. Total: 3
th(0)=-68.61721100826969;dx=-4.0119338539155136E-7
New Minimum: -68.61721100826969 > -72.29571634908734
END: th(2.1716701675521396E7)=-72.29571634908734; dx=-4.744143324938041E-8 evalInputDelta=3.678505340817651
Fitness changed from -68.61721100826969 to -72.29571634908734
Iteration 10 complete. Error: -72.29571634908734 Total: 19.6531; Orientation: 2.4126; Line Search: 11.4851
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/aa4cb736-4202-4092-b147-7903eabb7765.jpg)
Final threshold in iteration 11: -72.29571634908734 (> -Infinity) after 278.938s (< 5400.000s)
Returns
-72.29571634908734