BasicOptimizer.scala:88 executed in 133.75 seconds (3.812 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: 2798705506930
Reset training subject: 2802200790638
Adding measurement 203e4651 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=30.87572011584416;dx=-1.7808431686310182E-4
New Minimum: 30.87572011584416 > 30.875082136131823
WOLFE (weak): th(2.154434690031884)=30.875082136131823; dx=-1.6656842703247649E-4 evalInputDelta=6.379797123372555E-4
New Minimum: 30.875082136131823 > 30.87444478366524
WOLFE (weak): th(4.308869380063768)=30.87444478366524; dx=-1.8073725461134344E-4 evalInputDelta=0.0012753321789205074
New Minimum: 30.87444478366524 > 30.871894862037152
WOLFE (weak): th(12.926608140191302)=30.871894862037152; dx=-1.6343022607163304E-4 evalInputDelta=0.0038252538070082664
New Minimum: 30.871894862037152 > 30.860901952255517
END: th(51.70643256076521)=30.860901952255517; dx=-7.321454080738173E-5 evalInputDelta=0.014818163588643074
Fitness changed from 30.87572011584416 to 30.860901952255517
Iteration 1 complete. Error: 30.860901952255517 Total: 26.5760; Orientation: 0.0366; Line Search: 16.6391
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/6e7e807f-766f-4de6-974e-6b8d396adf20.jpg)
Adding measurement ad8f556 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=30.860901952255517;dx=-7.972674248552487E-5
New Minimum: 30.860901952255517 > 30.832412698538974
WOLFE (weak): th(111.39813200670669)=30.832412698538974; dx=-7.679505228854696E-5 evalInputDelta=0.028489253716543317
New Minimum: 30.832412698538974 > 30.818359225522727
WOLFE (weak): th(222.79626401341338)=30.818359225522727; dx=-7.397137270378671E-5 evalInputDelta=0.04254272673279047
New Minimum: 30.818359225522727 > 30.69680908555165
WOLFE (weak): th(668.3887920402401)=30.69680908555165; dx=-8.307693459896632E-5 evalInputDelta=0.1640928667038679
New Minimum: 30.69680908555165 > 30.128883307799697
WOLFE (weak): th(2673.5551681609604)=30.128883307799697; dx=-8.442203175978364E-5 evalInputDelta=0.7320186444558203
New Minimum: 30.128883307799697 > 27.71385648380965
END: th(13367.775840804803)=27.71385648380965; dx=-3.794352198792636E-5 evalInputDelta=3.1470454684458673
Fitness changed from 30.860901952255517 to 27.71385648380965
Iteration 2 complete. Error: 27.71385648380965 Total: 23.4164; Orientation: 0.0074; Line Search: 20.2302
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/ae9fb6f7-6ae9-4631-9858-4e63fa81a50e.jpg)
Adding measurement 335f80e9 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=27.71385648380965;dx=-4.587349704207726E-5
New Minimum: 27.71385648380965 > 25.349191173911095
END: th(28800.0)=25.349191173911095; dx=-1.9450733963857338E-5 evalInputDelta=2.3646653098985553
Fitness changed from 27.71385648380965 to 25.349191173911095
Iteration 3 complete. Error: 25.349191173911095 Total: 9.6895; Orientation: 0.0051; Line Search: 6.4435
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/0838d798-4745-48b1-a0ab-cc90cfe89ce8.jpg)
Adding measurement 1778a840 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.062e+02, gradient 5.027e-03, dot -0.460; [aefda40f-61da-4975-9364-b45cfae4df07 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 25.349191173911095, 27.71385648380965, 30.860901952255517, 30.87572011584416
LBFGS Accumulation History: 3 points
Removed measurement 1778a840 to history. Total: 3
th(0)=25.349191173911095;dx=-2.1039147661363537E-5
New Minimum: 25.349191173911095 > 22.232774739153683
END: th(62047.719072918255)=22.232774739153683; dx=-7.981232207462203E-6 evalInputDelta=3.1164164347574115
Fitness changed from 25.349191173911095 to 22.232774739153683
Iteration 4 complete. Error: 22.232774739153683 Total: 10.1543; Orientation: 0.4793; Line Search: 6.4342
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/d4df8bc6-8514-4ab0-8591-ddc2a07760c3.jpg)
Adding measurement 73967cc3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.724e+02, gradient 4.450e-03, dot -0.378; [aefda40f-61da-4975-9364-b45cfae4df07 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 22.232774739153683, 27.71385648380965, 30.860901952255517, 30.87572011584416
LBFGS Accumulation History: 3 points
Removed measurement 73967cc3 to history. Total: 3
th(0)=22.232774739153683;dx=-1.855036141169599E-5
New Minimum: 22.232774739153683 > 19.476506200619042
END: th(133677.75840804804)=19.476506200619042; dx=-4.689109793000392E-6 evalInputDelta=2.7562685385346413
Fitness changed from 22.232774739153683 to 19.476506200619042
Iteration 5 complete. Error: 19.476506200619042 Total: 10.2639; Orientation: 0.1041; Line Search: 6.9413
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/903669ff-7703-4179-b6e1-b77aa8c15834.jpg)
Adding measurement 3fb06bec to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.563e+02, gradient 3.358e-03, dot -0.386; [aefda40f-61da-4975-9364-b45cfae4df07 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 19.476506200619042, 27.71385648380965, 30.860901952255517, 30.87572011584416
LBFGS Accumulation History: 3 points
Removed measurement 3fb06bec to history. Total: 3
th(0)=19.476506200619042;dx=-1.0475680319738006E-5
New Minimum: 19.476506200619042 > 16.338731534779072
END: th(288000.00000000006)=16.338731534779072; dx=-2.5196541190124424E-6 evalInputDelta=3.13777466583997
Fitness changed from 19.476506200619042 to 16.338731534779072
Iteration 6 complete. Error: 16.338731534779072 Total: 9.9222; Orientation: 0.3969; Line Search: 6.3269
Adding measurement 477fa16b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.001e+02, gradient 2.159e-03, dot -0.414; [aefda40f-61da-4975-9364-b45cfae4df07 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 16.338731534779072, 27.71385648380965, 30.860901952255517, 30.87572011584416
LBFGS Accumulation History: 3 points
Removed measurement 477fa16b to history. Total: 3
th(0)=16.338731534779072;dx=-3.965951928218304E-6
New Minimum: 16.338731534779072 > 12.713996378704906
END: th(620477.1907291827)=12.713996378704906; dx=-1.258277056274704E-6 evalInputDelta=3.6247351560741663
Fitness changed from 16.338731534779072 to 12.713996378704906
Iteration 7 complete. Error: 12.713996378704906 Total: 10.3284; Orientation: 0.1033; Line Search: 7.0640
Adding measurement 1e3d85a0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.120e+02, gradient 1.536e-03, dot -0.451; [aefda40f-61da-4975-9364-b45cfae4df07 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 12.713996378704906, 27.71385648380965, 30.860901952255517, 30.87572011584416
LBFGS Accumulation History: 3 points
Removed measurement 1e3d85a0 to history. Total: 3
th(0)=12.713996378704906;dx=-2.1303490202498316E-6
New Minimum: 12.713996378704906 > 9.879397436976433
END: th(1336777.5840804807)=9.879397436976433; dx=-6.475774363971468E-7 evalInputDelta=2.8345989417284727
Fitness changed from 12.713996378704906 to 9.879397436976433
Iteration 8 complete. Error: 9.879397436976433 Total: 9.5603; Orientation: 0.0704; Line Search: 6.3518
Adding measurement 474ec38d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.033e+03, gradient 1.284e-03, dot -0.399; [aefda40f-61da-4975-9364-b45cfae4df07 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 9.879397436976433, 27.71385648380965, 30.860901952255517, 30.87572011584416
LBFGS Accumulation History: 3 points
Removed measurement 474ec38d to history. Total: 3
th(0)=9.879397436976433;dx=-1.5542640697680286E-6
New Minimum: 9.879397436976433 > 6.987674482166767
END: th(2880000.000000001)=6.987674482166767; dx=-6.659985155492187E-8 evalInputDelta=2.8917229548096657
Fitness changed from 9.879397436976433 to 6.987674482166767
Iteration 9 complete. Error: 6.987674482166767 Total: 10.2694; Orientation: 0.0698; Line Search: 6.4251
Adding measurement 53219c58 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.190e+02, gradient 8.956e-04, dot -0.160; [aefda40f-61da-4975-9364-b45cfae4df07 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 6.987674482166767, 27.71385648380965, 30.860901952255517, 30.87572011584416
LBFGS Accumulation History: 3 points
Removed measurement 53219c58 to history. Total: 3
th(0)=6.987674482166767;dx=-7.477673681795696E-7
Armijo: th(6204771.907291828)=7.389980584383011; dx=5.63948258093275E-8 evalInputDelta=-0.40230610221624374
New Minimum: 6.987674482166767 > 5.91889862716198
END: th(3102385.953645914)=5.91889862716198; dx=-8.061634151590666E-8 evalInputDelta=1.0687758550047874
Fitness changed from 6.987674482166767 to 5.91889862716198
Iteration 10 complete. Error: 5.91889862716198 Total: 13.5211; Orientation: 0.0702; Line Search: 10.2817
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/3bb9d3c6-92e6-4e7d-a2ea-a2cdf634b25e.jpg)
Final threshold in iteration 11: 5.91889862716198 (> -Infinity) after 133.727s (< 1800.000s)
Returns
5.91889862716198