Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Iteration 15 Iteration 15

BasicOptimizer.scala:89 executed in 43.13 seconds (1.056 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
Logging
Reset training subject: 215231091702700
Reset training subject: 215231704522300
Adding measurement 3073bf47 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-8.635377307531174;dx=-2.2052042204583E-4
New Minimum: -8.635377307531174 > -8.635726668636496
WOLFE (weak): th(2.154434690031884)=-8.635726668636496; dx=-2.2009605791284336E-4 evalInputDelta=3.4936110532157727E-4
New Minimum: -8.635726668636496 > -8.636075131573966
WOLFE (weak): th(4.308869380063768)=-8.636075131573966; dx=-2.207290351589044E-4 evalInputDelta=6.978240427919502E-4
New Minimum: -8.636075131573966 > -8.63747059708744
WOLFE (weak): th(12.926608140191302)=-8.63747059708744; dx=-2.2027609005688064E-4 evalInputDelta=0.002093289556265532
New Minimum: -8.63747059708744 > -8.643733950393408
WOLFE (weak): th(51.70643256076521)=-8.643733950393408; dx=-2.20780250340324E-4 evalInputDelta=0.008356642862233699
New Minimum: -8.643733950393408 > -8.677060123796535
WOLFE (weak): th(258.53216280382605)=-8.677060123796535; dx=-2.2021448807339983E-4 evalInputDelta=0.041682816265360856
New Minimum: -8.677060123796535 > -8.883562940982019
WOLFE (weak): th(1551.1929768229563)=-8.883562940982019; dx=-2.1745168237068596E-4 evalInputDelta=0.248185633450845
New Minimum: -8.883562940982019 > -10.267164658594398
END: th(10858.350837760694)=-10.267164658594398; dx=-1.8085269533622895E-4 evalInputDelta=1.631787351063224
Fitness changed from -8.635377307531174 to -10.267164658594398
Iteration 1 complete. Error: -10.267164658594398 Total: 6.7996; Orientation: 0.0154; Line Search: 5.0407
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/f4dea3d9-cacb-45d0-be61-5ab34d05646e.jpg)
Adding measurement 1d51d837 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-10.267164658594398;dx=-2.156904872130339E-4
New Minimum: -10.267164658594398 > -13.210069529892884
END: th(23393.607721408407)=-13.210069529892884; dx=-1.4278573421917757E-4 evalInputDelta=2.942904871298486
Fitness changed from -10.267164658594398 to -13.210069529892884
Iteration 2 complete. Error: -13.210069529892884 Total: 1.7941; Orientation: 0.0160; Line Search: 1.1882
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/2933d257-479f-450b-a13f-f98c4956e04b.jpg)
Adding measurement 3e36afd to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-13.210069529892884;dx=-1.96663226005464E-4
New Minimum: -13.210069529892884 > -17.31078000536119
END: th(50400.00000000001)=-17.31078000536119; dx=-8.461177886943003E-5 evalInputDelta=4.100710475468308
Fitness changed from -13.210069529892884 to -17.31078000536119
Iteration 3 complete. Error: -17.31078000536119 Total: 1.8186; Orientation: 0.0169; Line Search: 1.2478
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/b115e02c-0260-4286-8f7a-b9ecaf9db137.jpg)
Adding measurement 3a927220 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.192e+03, gradient 1.472e-02, dot -0.380; [8f6f7206-2027-43e9-a1cc-7004ebc2e88f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -17.31078000536119, -13.210069529892884, -10.267164658594398, -8.635377307531174
LBFGS Accumulation History: 3 points
Removed measurement 3a927220 to history. Total: 3
th(0)=-17.31078000536119;dx=-2.1614949860487175E-4
New Minimum: -17.31078000536119 > -19.787502040968768
END: th(108583.50837760697)=-19.787502040968768; dx=-3.073909277182879E-5 evalInputDelta=2.476722035607576
Fitness changed from -17.31078000536119 to -19.787502040968768
Iteration 4 complete. Error: -19.787502040968768 Total: 2.0921; Orientation: 0.2956; Line Search: 1.1901
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/28485ec5-6ac8-4902-8334-4152365c3c7b.jpg)
Adding measurement 66e94d7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.011e+03, gradient 1.625e-02, dot -0.195; [8f6f7206-2027-43e9-a1cc-7004ebc2e88f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -19.787502040968768, -13.210069529892884, -10.267164658594398, -8.635377307531174
LBFGS Accumulation History: 3 points
Removed measurement 66e94d7 to history. Total: 3
th(0)=-19.787502040968768;dx=-2.6333679936375897E-4
Armijo: th(233936.07721408413)=-16.434963657453693; dx=-1.5482508282315246E-7 evalInputDelta=-3.352538383515075
New Minimum: -19.787502040968768 > -22.703906710678
END: th(116968.03860704206)=-22.703906710678; dx=-3.111216568642348E-5 evalInputDelta=2.916404669709234
Fitness changed from -19.787502040968768 to -22.703906710678
Iteration 5 complete. Error: -22.703906710678 Total: 2.7001; Orientation: 0.2928; Line Search: 1.8046
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/7f7718d8-2a49-412a-bcdb-accea09eeabe.jpg)
Adding measurement bf16085 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.662e+03, gradient 1.544e-02, dot -0.193; [8f6f7206-2027-43e9-a1cc-7004ebc2e88f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -22.703906710678, -13.210069529892884, -10.267164658594398, -8.635377307531174
LBFGS Accumulation History: 3 points
Removed measurement bf16085 to history. Total: 3
th(0)=-22.703906710678;dx=-2.3789455657448092E-4
Armijo: th(252000.0000000001)=-17.531498662494705; dx=-7.053598245609719E-6 evalInputDelta=-5.172408048183296
New Minimum: -22.703906710678 > -24.957069064578423
END: th(126000.00000000004)=-24.957069064578423; dx=-4.679764923821693E-5 evalInputDelta=2.2531623539004215
Fitness changed from -22.703906710678 to -24.957069064578423
Iteration 6 complete. Error: -24.957069064578423 Total: 2.9418; Orientation: 0.2966; Line Search: 2.0588
Adding measurement e145e50 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.237e+03, gradient 1.616e-02, dot -0.169; [8f6f7206-2027-43e9-a1cc-7004ebc2e88f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -24.957069064578423, -13.210069529892884, -10.267164658594398, -8.635377307531174
LBFGS Accumulation History: 3 points
Removed measurement e145e50 to history. Total: 3
th(0)=-24.957069064578423;dx=-2.602594796840415E-4
Armijo: th(271458.77094401745)=-18.42897937745219; dx=-6.348462091165979E-6 evalInputDelta=-6.528089687126233
New Minimum: -24.957069064578423 > -26.21438485820575
END: th(135729.38547200873)=-26.21438485820575; dx=-4.311030088558919E-5 evalInputDelta=1.2573157936273276
Fitness changed from -24.957069064578423 to -26.21438485820575
Iteration 7 complete. Error: -26.21438485820575 Total: 2.6083; Orientation: 0.2825; Line Search: 1.7617
Adding measurement 4f5ce440 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.387e+03, gradient 1.535e-02, dot -0.156; [8f6f7206-2027-43e9-a1cc-7004ebc2e88f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -26.21438485820575, -13.210069529892884, -10.267164658594398, -8.635377307531174
LBFGS Accumulation History: 3 points
Removed measurement 4f5ce440 to history. Total: 3
th(0)=-26.21438485820575;dx=-2.349557309209232E-4
Armijo: th(292420.0965176052)=-19.857626486540294; dx=-3.1468285867319663E-6 evalInputDelta=-6.356758371665457
New Minimum: -26.21438485820575 > -29.252837201067287
END: th(146210.0482588026)=-29.252837201067287; dx=-5.171889437850498E-5 evalInputDelta=3.038452342861536
Fitness changed from -26.21438485820575 to -29.252837201067287
Iteration 8 complete. Error: -29.252837201067287 Total: 2.6119; Orientation: 0.2922; Line Search: 1.7715
Adding measurement 420a1e78 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.334e+03, gradient 1.515e-02, dot -0.155; [8f6f7206-2027-43e9-a1cc-7004ebc2e88f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -29.252837201067287, -13.210069529892884, -10.267164658594398, -8.635377307531174
LBFGS Accumulation History: 3 points
Removed measurement 420a1e78 to history. Total: 3
th(0)=-29.252837201067287;dx=-2.2917608706697555E-4
Armijo: th(315000.0000000001)=-21.251979609354823; dx=-6.2977197829274586E-6 evalInputDelta=-8.000857591712464
New Minimum: -29.252837201067287 > -31.875845269384428
END: th(157500.00000000006)=-31.875845269384428; dx=-4.969074262961975E-5 evalInputDelta=2.623008068317141
Fitness changed from -29.252837201067287 to -31.875845269384428
Iteration 9 complete. Error: -31.875845269384428 Total: 2.6203; Orientation: 0.2994; Line Search: 1.7715
Adding measurement 250f653 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.198e+03, gradient 1.489e-02, dot -0.150; [8f6f7206-2027-43e9-a1cc-7004ebc2e88f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -31.875845269384428, -13.210069529892884, -10.267164658594398, -8.635377307531174
LBFGS Accumulation History: 3 points
Removed measurement 250f653 to history. Total: 3
th(0)=-31.875845269384428;dx=-2.2124164876216243E-4
Armijo: th(339323.4636800218)=-22.768970305040604; dx=-5.309791225580728E-6 evalInputDelta=-9.106874964343824
New Minimum: -31.875845269384428 > -34.54500230485617
END: th(169661.7318400109)=-34.54500230485617; dx=-4.6203611514805215E-5 evalInputDelta=2.6691570354717413
Fitness changed from -31.875845269384428 to -34.54500230485617
Iteration 10 complete. Error: -34.54500230485617 Total: 2.9412; Orientation: 0.2914; Line Search: 2.0782
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/d6b9230d-80bf-4968-8a37-4e2958a509a3.jpg)
Adding measurement 36a179b7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.342e+03, gradient 1.467e-02, dot -0.146; [8f6f7206-2027-43e9-a1cc-7004ebc2e88f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -34.54500230485617, -13.210069529892884, -10.267164658594398, -8.635377307531174
LBFGS Accumulation History: 3 points
Removed measurement 36a179b7 to history. Total: 3
th(0)=-34.54500230485617;dx=-2.1464590379665326E-4
Armijo: th(365525.1206470065)=-24.74677495888926; dx=-3.303613019180939E-6 evalInputDelta=-9.798227345966907
New Minimum: -34.54500230485617 > -37.4028664329313
END: th(182762.56032350325)=-37.4028664329313; dx=-4.8528579930364785E-5 evalInputDelta=2.8578641280751285
Fitness changed from -34.54500230485617 to -37.4028664329313
Iteration 11 complete. Error: -37.4028664329313 Total: 2.7424; Orientation: 0.2769; Line Search: 1.8867
Adding measurement 27367396 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.019e+04, gradient 1.431e-02, dot -0.144; [8f6f7206-2027-43e9-a1cc-7004ebc2e88f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -37.4028664329313, -13.210069529892884, -10.267164658594398, -8.635377307531174
LBFGS Accumulation History: 3 points
Removed measurement 27367396 to history. Total: 3
th(0)=-37.4028664329313;dx=-2.0446981884556135E-4
Armijo: th(393750.0000000002)=-25.68752957367208; dx=-7.009349281114111E-7 evalInputDelta=-11.715336859259217
New Minimum: -37.4028664329313 > -39.32615459320635
END: th(196875.0000000001)=-39.32615459320635; dx=-3.974538403989431E-5 evalInputDelta=1.9232881602750496
Fitness changed from -37.4028664329313 to -39.32615459320635
Iteration 12 complete. Error: -39.32615459320635 Total: 2.6665; Orientation: 0.2921; Line Search: 1.8371
Adding measurement 5bda8832 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.067e+04, gradient 1.364e-02, dot -0.141; [8f6f7206-2027-43e9-a1cc-7004ebc2e88f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -39.32615459320635, -13.210069529892884, -10.267164658594398, -8.635377307531174
LBFGS Accumulation History: 3 points
Removed measurement 5bda8832 to history. Total: 3
th(0)=-39.32615459320635;dx=-1.8537475131182973E-4
Armijo: th(424154.3296000273)=-28.259235020706754; dx=-1.131259744653036E-6 evalInputDelta=-11.066919572499593
New Minimum: -39.32615459320635 > -42.31808050562925
END: th(212077.16480001365)=-42.31808050562925; dx=-4.147298399067409E-5 evalInputDelta=2.9919259124229
Fitness changed from -39.32615459320635 to -42.31808050562925
Iteration 13 complete. Error: -42.31808050562925 Total: 2.6728; Orientation: 0.3113; Line Search: 1.8150
Adding measurement 5b37211a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.546e+04, gradient 1.316e-02, dot -0.155; [8f6f7206-2027-43e9-a1cc-7004ebc2e88f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -42.31808050562925, -13.210069529892884, -10.267164658594398, -8.635377307531174
LBFGS Accumulation History: 3 points
Removed measurement 5b37211a to history. Total: 3
th(0)=-42.31808050562925;dx=-1.7286687682602962E-4
Armijo: th(456906.40080875816)=-29.915508092380243; dx=2.9250412868299E-6 evalInputDelta=-12.402572413249004
New Minimum: -42.31808050562925 > -45.050579619361805
END: th(228453.20040437908)=-45.050579619361805; dx=-3.2272691409689354E-5 evalInputDelta=2.7324991137325583
Fitness changed from -42.31808050562925 to -45.050579619361805
Iteration 14 complete. Error: -45.050579619361805 Total: 3.4753; Orientation: 0.3563; Line Search: 2.4918
Adding measurement 73e7cba6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.651e+04, gradient 1.311e-02, dot -0.149; [8f6f7206-2027-43e9-a1cc-7004ebc2e88f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -45.050579619361805, -13.210069529892884, -10.267164658594398, -8.635377307531174
LBFGS Accumulation History: 3 points
Removed measurement 73e7cba6 to history. Total: 3
th(0)=-45.050579619361805;dx=-1.7176533685890453E-4
Armijo: th(492187.5000000003)=-30.979925288650755; dx=7.23339312949864E-6 evalInputDelta=-14.07065433071105
New Minimum: -45.050579619361805 > -47.62565209080886
END: th(246093.75000000015)=-47.62565209080886; dx=-2.445921058038672E-5 evalInputDelta=2.575072471447058
Fitness changed from -45.050579619361805 to -47.62565209080886
Iteration 15 complete. Error: -47.62565209080886 Total: 2.6218; Orientation: 0.2877; Line Search: 1.7779
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/ec253416-3347-4c13-9aa9-03657cd8915a.jpg)
Final threshold in iteration 16: -47.62565209080886 (> -Infinity) after 43.129s (< 5400.000s)

Returns

    -47.62565209080886