Code from BasicOptimizer.scala:75 executed in 867.88 seconds (6.595 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: 942154941061500
Reset training subject: 942185754295100
Adding measurement 508f3d64 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=4.965214025229216;dx=-1.9832085686050655E-4
New Minimum: 4.965214025229216 > 4.964955251663923
WOLFE (weak): th(2.154434690031884)=4.964955251663923; dx=-1.9527290559333347E-4 evalInputDelta=2.587735652923584E-4
New Minimum: 4.964955251663923 > 4.964699815958738
WOLFE (weak): th(4.308869380063768)=4.964699815958738; dx=-1.9530632913051894E-4 evalInputDelta=5.142092704772949E-4
New Minimum: 4.964699815958738 > 4.963676106184721
WOLFE (weak): th(12.926608140191302)=4.963676106184721; dx=-1.9492504837622033E-4 evalInputDelta=0.001537919044494629
New Minimum: 4.963676106184721 > 4.958317220211029
WOLFE (weak): th(51.70643256076521)=4.958317220211029; dx=-1.9283473219377576E-4 evalInputDelta=0.006896805018186569
New Minimum: 4.958317220211029 > 4.932539276778698
WOLFE (weak): th(258.53216280382605)=4.932539276778698; dx=-1.897475548250767E-4 evalInputDelta=0.032674748450517654
New Minimum: 4.932539276778698 > 4.782597951591015
END: th(1551.1929768229563)=4.782597951591015; dx=-1.6586176004858793E-4 evalInputDelta=0.18261607363820076
Fitness changed from 4.965214025229216 to 4.782597951591015
Iteration 1 complete. Error: 4.782597951591015 Total: 310.1362; Orientation: 0.0153; Line Search: 217.0039
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/fa4869b7-2899-4832-8d2e-1f90008d9002.jpg)
Adding measurement 7ca4a414 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=4.782597951591015;dx=-1.554873924467126E-4
New Minimum: 4.782597951591015 > 4.494306951761246
END: th(3341.943960201201)=4.494306951761246; dx=-1.379293149886654E-4 evalInputDelta=0.28829099982976913
Fitness changed from 4.782597951591015 to 4.494306951761246
Iteration 2 complete. Error: 4.494306951761246 Total: 93.1956; Orientation: 0.0153; Line Search: 62.1149
<a id="p-5"></a>Iteration 2
...skipping 1675 bytes...
9ea00ddd-5f77-461d-be99-db00b98bdd84.jpg)
Adding measurement 1f2f0c80 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.279e+02, gradient 6.273e-03, dot -0.336; [c59fb1f6-3066-48f1-9c4e-0232cd9ffdb4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 4.782597951591015, 4.494306951761246, 4.2839842066168785, 4.079819537699223
LBFGS Accumulation History: 3 points
Removed measurement 7ca4a414 to history. Total: 4
th(0)=4.079819537699223;dx=-3.9349565001540466E-5
New Minimum: 4.079819537699223 > 3.941273909062147
END: th(16709.71980100601)=3.941273909062147; dx=-7.389735954014047E-6 evalInputDelta=0.13854562863707542
Fitness changed from 4.079819537699223 to 3.941273909062147
Iteration 5 complete. Error: 3.941273909062147 Total: 92.9733; Orientation: 0.4402; Line Search: 61.7187
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/e089f3e5-b0d8-449f-b6f9-65be4df0f7ca.jpg)
Adding measurement 2573bdbc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.147e+02, gradient 5.767e-03, dot -0.716; [c59fb1f6-3066-48f1-9c4e-0232cd9ffdb4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 4.494306951761246, 4.2839842066168785, 4.079819537699223, 3.941273909062147
LBFGS Accumulation History: 3 points
Removed measurement 46615035 to history. Total: 4
th(0)=3.941273909062147;dx=-3.325839419163523E-5
Armijo: th(36000.000000000015)=4.017167074605823; dx=1.150089112762993E-5 evalInputDelta=-0.07589316554367542
New Minimum: 3.941273909062147 > 3.8711273409426212
WOLF (strong): th(18000.000000000007)=3.8711273409426212; dx=4.63355372970161E-6 evalInputDelta=0.07014656811952591
END: th(6000.000000000003)=3.8736375365406275; dx=-7.070132658576752E-6 evalInputDelta=0.06763637252151966
Fitness changed from 3.941273909062147 to 3.8711273409426212
Iteration 6 complete. Error: 3.8711273409426212 Total: 154.9054; Orientation: 0.4451; Line Search: 123.3118
Final threshold in iteration 6: 3.8711273409426212 (> -Infinity) after 867.879s (< 720.000s)
3.8711273409426212