Code from BasicOptimizer.scala:88 executed in 914.16 seconds (7.528 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: 4249151022115
Reset training subject: 4265949738438
Adding measurement 4947951a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=4.948589384555817;dx=-8.223053043093596E-8
New Minimum: 4.948589384555817 > 4.948589324951172
WOLFE (weak): th(2.154434690031884)=4.948589324951172; dx=-8.223191152043646E-8 evalInputDelta=5.9604644775390625E-8
New Minimum: 4.948589324951172 > 4.948589161038399
WOLFE (weak): th(4.308869380063768)=4.948589161038399; dx=-8.223500136966053E-8 evalInputDelta=2.2351741790771484E-7
New Minimum: 4.948589161038399 > 4.948587700724602
WOLFE (weak): th(12.926608140191302)=4.948587700724602; dx=-8.223424020173351E-8 evalInputDelta=1.6838312149047852E-6
New Minimum: 4.948587700724602 > 4.948583796620369
WOLFE (weak): th(51.70643256076521)=4.948583796620369; dx=-8.223307968157732E-8 evalInputDelta=5.587935447692871E-6
New Minimum: 4.948583796620369 > 4.948560252785683
WOLFE (weak): th(258.53216280382605)=4.948560252785683; dx=-8.223424170090115E-8 evalInputDelta=2.9131770133972168E-5
New Minimum: 4.948560252785683 > 4.948415517807007
WOLFE (weak): th(1551.1929768229563)=4.948415517807007; dx=-8.223481244545773E-8 evalInputDelta=1.7386674880981445E-4
New Minimum: 4.948415517807007 > 4.947372764348984
WOLFE (weak): th(10858.350837760694)=4.947372764348984; dx=-8.223360745241356E-8 evalInputDelta=0.0012166202068328857
New Minimum: 4.947372764348984 > 4.938855513930321
WOLFE (weak): th(86866.80670208555)=4.938855513930321; dx=-8.224151865224744E-8 evalInputDelta=0.00973387062549591
New Minimum: 4.938855513930321 > 4.861018046736717
WOLFE (weak): th(781801.26031877)=4.861018046736717; dx=-8.216431470095809E-8 evalInputDelta=0.08757133781909943
New Minimum: 4.861018046736717 > 4.1006151884794235
WOLFE (weak): th(7818012.6031877)=4.1006151884794235; dx=-7.649795763376504E-8 evalInputDelta=0.8479741960763931
WOLF (strong): th(8.599813863506469E7)=4.4338075667619705; dx=6.841762498182262E-8 evalInputDelta=0.5147818177938461
...skipping 6510 bytes...
ry. Total: 3
Rejected: LBFGS Orientation magnitude: 5.580e+03, gradient 3.739e-05, dot -0.673; [1e0f23ad-010a-453a-b224-00d35508ab0b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.4489318206906319, 0.5261023044586182, 2.0367368310689926, 4.948589384555817
LBFGS Accumulation History: 3 points
Removed measurement 7bffc329 to history. Total: 3
th(0)=-1.4489318206906319;dx=-1.3974656370395966E-9
New Minimum: -1.4489318206906319 > -1.5524891838431358
END: th(7.560000000000003E7)=-1.5524891838431358; dx=-9.584133975015794E-10 evalInputDelta=0.10355736315250397
Fitness changed from -1.4489318206906319 to -1.5524891838431358
Iteration 9 complete. Error: -1.5524891838431358 Total: 54.8416; Orientation: 2.0628; Line Search: 35.5579
Adding measurement 3d806333 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.644e+03, gradient 3.452e-05, dot -0.677; [1e0f23ad-010a-453a-b224-00d35508ab0b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5524891838431358, 0.5261023044586182, 2.0367368310689926, 4.948589384555817
LBFGS Accumulation History: 3 points
Removed measurement 3d806333 to history. Total: 3
th(0)=-1.5524891838431358;dx=-1.191182006744388E-9
Armijo: th(1.6287526256641048E8)=-1.3486596196889877; dx=2.840823511322671E-9 evalInputDelta=-0.2038295641541481
New Minimum: -1.5524891838431358 > -1.5710389092564583
WOLF (strong): th(8.143763128320524E7)=-1.5710389092564583; dx=6.232729477425283E-10 evalInputDelta=0.01854972541332245
New Minimum: -1.5710389092564583 > -1.5819121152162552
END: th(2.7145877094401747E7)=-1.5819121152162552; dx=-6.508359252156689E-10 evalInputDelta=0.029422931373119354
Fitness changed from -1.5524891838431358 to -1.5819121152162552
Iteration 10 complete. Error: -1.5819121152162552 Total: 85.6996; Orientation: 2.0617; Line Search: 66.5760
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/ae0cfa13-219b-4930-8d3c-54c156204eea.jpg)
Final threshold in iteration 11: -1.5819121152162552 (> -Infinity) after 914.160s (< 3600.000s)
-1.5819121152162552