Code from BasicOptimizer.scala:88 executed in 127.24 seconds (2.383 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: 2119518962964
Reset training subject: 2122942035341
Adding measurement 5d827f5 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=34.08818452045671;dx=-6.826681391788315E-5
New Minimum: 34.08818452045671 > 34.08767827448901
WOLFE (weak): th(2.154434690031884)=34.08767827448901; dx=-6.792822125754072E-5 evalInputDelta=5.062459676992148E-4
New Minimum: 34.08767827448901 > 34.08717264578445
WOLFE (weak): th(4.308869380063768)=34.08717264578445; dx=-6.869967384438203E-5 evalInputDelta=0.0010118746722582728
New Minimum: 34.08717264578445 > 34.0851489972265
WOLFE (weak): th(12.926608140191302)=34.0851489972265; dx=-6.810540306704788E-5 evalInputDelta=0.0030355232302099466
New Minimum: 34.0851489972265 > 34.07366987329442
WOLFE (weak): th(51.70643256076521)=34.07366987329442; dx=-6.821361464247176E-5 evalInputDelta=0.014514647162286565
New Minimum: 34.07366987329442 > 34.03926703351317
WOLFE (weak): th(258.53216280382605)=34.03926703351317; dx=-6.277124402034946E-5 evalInputDelta=0.04891748694353737
New Minimum: 34.03926703351317 > 33.724230235326104
WOLFE (weak): th(1551.1929768229563)=33.724230235326104; dx=-6.304377913050694E-5 evalInputDelta=0.36395428513060324
New Minimum: 33.724230235326104 > 31.76752147526713
END: th(10858.350837760694)=31.76752147526713; dx=-5.9271353407871797E-5 evalInputDelta=2.3206630451895762
Fitness changed from 34.08818452045671 to 31.76752147526713
Iteration 1 complete. Error: 31.76752147526713 Total: 35.4585; Orientation: 0.0338; Line Search: 25.6845
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/9cf76bb4-5212-47fa-bcea-b132cfb06353.jpg)
Adding measurement 7e1cde5e to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=31.76752147526713;dx=-8.060491770289886E-5
New Minimum: 31.76752147526713 > 28.06522233132273
END: th(23393.607721408407)=28.06522233132273; dx=-3.119935117024361E-5 evalInputDelta=3.7022991439444013
Fitness changed from 31.76752147526713 to 28.06522233132273
Iterat
...skipping 4714 bytes...
192985266447 to 8.806199681013823
Iteration 8 complete. Error: 8.806199681013823 Total: 10.2398; Orientation: 0.1317; Line Search: 6.9068
Adding measurement 6d9ace14 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.014e+03, gradient 9.000e-04, dot -0.333; [805505a5-4bd5-4324-82b3-a77ee006ae74 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 8.806199681013823, 28.06522233132273, 31.76752147526713, 34.08818452045671
LBFGS Accumulation History: 3 points
Removed measurement 6d9ace14 to history. Total: 3
th(0)=8.806199681013823;dx=-7.541483154110704E-7
New Minimum: 8.806199681013823 > 6.360527824610472
END: th(5040000.000000002)=6.360527824610472; dx=-2.824306417160805E-8 evalInputDelta=2.445671856403351
Fitness changed from 8.806199681013823 to 6.360527824610472
Iteration 9 complete. Error: 6.360527824610472 Total: 9.3858; Orientation: 0.0678; Line Search: 6.1725
Adding measurement 41f05ba3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.565e+02, gradient 6.000e-04, dot -0.177; [805505a5-4bd5-4324-82b3-a77ee006ae74 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 6.360527824610472, 28.06522233132273, 31.76752147526713, 34.08818452045671
LBFGS Accumulation History: 3 points
Removed measurement 41f05ba3 to history. Total: 3
th(0)=6.360527824610472;dx=-3.322912923910093E-7
New Minimum: 6.360527824610472 > 5.460595240816474
WOLF (strong): th(1.0858350837760698E7)=5.460595240816474; dx=2.141368748031845E-8 evalInputDelta=0.8999325837939978
New Minimum: 5.460595240816474 > 4.399260297417641
END: th(5429175.418880349)=4.399260297417641; dx=-6.209629595769596E-8 evalInputDelta=1.961267527192831
Fitness changed from 6.360527824610472 to 4.399260297417641
Iteration 10 complete. Error: 4.399260297417641 Total: 13.2384; Orientation: 0.2008; Line Search: 9.9101
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/2729bc29-016d-47c2-ac83-05e2afa74719.jpg)
Final threshold in iteration 11: 4.399260297417641 (> -Infinity) after 127.216s (< 1800.000s)
4.399260297417641