Code from BasicOptimizer.scala:75 executed in 1049.85 seconds (13.468 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: 861294661752800
Reset training subject: 861307039005800
Adding measurement 1f5a1ad4 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=2.948883702480198;dx=-1.511217452393876E-7
New Minimum: 2.948883702480198 > 2.9488834518085305
WOLFE (weak): th(2.154434690031884)=2.9488834518085305; dx=-1.5112173757169064E-7 evalInputDelta=2.506716674233189E-7
New Minimum: 2.9488834518085305 > 2.9488830719140866
WOLFE (weak): th(4.308869380063768)=2.9488830719140866; dx=-1.511217410485726E-7 evalInputDelta=6.305661113259475E-7
New Minimum: 2.9488830719140866 > 2.948881787443673
WOLFE (weak): th(12.926608140191302)=2.948881787443673; dx=-1.511215905475082E-7 evalInputDelta=1.915036524913205E-6
New Minimum: 2.948881787443673 > 2.948875853213335
WOLFE (weak): th(51.70643256076521)=2.948875853213335; dx=-1.5112111756765816E-7 evalInputDelta=7.849266863146909E-6
New Minimum: 2.948875853213335 > 2.948844693442283
WOLFE (weak): th(258.53216280382605)=2.948844693442283; dx=-1.5111904442418345E-7 evalInputDelta=3.9009037914983224E-5
New Minimum: 2.948844693442283 > 2.948649603861664
WOLFE (weak): th(1551.1929768229563)=2.948649603861664; dx=-1.5110517091542796E-7 evalInputDelta=2.340986185340732E-4
New Minimum: 2.948649603861664 > 2.9472449957047746
WOLFE (weak): th(10858.350837760694)=2.9472449957047746; dx=-1.5099516887579335E-7 evalInputDelta=0.0016387067754233264
New Minimum: 2.9472449957047746 > 2.9358064534766615
WOLFE (weak): th(86866.80670208555)=2.9358064534766615; dx=-1.5005022622504164E-7 evalInputDelta=0.013077249003536462
New Minimum: 2.9358064534766615 > 2.8339373709278703
WOLFE (weak): th(781801.26031877)=2.8339373709278703; dx=-1.4139544538333228E-7 evalInputDelta=0.11494633155232759
New Minimum: 2.8339373709278703 > 2.0986372488287817
END: th(7818012.6031877)=2.0986372488287817; dx=-6.88605883467512E-8 evalInputDelta=0.8502464536514163
Fitness changed from 2.948883702480198 to 2.0986372488287817
Iteration 1 comp
...skipping 15553 bytes...
Total: 72.5588; Orientation: 1.7761; Line Search: 59.0887
Adding measurement 7695184b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.245e+04, gradient 1.741e-05, dot -0.756; [c9fdfec8-f940-4c3e-8d07-a7b84d640f3e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.45579688049920797, 0.40328602442222194, 0.32823234219576347, 0.3164447497706846
LBFGS Accumulation History: 3 points
Removed measurement bb3487c to history. Total: 4
th(0)=0.3164447497706846;dx=-3.030689055150644E-10
New Minimum: 0.3164447497706846 > 0.30207639733468505
END: th(6.283767845926333E7)=0.30207639733468505; dx=-2.19541135786375E-10 evalInputDelta=0.014368352435999543
Fitness changed from 0.3164447497706846 to 0.30207639733468505
Iteration 19 complete. Error: 0.30207639733468505 Total: 36.6272; Orientation: 1.8038; Line Search: 22.6049
Adding measurement 31f4fdc5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.330e+04, gradient 1.605e-05, dot -0.848; [c9fdfec8-f940-4c3e-8d07-a7b84d640f3e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.40328602442222194, 0.32823234219576347, 0.3164447497706846, 0.30207639733468505
LBFGS Accumulation History: 3 points
Removed measurement 3f0c2eff to history. Total: 4
th(0)=0.30207639733468505;dx=-2.575805439865155E-10
New Minimum: 0.30207639733468505 > 0.29538410179890373
WOLF (strong): th(1.353796743137062E8)=0.29538410179890373; dx=6.344225912381133E-11 evalInputDelta=0.006692295535781323
New Minimum: 0.29538410179890373 > 0.292497008675408
END: th(6.76898371568531E7)=0.292497008675408; dx=-8.531412590126333E-11 evalInputDelta=0.009579388659277044
Fitness changed from 0.30207639733468505 to 0.292497008675408
Iteration 20 complete. Error: 0.292497008675408 Total: 49.8188; Orientation: 1.8023; Line Search: 36.0637
<a id="p-17"></a>Iteration 20
<a id="p-16"></a>![Iteration 20](etc/7f4e7f19-ce39-4da4-b9d2-d809d2832ad8.jpg)
Final threshold in iteration 21: 0.292497008675408 (> -Infinity) after 1049.849s (< 3600.000s)
0.292497008675408