Code from BasicOptimizer.scala:75 executed in 969.69 seconds (11.066 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: 1238268224370300
Reset training subject: 1238276518451300
Adding measurement 2cd877d3 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=5.205117886309122;dx=-2.719010423425431E-5
New Minimum: 5.205117886309122 > 5.205092383771419
WOLFE (weak): th(2.154434690031884)=5.205092383771419; dx=-2.7189748549900057E-5 evalInputDelta=2.5502537702948302E-5
New Minimum: 5.205092383771419 > 5.205066642929145
WOLFE (weak): th(4.308869380063768)=5.205066642929145; dx=-2.7189357309478432E-5 evalInputDelta=5.124337997663986E-5
New Minimum: 5.205066642929145 > 5.204964352865067
WOLFE (weak): th(12.926608140191302)=5.204964352865067; dx=-2.7188097794316283E-5 evalInputDelta=1.5353344405433234E-4
New Minimum: 5.204964352865067 > 5.204503693247634
WOLFE (weak): th(51.70643256076521)=5.204503693247634; dx=-2.71825311237346E-5 evalInputDelta=6.141930614873559E-4
New Minimum: 5.204503693247634 > 5.202049254152205
WOLFE (weak): th(258.53216280382605)=5.202049254152205; dx=-2.7146788361165978E-5 evalInputDelta=0.003068632156916884
New Minimum: 5.202049254152205 > 5.1867859510899805
WOLFE (weak): th(1551.1929768229563)=5.1867859510899805; dx=-2.6918719957407682E-5 evalInputDelta=0.018331935219141116
New Minimum: 5.1867859510899805 > 5.08068212933535
WOLFE (weak): th(10858.350837760694)=5.08068212933535; dx=-2.5290248889774574E-5 evalInputDelta=0.12443575697377174
New Minimum: 5.08068212933535 > 4.426111800497832
END: th(86866.80670208555)=4.426111800497832; dx=-1.5549082960849836E-5 evalInputDelta=0.7790060858112895
Fitness changed from 5.205117886309122 to 4.426111800497832
Iteration 1 complete. Error: 4.426111800497832 Total: 95.8969; Orientation: 0.0067; Line Search: 71.7182
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/6bb4dbf3-bb10-479f-9cc3-b3b513cbe7d3.jpg)
Adding measurement 43b74979 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=4.426111800497832;dx=-1.1357128408971209E-5
New Minimum: 4
...skipping 23857 bytes...
.5617
Adding measurement 7552f05b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.786e+03, gradient 2.283e-04, dot -0.639; [883a6229-4963-4466-9892-d4bf226880c8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.36364874464078417, 0.33440572342128616, 0.31613386786048514, 0.3040469686218245
LBFGS Accumulation History: 3 points
Removed measurement 6d387e9b to history. Total: 4
th(0)=0.3040469686218245;dx=-5.211543363439924E-8
Armijo: th(1.0445962524205731E7)=0.443290249530915; dx=3.125080992077395E-8 evalInputDelta=-0.1392432809090905
Armijo: th(5222981.262102866)=0.3093152508401356; dx=5.427119326781353E-9 evalInputDelta=-0.0052682822183111044
New Minimum: 0.3040469686218245 > 0.28645126106358454
END: th(1740993.7540342885)=0.28645126106358454; dx=-2.7109663550388716E-8 evalInputDelta=0.01759570755823997
Fitness changed from 0.3040469686218245 to 0.28645126106358454
Iteration 29 complete. Error: 0.28645126106358454 Total: 40.3494; Orientation: 0.2011; Line Search: 32.0520
Adding measurement 6b3da23f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.126e+03, gradient 1.730e-04, dot -0.828; [883a6229-4963-4466-9892-d4bf226880c8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.33440572342128616, 0.31613386786048514, 0.3040469686218245, 0.28645126106358454
LBFGS Accumulation History: 3 points
Removed measurement 4f836d9 to history. Total: 4
th(0)=0.28645126106358454;dx=-2.992353137124014E-8
New Minimum: 0.28645126106358454 > 0.27125735093189224
END: th(3750857.338820308)=0.27125735093189224; dx=-2.1284645366965528E-8 evalInputDelta=0.015193910131692301
Fitness changed from 0.28645126106358454 to 0.27125735093189224
Iteration 30 complete. Error: 0.27125735093189224 Total: 24.0912; Orientation: 0.2013; Line Search: 15.8350
<a id="p-21"></a>Iteration 30
<a id="p-20"></a>![Iteration 30](etc/6a89fa4a-cd9f-4a2f-99cf-629107641b9d.jpg)
Final threshold in iteration 31: 0.27125735093189224 (> -Infinity) after 969.679s (< 3600.000s)
0.27125735093189224