Code from BasicOptimizer.scala:75 executed in 5744.51 seconds (56.230 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: 1388518061171500
Reset training subject: 1388598411820700
Adding measurement 46067a74 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=6.358664702624083;dx=-4.5920020541531566E-6
New Minimum: 6.358664702624083 > 6.358661059290171
WOLFE (weak): th(2.154434690031884)=6.358661059290171; dx=-4.542154271283913E-6 evalInputDelta=3.643333911895752E-6
New Minimum: 6.358661059290171 > 6.358657591044903
WOLFE (weak): th(4.308869380063768)=6.358657591044903; dx=-4.542135323362404E-6 evalInputDelta=7.111579179763794E-6
New Minimum: 6.358657591044903 > 6.3586443066596985
WOLFE (weak): th(12.926608140191302)=6.3586443066596985; dx=-4.542174959603799E-6 evalInputDelta=2.039596438407898E-5
New Minimum: 6.3586443066596985 > 6.358583070337772
WOLFE (weak): th(51.70643256076521)=6.358583070337772; dx=-4.542074354964424E-6 evalInputDelta=8.163228631019592E-5
New Minimum: 6.358583070337772 > 6.358257461339235
WOLFE (weak): th(258.53216280382605)=6.358257461339235; dx=-4.540013619359102E-6 evalInputDelta=4.072412848472595E-4
New Minimum: 6.358257461339235 > 6.356224115937948
WOLFE (weak): th(1551.1929768229563)=6.356224115937948; dx=-4.5287303398888675E-6 evalInputDelta=0.0024405866861343384
New Minimum: 6.356224115937948 > 6.341140557080507
WOLFE (weak): th(10858.350837760694)=6.341140557080507; dx=-4.433697972645627E-6 evalInputDelta=0.017524145543575287
New Minimum: 6.341140557080507 > 6.234839111566544
END: th(86866.80670208555)=6.234839111566544; dx=-3.630245629725629E-6 evalInputDelta=0.12382559105753899
Fitness changed from 6.358664702624083 to 6.234839111566544
Iteration 1 complete. Error: 6.234839111566544 Total: 961.8151; Orientation: 0.1320; Line Search: 721.4373
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/02b50b34-73bf-4f60-bdd5-3fddc9a62859.jpg)
Adding measurement 75c30a4f to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=6.234839111566544;dx=-3.40200366767817E-6
New Minimum: 6
...skipping 11929 bytes...
25; Line Search: 161.3825
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/c1af1959-6de5-4679-b102-c525347af84a.jpg)
Adding measurement 2e17a9e6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.168e+03, gradient 5.929e-04, dot -0.779; [5d10171a-ce81-4020-ad7a-ac3b4fd4e951 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 3.1607512831687927, 3.0417255088686943, 2.895672097802162, 2.780377507209778
LBFGS Accumulation History: 3 points
Removed measurement 1299fed3 to history. Total: 4
th(0)=2.780377507209778;dx=-3.5157046365389885E-7
New Minimum: 2.780377507209778 > 2.6639372408390045
END: th(5027014.276741066)=2.6639372408390045; dx=-7.934350379811093E-8 evalInputDelta=0.11644026637077332
Fitness changed from 2.780377507209778 to 2.6639372408390045
Iteration 16 complete. Error: 2.6639372408390045 Total: 243.8075; Orientation: 3.7168; Line Search: 160.0280
Adding measurement 52c2d1e8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.554e+03, gradient 7.962e-04, dot -0.553; [5d10171a-ce81-4020-ad7a-ac3b4fd4e951 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 3.0417255088686943, 2.895672097802162, 2.780377507209778, 2.6639372408390045
LBFGS Accumulation History: 3 points
Removed measurement 1cb7f2fe to history. Total: 4
th(0)=2.6639372408390045;dx=-6.339574644929944E-7
Armijo: th(1.0830373945096493E7)=3.3866719901561737; dx=1.2309025262371534E-7 evalInputDelta=-0.7227347493171692
Armijo: th(5415186.972548246)=2.7876045033335686; dx=1.0539186893705352E-7 evalInputDelta=-0.12366726249456406
New Minimum: 2.6639372408390045 > 2.5397211611270905
END: th(1805062.3241827488)=2.5397211611270905; dx=-7.511635464088855E-8 evalInputDelta=0.12421607971191406
Fitness changed from 2.6639372408390045 to 2.5397211611270905
Iteration 17 complete. Error: 2.5397211611270905 Total: 408.9730; Orientation: 3.7334; Line Search: 324.4739
Final threshold in iteration 17: 2.5397211611270905 (> -Infinity) after 5744.498s (< 5400.000s)
2.5397211611270905