Code from BasicOptimizer.scala:75 executed in 110.73 seconds (1.399 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: 931568130249600
Reset training subject: 931572216594400
Adding measurement 1e37903a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=3.4393942118622363;dx=-5.31460388421292E-4
New Minimum: 3.4393942118622363 > 3.4384105997160077
WOLFE (weak): th(2.154434690031884)=3.4384105997160077; dx=-5.314790859846626E-4 evalInputDelta=9.836121462285519E-4
New Minimum: 3.4384105997160077 > 3.437425316311419
WOLFE (weak): th(4.308869380063768)=3.437425316311419; dx=-5.323172127598047E-4 evalInputDelta=0.001968895550817251
New Minimum: 3.437425316311419 > 3.433485862798989
WOLFE (weak): th(12.926608140191302)=3.433485862798989; dx=-5.32624871845404E-4 evalInputDelta=0.005908349063247442
New Minimum: 3.433485862798989 > 3.4156977124512196
WOLFE (weak): th(51.70643256076521)=3.4156977124512196; dx=-5.298158566283516E-4 evalInputDelta=0.023696499411016703
New Minimum: 3.4156977124512196 > 3.3168313838541508
END: th(258.53216280382605)=3.3168313838541508; dx=-4.3736928760389985E-4 evalInputDelta=0.12256282800808549
Fitness changed from 3.4393942118622363 to 3.3168313838541508
Iteration 1 complete. Error: 3.3168313838541508 Total: 36.3858; Orientation: 0.0690; Line Search: 23.7819
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/aceb9a8b-4d81-4892-ad1a-b2729337281d.jpg)
Adding measurement bef29b5 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=3.3168313838541508;dx=-8.955996288678769E-4
New Minimum: 3.3168313838541508 > 3.1630040407180786
END: th(556.9906600335335)=3.1630040407180786; dx=-5.927643500822335E-5 evalInputDelta=0.15382734313607216
Fitness changed from 3.3168313838541508 to 3.1630040407180786
Iteration 2 complete. Error: 3.1630040407180786 Total: 11.8206; Orientation: 0.0686; Line Search: 7.9354
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/ea618225-14e2-4758-a2e1-2d2f1ec98628.jpg)
Adding measurement 43937629 to history. Total: 2
LBFGS Accumulation History: 3 po
...skipping 1283 bytes...
259335670620203
Fitness changed from 3.146100020967424 to 3.083506664261222
Iteration 4 complete. Error: 3.083506664261222 Total: 14.4458; Orientation: 1.8726; Line Search: 8.5964
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/ef0ac2ad-8164-4c53-b565-2a01203d053c.jpg)
Adding measurement 79e5834b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.886e+01, gradient 1.113e-02, dot -0.910; [9a89fd4e-ff12-4676-b839-7127efbf369e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 3.3168313838541508, 3.1630040407180786, 3.146100020967424, 3.083506664261222
LBFGS Accumulation History: 3 points
Removed measurement bef29b5 to history. Total: 4
th(0)=3.083506664261222;dx=-1.2389955502774562E-4
New Minimum: 3.083506664261222 > 3.00448668980971
END: th(928.3177667225558)=3.00448668980971; dx=-7.9491425003404E-5 evalInputDelta=0.0790199744515121
Fitness changed from 3.083506664261222 to 3.00448668980971
Iteration 5 complete. Error: 3.00448668980971 Total: 13.8947; Orientation: 1.9479; Line Search: 8.0937
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/877351eb-b2b9-4d65-bb83-f761ac5dc8dc.jpg)
Adding measurement 183ffbab to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.963e+01, gradient 8.964e-03, dot -0.957; [9a89fd4e-ff12-4676-b839-7127efbf369e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 3.1630040407180786, 3.146100020967424, 3.083506664261222, 3.00448668980971
LBFGS Accumulation History: 3 points
Removed measurement 43937629 to history. Total: 4
th(0)=3.00448668980971;dx=-8.034463722011816E-5
New Minimum: 3.00448668980971 > 2.918827422428876
END: th(2000.0000000000002)=2.918827422428876; dx=-3.2396544966335865E-5 evalInputDelta=0.08565926738083363
Fitness changed from 3.00448668980971 to 2.918827422428876
Iteration 6 complete. Error: 2.918827422428876 Total: 13.9857; Orientation: 1.9007; Line Search: 8.1271
Final threshold in iteration 7: 2.918827422428876 (> -Infinity) after 110.733s (< 720.000s)
2.918827422428876