Code from BasicOptimizer.scala:75 executed in 115.09 seconds (1.915 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: 900303196634400
Reset training subject: 900304286158000
Adding measurement 478cc5f1 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=1.3415240049362183;dx=-2.04456302480324E-6
New Minimum: 1.3415240049362183 > 1.3415204286575317
WOLFE (weak): th(2.154434690031884)=1.3415204286575317; dx=-2.0445549113277707E-6 evalInputDelta=3.5762786865234375E-6
New Minimum: 1.3415204286575317 > 1.3415165543556213
WOLFE (weak): th(4.308869380063768)=1.3415165543556213; dx=-2.044565982453174E-6 evalInputDelta=7.450580596923828E-6
New Minimum: 1.3415165543556213 > 1.3415016829967499
WOLFE (weak): th(12.926608140191302)=1.3415016829967499; dx=-2.0445431281347335E-6 evalInputDelta=2.232193946838379E-5
New Minimum: 1.3415016829967499 > 1.3414346575737
WOLFE (weak): th(51.70643256076521)=1.3414346575737; dx=-2.0443482371371368E-6 evalInputDelta=8.934736251831055E-5
New Minimum: 1.3414346575737 > 1.341077446937561
WOLFE (weak): th(258.53216280382605)=1.341077446937561; dx=-2.0437298705568972E-6 evalInputDelta=4.4655799865722656E-4
New Minimum: 1.341077446937561 > 1.33884859085083
WOLFE (weak): th(1551.1929768229563)=1.33884859085083; dx=-2.036938875380953E-6 evalInputDelta=0.0026754140853881836
New Minimum: 1.33884859085083 > 1.3213929533958435
WOLFE (weak): th(10858.350837760694)=1.3213929533958435; dx=-1.9977201652362296E-6 evalInputDelta=0.020131051540374756
New Minimum: 1.3213929533958435 > 1.204933524131775
END: th(86866.80670208555)=1.204933524131775; dx=-1.674512793569374E-6 evalInputDelta=0.13659048080444336
Fitness changed from 1.3415240049362183 to 1.204933524131775
Iteration 1 complete. Error: 1.204933524131775 Total: 13.3704; Orientation: 0.0143; Line Search: 10.1925
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/3b48547b-52dc-4c4d-aed8-3efaf1a0f8d0.jpg)
Adding measurement 7be1e187 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=1.204933524131775;dx=-1.4729479339102841E-6
New Minim
...skipping 19489 bytes...
Delta=0.004320278763771057
Fitness changed from -0.4842001646757126 to -0.48852044343948364
Iteration 23 complete. Error: -0.48852044343948364 Total: 5.9704; Orientation: 0.4309; Line Search: 4.5238
Adding measurement 65dd2191 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.728e+03, gradient 2.599e-05, dot -0.873; [d1d358b7-d3a3-48e3-acb8-45a531da9640 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.4678346961736679, -0.47713805735111237, -0.4842001646757126, -0.48852044343948364
LBFGS Accumulation History: 3 points
Removed measurement 7388486e to history. Total: 4
th(0)=-0.48852044343948364;dx=-6.753846854418509E-10
New Minimum: -0.48852044343948364 > -0.49353620409965515
END: th(1.6203703703703716E7)=-0.49353620409965515; dx=-4.859795671745369E-10 evalInputDelta=0.005015760660171509
Fitness changed from -0.48852044343948364 to -0.49353620409965515
Iteration 24 complete. Error: -0.49353620409965515 Total: 3.5542; Orientation: 0.4210; Line Search: 2.0959
Adding measurement 202d1424 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.966e+03, gradient 2.541e-05, dot -0.870; [d1d358b7-d3a3-48e3-acb8-45a531da9640 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.47713805735111237, -0.4842001646757126, -0.48852044343948364, -0.49353620409965515
LBFGS Accumulation History: 3 points
Removed measurement 6158113e to history. Total: 4
th(0)=-0.49353620409965515;dx=-6.455886056645334E-10
New Minimum: -0.49353620409965515 > -0.49867402017116547
END: th(3.490982136625741E7)=-0.49867402017116547; dx=-2.7091417988652996E-10 evalInputDelta=0.005137816071510315
Fitness changed from -0.49353620409965515 to -0.49867402017116547
Iteration 25 complete. Error: -0.49867402017116547 Total: 3.5292; Orientation: 0.4254; Line Search: 2.1080
<a id="p-19"></a>Iteration 25
<a id="p-18"></a>![Iteration 25](etc/f48bb430-48ef-46a0-bf27-3b758c19b3de.jpg)
Final threshold in iteration 26: -0.49867402017116547 (> -Infinity) after 115.087s (< 3600.000s)
-0.49867402017116547