BasicOptimizer.scala:89 executed in 234.54 seconds (3.356 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: 7092873877644
Reset training subject: 7098283572356
Adding measurement 4d42fa08 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-15.029363751411438;dx=-1.5601844445177476E-6
New Minimum: -15.029363751411438 > -15.029367119073868
WOLFE (weak): th(2.154434690031884)=-15.029367119073868; dx=-1.44569341282458E-6 evalInputDelta=3.3676624298095703E-6
New Minimum: -15.029367119073868 > -15.029371738433838
WOLFE (weak): th(4.308869380063768)=-15.029371738433838; dx=-1.4456420500581732E-6 evalInputDelta=7.987022399902344E-6
New Minimum: -15.029371738433838 > -15.029386281967163
WOLFE (weak): th(12.926608140191302)=-15.029386281967163; dx=-1.4461508379310962E-6 evalInputDelta=2.2530555725097656E-5
New Minimum: -15.029386281967163 > -15.029454380273819
WOLFE (weak): th(51.70643256076521)=-15.029454380273819; dx=-1.4455691690958772E-6 evalInputDelta=9.062886238098145E-5
New Minimum: -15.029454380273819 > -15.029817581176758
WOLFE (weak): th(258.53216280382605)=-15.029817581176758; dx=-1.445614892151067E-6 evalInputDelta=4.538297653198242E-4
New Minimum: -15.029817581176758 > -15.032084107398987
WOLFE (weak): th(1551.1929768229563)=-15.032084107398987; dx=-1.4446841588813935E-6 evalInputDelta=0.002720355987548828
New Minimum: -15.032084107398987 > -15.048348546028137
WOLFE (weak): th(10858.350837760694)=-15.048348546028137; dx=-1.4346094532069908E-6 evalInputDelta=0.01898479461669922
New Minimum: -15.048348546028137 > -15.176869928836823
END: th(86866.80670208555)=-15.176869928836823; dx=-1.3505447252186488E-6 evalInputDelta=0.14750617742538452
Fitness changed from -15.029363751411438 to -15.176869928836823
Iteration 1 complete. Error: -15.176869928836823 Total: 60.8800; Orientation: 0.0301; Line Search: 45.4196
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/fb3ccbf6-9cb4-446f-8b58-70e41b6fcce8.jpg)
Adding measurement 17bb0786 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-15.176869928836823;dx=-1.2815326396566012E-6
New Minimum: -15.176869928836823 > -15.447225660085678
END: th(187148.86177126726)=-15.447225660085678; dx=-1.0989983530507587E-6 evalInputDelta=0.2703557312488556
Fitness changed from -15.176869928836823 to -15.447225660085678
Iteration 2 complete. Error: -15.447225660085678 Total: 15.5545; Orientation: 0.0313; Line Search: 9.9909
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/85463f41-ff20-4f7a-9a89-7d2a02621311.jpg)
Adding measurement 34934487 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-15.447225660085678;dx=-1.010773348690963E-6
New Minimum: -15.447225660085678 > -15.884792298078537
END: th(403200.00000000006)=-15.884792298078537; dx=-7.844543426448319E-7 evalInputDelta=0.4375666379928589
Fitness changed from -15.447225660085678 to -15.884792298078537
Iteration 3 complete. Error: -15.884792298078537 Total: 15.4053; Orientation: 0.0290; Line Search: 9.9859
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/428f0566-a7a9-4f4a-aba9-44824671634a.jpg)
Adding measurement 3e81cc9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.907e+03, gradient 8.570e-04, dot -0.921; [8abdb407-2978-45e1-9104-ab91ac8467cc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -15.884792298078537, -15.447225660085678, -15.176869928836823, -15.029363751411438
LBFGS Accumulation History: 3 points
Removed measurement 3e81cc9 to history. Total: 3
th(0)=-15.884792298078537;dx=-7.338923105088037E-7
New Minimum: -15.884792298078537 > -16.51893785595894
END: th(868668.0670208557)=-16.51893785595894; dx=-4.925571353306672E-7 evalInputDelta=0.6341455578804016
Fitness changed from -15.884792298078537 to -16.51893785595894
Iteration 4 complete. Error: -16.51893785595894 Total: 16.4275; Orientation: 0.6182; Line Search: 10.1893
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/3207e2b6-da22-47b9-8480-37307f984fb6.jpg)
Adding measurement 3d9b7156 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.925e+03, gradient 7.115e-04, dot -0.826; [8abdb407-2978-45e1-9104-ab91ac8467cc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.51893785595894, -15.447225660085678, -15.176869928836823, -15.029363751411438
LBFGS Accumulation History: 3 points
Removed measurement 3d9b7156 to history. Total: 3
th(0)=-16.51893785595894;dx=-5.057202009947687E-7
New Minimum: -16.51893785595894 > -17.309416085481644
END: th(1871488.617712673)=-17.309416085481644; dx=-2.4844596296132315E-7 evalInputDelta=0.7904782295227051
Fitness changed from -16.51893785595894 to -17.309416085481644
Iteration 5 complete. Error: -17.309416085481644 Total: 16.3030; Orientation: 0.6176; Line Search: 10.7447
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/588839d3-3570-4145-bcc2-ee1ee4040dc0.jpg)
Adding measurement 6aaf012f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.797e+03, gradient 6.357e-04, dot -0.654; [8abdb407-2978-45e1-9104-ab91ac8467cc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -17.309416085481644, -15.447225660085678, -15.176869928836823, -15.029363751411438
LBFGS Accumulation History: 3 points
Removed measurement 6aaf012f to history. Total: 3
th(0)=-17.309416085481644;dx=-4.036378675139135E-7
New Minimum: -17.309416085481644 > -17.89017790555954
END: th(4032000.0000000014)=-17.89017790555954; dx=-1.853581340689863E-8 evalInputDelta=0.5807618200778961
Fitness changed from -17.309416085481644 to -17.89017790555954
Iteration 6 complete. Error: -17.89017790555954 Total: 15.9871; Orientation: 0.6151; Line Search: 9.8887
Adding measurement 1108f458 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.442e+03, gradient 8.086e-04, dot -0.297; [8abdb407-2978-45e1-9104-ab91ac8467cc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -17.89017790555954, -15.447225660085678, -15.176869928836823, -15.029363751411438
LBFGS Accumulation History: 3 points
Removed measurement 1108f458 to history. Total: 3
th(0)=-17.89017790555954;dx=-6.529096596817273E-7
Armijo: th(8686680.670208558)=-15.988598763942719; dx=2.455245036629569E-7 evalInputDelta=-1.9015791416168213
Armijo: th(4343340.335104279)=-17.57366994023323; dx=2.983921465184353E-7 evalInputDelta=-0.3165079653263092
New Minimum: -17.89017790555954 > -18.411040633916855
END: th(1447780.1117014263)=-18.411040633916855; dx=-1.3675178258468607E-8 evalInputDelta=0.5208627283573151
Fitness changed from -17.89017790555954 to -18.411040633916855
Iteration 7 complete. Error: -18.411040633916855 Total: 25.9442; Orientation: 0.6046; Line Search: 20.2448
Adding measurement 50b8a7c0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.898e+03, gradient 5.888e-04, dot -0.406; [8abdb407-2978-45e1-9104-ab91ac8467cc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -18.411040633916855, -15.447225660085678, -15.176869928836823, -15.029363751411438
LBFGS Accumulation History: 3 points
Removed measurement 50b8a7c0 to history. Total: 3
th(0)=-18.411040633916855;dx=-3.464723903508994E-7
New Minimum: -18.411040633916855 > -18.635376155376434
WOLF (strong): th(3119147.6961877886)=-18.635376155376434; dx=1.341011242744757E-7 evalInputDelta=0.22433552145957947
New Minimum: -18.635376155376434 > -18.75602501630783
END: th(1559573.8480938943)=-18.75602501630783; dx=-4.872800901970449E-8 evalInputDelta=0.34498438239097595
Fitness changed from -18.411040633916855 to -18.75602501630783
Iteration 8 complete. Error: -18.75602501630783 Total: 20.6143; Orientation: 0.6046; Line Search: 15.1461
Adding measurement 3978ad12 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.164e+03, gradient 4.631e-04, dot -0.514; [8abdb407-2978-45e1-9104-ab91ac8467cc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -18.75602501630783, -15.447225660085678, -15.176869928836823, -15.029363751411438
LBFGS Accumulation History: 3 points
Removed measurement 3978ad12 to history. Total: 3
th(0)=-18.75602501630783;dx=-2.1391448395280957E-7
New Minimum: -18.75602501630783 > -18.986211597919464
WOLF (strong): th(3360000.0000000014)=-18.986211597919464; dx=3.803387069382618E-8 evalInputDelta=0.2301865816116333
New Minimum: -18.986211597919464 > -19.005208134651184
END: th(1680000.0000000007)=-19.005208134651184; dx=-4.847038867938495E-8 evalInputDelta=0.24918311834335327
Fitness changed from -18.75602501630783 to -19.005208134651184
Iteration 9 complete. Error: -19.005208134651184 Total: 20.7184; Orientation: 0.6088; Line Search: 15.0206
Adding measurement 77dc4819 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.375e+03, gradient 4.180e-04, dot -0.555; [8abdb407-2978-45e1-9104-ab91ac8467cc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -19.005208134651184, -15.447225660085678, -15.176869928836823, -15.029363751411438
LBFGS Accumulation History: 3 points
Removed measurement 77dc4819 to history. Total: 3
th(0)=-19.005208134651184;dx=-1.7456646961518556E-7
New Minimum: -19.005208134651184 > -19.183580666780472
WOLF (strong): th(3619450.279253566)=-19.183580666780472; dx=2.3848447922686135E-8 evalInputDelta=0.17837253212928772
New Minimum: -19.183580666780472 > -19.208149313926697
END: th(1809725.139626783)=-19.208149313926697; dx=-2.657047368522469E-8 evalInputDelta=0.2029411792755127
Fitness changed from -19.005208134651184 to -19.208149313926697
Iteration 10 complete. Error: -19.208149313926697 Total: 26.4353; Orientation: 1.2345; Line Search: 17.2052
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/58668ca0-c6c6-459c-93ed-e78310deb298.jpg)
Final threshold in iteration 11: -19.208149313926697 (> -Infinity) after 234.536s (< 5400.000s)
Returns
-19.208149313926697