Code from BasicOptimizer.scala:88 executed in 50.59 seconds (3.004 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: 1752418255140
Reset training subject: 1753989028175
Adding measurement 25e793d5 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=33.2712728055194;dx=-0.005312177114245396
New Minimum: 33.2712728055194 > 33.25983356870711
WOLFE (weak): th(2.154434690031884)=33.25983356870711; dx=-0.005307251671393767 evalInputDelta=0.01143923681229353
New Minimum: 33.25983356870711 > 33.248404772020876
WOLFE (weak): th(4.308869380063768)=33.248404772020876; dx=-0.005297803761736268 evalInputDelta=0.02286803349852562
New Minimum: 33.248404772020876 > 33.20558723574504
WOLFE (weak): th(12.926608140191302)=33.20558723574504; dx=-0.005277824090990068 evalInputDelta=0.06568556977435946
New Minimum: 33.20558723574504 > 33.002234457526356
WOLFE (weak): th(51.70643256076521)=33.002234457526356; dx=-0.005968977137818783 evalInputDelta=0.26903834799304605
New Minimum: 33.002234457526356 > 31.942718617618084
END: th(258.53216280382605)=31.942718617618084; dx=-0.004700596433967299 evalInputDelta=1.328554187901318
Fitness changed from 33.2712728055194 to 31.942718617618084
Iteration 1 complete. Error: 31.942718617618084 Total: 11.9633; Orientation: 0.0415; Line Search: 7.7855
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/5a9d02dc-c74d-4c36-b632-71d3c0627d06.jpg)
Adding measurement d5443f0 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=31.942718617618084;dx=-0.004368730901273142
New Minimum: 31.942718617618084 > 29.81166112329811
END: th(556.9906600335335)=29.81166112329811; dx=-0.003322447731838104 evalInputDelta=2.1310574943199754
Fitness changed from 31.942718617618084 to 29.81166112329811
Iteration 2 complete. Error: 29.81166112329811 Total: 3.9513; Orientation: 0.0047; Line Search: 2.6378
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/92721e2d-77f3-4c7d-903f-f1cbdb1bbcb2.jpg)
Adding measurement 38208999 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=29.81166112329811;dx=-0.002733072996062
...skipping 4225 bytes...
020905077457
END: th(55699.066003353364)=15.856020905077457; dx=-1.9378855659891804E-5 evalInputDelta=1.776646913960576
Fitness changed from 17.632667819038033 to 15.856020905077457
Iteration 8 complete. Error: 15.856020905077457 Total: 3.8960; Orientation: 0.0997; Line Search: 2.5238
Adding measurement 489dfc22 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.172e+01, gradient 7.223e-03, dot -0.511; [467a832c-4fad-478d-8e46-f1d34df95338 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 15.856020905077457, 29.81166112329811, 31.942718617618084, 33.2712728055194
LBFGS Accumulation History: 3 points
Removed measurement 489dfc22 to history. Total: 3
th(0)=15.856020905077457;dx=-5.2167064948537946E-5
New Minimum: 15.856020905077457 > 14.006870182231069
END: th(120000.00000000004)=14.006870182231069; dx=-6.623555626395012E-6 evalInputDelta=1.8491507228463888
Fitness changed from 15.856020905077457 to 14.006870182231069
Iteration 9 complete. Error: 14.006870182231069 Total: 5.1470; Orientation: 0.0875; Line Search: 3.7756
Adding measurement 70791c0f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.152e+02, gradient 6.607e-03, dot -0.396; [467a832c-4fad-478d-8e46-f1d34df95338 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 14.006870182231069, 29.81166112329811, 31.942718617618084, 33.2712728055194
LBFGS Accumulation History: 3 points
Removed measurement 70791c0f to history. Total: 3
th(0)=14.006870182231069;dx=-4.365741815064561E-5
New Minimum: 14.006870182231069 > 11.356793336570263
END: th(258532.16280382616)=11.356793336570263; dx=-2.787595243746934E-6 evalInputDelta=2.6500768456608057
Fitness changed from 14.006870182231069 to 11.356793336570263
Iteration 10 complete. Error: 11.356793336570263 Total: 3.8397; Orientation: 0.0785; Line Search: 2.5410
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/ec3b2ad0-4ab5-4a2e-9102-74a88310f8e7.jpg)
Final threshold in iteration 11: 11.356793336570263 (> -Infinity) after 50.575s (< 3600.000s)
11.356793336570263