Code from BasicOptimizer.scala:75 executed in 30.46 seconds (0.372 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: 921411276719300
Reset training subject: 921412593526500
Adding measurement 7fe53e60 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=3.0331758558750153;dx=-3.1378445204643764E-5
New Minimum: 3.0331758558750153 > 3.033126037567854
WOLFE (weak): th(2.154434690031884)=3.033126037567854; dx=-3.137691357221261E-5 evalInputDelta=4.981830716133118E-5
New Minimum: 3.033126037567854 > 3.033075977116823
WOLFE (weak): th(4.308869380063768)=3.033075977116823; dx=-3.131612043707589E-5 evalInputDelta=9.987875819206238E-5
New Minimum: 3.033075977116823 > 3.0328769348561764
WOLFE (weak): th(12.926608140191302)=3.0328769348561764; dx=-3.1293486277209804E-5 evalInputDelta=2.9892101883888245E-4
New Minimum: 3.0328769348561764 > 3.031983718276024
WOLFE (weak): th(51.70643256076521)=3.031983718276024; dx=-3.116054149885764E-5 evalInputDelta=0.001192137598991394
New Minimum: 3.031983718276024 > 3.027279853820801
WOLFE (weak): th(258.53216280382605)=3.027279853820801; dx=-3.0577408915201174E-5 evalInputDelta=0.0058960020542144775
New Minimum: 3.027279853820801 > 3.0002792552113533
END: th(1551.1929768229563)=3.0002792552113533; dx=-2.700385612260952E-5 evalInputDelta=0.03289660066366196
Fitness changed from 3.0331758558750153 to 3.0002792552113533
Iteration 1 complete. Error: 3.0002792552113533 Total: 12.1344; Orientation: 0.0043; Line Search: 8.6347
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/28acde7d-fc08-47ae-9b57-8066146a3304.jpg)
Adding measurement 2cc62da7 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=3.0002792552113533;dx=-2.5169781221710835E-5
New Minimum: 3.0002792552113533 > 2.938379406929016
END: th(3341.943960201201)=2.938379406929016; dx=-2.035377078178372E-5 evalInputDelta=0.06189984828233719
Fitness changed from 3.0002792552113533 to 2.938379406929016
Iteration 2 complete. Error: 2.938379406929016 Total: 3.9423; Orientation: 0.0062; Line Search: 2.8508
<a id="p-5"></a>Iter
...skipping 1274 bytes...
Fitness changed from 2.853150136768818 to 2.7233263850212097
Iteration 4 complete. Error: 2.7233263850212097 Total: 3.5489; Orientation: 0.1212; Line Search: 2.2252
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/d251c26a-35a7-4aff-a5d6-c18695207929.jpg)
Adding measurement 6a57e13e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.533e+02, gradient 3.196e-03, dot -0.950; [f9cba8fc-deb9-4b4d-9e3a-1a26e8dd1a7a = 1.000/1.000e+00]
Orientation rejected. Popping history element from 3.0002792552113533, 2.938379406929016, 2.853150136768818, 2.7233263850212097
LBFGS Accumulation History: 3 points
Removed measurement 2cc62da7 to history. Total: 4
th(0)=2.7233263850212097;dx=-1.021503663392277E-5
New Minimum: 2.7233263850212097 > 2.5546705946326256
END: th(33419.43960201202)=2.5546705946326256; dx=-5.75651236360393E-6 evalInputDelta=0.16865579038858414
Fitness changed from 2.7233263850212097 to 2.5546705946326256
Iteration 5 complete. Error: 2.5546705946326256 Total: 3.4911; Orientation: 0.1343; Line Search: 2.2564
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/e7f64e64-a0b4-40a0-ad09-68ecd61105d1.jpg)
Adding measurement 622bd597 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.353e+02, gradient 2.949e-03, dot -0.832; [f9cba8fc-deb9-4b4d-9e3a-1a26e8dd1a7a = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.938379406929016, 2.853150136768818, 2.7233263850212097, 2.5546705946326256
LBFGS Accumulation History: 3 points
Removed measurement da22d0d to history. Total: 4
th(0)=2.5546705946326256;dx=-8.695420798708348E-6
New Minimum: 2.5546705946326256 > 2.393695630133152
END: th(72000.00000000003)=2.393695630133152; dx=-2.533277047862126E-6 evalInputDelta=0.16097496449947357
Fitness changed from 2.5546705946326256 to 2.393695630133152
Iteration 6 complete. Error: 2.393695630133152 Total: 3.6729; Orientation: 0.1097; Line Search: 2.4734
Final threshold in iteration 7: 2.393695630133152 (> -Infinity) after 30.459s (< 720.000s)
2.393695630133152