BasicOptimizer.scala:89 executed in 111.71 seconds (1.496 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: 42565056761600
Reset training subject: 42567439757300
Adding measurement 1a3208df to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-50.61603776095022;dx=-1.6333796741443828E-6
New Minimum: -50.61603776095022 > -50.61604121645304
END: th(2.154434690031884)=-50.61604121645304; dx=-1.2646456220216364E-6 evalInputDelta=3.455502820770562E-6
Fitness changed from -50.61603776095022 to -50.61604121645304
Iteration 1 complete. Error: -50.61604121645304 Total: 11.4992; Orientation: 0.0626; Line Search: 4.5905
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/5adb8fe4-7e73-4dbd-bad2-dd1731346b56.jpg)
Adding measurement 328b792d to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-50.61604121645304;dx=-1.2488958400769273E-6
New Minimum: -50.61604121645304 > -50.61604639970684
WOLFE (weak): th(4.641588833612779)=-50.61604639970684; dx=-1.2458665542013167E-6 evalInputDelta=5.183253797724774E-6
New Minimum: -50.61604639970684 > -50.6160515829601
WOLFE (weak): th(9.283177667225559)=-50.6160515829601; dx=-1.2454846485570755E-6 evalInputDelta=1.0366507055437069E-5
New Minimum: -50.6160515829601 > -50.61608095471855
WOLFE (weak): th(27.849533001676676)=-50.61608095471855; dx=-1.2444935092978714E-6 evalInputDelta=3.973826550662807E-5
New Minimum: -50.61608095471855 > -50.61619325834371
WOLFE (weak): th(111.3981320067067)=-50.61619325834371; dx=-1.2441222903006275E-6 evalInputDelta=1.520418906721943E-4
New Minimum: -50.61619325834371 > -50.61679623816293
WOLFE (weak): th(556.9906600335335)=-50.61679623816293; dx=-1.2435959845807934E-6 evalInputDelta=7.55021709885284E-4
New Minimum: -50.61679623816293 > -50.62055562941849
WOLFE (weak): th(3341.9439602012008)=-50.62055562941849; dx=-1.2432630752156724E-6 evalInputDelta=0.004514412965448855
New Minimum: -50.62055562941849 > -50.64763538376886
WOLFE (weak): th(23393.607721408407)=-50.64763538376886; dx=-1.2415538434721138E-6 evalInputDelta=0.031594167315816435
New Minimum: -50.64763538376886 > -50.86736144297277
WOLFE (weak): th(187148.86177126726)=-50.86736144297277; dx=-1.2247170755248444E-6 evalInputDelta=0.25132022651973074
New Minimum: -50.86736144297277 > -52.74869611624798
END: th(1684339.7559414054)=-52.74869611624798; dx=-1.0896230985982012E-6 evalInputDelta=2.132654899794936
Fitness changed from -50.61604121645304 to -52.74869611624798
Iteration 2 complete. Error: -52.74869611624798 Total: 25.8738; Orientation: 0.0612; Line Search: 23.2856
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/7506e76c-0801-45fa-9e63-6795651a21da.jpg)
Adding measurement 154e52e3 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-52.74869611624798;dx=-1.0847243438332262E-6
New Minimum: -52.74869611624798 > -56.35238234154061
END: th(3628800.0000000005)=-56.35238234154061; dx=-8.079434114598188E-7 evalInputDelta=3.603686225292634
Fitness changed from -52.74869611624798 to -56.35238234154061
Iteration 3 complete. Error: -56.35238234154061 Total: 8.2995; Orientation: 0.0719; Line Search: 5.3123
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/cbe13883-757d-4b53-8a39-114113c57aeb.jpg)
Adding measurement 4f2b0a96 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.482e+04, gradient 8.762e-04, dot -0.887; [3d4b7e83-6920-4d01-b6c0-c54e681c6a01 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -56.35238234154061, -52.74869611624798, -50.61604121645304, -50.61603776095022
LBFGS Accumulation History: 3 points
Removed measurement 4f2b0a96 to history. Total: 3
th(0)=-56.35238234154061;dx=-7.663583118824646E-7
New Minimum: -56.35238234154061 > -61.702608428742124
END: th(7818012.603187701)=-61.702608428742124; dx=-5.262104034950981E-7 evalInputDelta=5.350226087201513
Fitness changed from -56.35238234154061 to -61.702608428742124
Iteration 4 complete. Error: -61.702608428742124 Total: 8.5765; Orientation: 1.0767; Line Search: 4.7964
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/92c5ac13-5e78-4b62-85bd-512980be9f73.jpg)
Adding measurement 3c17f2cd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.326e+04, gradient 7.411e-04, dot -0.769; [3d4b7e83-6920-4d01-b6c0-c54e681c6a01 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -61.702608428742124, -52.74869611624798, -50.61604121645304, -50.61603776095022
LBFGS Accumulation History: 3 points
Removed measurement 3c17f2cd to history. Total: 3
th(0)=-61.702608428742124;dx=-5.473418625234665E-7
New Minimum: -61.702608428742124 > -69.1449047479466
END: th(1.6843397559414055E7)=-69.1449047479466; dx=-3.1301680887552184E-7 evalInputDelta=7.442296319204473
Fitness changed from -61.702608428742124 to -69.1449047479466
Iteration 5 complete. Error: -69.1449047479466 Total: 8.2568; Orientation: 1.0550; Line Search: 4.5575
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/2e80df84-53a6-499c-beb7-66211fda361e.jpg)
Adding measurement 7e5151c3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.776e+04, gradient 6.773e-04, dot -0.616; [3d4b7e83-6920-4d01-b6c0-c54e681c6a01 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -69.1449047479466, -52.74869611624798, -50.61604121645304, -50.61603776095022
LBFGS Accumulation History: 3 points
Removed measurement 7e5151c3 to history. Total: 3
th(0)=-69.1449047479466;dx=-4.5821165185230936E-7
New Minimum: -69.1449047479466 > -77.25500382184117
END: th(3.628800000000001E7)=-77.25500382184117; dx=-8.220819751135447E-8 evalInputDelta=8.110099073894574
Fitness changed from -69.1449047479466 to -77.25500382184117
Iteration 6 complete. Error: -77.25500382184117 Total: 8.2535; Orientation: 1.0172; Line Search: 4.4074
Adding measurement 54e9daa7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.860e+04, gradient 8.586e-04, dot -0.281; [3d4b7e83-6920-4d01-b6c0-c54e681c6a01 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -77.25500382184117, -52.74869611624798, -50.61604121645304, -50.61603776095022
LBFGS Accumulation History: 3 points
Removed measurement 54e9daa7 to history. Total: 3
th(0)=-77.25500382184117;dx=-7.363248333268368E-7
Armijo: th(7.818012603187701E7)=-70.2467272373539; dx=1.5859298382751288E-7 evalInputDelta=-7.008276584487277
New Minimum: -77.25500382184117 > -79.2042422533625
WOLF (strong): th(3.9090063015938506E7)=-79.2042422533625; dx=2.097836783338533E-7 evalInputDelta=1.949238431521323
New Minimum: -79.2042422533625 > -83.14097194794786
END: th(1.3030021005312836E7)=-83.14097194794786; dx=-1.3442725078206292E-7 evalInputDelta=5.88596812610669
Fitness changed from -77.25500382184117 to -83.14097194794786
Iteration 7 complete. Error: -83.14097194794786 Total: 12.5476; Orientation: 0.9945; Line Search: 9.1091
Adding measurement 4da20214 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.283e+04, gradient 6.055e-04, dot -0.523; [3d4b7e83-6920-4d01-b6c0-c54e681c6a01 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -83.14097194794786, -52.74869611624798, -50.61604121645304, -50.61603776095022
LBFGS Accumulation History: 3 points
Removed measurement 4da20214 to history. Total: 3
th(0)=-83.14097194794786;dx=-3.6562793001852486E-7
New Minimum: -83.14097194794786 > -87.73876844030362
END: th(2.8072329265690096E7)=-87.73876844030362; dx=-2.2778525658829303E-8 evalInputDelta=4.597796492355755
Fitness changed from -83.14097194794786 to -87.73876844030362
Iteration 8 complete. Error: -87.73876844030362 Total: 7.9605; Orientation: 1.2292; Line Search: 4.5142
Adding measurement 79c0e16a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.477e+04, gradient 7.662e-04, dot -0.344; [3d4b7e83-6920-4d01-b6c0-c54e681c6a01 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -87.73876844030362, -52.74869611624798, -50.61604121645304, -50.61603776095022
LBFGS Accumulation History: 3 points
Removed measurement 79c0e16a to history. Total: 3
th(0)=-87.73876844030362;dx=-5.866064212537515E-7
Armijo: th(6.048000000000002E7)=-82.14258527046304; dx=1.8611411835617516E-7 evalInputDelta=-5.596183169840572
New Minimum: -87.73876844030362 > -89.76260046210791
WOLF (strong): th(3.024000000000001E7)=-89.76260046210791; dx=2.0164918560792308E-7 evalInputDelta=2.0238320218042958
New Minimum: -89.76260046210791 > -91.85873119049705
END: th(1.0080000000000004E7)=-91.85873119049705; dx=-1.7958157066381472E-7 evalInputDelta=4.119962750193437
Fitness changed from -87.73876844030362 to -91.85873119049705
Iteration 9 complete. Error: -91.85873119049705 Total: 12.3503; Orientation: 1.0942; Line Search: 9.0506
Adding measurement 15464cb8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.702e+04, gradient 4.939e-04, dot -0.608; [3d4b7e83-6920-4d01-b6c0-c54e681c6a01 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -91.85873119049705, -52.74869611624798, -50.61604121645304, -50.61603776095022
LBFGS Accumulation History: 3 points
Removed measurement 15464cb8 to history. Total: 3
th(0)=-91.85873119049705;dx=-2.434067918282229E-7
New Minimum: -91.85873119049705 > -95.61094848601586
END: th(2.1716701675521396E7)=-95.61094848601586; dx=-1.169590528328807E-7 evalInputDelta=3.752217295518804
Fitness changed from -91.85873119049705 to -95.61094848601586
Iteration 10 complete. Error: -95.61094848601586 Total: 7.6514; Orientation: 1.0176; Line Search: 4.5196
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f4d27a1c-c503-4ea5-bef8-754d07a8aa69.jpg)
Final threshold in iteration 11: -95.61094848601586 (> -Infinity) after 111.714s (< 5400.000s)
Returns
-95.61094848601586