Code from BasicOptimizer.scala:75 executed in 25.06 seconds (0.611 gc):
val lineSearchInstance: LineSearchStrategy = lineSearchFactory
IterativeTrainer.wrap(trainable)
.setOrientation(orientation())
.setMonitor(new TrainingMonitor() {
override def clear(): Unit = trainingMonitor.clear()
override def log(msg: String): Unit = trainingMonitor.log(msg)
override def onStepFail(currentPoint: Step): Boolean = {
BasicOptimizer.this.onStepFail(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, currentPoint)
trainingMonitor.onStepComplete(currentPoint)
super.onStepComplete(currentPoint)
}
})
.setTimeout(trainingMinutes, TimeUnit.MINUTES)
.setMaxIterations(trainingIterations)
.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
.runAndFree
.asInstanceOf[lang.Double]
Reset training subject: 919268282607300
Reset training subject: 919269103846800
Adding measurement 76161d0b to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=1.2984008193016052;dx=-4.894863986281182E-7
New Minimum: 1.2984008193016052 > 1.2984006851911545
WOLFE (weak): th(2.154434690031884)=1.2984006851911545; dx=-4.894848159551565E-7 evalInputDelta=1.341104507446289E-7
New Minimum: 1.2984006851911545 > 1.2984003126621246
WOLFE (weak): th(4.308869380063768)=1.2984003126621246; dx=-4.894862742836833E-7 evalInputDelta=5.066394805908203E-7
New Minimum: 1.2984003126621246 > 1.2983997464179993
WOLFE (weak): th(12.926608140191302)=1.2983997464179993; dx=-4.894477134267265E-7 evalInputDelta=1.0728836059570312E-6
New Minimum: 1.2983997464179993 > 1.2983963191509247
WOLFE (weak): th(51.70643256076521)=1.2983963191509247; dx=-4.893577913681433E-7 evalInputDelta=4.500150680541992E-6
New Minimum: 1.2983963191509247 > 1.2983789592981339
WOLFE (weak): th(258.53216280382605)=1.2983789592981339; dx=-4.895969060800593E-7 evalInputDelta=2.1860003471374512E-5
New Minimum: 1.2983789592981339 > 1.2982693016529083
WOLFE (weak): th(1551.1929768229563)=1.2982693016529083; dx=-4.886330370939837E-7 evalInputDelta=1.3151764869689941E-4
New Minimum: 1.2982693016529083 > 1.2974815666675568
WOLFE (weak): th(10858.350837760694)=1.2974815666675568; dx=-4.860691081017137E-7 evalInputDelta=9.192526340484619E-4
New Minimum: 1.2974815666675568 > 1.2913898825645447
WOLFE (weak): th(86866.80670208555)=1.2913898825645447; dx=-4.600511271263843E-7 evalInputDelta=0.007010936737060547
New Minimum: 1.2913898825645447 > 1.2708368003368378
END: th(781801.26031877)=1.2708368003368378; dx=-2.587345933085189E-7 evalInputDelta=0.027564018964767456
Fitness changed from 1.2984008193016052 to 1.2708368003368378
Iteration 1 complete. Error: 1.2708368003368378 Total: 10.4788; Orientation: 0.0073; Line Search: 8.0887
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/b9ae
...skipping 1918 bytes...
95 Total: 2.7224; Orientation: 0.2354; Line Search: 1.6458
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/9a0d27e8-0773-4ccd-8140-cd09bd0eade0.jpg)
Adding measurement e1f6c1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.396e+03, gradient 3.940e-04, dot -0.788; [911e3408-814a-42ac-a106-905945d2df4a = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.2708368003368378, 1.2585725486278534, 1.2091721892356873, 1.0663831532001495
LBFGS Accumulation History: 3 points
Removed measurement 205eb0f4 to history. Total: 4
th(0)=1.0663831532001495;dx=-1.5523936131720327E-7
New Minimum: 1.0663831532001495 > 0.9879686534404755
END: th(1.684339755941405E7)=0.9879686534404755; dx=-1.6563187211332223E-8 evalInputDelta=0.07841449975967407
Fitness changed from 1.0663831532001495 to 0.9879686534404755
Iteration 5 complete. Error: 0.9879686534404755 Total: 2.5696; Orientation: 0.2054; Line Search: 1.5839
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/a5ac5664-30ef-49f1-a365-406b2a5114dc.jpg)
Adding measurement 30d7a9b8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.516e+03, gradient 3.185e-04, dot -0.760; [911e3408-814a-42ac-a106-905945d2df4a = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.2585725486278534, 1.2091721892356873, 1.0663831532001495, 0.9879686534404755
LBFGS Accumulation History: 3 points
Removed measurement 3cb5a3f6 to history. Total: 4
th(0)=0.9879686534404755;dx=-1.014407094913844E-7
Armijo: th(3.6288E7)=1.386860191822052; dx=-7.0330008155428174E-9 evalInputDelta=-0.39889153838157654
New Minimum: 0.9879686534404755 > 0.9502520561218262
END: th(1.8144E7)=0.9502520561218262; dx=-1.8303888357640326E-8 evalInputDelta=0.03771659731864929
Fitness changed from 0.9879686534404755 to 0.9502520561218262
Iteration 6 complete. Error: 0.9502520561218262 Total: 3.3991; Orientation: 0.2060; Line Search: 2.3952
Final threshold in iteration 7: 0.9502520561218262 (> -Infinity) after 25.057s (< 720.000s)
0.9502520561218262