Code from BasicOptimizer.scala:88 executed in 152.90 seconds (2.471 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: 1068254502651
Reset training subject: 1072389853445
Adding measurement 924a931 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=24.763833903707564;dx=-2.0693671785853772E-5
New Minimum: 24.763833903707564 > 24.763717343099415
WOLFE (weak): th(2.154434690031884)=24.763717343099415; dx=-2.0832826277705772E-5 evalInputDelta=1.1656060814857483E-4
New Minimum: 24.763717343099415 > 24.763602908700705
WOLFE (weak): th(4.308869380063768)=24.763602908700705; dx=-2.0816107772289704E-5 evalInputDelta=2.3099500685930252E-4
New Minimum: 24.763602908700705 > 24.763139136135578
WOLFE (weak): th(12.926608140191302)=24.763139136135578; dx=-2.088422939570865E-5 evalInputDelta=6.947675719857216E-4
New Minimum: 24.763139136135578 > 24.761052946560085
WOLFE (weak): th(51.70643256076521)=24.761052946560085; dx=-2.08963675025974E-5 evalInputDelta=0.0027809571474790573
New Minimum: 24.761052946560085 > 24.749926979653537
WOLFE (weak): th(258.53216280382605)=24.749926979653537; dx=-2.10431116721664E-5 evalInputDelta=0.013906924054026604
New Minimum: 24.749926979653537 > 24.672581222839653
WOLFE (weak): th(1551.1929768229563)=24.672581222839653; dx=-2.1753456514510954E-5 evalInputDelta=0.09125268086791039
New Minimum: 24.672581222839653 > 24.217726009897888
END: th(10858.350837760694)=24.217726009897888; dx=-1.7582624091834708E-5 evalInputDelta=0.5461078938096762
Fitness changed from 24.763833903707564 to 24.217726009897888
Iteration 1 complete. Error: 24.217726009897888 Total: 44.6645; Orientation: 0.0534; Line Search: 32.6068
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/9f5b4b26-1b8c-477e-85d0-ee64ae33c4f6.jpg)
Adding measurement 125649fb to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=24.217726009897888;dx=-2.0480373772167094E-5
New Minimum: 24.217726009897888 > 23.429301163181663
END: th(23393.607721408407)=23.429301163181663; dx=-1.189771714074647E-5 evalInputDelta=0.7884248467162251
Fitness changed from 24.21772600
...skipping 4625 bytes...
7.233803331851959
END: th(2339360.7721408415)=7.233803331851959; dx=-5.09522684022322E-7 evalInputDelta=4.177892968058586
Fitness changed from 11.411696299910545 to 7.233803331851959
Iteration 8 complete. Error: 7.233803331851959 Total: 11.8784; Orientation: 0.2656; Line Search: 7.6991
Adding measurement 69d3204d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.763e+03, gradient 1.028e-03, dot -0.512; [623949ee-6fdb-43db-b6d0-a1957ee6f178 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 7.233803331851959, 23.429301163181663, 24.217726009897888, 24.763833903707564
LBFGS Accumulation History: 3 points
Removed measurement 69d3204d to history. Total: 3
th(0)=7.233803331851959;dx=-1.0450082739878096E-6
New Minimum: 7.233803331851959 > 3.079916700720787
END: th(5040000.000000002)=3.079916700720787; dx=-2.297859085866828E-7 evalInputDelta=4.153886631131172
Fitness changed from 7.233803331851959 to 3.079916700720787
Iteration 9 complete. Error: 3.079916700720787 Total: 12.0060; Orientation: 0.2439; Line Search: 7.8193
Adding measurement 223bd4d2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.356e+03, gradient 6.883e-04, dot -0.450; [623949ee-6fdb-43db-b6d0-a1957ee6f178 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 3.079916700720787, 23.429301163181663, 24.217726009897888, 24.763833903707564
LBFGS Accumulation History: 3 points
Removed measurement 223bd4d2 to history. Total: 3
th(0)=3.079916700720787;dx=-4.5605691568211516E-7
New Minimum: 3.079916700720787 > 0.6852268278598785
END: th(1.0858350837760698E7)=0.6852268278598785; dx=-1.782098464890285E-8 evalInputDelta=2.3946898728609085
Fitness changed from 3.079916700720787 to 0.6852268278598785
Iteration 10 complete. Error: 0.6852268278598785 Total: 11.7536; Orientation: 0.0987; Line Search: 7.7987
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/b74147c6-7e0c-4a3f-8e86-52d9e9ef6aa4.jpg)
Final threshold in iteration 11: 0.6852268278598785 (> -Infinity) after 152.885s (< 1800.000s)
0.6852268278598785