BasicOptimizer.scala:89 executed in 132.76 seconds (1.733 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: 32864830551400
Reset training subject: 32867456130200
Adding measurement 6e50ed56 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-62.298813323671816;dx=-4.494737097730716E-6
New Minimum: -62.298813323671816 > -62.29882430908057
END: th(2.154434690031884)=-62.29882430908057; dx=-3.1845685335068705E-6 evalInputDelta=1.0985408756880588E-5
Fitness changed from -62.298813323671816 to -62.29882430908057
Iteration 1 complete. Error: -62.29882430908057 Total: 13.0136; Orientation: 0.0612; Line Search: 5.1368
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/c45d551c-a29e-407e-96a1-621dec81b10f.jpg)
Adding measurement 3ffb0679 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-62.29882430908057;dx=-3.1551162003778504E-6
New Minimum: -62.29882430908057 > -62.29884078719007
WOLFE (weak): th(4.641588833612779)=-62.29884078719007; dx=-3.155577878758001E-6 evalInputDelta=1.647810950089479E-5
New Minimum: -62.29884078719007 > -62.29885726529522
WOLFE (weak): th(9.283177667225559)=-62.29885726529522; dx=-3.1541575398060675E-6 evalInputDelta=3.295621464616261E-5
New Minimum: -62.29885726529522 > -62.298925924019755
WOLFE (weak): th(27.849533001676676)=-62.298925924019755; dx=-3.1517628822466482E-6 evalInputDelta=1.0161493918303677E-4
New Minimum: -62.298925924019755 > -62.29923076784285
WOLFE (weak): th(111.3981320067067)=-62.29923076784285; dx=-3.1499105805360253E-6 evalInputDelta=4.064587622778504E-4
New Minimum: -62.29923076784285 > -62.30086206889856
WOLFE (weak): th(556.9906600335335)=-62.30086206889856; dx=-3.1495685968861408E-6 evalInputDelta=0.0020377598179877054
New Minimum: -62.30086206889856 > -62.31104986837486
WOLFE (weak): th(3341.9439602012008)=-62.31104986837486; dx=-3.1482274314284427E-6 evalInputDelta=0.01222555929428637
New Minimum: -62.31104986837486 > -62.384328227773715
WOLFE (weak): th(23393.607721408407)=-62.384328227773715; dx=-3.142826952362771E-6 evalInputDelta=0.08550391869314211
New Minimum: -62.384328227773715 > -62.97747820773697
WOLFE (weak): th(187148.86177126726)=-62.97747820773697; dx=-3.088427902630133E-6 evalInputDelta=0.6786538986563997
New Minimum: -62.97747820773697 > -67.79307263228266
END: th(1684339.7559414054)=-67.79307263228266; dx=-2.4146561051978392E-6 evalInputDelta=5.494248323202086
Fitness changed from -62.29882430908057 to -67.79307263228266
Iteration 2 complete. Error: -67.79307263228266 Total: 29.4646; Orientation: 0.0642; Line Search: 26.4422
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/242d5a13-a50a-41e9-9c1c-e5cf9c398ebf.jpg)
Adding measurement 244fc0c3 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-67.79307263228266;dx=-2.3840564600436114E-6
New Minimum: -67.79307263228266 > -75.33907430430186
END: th(3628800.0000000005)=-75.33907430430186; dx=-1.3247355636705699E-6 evalInputDelta=7.546001672019202
Fitness changed from -67.79307263228266 to -75.33907430430186
Iteration 3 complete. Error: -75.33907430430186 Total: 8.6177; Orientation: 0.0596; Line Search: 5.3552
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/20c9a6ca-47f1-4272-8cf3-5b0ebbe6464e.jpg)
Adding measurement 56db61aa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.069e+03, gradient 1.223e-03, dot -0.672; [a4d06c12-d762-4363-8fe4-5110344bac4b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -75.33907430430186, -67.79307263228266, -62.29882430908057, -62.298813323671816
LBFGS Accumulation History: 3 points
Removed measurement 56db61aa to history. Total: 3
th(0)=-75.33907430430186;dx=-1.4929775145017835E-6
New Minimum: -75.33907430430186 > -84.36422845939616
END: th(7818012.603187701)=-84.36422845939616; dx=-6.01020944642776E-7 evalInputDelta=9.025154155094299
Fitness changed from -75.33907430430186 to -84.36422845939616
Iteration 4 complete. Error: -84.36422845939616 Total: 9.2249; Orientation: 1.0533; Line Search: 5.1772
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/a8799fa2-0500-44d0-909f-4bcb61cb15b4.jpg)
Adding measurement 359d5525 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.293e+04, gradient 1.248e-03, dot -0.475; [a4d06c12-d762-4363-8fe4-5110344bac4b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -84.36422845939616, -67.79307263228266, -62.29882430908057, -62.298813323671816
LBFGS Accumulation History: 3 points
Removed measurement 359d5525 to history. Total: 3
th(0)=-84.36422845939616;dx=-1.5552001295938219E-6
New Minimum: -84.36422845939616 > -85.90303651175556
WOLF (strong): th(1.6843397559414055E7)=-85.90303651175556; dx=3.647245145366628E-7 evalInputDelta=1.5388080523593999
New Minimum: -85.90303651175556 > -89.10581819904041
WOLF (strong): th(8421698.779707028)=-89.10581819904041; dx=1.2731078793981264E-7 evalInputDelta=4.741589739644255
END: th(2807232.926569009)=-88.00397258434518; dx=-7.22161853996118E-7 evalInputDelta=3.6397441249490186
Fitness changed from -84.36422845939616 to -89.10581819904041
Iteration 5 complete. Error: -89.10581819904041 Total: 14.5974; Orientation: 1.0247; Line Search: 10.5410
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/9d7c58b6-3338-47ea-a314-adcbbc9fb94d.jpg)
Adding measurement 62db94bc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.839e+03, gradient 1.537e-03, dot -0.264; [a4d06c12-d762-4363-8fe4-5110344bac4b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -89.10581819904041, -67.79307263228266, -62.29882430908057, -62.298813323671816
LBFGS Accumulation History: 3 points
Removed measurement 62db94bc to history. Total: 3
th(0)=-89.10581819904041;dx=-2.3608855263293475E-6
New Minimum: -89.10581819904041 > -95.2103322546984
WOLF (strong): th(6048000.000000001)=-95.2103322546984; dx=5.200615581404741E-7 evalInputDelta=6.104514055657987
END: th(3024000.0000000005)=-94.96405254587954; dx=-8.881577710412549E-7 evalInputDelta=5.858234346839126
Fitness changed from -89.10581819904041 to -95.2103322546984
Iteration 6 complete. Error: -95.2103322546984 Total: 11.9868; Orientation: 1.1061; Line Search: 7.6708
Adding measurement 21604765 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.962e+04, gradient 1.365e-03, dot -0.360; [a4d06c12-d762-4363-8fe4-5110344bac4b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -95.2103322546984, -67.79307263228266, -62.29882430908057, -62.298813323671816
LBFGS Accumulation History: 3 points
Removed measurement 21604765 to history. Total: 3
th(0)=-95.2103322546984;dx=-1.8633242327874313E-6
New Minimum: -95.2103322546984 > -99.17630771023055
WOLF (strong): th(6515010.502656418)=-99.17630771023055; dx=5.948537318839898E-7 evalInputDelta=3.9659754555321456
New Minimum: -99.17630771023055 > -99.75807981572305
END: th(3257505.251328209)=-99.75807981572305; dx=-4.989985267717848E-7 evalInputDelta=4.54774756102465
Fitness changed from -95.2103322546984 to -99.75807981572305
Iteration 7 complete. Error: -99.75807981572305 Total: 11.4060; Orientation: 1.0212; Line Search: 7.8253
Adding measurement 27ace188 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.773e+04, gradient 8.659e-04, dot -0.668; [a4d06c12-d762-4363-8fe4-5110344bac4b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -99.75807981572305, -67.79307263228266, -62.29882430908057, -62.298813323671816
LBFGS Accumulation History: 3 points
Removed measurement 27ace188 to history. Total: 3
th(0)=-99.75807981572305;dx=-7.494302859835777E-7
New Minimum: -99.75807981572305 > -104.06581808206046
END: th(7018082.316422524)=-104.06581808206046; dx=-3.7918395022938734E-7 evalInputDelta=4.3077382663374095
Fitness changed from -99.75807981572305 to -104.06581808206046
Iteration 8 complete. Error: -104.06581808206046 Total: 8.7544; Orientation: 1.0951; Line Search: 5.1935
Adding measurement 3406559d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.168e+04, gradient 9.663e-04, dot -0.557; [a4d06c12-d762-4363-8fe4-5110344bac4b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -104.06581808206046, -67.79307263228266, -62.29882430908057, -62.298813323671816
LBFGS Accumulation History: 3 points
Removed measurement 3406559d to history. Total: 3
th(0)=-104.06581808206046;dx=-9.326491317846158E-7
New Minimum: -104.06581808206046 > -105.14096329800853
WOLF (strong): th(1.5120000000000006E7)=-105.14096329800853; dx=2.751769348230202E-7 evalInputDelta=1.0751452159480692
New Minimum: -105.14096329800853 > -106.99250888393513
WOLF (strong): th(7560000.000000003)=-106.99250888393513; dx=3.11861163698559E-8 evalInputDelta=2.9266908018746705
END: th(2520000.000000001)=-106.0681582168621; dx=-4.871420992031304E-7 evalInputDelta=2.002340134801642
Fitness changed from -104.06581808206046 to -106.99250888393513
Iteration 9 complete. Error: -106.99250888393513 Total: 13.9934; Orientation: 0.9853; Line Search: 10.4217
Adding measurement 837f2ef to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.870e+04, gradient 1.214e-03, dot -0.379; [a4d06c12-d762-4363-8fe4-5110344bac4b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -106.99250888393513, -67.79307263228266, -62.29882430908057, -62.298813323671816
LBFGS Accumulation History: 3 points
Removed measurement 837f2ef to history. Total: 3
th(0)=-106.99250888393513;dx=-1.4730734051502979E-6
New Minimum: -106.99250888393513 > -110.60688703167885
WOLF (strong): th(5429175.418880349)=-110.60688703167885; dx=2.9128880841864087E-7 evalInputDelta=3.6143781477437216
END: th(2714587.7094401745)=-110.30008842473133; dx=-6.143200969779743E-7 evalInputDelta=3.3075795407961976
Fitness changed from -106.99250888393513 to -110.60688703167885
Iteration 10 complete. Error: -110.60688703167885 Total: 11.2680; Orientation: 0.9845; Line Search: 7.7686
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/cf7cb3bf-4975-4912-8583-8f7f7e9792f2.jpg)
Final threshold in iteration 11: -110.60688703167885 (> -Infinity) after 132.760s (< 5400.000s)
Returns
-110.60688703167885