Code from BasicOptimizer.scala:88 executed in 143.96 seconds (2.875 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: 17578730922285
Reset training subject: 17581906273521
Adding measurement 34974c3c to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=23.395109459699597;dx=-1.692951695349768E-5
New Minimum: 23.395109459699597 > 23.395040416624397
WOLFE (weak): th(2.154434690031884)=23.395040416624397; dx=-1.8925223202735587E-5 evalInputDelta=6.904307520017028E-5
New Minimum: 23.395040416624397 > 23.39497237361502
WOLFE (weak): th(4.308869380063768)=23.39497237361502; dx=-1.6351416353877305E-5 evalInputDelta=1.3708608457818627E-4
New Minimum: 23.39497237361502 > 23.394698357849848
WOLFE (weak): th(12.926608140191302)=23.394698357849848; dx=-1.631417312687533E-5 evalInputDelta=4.1110184974968433E-4
New Minimum: 23.394698357849848 > 23.393466917681508
WOLFE (weak): th(51.70643256076521)=23.393466917681508; dx=-1.767009574071421E-5 evalInputDelta=0.0016425420180894434
New Minimum: 23.393466917681508 > 23.380729530239478
WOLFE (weak): th(258.53216280382605)=23.380729530239478; dx=-1.8535173642715598E-5 evalInputDelta=0.014379929460119456
New Minimum: 23.380729530239478 > 23.33880372485146
WOLFE (weak): th(1551.1929768229563)=23.33880372485146; dx=-1.8165946279943204E-5 evalInputDelta=0.056305734848137945
New Minimum: 23.33880372485146 > 23.047783961577807
WOLFE (weak): th(10858.350837760694)=23.047783961577807; dx=-1.6289594684037148E-5 evalInputDelta=0.3473254981217906
New Minimum: 23.047783961577807 > 21.652449148125015
END: th(86866.80670208555)=21.652449148125015; dx=-5.97115064476289E-6 evalInputDelta=1.742660311574582
Fitness changed from 23.395109459699597 to 21.652449148125015
Iteration 1 complete. Error: 21.652449148125015 Total: 39.2458; Orientation: 0.0026; Line Search: 29.7769
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/aaacf8ab-d8b7-40b2-87a6-df3434ecdcb3.jpg)
Adding measurement 68dbe697 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=21.652449148125015;dx=-1.4773625032849412E-5
New Minimum: 21.6524491481
...skipping 5363 bytes...
.557891890406609 Total: 14.4810; Orientation: 0.2410; Line Search: 10.9315
Adding measurement 580d151b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.844e+02, gradient 6.442e-04, dot -0.265; [01803d89-1c5b-47e3-a104-12f5e289f757 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 4.557891890406609, 19.260767617961392, 21.652449148125015, 23.395109459699597
LBFGS Accumulation History: 3 points
Removed measurement 580d151b to history. Total: 3
th(0)=4.557891890406609;dx=-3.9418483715649444E-7
Armijo: th(5040000.000000002)=4.974781516939402; dx=1.4303621719604401E-8 evalInputDelta=-0.41688962653279305
New Minimum: 4.557891890406609 > 4.215767242014408
END: th(2520000.000000001)=4.215767242014408; dx=-1.8531982439990276E-8 evalInputDelta=0.34212464839220047
Fitness changed from 4.557891890406609 to 4.215767242014408
Iteration 9 complete. Error: 4.215767242014408 Total: 12.7023; Orientation: 0.0687; Line Search: 9.4456
Adding measurement 191df332 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.133e+02, gradient 5.633e-04, dot -0.231; [01803d89-1c5b-47e3-a104-12f5e289f757 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 4.215767242014408, 19.260767617961392, 21.652449148125015, 23.395109459699597
LBFGS Accumulation History: 3 points
Removed measurement 191df332 to history. Total: 3
th(0)=4.215767242014408;dx=-2.8368021118105523E-7
Armijo: th(5429175.418880349)=4.914069302380085; dx=2.1661671875800386E-8 evalInputDelta=-0.6983020603656769
New Minimum: 4.215767242014408 > 4.029765009880066
END: th(2714587.7094401745)=4.029765009880066; dx=-6.1314527442421E-8 evalInputDelta=0.1860022321343422
Fitness changed from 4.215767242014408 to 4.029765009880066
Iteration 10 complete. Error: 4.029765009880066 Total: 12.8685; Orientation: 0.3460; Line Search: 9.3794
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/e0410384-4a14-4d0d-a6b8-48254485582e.jpg)
Final threshold in iteration 11: 4.029765009880066 (> -Infinity) after 143.961s (< 1800.000s)
4.029765009880066