BasicOptimizer.scala:89 executed in 132.95 seconds (1.480 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: 27569467012900
Reset training subject: 27572084655600
Adding measurement 6806fc07 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-77.42253222759271;dx=-5.155597352494598E-6
New Minimum: -77.42253222759271 > -77.4225410671118
END: th(2.154434690031884)=-77.4225410671118; dx=-3.3948192906385133E-6 evalInputDelta=8.839519082926017E-6
Fitness changed from -77.42253222759271 to -77.4225410671118
Iteration 1 complete. Error: -77.4225410671118 Total: 12.7739; Orientation: 0.0617; Line Search: 5.0547
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/72294734-6a3a-4fb6-bdaa-fa8621e35b39.jpg)
Adding measurement 7431b2f9 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-77.4225410671118;dx=-3.369523959829018E-6
New Minimum: -77.4225410671118 > -77.42255874614693
WOLFE (weak): th(4.641588833612779)=-77.42255874614693; dx=-3.3683390704907714E-6 evalInputDelta=1.767903513893998E-5
New Minimum: -77.42255874614693 > -77.42257642517802
WOLFE (weak): th(9.283177667225559)=-77.42257642517802; dx=-3.3661948724377247E-6 evalInputDelta=3.535806622778637E-5
New Minimum: -77.42257642517802 > -77.42264714126203
WOLFE (weak): th(27.849533001676676)=-77.42264714126203; dx=-3.3650460951779498E-6 evalInputDelta=1.0607415023855538E-4
New Minimum: -77.42264714126203 > -77.42296536284076
WOLFE (weak): th(111.3981320067067)=-77.42296536284076; dx=-3.3631904305608676E-6 evalInputDelta=4.242957289619653E-4
New Minimum: -77.42296536284076 > -77.42465368322782
WOLFE (weak): th(556.9906600335335)=-77.42465368322782; dx=-3.3626256195203913E-6 evalInputDelta=0.0021126161160225365
New Minimum: -77.42465368322782 > -77.43521148021433
WOLFE (weak): th(3341.9439602012008)=-77.43521148021433; dx=-3.360952417712577E-6 evalInputDelta=0.012670413102540579
New Minimum: -77.43521148021433 > -77.5111419023682
WOLFE (weak): th(23393.607721408407)=-77.5111419023682; dx=-3.356211140869854E-6 evalInputDelta=0.0886008352564005
New Minimum: -77.5111419023682 > -78.12589775165654
WOLFE (weak): th(187148.86177126726)=-78.12589775165654; dx=-3.3019991316753104E-6 evalInputDelta=0.7033566845447439
New Minimum: -78.12589775165654 > -83.20904614501745
END: th(1684339.7559414054)=-83.20904614501745; dx=-2.695279182596037E-6 evalInputDelta=5.786505077905659
Fitness changed from -77.4225410671118 to -83.20904614501745
Iteration 2 complete. Error: -83.20904614501745 Total: 29.8657; Orientation: 0.0622; Line Search: 26.6363
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/90ea40aa-43d2-4ce5-a3d3-1101e188f6a9.jpg)
Adding measurement 3b785bf4 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-83.20904614501745;dx=-2.6215641883755428E-6
New Minimum: -83.20904614501745 > -91.52948254273352
END: th(3628800.0000000005)=-91.52948254273352; dx=-1.5344522103430627E-6 evalInputDelta=8.320436397716065
Fitness changed from -83.20904614501745 to -91.52948254273352
Iteration 3 complete. Error: -91.52948254273352 Total: 8.2436; Orientation: 0.0620; Line Search: 5.1787
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/fa155b2d-0d2b-446c-a09c-ed92ea301a4e.jpg)
Adding measurement 2ce6e99a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.149e+04, gradient 1.269e-03, dot -0.716; [b79a892b-2ab4-4e16-959c-f89c1071bd41 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -91.52948254273352, -83.20904614501745, -77.4225410671118, -77.42253222759271
LBFGS Accumulation History: 3 points
Removed measurement 2ce6e99a to history. Total: 3
th(0)=-91.52948254273352;dx=-1.6098524999462658E-6
New Minimum: -91.52948254273352 > -101.30997560936018
END: th(7818012.603187701)=-101.30997560936018; dx=-6.794008666965889E-7 evalInputDelta=9.780493066626661
Fitness changed from -91.52948254273352 to -101.30997560936018
Iteration 4 complete. Error: -101.30997560936018 Total: 9.5705; Orientation: 1.0946; Line Search: 5.5758
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/6b488cd9-bb1e-464f-b8c6-c37c894cf5d9.jpg)
Adding measurement 736925a2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.260e+04, gradient 1.196e-03, dot -0.486; [b79a892b-2ab4-4e16-959c-f89c1071bd41 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -101.30997560936018, -83.20904614501745, -77.4225410671118, -77.42253222759271
LBFGS Accumulation History: 3 points
Removed measurement 736925a2 to history. Total: 3
th(0)=-101.30997560936018;dx=-1.429254123486967E-6
New Minimum: -101.30997560936018 > -105.05853494916107
WOLF (strong): th(1.6843397559414055E7)=-105.05853494916107; dx=2.90949321467132E-7 evalInputDelta=3.7485593398008916
New Minimum: -105.05853494916107 > -106.69968240127439
END: th(8421698.779707028)=-106.69968240127439; dx=-2.90262626346373E-8 evalInputDelta=5.389706791914207
Fitness changed from -101.30997560936018 to -106.69968240127439
Iteration 5 complete. Error: -106.69968240127439 Total: 12.2248; Orientation: 1.0982; Line Search: 7.8979
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/8dda65b6-a0bb-4948-a1e0-020f75656432.jpg)
Adding measurement 501ff1f8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.151e+04, gradient 1.407e-03, dot -0.318; [b79a892b-2ab4-4e16-959c-f89c1071bd41 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -106.69968240127439, -83.20904614501745, -77.4225410671118, -77.42253222759271
LBFGS Accumulation History: 3 points
Removed measurement 501ff1f8 to history. Total: 3
th(0)=-106.69968240127439;dx=-1.9784916871010504E-6
Armijo: th(1.8144000000000004E7)=-100.7585913798089; dx=8.598449398300771E-7 evalInputDelta=-5.941091021465482
New Minimum: -106.69968240127439 > -110.07542974688627
WOLF (strong): th(9072000.000000002)=-110.07542974688627; dx=7.802368468168851E-7 evalInputDelta=3.3757473456118845
New Minimum: -110.07542974688627 > -111.54717408528589
END: th(3024000.0000000005)=-111.54717408528589; dx=-8.102717010325131E-7 evalInputDelta=4.847491684011501
Fitness changed from -106.69968240127439 to -111.54717408528589
Iteration 6 complete. Error: -111.54717408528589 Total: 14.2806; Orientation: 1.0847; Line Search: 10.2940
Adding measurement 753a1708 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.036e+04, gradient 9.151e-04, dot -0.638; [b79a892b-2ab4-4e16-959c-f89c1071bd41 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -111.54717408528589, -83.20904614501745, -77.4225410671118, -77.42253222759271
LBFGS Accumulation History: 3 points
Removed measurement 753a1708 to history. Total: 3
th(0)=-111.54717408528589;dx=-8.368745917707613E-7
New Minimum: -111.54717408528589 > -115.90265575816296
END: th(6515010.502656418)=-115.90265575816296; dx=-3.915916584366327E-7 evalInputDelta=4.355481672877076
Fitness changed from -111.54717408528589 to -115.90265575816296
Iteration 7 complete. Error: -115.90265575816296 Total: 8.7020; Orientation: 1.1478; Line Search: 5.1011
Adding measurement 437c4578 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.360e+04, gradient 9.519e-04, dot -0.564; [b79a892b-2ab4-4e16-959c-f89c1071bd41 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -115.90265575816296, -83.20904614501745, -77.4225410671118, -77.42253222759271
LBFGS Accumulation History: 3 points
Removed measurement 437c4578 to history. Total: 3
th(0)=-115.90265575816296;dx=-9.051701270486598E-7
New Minimum: -115.90265575816296 > -118.92828620461763
WOLF (strong): th(1.4036164632845048E7)=-118.92828620461763; dx=1.3874376923592705E-7 evalInputDelta=3.02563044645467
New Minimum: -118.92828620461763 > -119.31040126921687
END: th(7018082.316422524)=-119.31040126921687; dx=-1.0549021404628485E-7 evalInputDelta=3.4077455110539034
Fitness changed from -115.90265575816296 to -119.31040126921687
Iteration 8 complete. Error: -119.31040126921687 Total: 11.4790; Orientation: 1.0255; Line Search: 7.7276
Adding measurement 60414977 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.353e+04, gradient 1.100e-03, dot -0.438; [b79a892b-2ab4-4e16-959c-f89c1071bd41 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -119.31040126921687, -83.20904614501745, -77.4225410671118, -77.42253222759271
LBFGS Accumulation History: 3 points
Removed measurement 60414977 to history. Total: 3
th(0)=-119.31040126921687;dx=-1.2098803666770552E-6
Armijo: th(1.5120000000000006E7)=-117.4931506345229; dx=5.88312986479252E-7 evalInputDelta=-1.8172506346939628
New Minimum: -119.31040126921687 > -122.07111674560892
WOLF (strong): th(7560000.000000003)=-122.07111674560892; dx=3.5045162316766115E-7 evalInputDelta=2.7607154763920505
END: th(2520000.000000001)=-121.89462341674702; dx=-6.159544252003637E-7 evalInputDelta=2.5842221475301557
Fitness changed from -119.31040126921687 to -122.07111674560892
Iteration 9 complete. Error: -122.07111674560892 Total: 14.1443; Orientation: 1.0200; Line Search: 10.3705
Adding measurement 49019c88 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.344e+04, gradient 1.302e-03, dot -0.316; [b79a892b-2ab4-4e16-959c-f89c1071bd41 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -122.07111674560892, -83.20904614501745, -77.4225410671118, -77.42253222759271
LBFGS Accumulation History: 3 points
Removed measurement 49019c88 to history. Total: 3
th(0)=-122.07111674560892;dx=-1.694594563054778E-6
New Minimum: -122.07111674560892 > -126.21134748637
WOLF (strong): th(5429175.418880349)=-126.21134748637; dx=3.5096756045493575E-7 evalInputDelta=4.140230740761083
END: th(2714587.7094401745)=-125.82053562622356; dx=-7.094860860506291E-7 evalInputDelta=3.749418880614641
Fitness changed from -122.07111674560892 to -126.21134748637
Iteration 10 complete. Error: -126.21134748637 Total: 11.2283; Orientation: 1.0431; Line Search: 7.7330
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/304ad285-3a62-4c72-87b2-efd8d6034a9b.jpg)
Final threshold in iteration 11: -126.21134748637 (> -Infinity) after 132.948s (< 5400.000s)
Returns
-126.21134748637