BasicOptimizer.scala:89 executed in 204.90 seconds (2.203 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: 13232677695443
Reset training subject: 13237040386644
Adding measurement 5a178181 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.08008089661598206;dx=-6.818519419770642E-7
New Minimum: -0.08008089661598206 > -0.0800812691450119
WOLFE (weak): th(2.154434690031884)=-0.0800812691450119; dx=-6.266862221778861E-7 evalInputDelta=3.725290298461914E-7
New Minimum: -0.0800812691450119 > -0.08008205890655518
WOLFE (weak): th(4.308869380063768)=-0.08008205890655518; dx=-6.266722579619555E-7 evalInputDelta=1.1622905731201172E-6
New Minimum: -0.08008205890655518 > -0.0800849199295044
WOLFE (weak): th(12.926608140191302)=-0.0800849199295044; dx=-6.266679520295172E-7 evalInputDelta=4.023313522338867E-6
New Minimum: -0.0800849199295044 > -0.08009709417819977
WOLFE (weak): th(51.70643256076521)=-0.08009709417819977; dx=-6.266312150605636E-7 evalInputDelta=1.6197562217712402E-5
New Minimum: -0.08009709417819977 > -0.0801619291305542
WOLFE (weak): th(258.53216280382605)=-0.0801619291305542; dx=-6.26645819023568E-7 evalInputDelta=8.103251457214355E-5
New Minimum: -0.0801619291305542 > -0.08056680858135223
WOLFE (weak): th(1551.1929768229563)=-0.08056680858135223; dx=-6.264276519687527E-7 evalInputDelta=4.859119653701782E-4
New Minimum: -0.08056680858135223 > -0.08347716927528381
WOLFE (weak): th(10858.350837760694)=-0.08347716927528381; dx=-6.243336467700948E-7 evalInputDelta=0.003396272659301758
New Minimum: -0.08347716927528381 > -0.1068875789642334
END: th(86866.80670208555)=-0.1068875789642334; dx=-6.079100754295354E-7 evalInputDelta=0.026806682348251343
Fitness changed from -0.08008089661598206 to -0.1068875789642334
Iteration 1 complete. Error: -0.1068875789642334 Total: 51.3669; Orientation: 0.0452; Line Search: 37.9490
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/8cb8c96f-66f3-40aa-a64f-82a620baeadf.jpg)
Adding measurement 4564a517 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.1068875789642334;dx=-5.94539910558821E-7
New Minimum: -0.1068875789642334 > -0.16073741018772125
WOLFE (weak): th(187148.86177126726)=-0.16073741018772125; dx=-5.559197567635293E-7 evalInputDelta=0.053849831223487854
New Minimum: -0.16073741018772125 > -0.21094027161598206
END: th(374297.7235425345)=-0.21094027161598206; dx=-5.165946565665084E-7 evalInputDelta=0.10405269265174866
Fitness changed from -0.1068875789642334 to -0.21094027161598206
Iteration 2 complete. Error: -0.21094027161598206 Total: 18.3326; Orientation: 0.0462; Line Search: 13.8700
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/258fd3fe-565a-4441-a39a-fd60ce0ac4cc.jpg)
Adding measurement 7fb9a3d6 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.21094027161598206;dx=-4.75281474768442E-7
New Minimum: -0.21094027161598206 > -0.3797767162322998
END: th(806400.0000000001)=-0.3797767162322998; dx=-3.6389810664746953E-7 evalInputDelta=0.16883644461631775
Fitness changed from -0.21094027161598206 to -0.3797767162322998
Iteration 3 complete. Error: -0.3797767162322998 Total: 13.4895; Orientation: 0.0469; Line Search: 8.6861
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/4e0647f8-4906-41a7-b05e-edb970ae5488.jpg)
Adding measurement 54d690ea to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.124e+03, gradient 5.684e-04, dot -0.925; [12d31a0a-2096-4017-b891-1b86b9df099a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.3797767162322998, -0.21094027161598206, -0.1068875789642334, -0.08008089661598206
LBFGS Accumulation History: 3 points
Removed measurement 54d690ea to history. Total: 3
th(0)=-0.3797767162322998;dx=-3.230421567231162E-7
New Minimum: -0.3797767162322998 > -0.6096835881471634
END: th(1737336.1340417115)=-0.6096835881471634; dx=-2.1172025823350602E-7 evalInputDelta=0.2299068719148636
Fitness changed from -0.3797767162322998 to -0.6096835881471634
Iteration 4 complete. Error: -0.6096835881471634 Total: 14.6918; Orientation: 1.0200; Line Search: 9.3182
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/d8a1953f-a1ac-41dd-8651-3a61d8cd9bac.jpg)
Adding measurement 46210ae9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.667e+03, gradient 4.450e-04, dot -0.818; [12d31a0a-2096-4017-b891-1b86b9df099a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.6096835881471634, -0.21094027161598206, -0.1068875789642334, -0.08008089661598206
LBFGS Accumulation History: 3 points
Removed measurement 46210ae9 to history. Total: 3
th(0)=-0.6096835881471634;dx=-1.980517131152881E-7
New Minimum: -0.6096835881471634 > -0.8820225447416306
END: th(3742977.235425346)=-0.8820225447416306; dx=-1.0583918327206244E-7 evalInputDelta=0.27233895659446716
Fitness changed from -0.6096835881471634 to -0.8820225447416306
Iteration 5 complete. Error: -0.8820225447416306 Total: 13.6860; Orientation: 1.0213; Line Search: 8.7788
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/485c0ecc-caf2-4be7-826b-5ce914e09b3d.jpg)
Adding measurement 3f57911e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.647e+03, gradient 3.601e-04, dot -0.682; [12d31a0a-2096-4017-b891-1b86b9df099a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.8820225447416306, -0.21094027161598206, -0.1068875789642334, -0.08008089661598206
LBFGS Accumulation History: 3 points
Removed measurement 3f57911e to history. Total: 3
th(0)=-0.8820225447416306;dx=-1.2965374061485424E-7
New Minimum: -0.8820225447416306 > -1.15643610060215
END: th(8064000.000000003)=-1.15643610060215; dx=-3.505689889173153E-8 evalInputDelta=0.2744135558605194
Fitness changed from -0.8820225447416306 to -1.15643610060215
Iteration 6 complete. Error: -1.15643610060215 Total: 14.5955; Orientation: 1.0426; Line Search: 8.9809
Adding measurement 20366c06 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.617e+03, gradient 3.410e-04, dot -0.433; [12d31a0a-2096-4017-b891-1b86b9df099a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.15643610060215, -0.21094027161598206, -0.1068875789642334, -0.08008089661598206
LBFGS Accumulation History: 3 points
Removed measurement 20366c06 to history. Total: 3
th(0)=-1.15643610060215;dx=-1.163016144418449E-7
New Minimum: -1.15643610060215 > -1.280450463294983
WOLF (strong): th(1.7373361340417117E7)=-1.280450463294983; dx=1.73840358333738E-8 evalInputDelta=0.12401436269283295
New Minimum: -1.280450463294983 > -1.333415001630783
WOLF (strong): th(8686680.670208558)=-1.333415001630783; dx=2.4238443116324254E-9 evalInputDelta=0.17697890102863312
END: th(2895560.2234028527)=-1.2775738090276718; dx=-5.3498022104466037E-8 evalInputDelta=0.12113770842552185
Fitness changed from -1.15643610060215 to -1.333415001630783
Iteration 7 complete. Error: -1.333415001630783 Total: 22.9444; Orientation: 1.0127; Line Search: 17.5947
Adding measurement 29a4101a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.697e+03, gradient 3.253e-04, dot -0.345; [12d31a0a-2096-4017-b891-1b86b9df099a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.333415001630783, -0.21094027161598206, -0.1068875789642334, -0.08008089661598206
LBFGS Accumulation History: 3 points
Removed measurement 29a4101a to history. Total: 3
th(0)=-1.333415001630783;dx=-1.058294732135097E-7
New Minimum: -1.333415001630783 > -1.4940665364265442
END: th(6238295.392375577)=-1.4940665364265442; dx=-1.1647814017887714E-8 evalInputDelta=0.1606515347957611
Fitness changed from -1.333415001630783 to -1.4940665364265442
Iteration 8 complete. Error: -1.4940665364265442 Total: 13.7533; Orientation: 1.0171; Line Search: 8.4095
Adding measurement 73c59fbd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.971e+03, gradient 2.212e-04, dot -0.492; [12d31a0a-2096-4017-b891-1b86b9df099a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.4940665364265442, -0.21094027161598206, -0.1068875789642334, -0.08008089661598206
LBFGS Accumulation History: 3 points
Removed measurement 73c59fbd to history. Total: 3
th(0)=-1.4940665364265442;dx=-4.893217561395708E-8
New Minimum: -1.4940665364265442 > -1.6138131320476532
WOLF (strong): th(1.3440000000000006E7)=-1.6138131320476532; dx=5.841504139157504E-9 evalInputDelta=0.11974659562110901
END: th(6720000.000000003)=-1.5996793508529663; dx=-1.6168034989476017E-8 evalInputDelta=0.10561281442642212
Fitness changed from -1.4940665364265442 to -1.6138131320476532
Iteration 9 complete. Error: -1.6138131320476532 Total: 18.8363; Orientation: 1.5175; Line Search: 12.9565
Adding measurement d16fffa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.840e+03, gradient 2.741e-04, dot -0.288; [12d31a0a-2096-4017-b891-1b86b9df099a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.6138131320476532, -0.21094027161598206, -0.1068875789642334, -0.08008089661598206
LBFGS Accumulation History: 3 points
Removed measurement d16fffa to history. Total: 3
th(0)=-1.6138131320476532;dx=-7.513182942019693E-8
New Minimum: -1.6138131320476532 > -1.6463073045015335
WOLF (strong): th(1.4477801117014265E7)=-1.6463073045015335; dx=3.149672376729945E-8 evalInputDelta=0.03249417245388031
New Minimum: -1.6463073045015335 > -1.721912458539009
WOLF (strong): th(7238900.558507132)=-1.721912458539009; dx=2.65492160022883E-9 evalInputDelta=0.1080993264913559
END: th(2412966.8528357106)=-1.6828145384788513; dx=-3.975360885618294E-8 evalInputDelta=0.06900140643119812
Fitness changed from -1.6138131320476532 to -1.721912458539009
Iteration 10 complete. Error: -1.721912458539009 Total: 23.1305; Orientation: 1.0275; Line Search: 17.9202
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/267dc754-4e5e-4492-bf24-2a315ba399b0.jpg)
Final threshold in iteration 11: -1.721912458539009 (> -Infinity) after 204.898s (< 5400.000s)
Returns
-1.721912458539009