Code from BasicOptimizer.scala:88 executed in 540.52 seconds (10.641 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: 2872112931565
Reset training subject: 2874607511318
Adding measurement 757ae762 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=3.5503571331501007;dx=-2.4334088685788073E-7
New Minimum: 3.5503571331501007 > 3.550356611609459
WOLFE (weak): th(2.154434690031884)=3.550356611609459; dx=-2.429579648572758E-7 evalInputDelta=5.21540641784668E-7
New Minimum: 3.550356611609459 > 3.550355851650238
WOLFE (weak): th(4.308869380063768)=3.550355851650238; dx=-2.4282339591904846E-7 evalInputDelta=1.2814998626708984E-6
New Minimum: 3.550355851650238 > 3.550353080034256
WOLFE (weak): th(12.926608140191302)=3.550353080034256; dx=-2.429348506003158E-7 evalInputDelta=4.0531158447265625E-6
New Minimum: 3.550353080034256 > 3.550341233611107
WOLFE (weak): th(51.70643256076521)=3.550341233611107; dx=-2.42847842181298E-7 evalInputDelta=1.589953899383545E-5
New Minimum: 3.550341233611107 > 3.5502768605947495
WOLFE (weak): th(258.53216280382605)=3.5502768605947495; dx=-2.42938998055111E-7 evalInputDelta=8.027255535125732E-5
New Minimum: 3.5502768605947495 > 3.549876093864441
WOLFE (weak): th(1551.1929768229563)=3.549876093864441; dx=-2.4284370911375343E-7 evalInputDelta=4.8103928565979004E-4
New Minimum: 3.549876093864441 > 3.5469879508018494
WOLFE (weak): th(10858.350837760694)=3.5469879508018494; dx=-2.4268505922493525E-7 evalInputDelta=0.0033691823482513428
New Minimum: 3.5469879508018494 > 3.523415207862854
WOLFE (weak): th(86866.80670208555)=3.523415207862854; dx=-2.421522176329585E-7 evalInputDelta=0.026941925287246704
New Minimum: 3.523415207862854 > 3.309570774435997
WOLFE (weak): th(781801.26031877)=3.309570774435997; dx=-2.342060628782901E-7 evalInputDelta=0.2407863587141037
New Minimum: 3.309570774435997 > 1.8904058039188385
END: th(7818012.6031877)=1.8904058039188385; dx=-1.203711215807738E-7 evalInputDelta=1.6599513292312622
Fitness changed from 3.5503571331501007 to 1.8904058039188385
Iteration 1 complete. Error: 1.8904058039188385 Total: 32
...skipping 35785 bytes...
.519725049)=-1.8234460204839706; dx=-3.2663908259545253E-9 evalInputDelta=-9.164214134216309E-7
WOLFE (weak): th(4403068.551904939)=-1.8234548568725586; dx=-3.281786063464097E-9 evalInputDelta=7.91996717453003E-6
WOLFE (weak): th(4451991.535814994)=-1.8234504237771034; dx=-3.281798328754671E-9 evalInputDelta=3.4868717193603516E-6
WOLFE (weak): th(4476453.027770022)=-1.8234482556581497; dx=-3.2792667733994417E-9 evalInputDelta=1.3187527656555176E-6
WOLFE (weak): th(4488683.773747535)=-1.8234470412135124; dx=-3.279864984894892E-9 evalInputDelta=1.043081283569336E-7
Armijo: th(4494799.146736292)=-1.8234465047717094; dx=-3.2796236880682264E-9 evalInputDelta=-4.3213367462158203E-7
Armijo: th(4491741.460241914)=-1.823446810245514; dx=-3.2811288764863235E-9 evalInputDelta=-1.2665987014770508E-7
Armijo: th(4490212.616994725)=-1.8234469145536423; dx=-3.2792945477088085E-9 evalInputDelta=-2.2351741790771484E-8
WOLFE (weak): th(4489448.1953711305)=-1.8234469592571259; dx=-3.2795552385120225E-9 evalInputDelta=2.2351741790771484E-8
WOLFE (weak): th(4489830.406182928)=-1.8234469592571259; dx=-3.265279877124787E-9 evalInputDelta=2.2351741790771484E-8
WOLFE (weak): th(4490021.511588827)=-1.8234469592571259; dx=-3.2787925416921544E-9 evalInputDelta=2.2351741790771484E-8
WOLFE (weak): th(4490117.064291775)=-1.8234469443559647; dx=-3.2802872868749114E-9 evalInputDelta=7.450580596923828E-9
Armijo: th(4490164.840643249)=-1.8234469220042229; dx=-3.2799045550023504E-9 evalInputDelta=-1.4901161193847656E-8
Armijo: th(4490140.952467512)=-1.823446936905384; dx=-3.2769343203567965E-9 evalInputDelta=0.0
mu ~= nu (4490117.064291775): th(1565535.485121756)=-1.823544681072235
Fitness changed from -1.823446936905384 to -1.823544681072235
Iteration 30 complete. Error: -1.823544681072235 Total: 53.1420; Orientation: 0.3126; Line Search: 50.7708
<a id="p-21"></a>Iteration 30
<a id="p-20"></a>![Iteration 30](etc/08610ec5-72b8-46df-8f67-0fa862ab814c.jpg)
Final threshold in iteration 31: -1.823544681072235 (> -Infinity) after 540.521s (< 3600.000s)
-1.823544681072235