BasicOptimizer.scala:89 executed in 131.99 seconds (2.193 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: 35971502449500
Reset training subject: 35974136157700
Adding measurement 7995a72f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-80.52310791235527;dx=-4.987609486446374E-6
New Minimum: -80.52310791235527 > -80.52312066107959
END: th(2.154434690031884)=-80.52312066107959; dx=-3.2798598722568456E-6 evalInputDelta=1.274872431622498E-5
Fitness changed from -80.52310791235527 to -80.52312066107959
Iteration 1 complete. Error: -80.52312066107959 Total: 13.1101; Orientation: 0.0611; Line Search: 5.3497
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/bfc6fb17-64b9-4a8e-b52c-72d44cfb1e02.jpg)
Adding measurement 6d77fad7 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-80.52312066107959;dx=-3.252507070885309E-6
New Minimum: -80.52312066107959 > -80.52313340980189
WOLFE (weak): th(4.641588833612779)=-80.52313340980189; dx=-3.250722189985868E-6 evalInputDelta=1.274872229828361E-5
New Minimum: -80.52313340980189 > -80.52315040809513
WOLFE (weak): th(9.283177667225559)=-80.52315040809513; dx=-3.2495716106051927E-6 evalInputDelta=2.9747015545922295E-5
New Minimum: -80.52315040809513 > -80.52322265080142
WOLFE (weak): th(27.849533001676676)=-80.52322265080142; dx=-3.247533592018702E-6 evalInputDelta=1.0198972182706711E-4
New Minimum: -80.52322265080142 > -80.52353286874464
WOLFE (weak): th(111.3981320067067)=-80.52353286874464; dx=-3.244332571296818E-6 evalInputDelta=4.122076650503459E-4
New Minimum: -80.52353286874464 > -80.52518167830397
WOLFE (weak): th(556.9906600335335)=-80.52518167830397; dx=-3.2447403086155445E-6 evalInputDelta=0.0020610172243777924
New Minimum: -80.52518167830397 > -80.53548597326058
WOLFE (weak): th(3341.9439602012008)=-80.53548597326058; dx=-3.2445687934041923E-6 evalInputDelta=0.012365312180989463
New Minimum: -80.53548597326058 > -80.60960829830482
WOLFE (weak): th(23393.607721408407)=-80.60960829830482; dx=-3.2392996602308433E-6 evalInputDelta=0.08648763722523256
New Minimum: -80.60960829830482 > -81.20951862148078
WOLFE (weak): th(187148.86177126726)=-81.20951862148078; dx=-3.1849750920770146E-6 evalInputDelta=0.6863979604011945
New Minimum: -81.20951862148078 > -86.16455711908894
END: th(1684339.7559414054)=-86.16455711908894; dx=-2.5881582180873154E-6 evalInputDelta=5.641436458009352
Fitness changed from -80.52312066107959 to -86.16455711908894
Iteration 2 complete. Error: -86.16455711908894 Total: 28.6156; Orientation: 0.0611; Line Search: 25.6045
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/5c5ced94-70ea-4b50-bfc7-0af0a514a9d7.jpg)
Adding measurement 39dc6249 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-86.16455711908894;dx=-2.5085958524050293E-6
New Minimum: -86.16455711908894 > -94.2210786992319
END: th(3628800.0000000005)=-94.2210786992319; dx=-1.483446635330402E-6 evalInputDelta=8.056521580142956
Fitness changed from -86.16455711908894 to -94.2210786992319
Iteration 3 complete. Error: -94.2210786992319 Total: 8.3748; Orientation: 0.0603; Line Search: 5.2187
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/718b1e8e-7247-4524-8867-003cb5432356.jpg)
Adding measurement 3987ba61 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.107e+04, gradient 1.242e-03, dot -0.724; [da9cdd09-cc61-42a6-8dcd-f45a9c2095cf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -94.2210786992319, -86.16455711908894, -80.52312066107959, -80.52310791235527
LBFGS Accumulation History: 3 points
Removed measurement 3987ba61 to history. Total: 3
th(0)=-94.2210786992319;dx=-1.540601627736387E-6
New Minimum: -94.2210786992319 > -103.86758440985196
END: th(7818012.603187701)=-103.86758440985196; dx=-6.859768658327072E-7 evalInputDelta=9.646505710620062
Fitness changed from -94.2210786992319 to -103.86758440985196
Iteration 4 complete. Error: -103.86758440985196 Total: 9.4087; Orientation: 1.0608; Line Search: 5.3185
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/1a07ef81-7367-44e8-8080-2894c1a9c8ab.jpg)
Adding measurement 18c104ba to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.254e+04, gradient 1.176e-03, dot -0.499; [da9cdd09-cc61-42a6-8dcd-f45a9c2095cf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -103.86758440985196, -86.16455711908894, -80.52312066107959, -80.52310791235527
LBFGS Accumulation History: 3 points
Removed measurement 18c104ba to history. Total: 3
th(0)=-103.86758440985196;dx=-1.3785533249280943E-6
New Minimum: -103.86758440985196 > -107.9829170369636
WOLF (strong): th(1.6843397559414055E7)=-107.9829170369636; dx=2.726550324479605E-7 evalInputDelta=4.115332627111641
New Minimum: -107.9829170369636 > -109.42232379721897
END: th(8421698.779707028)=-109.42232379721897; dx=-7.309456498712686E-8 evalInputDelta=5.5547393873670075
Fitness changed from -103.86758440985196 to -109.42232379721897
Iteration 5 complete. Error: -109.42232379721897 Total: 12.2714; Orientation: 1.1584; Line Search: 7.9004
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/c2c21eab-f01a-420c-b995-c2af4464f25a.jpg)
Adding measurement 41bdab85 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.229e+04, gradient 1.383e-03, dot -0.341; [da9cdd09-cc61-42a6-8dcd-f45a9c2095cf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -109.42232379721897, -86.16455711908894, -80.52312066107959, -80.52310791235527
LBFGS Accumulation History: 3 points
Removed measurement 41bdab85 to history. Total: 3
th(0)=-109.42232379721897;dx=-1.91114384943691E-6
Armijo: th(1.8144000000000004E7)=-103.76143164959969; dx=8.589418551896452E-7 evalInputDelta=-5.660892147619279
New Minimum: -109.42232379721897 > -112.92761434394214
WOLF (strong): th(9072000.000000002)=-112.92761434394214; dx=7.151659353160345E-7 evalInputDelta=3.505290546723174
New Minimum: -112.92761434394214 > -114.16639828742336
END: th(3024000.0000000005)=-114.16639828742336; dx=-8.046257552490815E-7 evalInputDelta=4.744074490204397
Fitness changed from -109.42232379721897 to -114.16639828742336
Iteration 6 complete. Error: -114.16639828742336 Total: 14.1099; Orientation: 1.0165; Line Search: 10.1216
Adding measurement 4cccb72b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.135e+04, gradient 9.022e-04, dot -0.664; [da9cdd09-cc61-42a6-8dcd-f45a9c2095cf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -114.16639828742336, -86.16455711908894, -80.52312066107959, -80.52310791235527
LBFGS Accumulation History: 3 points
Removed measurement 4cccb72b to history. Total: 3
th(0)=-114.16639828742336;dx=-8.119410682770511E-7
New Minimum: -114.16639828742336 > -118.59016923830703
END: th(6515010.502656418)=-118.59016923830703; dx=-4.339850197444066E-7 evalInputDelta=4.4237709508836645
Fitness changed from -114.16639828742336 to -118.59016923830703
Iteration 7 complete. Error: -118.59016923830703 Total: 8.7870; Orientation: 1.0187; Line Search: 5.0803
Adding measurement 780501bf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.486e+04, gradient 9.250e-04, dot -0.595; [da9cdd09-cc61-42a6-8dcd-f45a9c2095cf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -118.59016923830703, -86.16455711908894, -80.52312066107959, -80.52310791235527
LBFGS Accumulation History: 3 points
Removed measurement 780501bf to history. Total: 3
th(0)=-118.59016923830703;dx=-8.548818199652538E-7
New Minimum: -118.59016923830703 > -122.47463112157082
WOLF (strong): th(1.4036164632845048E7)=-122.47463112157082; dx=5.5457061396174926E-8 evalInputDelta=3.8844618832637963
END: th(7018082.316422524)=-122.22246826504451; dx=-1.8688290162786643E-7 evalInputDelta=3.632299026737485
Fitness changed from -118.59016923830703 to -122.47463112157082
Iteration 8 complete. Error: -122.47463112157082 Total: 11.2645; Orientation: 1.0227; Line Search: 7.7860
Adding measurement 2f47a3c4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.741e+04, gradient 1.398e-03, dot -0.246; [da9cdd09-cc61-42a6-8dcd-f45a9c2095cf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -122.47463112157082, -86.16455711908894, -80.52312066107959, -80.52310791235527
LBFGS Accumulation History: 3 points
Removed measurement 2f47a3c4 to history. Total: 3
th(0)=-122.47463112157082;dx=-1.9522699989109972E-6
Armijo: th(1.5120000000000006E7)=-118.1231009401199; dx=1.255665859082899E-6 evalInputDelta=-4.351530181450926
New Minimum: -122.47463112157082 > -127.88839576364339
WOLF (strong): th(7560000.000000003)=-127.88839576364339; dx=6.424006436383531E-7 evalInputDelta=5.4137646420725645
END: th(2520000.000000001)=-126.94414456178113; dx=-1.1556101385634808E-6 evalInputDelta=4.4695134402103065
Fitness changed from -122.47463112157082 to -127.88839576364339
Iteration 9 complete. Error: -127.88839576364339 Total: 14.0121; Orientation: 0.9957; Line Search: 10.3565
Adding measurement 3206709 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.375e+04, gradient 1.289e-03, dot -0.288; [da9cdd09-cc61-42a6-8dcd-f45a9c2095cf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -127.88839576364339, -86.16455711908894, -80.52312066107959, -80.52310791235527
LBFGS Accumulation History: 3 points
Removed measurement 3206709 to history. Total: 3
th(0)=-127.88839576364339;dx=-1.661509545243034E-6
New Minimum: -127.88839576364339 > -132.32215422494656
WOLF (strong): th(5429175.418880349)=-132.32215422494656; dx=2.423421086132578E-7 evalInputDelta=4.433758461303171
END: th(2714587.7094401745)=-131.67230294084808; dx=-7.445465401548822E-7 evalInputDelta=3.7839071772046964
Fitness changed from -127.88839576364339 to -132.32215422494656
Iteration 10 complete. Error: -132.32215422494656 Total: 11.5776; Orientation: 0.9954; Line Search: 7.6029
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/fd333dbc-9aec-48c1-ae3a-4233f7a99b9f.jpg)
Final threshold in iteration 11: -132.32215422494656 (> -Infinity) after 131.993s (< 5400.000s)
Returns
-132.32215422494656