Code from BasicOptimizer.scala:88 executed in 624.47 seconds (3.748 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: 1028355623162
Reset training subject: 1040457342256
Adding measurement 25fbb44c to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=11.728265777230263;dx=-1.4340645618541244E-6
New Minimum: 11.728265777230263 > 11.728260591626167
WOLFE (weak): th(2.154434690031884)=11.728260591626167; dx=-1.431443023839651E-6 evalInputDelta=5.185604095458984E-6
New Minimum: 11.728260591626167 > 11.728254854679108
WOLFE (weak): th(4.308869380063768)=11.728254854679108; dx=-1.4312320222365262E-6 evalInputDelta=1.0922551155090332E-5
New Minimum: 11.728254854679108 > 11.728233605623245
WOLFE (weak): th(12.926608140191302)=11.728233605623245; dx=-1.431231613773757E-6 evalInputDelta=3.217160701751709E-5
New Minimum: 11.728233605623245 > 11.728137478232384
WOLFE (weak): th(51.70643256076521)=11.728137478232384; dx=-1.4314573797190563E-6 evalInputDelta=1.2829899787902832E-4
New Minimum: 11.728137478232384 > 11.72762443125248
WOLFE (weak): th(258.53216280382605)=11.72762443125248; dx=-1.430589895462795E-6 evalInputDelta=6.413459777832031E-4
New Minimum: 11.72762443125248 > 11.724419921636581
WOLFE (weak): th(1551.1929768229563)=11.724419921636581; dx=-1.4312489202554285E-6 evalInputDelta=0.0038458555936813354
New Minimum: 11.724419921636581 > 11.701368033885956
WOLFE (weak): th(10858.350837760694)=11.701368033885956; dx=-1.4272089106732686E-6 evalInputDelta=0.026897743344306946
New Minimum: 11.701368033885956 > 11.514542683959007
WOLFE (weak): th(86866.80670208555)=11.514542683959007; dx=-1.3689847464130563E-6 evalInputDelta=0.2137230932712555
New Minimum: 11.514542683959007 > 10.117144078016281
END: th(781801.26031877)=10.117144078016281; dx=-7.924284469258032E-7 evalInputDelta=1.6111216992139816
Fitness changed from 11.728265777230263 to 10.117144078016281
Iteration 1 complete. Error: 10.117144078016281 Total: 173.7326; Orientation: 0.0335; Line Search: 135.5993
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/1d35a502-07ad-4b58-afb5-755d9618
...skipping 5831 bytes...
istory. Total: 3
Rejected: LBFGS Orientation magnitude: 1.396e+03, gradient 2.073e-04, dot -0.193; [31afedc9-3f52-4908-9f05-330cdc0ec66d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.2794518768787384, 8.010546058416367, 10.117144078016281, 11.728265777230263
LBFGS Accumulation History: 3 points
Removed measurement 5223d4a3 to history. Total: 3
th(0)=-0.2794518768787384;dx=-4.2871631374108486E-8
New Minimum: -0.2794518768787384 > -0.5334538817405701
END: th(1.5120000000000002E7)=-0.5334538817405701; dx=-5.964502610629353E-10 evalInputDelta=0.25400200486183167
Fitness changed from -0.2794518768787384 to -0.5334538817405701
Iteration 9 complete. Error: -0.5334538817405701 Total: 41.9296; Orientation: 0.8151; Line Search: 27.1273
Adding measurement 4ea3bc6b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.509e+03, gradient 2.330e-04, dot -0.188; [31afedc9-3f52-4908-9f05-330cdc0ec66d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.5334538817405701, 8.010546058416367, 10.117144078016281, 11.728265777230263
LBFGS Accumulation History: 3 points
Removed measurement 4ea3bc6b to history. Total: 3
th(0)=-0.5334538817405701;dx=-5.416595040777669E-8
Armijo: th(3.2575052513282087E7)=0.25107957422733307; dx=1.924968514596993E-8 evalInputDelta=-0.7845334559679031
New Minimum: -0.5334538817405701 > -0.5652057975530624
WOLF (strong): th(1.6287526256641043E7)=-0.5652057975530624; dx=1.4726819137028866E-8 evalInputDelta=0.03175191581249237
New Minimum: -0.5652057975530624 > -0.8341287672519684
END: th(5429175.418880348)=-0.8341287672519684; dx=-1.217764472454308E-8 evalInputDelta=0.3006748855113983
Fitness changed from -0.5334538817405701 to -0.8341287672519684
Iteration 10 complete. Error: -0.8341287672519684 Total: 68.7874; Orientation: 0.7931; Line Search: 54.4496
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/d5b61183-3751-4be1-b069-7017bde63396.jpg)
Final threshold in iteration 11: -0.8341287672519684 (> -Infinity) after 624.465s (< 1800.000s)
-0.8341287672519684