Code from BasicOptimizer.scala:75 executed in 31.60 seconds (0.981 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: 912618049872100
Reset training subject: 912618544813200
Adding measurement 4dc319d0 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=1.739213451743126;dx=-2.511439125023506E-6
New Minimum: 1.739213451743126 > 1.7392095178365707
WOLFE (weak): th(2.154434690031884)=1.7392095178365707; dx=-2.511529883217313E-6 evalInputDelta=3.933906555175781E-6
New Minimum: 1.7392095178365707 > 1.7392055541276932
WOLFE (weak): th(4.308869380063768)=1.7392055541276932; dx=-2.51153979052898E-6 evalInputDelta=7.897615432739258E-6
New Minimum: 1.7392055541276932 > 1.7391903698444366
WOLFE (weak): th(12.926608140191302)=1.7391903698444366; dx=-2.511751799341316E-6 evalInputDelta=2.308189868927002E-5
New Minimum: 1.7391903698444366 > 1.7391208410263062
WOLFE (weak): th(51.70643256076521)=1.7391208410263062; dx=-2.5112131618968105E-6 evalInputDelta=9.261071681976318E-5
New Minimum: 1.7391208410263062 > 1.7387501150369644
WOLFE (weak): th(258.53216280382605)=1.7387501150369644; dx=-2.511117409507575E-6 evalInputDelta=4.63336706161499E-4
New Minimum: 1.7387501150369644 > 1.7364367544651031
WOLFE (weak): th(1551.1929768229563)=1.7364367544651031; dx=-2.4996823962816512E-6 evalInputDelta=0.002776697278022766
New Minimum: 1.7364367544651031 > 1.719964250922203
WOLFE (weak): th(10858.350837760694)=1.719964250922203; dx=-2.4297184545608506E-6 evalInputDelta=0.01924920082092285
New Minimum: 1.719964250922203 > 1.6031497418880463
END: th(86866.80670208555)=1.6031497418880463; dx=-1.73433696683339E-6 evalInputDelta=0.13606370985507965
Fitness changed from 1.739213451743126 to 1.6031497418880463
Iteration 1 complete. Error: 1.6031497418880463 Total: 5.9427; Orientation: 0.0035; Line Search: 4.5271
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/473c63b3-c6c3-41dd-9889-3fc30157ca77.jpg)
Adding measurement 5613eb98 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=1.6031497418880463;dx=-2.9572931060540545E-6
Ne
...skipping 10248 bytes...
1.000e+00]
Orientation rejected. Popping history element from -0.2207566201686859, -0.25810742378234863, -0.29075920581817627, -0.3052493631839752
LBFGS Accumulation History: 3 points
Removed measurement 5808531e to history. Total: 4
th(0)=-0.3052493631839752;dx=-1.4703012201331385E-8
Armijo: th(3.898934620234736E7)=0.04394131898880005; dx=1.1850548968044506E-8 evalInputDelta=-0.34919068217277527
Armijo: th(1.949467310117368E7)=-0.23001012206077576; dx=9.501504397490336E-9 evalInputDelta=-0.07523924112319946
New Minimum: -0.3052493631839752 > -0.3369821310043335
END: th(6498224.367057893)=-0.3369821310043335; dx=-1.0836241863421766E-9 evalInputDelta=0.031732767820358276
Fitness changed from -0.3052493631839752 to -0.3369821310043335
Iteration 14 complete. Error: -0.3369821310043335 Total: 2.4660; Orientation: 0.1063; Line Search: 1.9034
Adding measurement 2546d1f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.115e+03, gradient 8.872e-05, dot -0.618; [c0e525db-acdb-47d6-93d3-723b7a89bbb2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.25810742378234863, -0.29075920581817627, -0.3052493631839752, -0.3369821310043335
LBFGS Accumulation History: 3 points
Removed measurement 2dd2dedd to history. Total: 4
th(0)=-0.3369821310043335;dx=-7.870827594795675E-9
New Minimum: -0.3369821310043335 > -0.341465026140213
WOLF (strong): th(1.4000000000000007E7)=-0.341465026140213; dx=2.294338447270766E-9 evalInputDelta=0.004482895135879517
New Minimum: -0.341465026140213 > -0.3551652729511261
END: th(7000000.000000004)=-0.3551652729511261; dx=-1.0011238559611436E-9 evalInputDelta=0.018183141946792603
Fitness changed from -0.3369821310043335 to -0.3551652729511261
Iteration 15 complete. Error: -0.3551652729511261 Total: 1.9889; Orientation: 0.1061; Line Search: 1.4196
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/02c82f1c-8c46-4f62-ab99-09403635b987.jpg)
Final threshold in iteration 16: -0.3551652729511261 (> -Infinity) after 31.596s (< 1800.000s)
-0.3551652729511261