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 7.58 seconds (0.000 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: 144005291485900
Reset training subject: 144005419319600
Adding measurement 43a9d99c to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-48.09005290207745;dx=-2.6324303537844633
New Minimum: -48.09005290207745 > -52.54127670791259
WOLFE (weak): th(2.154434690031884)=-52.54127670791259; dx=-2.6336482745655805 evalInputDelta=4.451223805835134
New Minimum: -52.54127670791259 > -57.095406366243616
WOLFE (weak): th(4.308869380063768)=-57.095406366243616; dx=-2.6465009048827683 evalInputDelta=9.005353464166163
New Minimum: -57.095406366243616 > -76.6597695127548
WOLFE (weak): th(12.926608140191302)=-76.6597695127548; dx=-2.6672058754884196 evalInputDelta=28.569716610677354
New Minimum: -76.6597695127548 > -169.49414262395868
END: th(51.70643256076521)=-169.49414262395868; dx=-2.050162644543276 evalInputDelta=121.40408972188123
Fitness changed from -48.09005290207745 to -169.49414262395868
Iteration 1 complete. Error: -169.49414262395868 Total: 0.9141; Orientation: 0.0015; Line Search: 0.5678
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/72fa681f-384e-4590-9124-39eb9eca2c11.jpg)
Adding measurement 7e44bd2e to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-169.49414262395868;dx=-4.6049813104163775
New Minimum: -169.49414262395868 > -453.4221005679654
END: th(111.39813200670669)=-453.4221005679654; dx=-1.1488259582836928 evalInputDelta=283.9279579440067
Fitness changed from -169.49414262395868 to -453.4221005679654
Iteration 2 complete. Error: -453.4221005679654 Total: 0.3483; Orientation: 0.0015; Line Search: 0.2241
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/a81aaf0e-693a-47a0-86da-e73eda770cae.jpg)
Adding measurement 36df3148 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-453.4221005679654;dx=-5.911856914106921
New Minimum: -453.4221005679654 > -1008.5428704261204
END: th(240.0)=-1008.5428704261204; dx=-0.5531732209463402 evalInputDelta=555.120769858155
Fitness changed from -453.4221005679654 to -1008.5428704261204
Iteration 3 complete. Error: -1008.5428704261204 Total: 0.3468; Orientation: 0.0014; Line Search: 0.2274
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/40fd756a-d547-421e-a3eb-892b1e23a285.jpg)
Adding measurement 14b66f79 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.520e+03, gradient 2.629e+00, dot -0.173; [41b3f96b-831d-4f6f-880d-d668f95e0926 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1008.5428704261204, -453.4221005679654, -169.49414262395868, -48.09005290207745
LBFGS Accumulation History: 3 points
Removed measurement 14b66f79 to history. Total: 3
th(0)=-1008.5428704261204;dx=-6.585043101076909
New Minimum: -1008.5428704261204 > -2508.5359353953213
END: th(517.0643256076521)=-2508.5359353953213; dx=-0.33151443061856795 evalInputDelta=1499.993064969201
Fitness changed from -1008.5428704261204 to -2508.5359353953213
Iteration 4 complete. Error: -2508.5359353953213 Total: 0.3789; Orientation: 0.0283; Line Search: 0.2290
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/40d11af1-ee0d-4d0a-ba93-783c092cd812.jpg)
Adding measurement 31e39981 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.525e+03, gradient 2.274e+00, dot -0.143; [41b3f96b-831d-4f6f-880d-d668f95e0926 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2508.5359353953213, -453.4221005679654, -169.49414262395868, -48.09005290207745
LBFGS Accumulation History: 3 points
Removed measurement 31e39981 to history. Total: 3
th(0)=-2508.5359353953213;dx=-4.736693234249347
New Minimum: -2508.5359353953213 > -5084.684386838219
END: th(1113.981320067067)=-5084.684386838219; dx=-0.1175296835031787 evalInputDelta=2576.148451442898
Fitness changed from -2508.5359353953213 to -5084.684386838219
Iteration 5 complete. Error: -5084.684386838219 Total: 0.3747; Orientation: 0.0291; Line Search: 0.2247
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/309541b3-1eb8-49d8-8246-6495636253e7.jpg)
Adding measurement 676f75f0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.461e+03, gradient 2.390e+00, dot -0.130; [41b3f96b-831d-4f6f-880d-d668f95e0926 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5084.684386838219, -453.4221005679654, -169.49414262395868, -48.09005290207745
LBFGS Accumulation History: 3 points
Removed measurement 676f75f0 to history. Total: 3
th(0)=-5084.684386838219;dx=-5.430336140880826
New Minimum: -5084.684386838219 > -6454.895777448905
WOLF (strong): th(2400.0)=-6454.895777448905; dx=0.18244421961708351 evalInputDelta=1370.211390610686
New Minimum: -6454.895777448905 > -8223.459651843135
END: th(1200.0)=-8223.459651843135; dx=-0.22135283421368457 evalInputDelta=3138.775265004916
Fitness changed from -5084.684386838219 to -8223.459651843135
Iteration 6 complete. Error: -8223.459651843135 Total: 0.4889; Orientation: 0.0271; Line Search: 0.3412
Adding measurement 67335f60 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.847e+04, gradient 2.252e+00, dot -0.180; [41b3f96b-831d-4f6f-880d-d668f95e0926 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8223.459651843135, -453.4221005679654, -169.49414262395868, -48.09005290207745
LBFGS Accumulation History: 3 points
Removed measurement 67335f60 to history. Total: 3
th(0)=-8223.459651843135;dx=-4.782906464073815
New Minimum: -8223.459651843135 > -8884.309791956488
END: th(2585.3216280382608)=-8884.309791956488; dx=-0.020672779321398896 evalInputDelta=660.8501401133526
Fitness changed from -8223.459651843135 to -8884.309791956488
Iteration 7 complete. Error: -8884.309791956488 Total: 0.3665; Orientation: 0.0270; Line Search: 0.2270
Adding measurement 380b4bbf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.539e+04, gradient 2.239e+00, dot -0.172; [41b3f96b-831d-4f6f-880d-d668f95e0926 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8884.309791956488, -453.4221005679654, -169.49414262395868, -48.09005290207745
LBFGS Accumulation History: 3 points
Removed measurement 380b4bbf to history. Total: 3
th(0)=-8884.309791956488;dx=-4.798907432785775
Armijo: th(5569.9066003353355)=-7408.651864038782; dx=0.5212191134599478 evalInputDelta=-1475.6579279177058
New Minimum: -8884.309791956488 > -11692.083635520989
WOLF (strong): th(2784.9533001676677)=-11692.083635520989; dx=0.12268412332865233 evalInputDelta=2807.7738435645006
New Minimum: -11692.083635520989 > -12581.051728949034
END: th(928.3177667225559)=-12581.051728949034; dx=-1.4610663429092965 evalInputDelta=3696.7419369925465
Fitness changed from -8884.309791956488 to -12581.051728949034
Iteration 8 complete. Error: -12581.051728949034 Total: 0.6172; Orientation: 0.0276; Line Search: 0.4803
Adding measurement 3accca50 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 5.527e+04, gradient 1.926e+00, dot 0.266; [41b3f96b-831d-4f6f-880d-d668f95e0926 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-12581.051728949034;dx=-27257.793894559538
Armijo: th(2000.0000000000005)=-5765.643877541417; dx=1.2363758343379838 evalInputDelta=-6815.407851407617
Armijo: th(1000.0000000000002)=-5769.443704745195; dx=2.543524294689718 evalInputDelta=-6811.60802420384
Armijo: th(333.3333333333334)=-5778.529038507998; dx=7.432718299603374 evalInputDelta=-6802.5226904410365
Armijo: th(83.33333333333336)=-5810.940911035836; dx=30.049436447618106 evalInputDelta=-6770.110817913199
Armijo: th(16.66666666666667)=-5809.835167312858; dx=150.8075395334472 evalInputDelta=-6771.216561636176
Armijo: th(2.7777777777777786)=-6124.2957288423195; dx=886.8603556460516 evalInputDelta=-6456.756000106715
Armijo: th(0.3968253968253969)=-8500.094921982705; dx=4512.9272643768345 evalInputDelta=-4080.956806966329
Armijo: th(0.049603174603174614)=-12487.020373697742; dx=-3718.7067940316615 evalInputDelta=-94.03135525129255
New Minimum: -12581.051728949034 > -12641.749383924076
END: th(0.0055114638447971796)=-12641.749383924076; dx=-11463.683215513345 evalInputDelta=60.69765497504159
Fitness changed from -12581.051728949034 to -12641.749383924076
Iteration 9 complete. Error: -12641.749383924076 Total: 1.3469; Orientation: 0.0299; Line Search: 1.1934
Adding measurement 5c578221 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 9.336e+04, gradient 1.923e+00, dot -0.255; [41b3f96b-831d-4f6f-880d-d668f95e0926 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -12641.749383924076, -12581.051728949034, -453.4221005679654, -169.49414262395868, -48.09005290207745
Rejected: LBFGS Orientation magnitude: 2.577e+05, gradient 1.923e+00, dot -0.277; [41b3f96b-831d-4f6f-880d-d668f95e0926 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -12641.749383924076, -12581.051728949034, -453.4221005679654, -169.49414262395868
LBFGS Accumulation History: 3 points
Removed measurement 5c578221 to history. Total: 4
Removed measurement 3accca50 to history. Total: 3
th(0)=-12641.749383924076;dx=-3.5426118769052524
New Minimum: -12641.749383924076 > -12641.784360490301
END: th(0.011874088900087546)=-12641.784360490301; dx=-2.5827014665469314 evalInputDelta=0.03497656622494105
Fitness changed from -12641.749383924076 to -12641.784360490301
Iteration 10 complete. Error: -12641.784360490301 Total: 0.3999; Orientation: 0.0607; Line Search: 0.2303
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/0e728da8-dfa2-44a2-8751-49ea1cb56d5a.jpg)
Adding measurement 76160f7b to history. Total: 3
Accepted: LBFGS Orientation magnitude: 6.488e+04, gradient 1.946e+00, dot 0.257; [41b3f96b-831d-4f6f-880d-d668f95e0926 = 1.000/1.000e+00]
th(0)=-12641.784360490301;dx=-31390.85745151421
Armijo: th(0.025581949038871146)=-12627.057027376775; dx=-7374.752855399408 evalInputDelta=-14.727333113525674
New Minimum: -12641.784360490301 > -12694.377682172562
END: th(0.012790974519435573)=-12694.377682172562; dx=-10353.27578085713 evalInputDelta=52.593321682261376
Fitness changed from -12641.784360490301 to -12694.377682172562
Iteration 11 complete. Error: -12694.377682172562 Total: 0.4911; Orientation: 0.0292; Line Search: 0.3423
Adding measurement 5ed9c552 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 2.124e+05, gradient 1.886e+00, dot -0.234; [41b3f96b-831d-4f6f-880d-d668f95e0926 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -12694.377682172562, -12641.784360490301, -453.4221005679654, -169.49414262395868, -48.09005290207745
Rejected: LBFGS Orientation magnitude: 3.868e+05, gradient 1.886e+00, dot -0.267; [41b3f96b-831d-4f6f-880d-d668f95e0926 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -12694.377682172562, -12641.784360490301, -453.4221005679654, -169.49414262395868
LBFGS Accumulation History: 3 points
Removed measurement 5ed9c552 to history. Total: 4
Removed measurement 76160f7b to history. Total: 3
th(0)=-12694.377682172562;dx=-3.465595732152043
New Minimum: -12694.377682172562 > -12694.450511690942
END: th(0.027557319223985903)=-12694.450511690942; dx=-2.4563496389062456 evalInputDelta=0.07282951837987639
Fitness changed from -12694.377682172562 to -12694.450511690942
Iteration 12 complete. Error: -12694.450511690942 Total: 0.3971; Orientation: 0.0587; Line Search: 0.2317
Adding measurement 208f75a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.811e+05, gradient 1.909e+00, dot -0.224; [41b3f96b-831d-4f6f-880d-d668f95e0926 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -12694.450511690942, -453.4221005679654, -169.49414262395868, -48.09005290207745
LBFGS Accumulation History: 3 points
Removed measurement 208f75a to history. Total: 3
th(0)=-12694.450511690942;dx=-3.512907661160834
New Minimum: -12694.450511690942 > -12694.613057225031
END: th(0.05937044450043774)=-12694.613057225031; dx=-2.4563440701974786 evalInputDelta=0.16254553408907668
Fitness changed from -12694.450511690942 to -12694.613057225031
Iteration 13 complete. Error: -12694.613057225031 Total: 0.3660; Orientation: 0.0274; Line Search: 0.2282
Adding measurement 25a5a019 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.035e+08, gradient 1.928e+00, dot -0.231; [41b3f96b-831d-4f6f-880d-d668f95e0926 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -12694.613057225031, -453.4221005679654, -169.49414262395868, -48.09005290207745
LBFGS Accumulation History: 3 points
Removed measurement 25a5a019 to history. Total: 3
th(0)=-12694.613057225031;dx=-3.502173287549727
New Minimum: -12694.613057225031 > -12694.975082980127
END: th(0.12790974519435575)=-12694.975082980127; dx=-2.4610181042140926 evalInputDelta=0.3620257550956012
Fitness changed from -12694.613057225031 to -12694.975082980127
Iteration 14 complete. Error: -12694.975082980127 Total: 0.3646; Orientation: 0.0271; Line Search: 0.2261
Adding measurement 3ae2dc2d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.319e+05, gradient 1.914e+00, dot -0.225; [41b3f96b-831d-4f6f-880d-d668f95e0926 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -12694.975082980127, -453.4221005679654, -169.49414262395868, -48.09005290207745
LBFGS Accumulation History: 3 points
Removed measurement 3ae2dc2d to history. Total: 3
th(0)=-12694.975082980127;dx=-3.4615790222874505
New Minimum: -12694.975082980127 > -12695.711240538825
END: th(0.27557319223985904)=-12695.711240538825; dx=-2.441867363557659 evalInputDelta=0.7361575586983236
Fitness changed from -12694.975082980127 to -12695.711240538825
Iteration 15 complete. Error: -12695.711240538825 Total: 0.3646; Orientation: 0.0278; Line Search: 0.2283
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/d6b988f7-be6d-4a95-83d3-ebf32a77f7c2.jpg)
Final threshold in iteration 16: -12695.711240538825 (> -Infinity) after 7.579s (< 5400.000s)

Returns

    -12695.711240538825