BasicOptimizer.scala:89 executed in 217.39 seconds (3.486 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: 687389231104200
Reset training subject: 687393757264500
Adding measurement 36773562 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-1195.8574329743492;dx=-0.013272135549210872
New Minimum: -1195.8574329743492 > -1195.887850092976
WOLFE (weak): th(2.154434690031884)=-1195.887850092976; dx=-0.012976508714515153 evalInputDelta=0.030417118626701267
New Minimum: -1195.887850092976 > -1195.9183709601589
WOLFE (weak): th(4.308869380063768)=-1195.9183709601589; dx=-0.012979341355104573 evalInputDelta=0.060937985809687234
New Minimum: -1195.9183709601589 > -1196.0402376174475
WOLFE (weak): th(12.926608140191302)=-1196.0402376174475; dx=-0.012975721459406986 evalInputDelta=0.18280464309827948
New Minimum: -1196.0402376174475 > -1196.5884317508674
WOLFE (weak): th(51.70643256076521)=-1196.5884317508674; dx=-0.012970251397351688 evalInputDelta=0.7309987765181631
New Minimum: -1196.5884317508674 > -1199.5041683962586
WOLFE (weak): th(258.53216280382605)=-1199.5041683962586; dx=-0.012908450578999172 evalInputDelta=3.6467354219093977
New Minimum: -1199.5041683962586 > -1217.43285235778
WOLFE (weak): th(1551.1929768229563)=-1217.43285235778; dx=-0.012551877687096214 evalInputDelta=21.5754193834307
New Minimum: -1217.43285235778 > -1330.9461859895011
END: th(10858.350837760694)=-1330.9461859895011; dx=-0.009768701677528486 evalInputDelta=135.08875301515195
Fitness changed from -1195.8574329743492 to -1330.9461859895011
Iteration 1 complete. Error: -1330.9461859895011 Total: 50.0710; Orientation: 0.0978; Line Search: 36.3245
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/8edf1651-b756-4245-81a6-49774efe3c58.jpg)
Adding measurement 2496e86c to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-1330.9461859895011;dx=-0.008328211088942935
New Minimum: -1330.9461859895011 > -1506.813442334518
END: th(23393.607721408407)=-1506.813442334518; dx=-0.005523337676404578 evalInputDelta=175.8672563450168
Fitness changed from -1330.9461859895011 to -1506.813442334518
Iteration 2 complete. Error: -1506.813442334518 Total: 14.5555; Orientation: 0.0906; Line Search: 8.8900
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/09523e96-fe7f-47de-bb13-2c711ea2e7ab.jpg)
Adding measurement 6788c98f to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-1506.813442334518;dx=-0.004858386426298061
New Minimum: -1506.813442334518 > -1724.9197082763012
END: th(50400.00000000001)=-1724.9197082763012; dx=-0.003154111041648675 evalInputDelta=218.10626594178325
Fitness changed from -1506.813442334518 to -1724.9197082763012
Iteration 3 complete. Error: -1724.9197082763012 Total: 15.0231; Orientation: 0.1000; Line Search: 9.0285
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/1a78c7e3-a100-461e-8953-2d5b4e9fd933.jpg)
Adding measurement 6b89cb96 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.721e+03, gradient 5.685e-02, dot -0.875; [59278687-f7b3-4ff4-8fe0-806ef0a1e385 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1724.9197082763012, -1506.813442334518, -1330.9461859895011, -1195.8574329743492
LBFGS Accumulation History: 3 points
Removed measurement 6b89cb96 to history. Total: 3
th(0)=-1724.9197082763012;dx=-0.0032284831404304007
New Minimum: -1724.9197082763012 > -2004.6386831546477
END: th(108583.50837760697)=-2004.6386831546477; dx=-0.0016928467604766626 evalInputDelta=279.71897487834644
Fitness changed from -1724.9197082763012 to -2004.6386831546477
Iteration 4 complete. Error: -2004.6386831546477 Total: 15.9731; Orientation: 1.7119; Line Search: 8.9729
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/7d4dc491-a8df-4a00-8c33-381ee0fbdb71.jpg)
Adding measurement 77ec9646 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.203e+04, gradient 5.408e-02, dot -0.667; [59278687-f7b3-4ff4-8fe0-806ef0a1e385 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2004.6386831546477, -1506.813442334518, -1330.9461859895011, -1195.8574329743492
LBFGS Accumulation History: 3 points
Removed measurement 77ec9646 to history. Total: 3
th(0)=-2004.6386831546477;dx=-0.0029205485969237607
New Minimum: -2004.6386831546477 > -2256.723952990263
END: th(233936.07721408413)=-2256.723952990263; dx=-2.7411774325261727E-4 evalInputDelta=252.08526983561546
Fitness changed from -2004.6386831546477 to -2256.723952990263
Iteration 5 complete. Error: -2256.723952990263 Total: 16.9378; Orientation: 1.6767; Line Search: 9.6020
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/6e16ff88-cf21-4a41-b6e4-95b2c91bd184.jpg)
Adding measurement 7ec89942 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.046e+04, gradient 6.634e-02, dot -0.368; [59278687-f7b3-4ff4-8fe0-806ef0a1e385 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2256.723952990263, -1506.813442334518, -1330.9461859895011, -1195.8574329743492
LBFGS Accumulation History: 3 points
Removed measurement 7ec89942 to history. Total: 3
th(0)=-2256.723952990263;dx=-0.004399081293154488
Armijo: th(504000.0000000002)=-1959.0152500682582; dx=0.0010071322216169175 evalInputDelta=-297.70870292200493
New Minimum: -2256.723952990263 > -2309.467471085055
WOLF (strong): th(252000.0000000001)=-2309.467471085055; dx=0.001310124214154003 evalInputDelta=52.74351809479185
New Minimum: -2309.467471085055 > -2469.508858052548
END: th(84000.00000000003)=-2469.508858052548; dx=-5.861290393034378E-4 evalInputDelta=212.7849050622849
Fitness changed from -2256.723952990263 to -2469.508858052548
Iteration 6 complete. Error: -2469.508858052548 Total: 25.0638; Orientation: 1.6035; Line Search: 17.9546
Adding measurement 7be1da32 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.684e+04, gradient 5.097e-02, dot -0.481; [59278687-f7b3-4ff4-8fe0-806ef0a1e385 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2469.508858052548, -1506.813442334518, -1330.9461859895011, -1195.8574329743492
LBFGS Accumulation History: 3 points
Removed measurement 7be1da32 to history. Total: 3
th(0)=-2469.508858052548;dx=-0.002594901206901196
New Minimum: -2469.508858052548 > -2607.2736718649235
WOLF (strong): th(180972.5139626783)=-2607.2736718649235; dx=3.5736325981721795E-4 evalInputDelta=137.76481381237545
New Minimum: -2607.2736718649235 > -2612.9866054000354
END: th(90486.25698133915)=-2612.9866054000354; dx=-5.648937935536271E-4 evalInputDelta=143.47774734748737
Fitness changed from -2469.508858052548 to -2612.9866054000354
Iteration 7 complete. Error: -2612.9866054000354 Total: 20.0472; Orientation: 1.5979; Line Search: 13.9082
Adding measurement 655bd25f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.257e+04, gradient 4.858e-02, dot -0.525; [59278687-f7b3-4ff4-8fe0-806ef0a1e385 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2612.9866054000354, -1506.813442334518, -1330.9461859895011, -1195.8574329743492
LBFGS Accumulation History: 3 points
Removed measurement 655bd25f to history. Total: 3
th(0)=-2612.9866054000354;dx=-0.0023549288429461565
New Minimum: -2612.9866054000354 > -2711.675035840394
WOLF (strong): th(194946.7310117368)=-2711.675035840394; dx=3.2113586931442075E-4 evalInputDelta=98.68843044035839
New Minimum: -2711.675035840394 > -2730.126462272398
END: th(97473.3655058684)=-2730.126462272398; dx=-2.548440476130263E-4 evalInputDelta=117.13985687236254
Fitness changed from -2612.9866054000354 to -2730.126462272398
Iteration 8 complete. Error: -2730.126462272398 Total: 19.9347; Orientation: 1.6480; Line Search: 13.9788
Adding measurement 4a9584c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.519e+04, gradient 5.068e-02, dot -0.489; [59278687-f7b3-4ff4-8fe0-806ef0a1e385 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2730.126462272398, -1506.813442334518, -1330.9461859895011, -1195.8574329743492
LBFGS Accumulation History: 3 points
Removed measurement 4a9584c to history. Total: 3
th(0)=-2730.126462272398;dx=-0.002563614237497106
New Minimum: -2730.126462272398 > -2760.377329279459
WOLF (strong): th(210000.0000000001)=-2760.377329279459; dx=7.077684999175518E-4 evalInputDelta=30.25086700706106
New Minimum: -2760.377329279459 > -2833.2142523995603
WOLF (strong): th(105000.00000000004)=-2833.2142523995603; dx=2.355371191056905E-4 evalInputDelta=103.0877901271624
END: th(35000.000000000015)=-2803.3679744193414; dx=-0.0013822706331234516 evalInputDelta=73.24151214694348
Fitness changed from -2730.126462272398 to -2833.2142523995603
Iteration 9 complete. Error: -2833.2142523995603 Total: 24.0636; Orientation: 1.5854; Line Search: 18.1578
Adding measurement 43374d10 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.771e+04, gradient 5.508e-02, dot -0.438; [59278687-f7b3-4ff4-8fe0-806ef0a1e385 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2833.2142523995603, -1506.813442334518, -1330.9461859895011, -1195.8574329743492
LBFGS Accumulation History: 3 points
Removed measurement 43374d10 to history. Total: 3
th(0)=-2833.2142523995603;dx=-0.0030295739102554954
New Minimum: -2833.2142523995603 > -2948.3700581846915
END: th(75405.21415111597)=-2948.3700581846915; dx=-1.1746703029482416E-4 evalInputDelta=115.15580578513118
Fitness changed from -2833.2142523995603 to -2948.3700581846915
Iteration 10 complete. Error: -2948.3700581846915 Total: 14.8473; Orientation: 1.5908; Line Search: 9.0391
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/dda7c849-6861-4226-a73e-35ddb2f9d29c.jpg)
Final threshold in iteration 11: -2948.3700581846915 (> -Infinity) after 217.389s (< 5400.000s)
Returns
-2948.3700581846915