BasicOptimizer.scala:89 executed in 109.76 seconds (1.532 gc):
val lineSearchInstance: LineSearchStrategy = lineSearchFactory
val trainer = new IterativeTrainer(trainable)
trainer.setOrientation(orientation())
trainer.setMonitor(new TrainingMonitor() {
override def clear(): Unit = trainingMonitor.clear()
override def log(msg: String): Unit = {
trainingMonitor.log(msg)
BasicOptimizer.this.log(msg)
}
override def onStepFail(currentPoint: Step): Boolean = {
BasicOptimizer.this.onStepFail(trainable.addRef().asInstanceOf[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.addRef().asInstanceOf[Trainable], currentPoint)
trainingMonitor.onStepComplete(currentPoint)
super.onStepComplete(currentPoint)
}
})
trainer.setTimeout(trainingMinutes, TimeUnit.MINUTES)
trainer.setMaxIterations(trainingIterations)
trainer.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
trainer.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
val result = trainer.run.asInstanceOf[lang.Double]
trainer.freeRef()
result
Reset training subject: 48124270095600
Reset training subject: 48126693694900
Corrupt weights measurement
LBFGS Accumulation History: 0 points
Constructing line search parameters: GD+Trust
New Minimum: -47.76420323303152 > -48.019922926608594
th(0)=-48.019922926608594;dx=-1.850078444649694E-6
New Minimum: -48.019922926608594 > -48.01992656892724
WOLFE (weak): th(2.154434690031884)=-48.01992656892724; dx=-1.7321568723654172E-6 evalInputDelta=3.6423186458023338E-6
New Minimum: -48.01992656892724 > -48.019930211245615
WOLFE (weak): th(4.308869380063768)=-48.019930211245615; dx=-1.7329417068110364E-6 evalInputDelta=7.284637021598428E-6
New Minimum: -48.019930211245615 > -48.01994660167487
WOLFE (weak): th(12.926608140191302)=-48.01994660167487; dx=-1.7329707635197692E-6 evalInputDelta=2.367506627365401E-5
New Minimum: -48.01994660167487 > -48.0200212691151
WOLFE (weak): th(51.70643256076521)=-48.0200212691151; dx=-1.7329528268345292E-6 evalInputDelta=9.8342506504423E-5
New Minimum: -48.0200212691151 > -48.020410994845506
WOLFE (weak): th(258.53216280382605)=-48.020410994845506; dx=-1.7324556097294476E-6 evalInputDelta=4.880682369119427E-4
New Minimum: -48.020410994845506 > -48.02285126162465
WOLFE (weak): th(1551.1929768229563)=-48.02285126162465; dx=-1.7327137727392331E-6 evalInputDelta=0.00292833501605827
New Minimum: -48.02285126162465 > -48.04040842133794
WOLFE (weak): th(10858.350837760694)=-48.04040842133794; dx=-1.7311063466084769E-6 evalInputDelta=0.020485494729349796
New Minimum: -48.04040842133794 > -48.183474084795414
WOLFE (weak): th(86866.80670208555)=-48.183474084795414; dx=-1.7207956359861726E-6 evalInputDelta=0.1635511581868201
New Minimum: -48.183474084795414 > -49.44796048268491
END: th(781801.26031877)=-49.44796048268491; dx=-1.6192567797934356E-6 evalInputDelta=1.428037556076319
Fitness changed from -47.76420323303152 to -49.44796048268491
Iteration 1 complete. Error: -49.44796048268491 Total: 29.7046; Orientation: 0.0385; Line Search: 22.6076
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/9b4a0848-94f1-4411-bd4a-b7f274a13b0f.jpg)
Adding measurement 2b944d7f to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-49.44796048268491;dx=-1.5755213261324195E-6
New Minimum: -49.44796048268491 > -52.15293847616934
END: th(1684339.7559414052)=-52.15293847616934; dx=-1.3773368264274398E-6 evalInputDelta=2.7049779934844267
Fitness changed from -49.44796048268491 to -52.15293847616934
Iteration 2 complete. Error: -52.15293847616934 Total: 7.6062; Orientation: 0.0625; Line Search: 4.4210
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/1b1f3726-08d9-4b22-ac10-6c2718fed491.jpg)
Adding measurement 5c56760a to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-52.15293847616934;dx=-1.3046031280431823E-6
New Minimum: -52.15293847616934 > -56.70904805767214
END: th(3628800.0)=-56.70904805767214; dx=-1.0165883304788484E-6 evalInputDelta=4.5561095815028025
Fitness changed from -52.15293847616934 to -56.70904805767214
Iteration 3 complete. Error: -56.70904805767214 Total: 7.2035; Orientation: 0.0627; Line Search: 4.3521
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d86c6869-146e-40f5-819b-30aebb807e6e.jpg)
Adding measurement 94e7751 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-56.70904805767214;dx=-9.469762762434646E-7
New Minimum: -56.70904805767214 > -63.339228027289586
END: th(7818012.6031877)=-63.339228027289586; dx=-6.435576613035092E-7 evalInputDelta=6.630179969617444
Fitness changed from -56.70904805767214 to -63.339228027289586
Iteration 4 complete. Error: -63.339228027289586 Total: 7.2673; Orientation: 0.0616; Line Search: 4.4349
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/a83ccbbd-267a-4aea-96fe-0e09f3e79b83.jpg)
Adding measurement 649f11cf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.094e+04, gradient 8.043e-04, dot -0.851; [83a5a837-f179-4721-8596-e451c604028e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -63.339228027289586, -56.70904805767214, -52.15293847616934, -49.44796048268491
LBFGS Accumulation History: 3 points
Removed measurement 649f11cf to history. Total: 3
th(0)=-63.339228027289586;dx=-6.454130667726685E-7
New Minimum: -63.339228027289586 > -72.19563045219621
END: th(1.684339755941405E7)=-72.19563045219621; dx=-3.706555266899224E-7 evalInputDelta=8.856402424906626
Fitness changed from -63.339228027289586 to -72.19563045219621
Iteration 5 complete. Error: -72.19563045219621 Total: 8.4452; Orientation: 1.0631; Line Search: 4.5366
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/8fe29eaf-02a3-496b-adff-9ad90ab3fbec.jpg)
Adding measurement 59543e69 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.089e+04, gradient 6.940e-04, dot -0.702; [83a5a837-f179-4721-8596-e451c604028e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -72.19563045219621, -56.70904805767214, -52.15293847616934, -49.44796048268491
LBFGS Accumulation History: 3 points
Removed measurement 59543e69 to history. Total: 3
th(0)=-72.19563045219621;dx=-4.808557207331857E-7
New Minimum: -72.19563045219621 > -81.86207303067228
END: th(3.6288E7)=-81.86207303067228; dx=-1.1949377248349553E-7 evalInputDelta=9.666442578476065
Fitness changed from -72.19563045219621 to -81.86207303067228
Iteration 6 complete. Error: -81.86207303067228 Total: 8.2978; Orientation: 1.0618; Line Search: 4.6413
Adding measurement 2df0ede5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.108e+04, gradient 8.096e-04, dot -0.421; [83a5a837-f179-4721-8596-e451c604028e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -81.86207303067228, -56.70904805767214, -52.15293847616934, -49.44796048268491
LBFGS Accumulation History: 3 points
Removed measurement 2df0ede5 to history. Total: 3
th(0)=-81.86207303067228;dx=-6.540837559037474E-7
Armijo: th(7.8180126031877E7)=-74.28411144433866; dx=1.858941473714736E-7 evalInputDelta=-7.577961586333615
New Minimum: -81.86207303067228 > -83.95275732289399
WOLF (strong): th(3.90900630159385E7)=-83.95275732289399; dx=2.0614778490532828E-7 evalInputDelta=2.0906842922217095
New Minimum: -83.95275732289399 > -87.28810939034177
END: th(1.3030021005312832E7)=-87.28810939034177; dx=-1.4551684297901315E-7 evalInputDelta=5.426036359669496
Fitness changed from -81.86207303067228 to -87.28810939034177
Iteration 7 complete. Error: -87.28810939034177 Total: 12.7517; Orientation: 1.0397; Line Search: 9.5060
Adding measurement 39b68d89 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.093e+04, gradient 5.903e-04, dot -0.581; [83a5a837-f179-4721-8596-e451c604028e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -87.28810939034177, -56.70904805767214, -52.15293847616934, -49.44796048268491
LBFGS Accumulation History: 3 points
Removed measurement 39b68d89 to history. Total: 3
th(0)=-87.28810939034177;dx=-3.4756580586259084E-7
New Minimum: -87.28810939034177 > -91.90493093218149
END: th(2.807232926569009E7)=-91.90493093218149; dx=-3.2619663136013313E-8 evalInputDelta=4.6168215418397125
Fitness changed from -87.28810939034177 to -91.90493093218149
Iteration 8 complete. Error: -91.90493093218149 Total: 7.7216; Orientation: 0.9773; Line Search: 4.5892
Adding measurement 1ddb485c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.311e+04, gradient 7.472e-04, dot -0.415; [83a5a837-f179-4721-8596-e451c604028e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -91.90493093218149, -56.70904805767214, -52.15293847616934, -49.44796048268491
LBFGS Accumulation History: 3 points
Removed measurement 1ddb485c to history. Total: 3
th(0)=-91.90493093218149;dx=-5.583267224646071E-7
Armijo: th(6.048000000000001E7)=-86.16296771449615; dx=1.9223503622903405E-7 evalInputDelta=-5.741963217685338
New Minimum: -91.90493093218149 > -93.76702192753471
WOLF (strong): th(3.0240000000000004E7)=-93.76702192753471; dx=1.9792753208653463E-7 evalInputDelta=1.8620909953532276
New Minimum: -93.76702192753471 > -95.83137000506319
END: th(1.0080000000000002E7)=-95.83137000506319; dx=-1.6956949946482578E-7 evalInputDelta=3.9264390728817062
Fitness changed from -91.90493093218149 to -95.83137000506319
Iteration 9 complete. Error: -95.83137000506319 Total: 12.5372; Orientation: 1.0345; Line Search: 9.2261
Adding measurement 436524ee to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.109e+04, gradient 4.803e-04, dot -0.640; [83a5a837-f179-4721-8596-e451c604028e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -95.83137000506319, -56.70904805767214, -52.15293847616934, -49.44796048268491
LBFGS Accumulation History: 3 points
Removed measurement 436524ee to history. Total: 3
th(0)=-95.83137000506319;dx=-2.3017615794188176E-7
New Minimum: -95.83137000506319 > -99.4670604483709
END: th(2.1716701675521392E7)=-99.4670604483709; dx=-1.1776572991339257E-7 evalInputDelta=3.635690443307709
Fitness changed from -95.83137000506319 to -99.4670604483709
Iteration 10 complete. Error: -99.4670604483709 Total: 7.8186; Orientation: 1.0250; Line Search: 4.6488
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/da95a12f-56fc-4691-9225-3586cfde9e00.jpg)
Final threshold in iteration 11: -99.4670604483709 (> -Infinity) after 109.760s (< 5400.000s)
Returns
-99.4670604483709