BasicOptimizer.scala:89 executed in 307.35 seconds (5.478 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: 642945797661500
Reset training subject: 642951723499900
Adding measurement 40633739 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-20.408003326403772;dx=-1.8885051642808792E-6
New Minimum: -20.408003326403772 > -20.408006102051782
WOLFE (weak): th(2.154434690031884)=-20.408006102051782; dx=-1.7916170727329698E-6 evalInputDelta=2.77564801010044E-6
New Minimum: -20.408006102051782 > -20.408011653346662
WOLFE (weak): th(4.308869380063768)=-20.408011653346662; dx=-1.7926160544675056E-6 evalInputDelta=8.326942889880229E-6
New Minimum: -20.408011653346662 > -20.408029232437165
WOLFE (weak): th(12.926608140191302)=-20.408029232437165; dx=-1.792215503377899E-6 evalInputDelta=2.590603339314157E-5
New Minimum: -20.408029232437165 > -20.40810602512864
WOLFE (weak): th(51.70643256076521)=-20.40810602512864; dx=-1.7925378297730778E-6 evalInputDelta=1.0269872486645681E-4
New Minimum: -20.40810602512864 > -20.40851959043832
WOLFE (weak): th(258.53216280382605)=-20.40851959043832; dx=-1.7925585738960867E-6 evalInputDelta=5.162640345481861E-4
New Minimum: -20.40851959043832 > -20.411098864589352
WOLFE (weak): th(1551.1929768229563)=-20.411098864589352; dx=-1.7924781425438111E-6 evalInputDelta=0.003095538185579727
New Minimum: -20.411098864589352 > -20.429670561951472
WOLFE (weak): th(10858.350837760694)=-20.429670561951472; dx=-1.7918975456140005E-6 evalInputDelta=0.021667235547699448
New Minimum: -20.429670561951472 > -20.581180496124343
WOLFE (weak): th(86866.80670208555)=-20.581180496124343; dx=-1.7891444346364258E-6 evalInputDelta=0.17317716972057084
New Minimum: -20.581180496124343 > -21.94490410638283
WOLFE (weak): th(781801.26031877)=-21.94490410638283; dx=-1.7292574354322184E-6 evalInputDelta=1.5369007799790566
New Minimum: -21.94490410638283 > -30.46809276208515
END: th(7818012.6031877)=-30.46809276208515; dx=-4.3031433037589054E-7 evalInputDelta=10.060089435681377
Fitness changed from -20.408003326403772 to -30.46809276208515
Iteration 1 complete. Error: -30.46809276208515 Total: 82.0281; Orientation: 0.1397; Line Search: 64.5389
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/3285727c-6b62-4202-8b0d-473a59376f17.jpg)
Adding measurement caa8a46 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-30.46809276208515;dx=-1.2232651477227958E-6
New Minimum: -30.46809276208515 > -36.90176565933414
WOLF (strong): th(1.684339755941405E7)=-36.90176565933414; dx=6.54492328611066E-8 evalInputDelta=6.433672897248989
END: th(8421698.779707026)=-36.696853100267276; dx=-2.0844330227213402E-7 evalInputDelta=6.228760338182127
Fitness changed from -30.46809276208515 to -36.90176565933414
Iteration 2 complete. Error: -36.90176565933414 Total: 23.7630; Orientation: 0.1244; Line Search: 17.1986
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/e06af60c-ce98-49a4-92b3-6d80a2edf602.jpg)
Adding measurement 73d58cab to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-36.90176565933414;dx=-1.4161985189889156E-6
New Minimum: -36.90176565933414 > -44.03871955560483
WOLF (strong): th(1.8144E7)=-44.03871955560483; dx=3.2790538737684456E-7 evalInputDelta=7.13695389627069
New Minimum: -44.03871955560483 > -45.59189897149893
END: th(9072000.0)=-45.59189897149893; dx=-2.24139676599953E-7 evalInputDelta=8.69013331216479
Fitness changed from -36.90176565933414 to -45.59189897149893
Iteration 3 complete. Error: -45.59189897149893 Total: 24.3299; Orientation: 0.1262; Line Search: 17.3330
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/afee029e-ef02-4d8b-87a6-29eb2470ad29.jpg)
Adding measurement 6bfea0eb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.983e+04, gradient 9.198e-04, dot -0.604; [25782cf4-6843-4b31-a73c-6a87e451827e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -45.59189897149893, -36.90176565933414, -30.46809276208515, -20.408003326403772
LBFGS Accumulation History: 3 points
Removed measurement 6bfea0eb to history. Total: 3
th(0)=-45.59189897149893;dx=-8.459212890729208E-7
New Minimum: -45.59189897149893 > -50.35322002707671
WOLF (strong): th(1.954503150796925E7)=-50.35322002707671; dx=1.08162591768037E-7 evalInputDelta=4.761321055577781
New Minimum: -50.35322002707671 > -50.689784680687424
END: th(9772515.753984625)=-50.689784680687424; dx=-1.4235639417831458E-7 evalInputDelta=5.097885709188496
Fitness changed from -45.59189897149893 to -50.689784680687424
Iteration 4 complete. Error: -50.689784680687424 Total: 27.1989; Orientation: 2.5270; Line Search: 17.9323
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/27711c79-4301-4b9c-b2a9-d9db59b00bf4.jpg)
Adding measurement 73ed4a94 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.847e+04, gradient 8.849e-04, dot -0.609; [25782cf4-6843-4b31-a73c-6a87e451827e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -50.689784680687424, -36.90176565933414, -30.46809276208515, -20.408003326403772
LBFGS Accumulation History: 3 points
Removed measurement 73ed4a94 to history. Total: 3
th(0)=-50.689784680687424;dx=-7.822279293622149E-7
New Minimum: -50.689784680687424 > -54.05479268796417
WOLF (strong): th(2.1054246949267566E7)=-54.05479268796417; dx=1.182310310659182E-7 evalInputDelta=3.3650080072767423
New Minimum: -54.05479268796417 > -55.027739447434705
END: th(1.0527123474633783E7)=-55.027739447434705; dx=-4.3142518346297426E-8 evalInputDelta=4.337954766747281
Fitness changed from -50.689784680687424 to -55.027739447434705
Iteration 5 complete. Error: -55.027739447434705 Total: 26.9460; Orientation: 2.4368; Line Search: 17.7465
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/45c65267-fbeb-4cdc-8a34-b4068f49b77a.jpg)
Adding measurement 1e5f47f6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.482e+04, gradient 9.048e-04, dot -0.578; [25782cf4-6843-4b31-a73c-6a87e451827e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -55.027739447434705, -36.90176565933414, -30.46809276208515, -20.408003326403772
LBFGS Accumulation History: 3 points
Removed measurement 1e5f47f6 to history. Total: 3
th(0)=-55.027739447434705;dx=-8.180431189989855E-7
New Minimum: -55.027739447434705 > -56.96062061945189
WOLF (strong): th(2.2680000000000004E7)=-56.96062061945189; dx=1.9582129551557165E-7 evalInputDelta=1.9328811720171828
New Minimum: -56.96062061945189 > -59.23812841852394
WOLF (strong): th(1.1340000000000002E7)=-59.23812841852394; dx=5.7750115771840024E-8 evalInputDelta=4.2103889710892375
END: th(3780000.0000000005)=-57.83343189800161; dx=-5.035547895873152E-7 evalInputDelta=2.8056924505669087
Fitness changed from -55.027739447434705 to -59.23812841852394
Iteration 6 complete. Error: -59.23812841852394 Total: 32.3975; Orientation: 2.4421; Line Search: 23.4188
Adding measurement 7f8682f9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.955e+04, gradient 9.265e-04, dot -0.530; [25782cf4-6843-4b31-a73c-6a87e451827e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.23812841852394, -36.90176565933414, -30.46809276208515, -20.408003326403772
LBFGS Accumulation History: 3 points
Removed measurement 7f8682f9 to history. Total: 3
th(0)=-59.23812841852394;dx=-8.577136984846462E-7
New Minimum: -59.23812841852394 > -63.6735092466085
END: th(8143763.128320522)=-63.6735092466085; dx=-1.0271399904295857E-7 evalInputDelta=4.435380828084561
Fitness changed from -59.23812841852394 to -63.6735092466085
Iteration 7 complete. Error: -63.6735092466085 Total: 19.1218; Orientation: 2.4292; Line Search: 11.2518
Adding measurement cabce30 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.822e+04, gradient 7.091e-04, dot -0.670; [25782cf4-6843-4b31-a73c-6a87e451827e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -63.6735092466085, -36.90176565933414, -30.46809276208515, -20.408003326403772
LBFGS Accumulation History: 3 points
Removed measurement cabce30 to history. Total: 3
th(0)=-63.6735092466085;dx=-5.016086667667108E-7
New Minimum: -63.6735092466085 > -67.76984775854427
END: th(1.754520579105631E7)=-67.76984775854427; dx=-3.259422804513301E-8 evalInputDelta=4.09633851193577
Fitness changed from -63.6735092466085 to -67.76984775854427
Iteration 8 complete. Error: -67.76984775854427 Total: 19.1491; Orientation: 2.4289; Line Search: 11.0571
Adding measurement 17078ef8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.038e+05, gradient 9.233e-04, dot -0.477; [25782cf4-6843-4b31-a73c-6a87e451827e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -67.76984775854427, -36.90176565933414, -30.46809276208515, -20.408003326403772
LBFGS Accumulation History: 3 points
Removed measurement 17078ef8 to history. Total: 3
th(0)=-67.76984775854427;dx=-8.520946852963741E-7
Armijo: th(3.7800000000000015E7)=-64.09922154941437; dx=2.464616692886905E-7 evalInputDelta=-3.6706262091299067
New Minimum: -67.76984775854427 > -70.65636511752652
WOLF (strong): th(1.8900000000000007E7)=-70.65636511752652; dx=2.899497967158234E-7 evalInputDelta=2.886517358982246
New Minimum: -70.65636511752652 > -72.08390050841534
END: th(6300000.000000003)=-72.08390050841534; dx=-3.3592653924528873E-7 evalInputDelta=4.314052749871067
Fitness changed from -67.76984775854427 to -72.08390050841534
Iteration 9 complete. Error: -72.08390050841534 Total: 31.5226; Orientation: 2.4129; Line Search: 23.4283
Adding measurement 7fc190cd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.134e+05, gradient 5.859e-04, dot -0.722; [25782cf4-6843-4b31-a73c-6a87e451827e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -72.08390050841534, -36.90176565933414, -30.46809276208515, -20.408003326403772
LBFGS Accumulation History: 3 points
Removed measurement 7fc190cd to history. Total: 3
th(0)=-72.08390050841534;dx=-3.4276951100374226E-7
New Minimum: -72.08390050841534 > -76.00789172734723
END: th(1.3572938547200873E7)=-76.00789172734723; dx=-2.0616563493149917E-7 evalInputDelta=3.9239912189318886
Fitness changed from -72.08390050841534 to -76.00789172734723
Iteration 10 complete. Error: -76.00789172734723 Total: 19.8570; Orientation: 2.3879; Line Search: 11.8874
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/9a9f5d87-6d27-4590-920e-38940b555582.jpg)
Final threshold in iteration 11: -76.00789172734723 (> -Infinity) after 307.351s (< 5400.000s)
Returns
-76.00789172734723