Code from BasicOptimizer.scala:88 executed in 155.51 seconds (3.690 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: 912571860372
Reset training subject: 913818065370
Adding measurement 7ce34ec to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=15.561659992672503;dx=-2.3101424789878507E-6
New Minimum: 15.561659992672503 > 15.561654258519411
WOLFE (weak): th(2.154434690031884)=15.561654258519411; dx=-2.311170423613195E-6 evalInputDelta=5.734153091907501E-6
New Minimum: 15.561654258519411 > 15.56164757348597
WOLFE (weak): th(4.308869380063768)=15.56164757348597; dx=-2.3107186052065263E-6 evalInputDelta=1.2419186532497406E-5
New Minimum: 15.56164757348597 > 15.561623003333807
WOLFE (weak): th(12.926608140191302)=15.561623003333807; dx=-2.3112990071503404E-6 evalInputDelta=3.698933869600296E-5
New Minimum: 15.561623003333807 > 15.561513021588326
WOLFE (weak): th(51.70643256076521)=15.561513021588326; dx=-2.3108718985929376E-6 evalInputDelta=1.4697108417749405E-4
New Minimum: 15.561513021588326 > 15.560927201993763
WOLFE (weak): th(258.53216280382605)=15.560927201993763; dx=-2.3123953292638863E-6 evalInputDelta=7.327906787395477E-4
New Minimum: 15.560927201993763 > 15.55725694540888
WOLFE (weak): th(1551.1929768229563)=15.55725694540888; dx=-2.3149630554293324E-6 evalInputDelta=0.004403047263622284
New Minimum: 15.55725694540888 > 15.530645157210529
WOLFE (weak): th(10858.350837760694)=15.530645157210529; dx=-2.3431880736746483E-6 evalInputDelta=0.031014835461974144
New Minimum: 15.530645157210529 > 15.303729282692075
WOLFE (weak): th(86866.80670208555)=15.303729282692075; dx=-2.490629029201339E-6 evalInputDelta=0.2579307099804282
New Minimum: 15.303729282692075 > 13.41173230484128
END: th(781801.26031877)=13.41173230484128; dx=-1.851242814638507E-6 evalInputDelta=2.149927687831223
Fitness changed from 15.561659992672503 to 13.41173230484128
Iteration 1 complete. Error: 13.41173230484128 Total: 16.2780; Orientation: 0.0131; Line Search: 12.5574
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/04125819-7c21-4357-8aad-665a02203927.jpg)
Ad
...skipping 24476 bytes...
ion: 0.1694; Line Search: 3.5541
Adding measurement 7d6d6a5e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.187e+02, gradient 1.027e-04, dot -0.251; [7dfe4676-3a08-4ed4-9efa-73d219e32637 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.2545067518949509, 9.39744246006012, 13.41173230484128, 15.561659992672503
LBFGS Accumulation History: 3 points
Removed measurement 7d6d6a5e to history. Total: 3
th(0)=-1.2545067518949509;dx=-1.0528051907488519E-8
Armijo: th(7834471.893154292)=-1.2463650852441788; dx=6.875541758347983E-9 evalInputDelta=-0.008141666650772095
New Minimum: -1.2545067518949509 > -1.2729144468903542
WOLF (strong): th(3917235.946577146)=-1.2729144468903542; dx=2.3271608807608534E-9 evalInputDelta=0.01840769499540329
END: th(1305745.3155257155)=-1.2679587453603745; dx=-6.236434745729426E-9 evalInputDelta=0.013451993465423584
Fitness changed from -1.2545067518949509 to -1.2729144468903542
Iteration 29 complete. Error: -1.2729144468903542 Total: 6.0190; Orientation: 0.1630; Line Search: 4.6997
Adding measurement 32091eee to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.771e+02, gradient 8.407e-05, dot -0.301; [7dfe4676-3a08-4ed4-9efa-73d219e32637 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.2729144468903542, 9.39744246006012, 13.41173230484128, 15.561659992672503
LBFGS Accumulation History: 3 points
Removed measurement 32091eee to history. Total: 3
th(0)=-1.2729144468903542;dx=-7.055292087219652E-9
New Minimum: -1.2729144468903542 > -1.2872938960790634
END: th(2813143.004115229)=-1.2872938960790634; dx=-1.2797665093855107E-9 evalInputDelta=0.014379449188709259
Fitness changed from -1.2729144468903542 to -1.2872938960790634
Iteration 30 complete. Error: -1.2872938960790634 Total: 3.6959; Orientation: 0.1589; Line Search: 2.3824
<a id="p-21"></a>Iteration 30
<a id="p-20"></a>![Iteration 30](etc/19232f11-42ad-4177-ada0-ee0958eb75c8.jpg)
Final threshold in iteration 31: -1.2872938960790634 (> -Infinity) after 155.505s (< 3600.000s)
-1.2872938960790634