Code from BasicOptimizer.scala:75 executed in 13.69 seconds (0.310 gc):
val lineSearchInstance: LineSearchStrategy = lineSearchFactory
IterativeTrainer.wrap(trainable)
.setOrientation(orientation())
.setMonitor(new TrainingMonitor() {
override def clear(): Unit = trainingMonitor.clear()
override def log(msg: String): Unit = trainingMonitor.log(msg)
override def onStepFail(currentPoint: Step): Boolean = {
BasicOptimizer.this.onStepFail(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, currentPoint)
trainingMonitor.onStepComplete(currentPoint)
super.onStepComplete(currentPoint)
}
})
.setTimeout(trainingMinutes, TimeUnit.MINUTES)
.setMaxIterations(trainingIterations)
.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
.runAndFree
.asInstanceOf[lang.Double]
Reset training subject: 914966217914500
Reset training subject: 914966734431500
Adding measurement 2e612803 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=2.077664688229561;dx=-4.661707215494664E-6
New Minimum: 2.077664688229561 > 2.0776577815413475
WOLFE (weak): th(2.154434690031884)=2.0776577815413475; dx=-4.663405008306428E-6 evalInputDelta=6.906688213348389E-6
New Minimum: 2.0776577815413475 > 2.077650897204876
WOLFE (weak): th(4.308869380063768)=2.077650897204876; dx=-4.663688969389979E-6 evalInputDelta=1.3791024684906006E-5
New Minimum: 2.077650897204876 > 2.077623561024666
WOLFE (weak): th(12.926608140191302)=2.077623561024666; dx=-4.663831423996674E-6 evalInputDelta=4.112720489501953E-5
New Minimum: 2.077623561024666 > 2.077501192688942
WOLFE (weak): th(51.70643256076521)=2.077501192688942; dx=-4.662388160774405E-6 evalInputDelta=1.6349554061889648E-4
New Minimum: 2.077501192688942 > 2.076846167445183
WOLFE (weak): th(258.53216280382605)=2.076846167445183; dx=-4.663945894550966E-6 evalInputDelta=8.185207843780518E-4
New Minimum: 2.076846167445183 > 2.0727403983473778
WOLFE (weak): th(1551.1929768229563)=2.0727403983473778; dx=-4.6489974612619414E-6 evalInputDelta=0.004924289882183075
New Minimum: 2.0727403983473778 > 2.0429747477173805
WOLFE (weak): th(10858.350837760694)=2.0429747477173805; dx=-4.558173303331079E-6 evalInputDelta=0.03468994051218033
New Minimum: 2.0429747477173805 > 1.824703961610794
END: th(86866.80670208555)=1.824703961610794; dx=-2.6622445742049454E-6 evalInputDelta=0.2529607266187668
Fitness changed from 2.077664688229561 to 1.824703961610794
Iteration 1 complete. Error: 1.824703961610794 Total: 5.8961; Orientation: 0.0042; Line Search: 4.3963
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/e3c74bed-4d3d-4a7a-8b75-fc0c6aee6f93.jpg)
Adding measurement 39aec833 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=1.824703961610794;dx=-4.514585084734821E-6
New Minimum: 1
...skipping 1630 bytes...
anged from 1.1362592577934265 to 0.8983394652605057
Iteration 4 complete. Error: 0.8983394652605057 Total: 1.5242; Orientation: 0.1045; Line Search: 0.9460
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/7d1836c4-c99f-4523-943b-cbde28d2b9ff.jpg)
Adding measurement 7e08daa2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.329e+02, gradient 7.288e-04, dot -0.797; [4ab6dc21-790f-408a-abc1-3faaf6937044 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.824703961610794, 1.4581268727779388, 1.1362592577934265, 0.8983394652605057
LBFGS Accumulation History: 3 points
Removed measurement 39aec833 to history. Total: 4
th(0)=0.8983394652605057;dx=-5.311042634097128E-7
New Minimum: 0.8983394652605057 > 0.7051733732223511
END: th(1871488.617712673)=0.7051733732223511; dx=-7.753387142140087E-8 evalInputDelta=0.1931660920381546
Fitness changed from 0.8983394652605057 to 0.7051733732223511
Iteration 5 complete. Error: 0.7051733732223511 Total: 1.5076; Orientation: 0.1043; Line Search: 0.9350
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/1c696829-febe-40b4-a0f3-e40a5df5c4ec.jpg)
Adding measurement 2e7566b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.304e+03, gradient 6.273e-04, dot -0.739; [4ab6dc21-790f-408a-abc1-3faaf6937044 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.4581268727779388, 1.1362592577934265, 0.8983394652605057, 0.7051733732223511
LBFGS Accumulation History: 3 points
Removed measurement 1c6cdda1 to history. Total: 4
th(0)=0.7051733732223511;dx=-3.934443290054217E-7
New Minimum: 0.7051733732223511 > 0.5940175950527191
END: th(4032000.0000000014)=0.5940175950527191; dx=-1.2727627603805407E-8 evalInputDelta=0.11115577816963196
Fitness changed from 0.7051733732223511 to 0.5940175950527191
Iteration 6 complete. Error: 0.5940175950527191 Total: 1.5334; Orientation: 0.1076; Line Search: 0.9530
Final threshold in iteration 7: 0.5940175950527191 (> -Infinity) after 13.692s (< 720.000s)
0.5940175950527191