Code from BasicOptimizer.scala:88 executed in 445.64 seconds (3.048 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: 872067759808
Reset training subject: 881633835539
Adding measurement 138e32e6 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=6.884460214525461;dx=-1.7951592380837896E-7
New Minimum: 6.884460214525461 > 6.884458526968956
WOLFE (weak): th(2.154434690031884)=6.884458526968956; dx=-1.7954582397612077E-7 evalInputDelta=1.687556505203247E-6
New Minimum: 6.884458526968956 > 6.884456135332584
WOLFE (weak): th(4.308869380063768)=6.884456135332584; dx=-1.7975306766234052E-7 evalInputDelta=4.079192876815796E-6
New Minimum: 6.884456135332584 > 6.884450018405914
WOLFE (weak): th(12.926608140191302)=6.884450018405914; dx=-1.7829098443146293E-7 evalInputDelta=1.0196119546890259E-5
New Minimum: 6.884450018405914 > 6.884418845176697
WOLFE (weak): th(51.70643256076521)=6.884418845176697; dx=-1.7215024389753186E-7 evalInputDelta=4.1369348764419556E-5
New Minimum: 6.884418845176697 > 6.884254962205887
WOLFE (weak): th(258.53216280382605)=6.884254962205887; dx=-1.7841682541287054E-7 evalInputDelta=2.0525231957435608E-4
New Minimum: 6.884254962205887 > 6.8832297176122665
WOLFE (weak): th(1551.1929768229563)=6.8832297176122665; dx=-1.7864259274073724E-7 evalInputDelta=0.0012304969131946564
New Minimum: 6.8832297176122665 > 6.875838950276375
WOLFE (weak): th(10858.350837760694)=6.875838950276375; dx=-1.782927685270026E-7 evalInputDelta=0.00862126424908638
New Minimum: 6.875838950276375 > 6.8147279396653175
WOLFE (weak): th(86866.80670208555)=6.8147279396653175; dx=-1.810208758742037E-7 evalInputDelta=0.06973227486014366
New Minimum: 6.8147279396653175 > 6.284317120909691
END: th(781801.26031877)=6.284317120909691; dx=-1.5897400684011195E-7 evalInputDelta=0.6001430936157703
Fitness changed from 6.884460214525461 to 6.284317120909691
Iteration 1 complete. Error: 6.284317120909691 Total: 124.8988; Orientation: 0.0143; Line Search: 96.1830
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a6ec09f3-8c9f-4875-a1e7-15fba061bfe3.jpg)
Adding meas
...skipping 5613 bytes...
392 Total: 39.2258; Orientation: 0.2767; Line Search: 29.1220
Adding measurement 38ccaca0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.718e+03, gradient 2.104e-04, dot -0.375; [b1dcbc03-200d-43e6-b163-c1c4e1211f21 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.1482834666967392, 5.244582548737526, 6.284317120909691, 6.884460214525461
LBFGS Accumulation History: 3 points
Removed measurement 38ccaca0 to history. Total: 3
th(0)=1.1482834666967392;dx=-4.289011236578357E-8
Armijo: th(1.5120000000000004E7)=1.600900262594223; dx=2.3180161362131605E-9 evalInputDelta=-0.4526167958974838
New Minimum: 1.1482834666967392 > 0.9614758118987083
END: th(7560000.000000002)=0.9614758118987083; dx=-1.1467592742941654E-8 evalInputDelta=0.18680765479803085
Fitness changed from 1.1482834666967392 to 0.9614758118987083
Iteration 9 complete. Error: 0.9614758118987083 Total: 38.1324; Orientation: 0.1759; Line Search: 28.3632
Adding measurement 649bc68 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.052e+03, gradient 2.283e-04, dot -0.343; [b1dcbc03-200d-43e6-b163-c1c4e1211f21 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.9614758118987083, 5.244582548737526, 6.284317120909691, 6.884460214525461
LBFGS Accumulation History: 3 points
Removed measurement 649bc68 to history. Total: 3
th(0)=0.9614758118987083;dx=-4.918602895084914E-8
Armijo: th(1.6287526256641045E7)=1.8504681140184402; dx=1.0541885051224492E-8 evalInputDelta=-0.8889923021197319
New Minimum: 0.9614758118987083 > 0.857549712061882
END: th(8143763.128320523)=0.857549712061882; dx=-3.5666595919381725E-9 evalInputDelta=0.10392609983682632
Fitness changed from 0.9614758118987083 to 0.857549712061882
Iteration 10 complete. Error: 0.857549712061882 Total: 38.8003; Orientation: 0.1751; Line Search: 29.0405
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/197f695d-47e8-4c66-9ab4-87e1e0ce4b7b.jpg)
Final threshold in iteration 11: 0.857549712061882 (> -Infinity) after 445.641s (< 1800.000s)
0.857549712061882