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 46.93 seconds (0.809 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: 222079443992600
Reset training subject: 222080062615700
Adding measurement 7ffaf354 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-171.09378139269117;dx=-0.14334376582101202
New Minimum: -171.09378139269117 > -171.31771556210288
WOLFE (weak): th(2.154434690031884)=-171.31771556210288; dx=-0.1432120458960252 evalInputDelta=0.22393416941170585
New Minimum: -171.31771556210288 > -171.5417837827893
WOLFE (weak): th(4.308869380063768)=-171.5417837827893; dx=-0.14367263287044207 evalInputDelta=0.44800239009813936
New Minimum: -171.5417837827893 > -172.44813612761823
WOLFE (weak): th(12.926608140191302)=-172.44813612761823; dx=-0.1452304458878645 evalInputDelta=1.3543547349270568
New Minimum: -172.44813612761823 > -176.62106246681594
WOLFE (weak): th(51.70643256076521)=-176.62106246681594; dx=-0.14757635481508563 evalInputDelta=5.527281074124772
New Minimum: -176.62106246681594 > -199.00281402952962
WOLFE (weak): th(258.53216280382605)=-199.00281402952962; dx=-0.1355783085589985 evalInputDelta=27.909032636838447
New Minimum: -199.00281402952962 > -289.66356818474395
END: th(1551.1929768229563)=-289.66356818474395; dx=-0.0718777022298675 evalInputDelta=118.56978679205278
Fitness changed from -171.09378139269117 to -289.66356818474395
Iteration 1 complete. Error: -289.66356818474395 Total: 6.3970; Orientation: 0.0158; Line Search: 4.5722
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/3b6bc7af-b239-4aa8-aa1c-46f5baf0634a.jpg)
Adding measurement 79f9c80d to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-289.66356818474395;dx=-0.1629780537880664
New Minimum: -289.66356818474395 > -457.6235208073207
END: th(3341.943960201201)=-457.6235208073207; dx=-0.044461240704030694 evalInputDelta=167.95995262257674
Fitness changed from -289.66356818474395 to -457.6235208073207
Iteration 2 complete. Error: -457.6235208073207 Total: 1.7489; Orientation: 0.0200; Line Search: 1.1626
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/58ad8794-95ea-4744-acf7-eefbc6f913d3.jpg)
Adding measurement 3ccf3c1 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-457.6235208073207;dx=-0.16679101841670435
New Minimum: -457.6235208073207 > -617.7531776449981
END: th(7200.000000000001)=-617.7531776449981; dx=-0.02482135925480344 evalInputDelta=160.12965683767743
Fitness changed from -457.6235208073207 to -617.7531776449981
Iteration 3 complete. Error: -617.7531776449981 Total: 1.8084; Orientation: 0.0161; Line Search: 1.1854
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d497480f-a5b1-4cfa-9dfc-f263931fd7b2.jpg)
Adding measurement 7564f53d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.405e+03, gradient 4.218e-01, dot -0.209; [5fa816e7-0558-425d-8570-5cf664ca9888 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -617.7531776449981, -457.6235208073207, -289.66356818474395, -171.09378139269117
LBFGS Accumulation History: 3 points
Removed measurement 7564f53d to history. Total: 3
th(0)=-617.7531776449981;dx=-0.17765745490670604
New Minimum: -617.7531776449981 > -770.0420548518449
END: th(15511.929768229566)=-770.0420548518449; dx=-0.010282299788901765 evalInputDelta=152.2888772068468
Fitness changed from -617.7531776449981 to -770.0420548518449
Iteration 4 complete. Error: -770.0420548518449 Total: 2.0954; Orientation: 0.2974; Line Search: 1.2157
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/14cea39f-394b-42b5-86fe-cd9c63b23bfa.jpg)
Adding measurement 106c0de1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.683e+03, gradient 4.155e-01, dot -0.171; [5fa816e7-0558-425d-8570-5cf664ca9888 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -770.0420548518449, -457.6235208073207, -289.66356818474395, -171.09378139269117
LBFGS Accumulation History: 3 points
Removed measurement 106c0de1 to history. Total: 3
th(0)=-770.0420548518449;dx=-0.1721429478765164
New Minimum: -770.0420548518449 > -881.7113559481091
END: th(33419.43960201202)=-881.7113559481091; dx=-0.002495032092615432 evalInputDelta=111.66930109626423
Fitness changed from -770.0420548518449 to -881.7113559481091
Iteration 5 complete. Error: -881.7113559481091 Total: 2.0608; Orientation: 0.2952; Line Search: 1.2039
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/abd74b36-9cc9-44cd-8b5e-e1c2afc1079a.jpg)
Adding measurement 2836e5f5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.026e+03, gradient 3.560e-01, dot -0.116; [5fa816e7-0558-425d-8570-5cf664ca9888 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -881.7113559481091, -457.6235208073207, -289.66356818474395, -171.09378139269117
LBFGS Accumulation History: 3 points
Removed measurement 2836e5f5 to history. Total: 3
th(0)=-881.7113559481091;dx=-0.12647561454451978
New Minimum: -881.7113559481091 > -974.4756368712781
END: th(72000.00000000003)=-974.4756368712781; dx=-2.273276906797914E-4 evalInputDelta=92.76428092316894
Fitness changed from -881.7113559481091 to -974.4756368712781
Iteration 6 complete. Error: -974.4756368712781 Total: 2.0960; Orientation: 0.2898; Line Search: 1.2337
Adding measurement 44cf15b4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.383e+04, gradient 3.113e-01, dot -0.088; [5fa816e7-0558-425d-8570-5cf664ca9888 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -974.4756368712781, -457.6235208073207, -289.66356818474395, -171.09378139269117
LBFGS Accumulation History: 3 points
Removed measurement 44cf15b4 to history. Total: 3
th(0)=-974.4756368712781;dx=-0.09679208589382517
Armijo: th(155119.2976822957)=-805.9284565969573; dx=9.721226409452223E-4 evalInputDelta=-168.5471802743208
New Minimum: -974.4756368712781 > -1525.4317219164573
END: th(77559.64884114785)=-1525.4317219164573; dx=-0.0032638530015022846 evalInputDelta=550.9560850451792
Fitness changed from -974.4756368712781 to -1525.4317219164573
Iteration 7 complete. Error: -1525.4317219164573 Total: 2.9764; Orientation: 0.2766; Line Search: 1.8612
Adding measurement 2dba4af5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.895e+04, gradient 2.854e-01, dot -0.104; [5fa816e7-0558-425d-8570-5cf664ca9888 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1525.4317219164573, -457.6235208073207, -289.66356818474395, -171.09378139269117
LBFGS Accumulation History: 3 points
Removed measurement 2dba4af5 to history. Total: 3
th(0)=-1525.4317219164573;dx=-0.08132439633062424
Armijo: th(167097.19801006012)=-1336.461009097895; dx=0.0013570332744816816 evalInputDelta=-188.97071281856233
New Minimum: -1525.4317219164573 > -2132.2316924601637
END: th(83548.59900503006)=-2132.2316924601637; dx=-0.004865027751511512 evalInputDelta=606.7999705437064
Fitness changed from -1525.4317219164573 to -2132.2316924601637
Iteration 8 complete. Error: -2132.2316924601637 Total: 2.6578; Orientation: 0.2911; Line Search: 1.8112
Adding measurement 1561f737 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.327e+06, gradient 2.771e-01, dot -0.131; [5fa816e7-0558-425d-8570-5cf664ca9888 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2132.2316924601637, -457.6235208073207, -289.66356818474395, -171.09378139269117
LBFGS Accumulation History: 3 points
Removed measurement 1561f737 to history. Total: 3
th(0)=-2132.2316924601637;dx=-0.07667678617816581
Armijo: th(180000.0000000001)=-1590.2141472296546; dx=0.002376206607082328 evalInputDelta=-542.0175452305091
New Minimum: -2132.2316924601637 > -2633.070157462626
END: th(90000.00000000004)=-2633.070157462626; dx=-0.0037551546217182196 evalInputDelta=500.83846500246227
Fitness changed from -2132.2316924601637 to -2633.070157462626
Iteration 9 complete. Error: -2633.070157462626 Total: 2.6622; Orientation: 0.2916; Line Search: 1.8152
Adding measurement 514a2784 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 6.970e+04, gradient 2.788e-01, dot 0.162; [5fa816e7-0558-425d-8570-5cf664ca9888 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-2633.070157462626;dx=-3142.263362812062
Armijo: th(193899.12210286965)=-1580.1144272723404; dx=0.0050788354290421 evalInputDelta=-1052.9557301902855
Armijo: th(96949.56105143482)=-1585.4764757718867; dx=0.01009809807052615 evalInputDelta=-1047.5936816907392
Armijo: th(32316.520350478273)=-1594.57181519095; dx=0.030023313677057524 evalInputDelta=-1038.498342271676
Armijo: th(8079.130087619568)=-1605.3331076978461; dx=0.11868340197873938 evalInputDelta=-1027.7370497647798
Armijo: th(1615.8260175239136)=-1621.5304641175626; dx=0.5831778159817461 evalInputDelta=-1011.5396933450634
Armijo: th(269.3043362539856)=-1652.608240203428; dx=3.3674925695439373 evalInputDelta=-980.4619172591979
Armijo: th(38.47204803628365)=-1725.9258662661491; dx=21.50991468076591 evalInputDelta=-907.1442911964768
Armijo: th(4.809006004535457)=-1949.095248763561; dx=119.8426075570614 evalInputDelta=-683.974908699065
Armijo: th(0.5343340005039396)=-2497.085171033212; dx=188.87023919320418 evalInputDelta=-135.98498642941377
New Minimum: -2633.070157462626 > -2643.5718982311973
END: th(0.053433400050393966)=-2643.5718982311973; dx=-411.88887317531123 evalInputDelta=10.50174076857138
Fitness changed from -2633.070157462626 to -2643.5718982311973
Iteration 10 complete. Error: -2643.5718982311973 Total: 7.7278; Orientation: 0.2885; Line Search: 6.8940
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/c662f195-7135-40fc-9a2a-5b34bc4f5b3b.jpg)
Adding measurement 11a14087 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 1.470e+06, gradient 2.742e-01, dot -0.092; [5fa816e7-0558-425d-8570-5cf664ca9888 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2643.5718982311973, -2633.070157462626, -457.6235208073207, -289.66356818474395, -171.09378139269117
Rejected: LBFGS Orientation magnitude: 3.016e+06, gradient 2.742e-01, dot -0.095; [5fa816e7-0558-425d-8570-5cf664ca9888 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2643.5718982311973, -2633.070157462626, -457.6235208073207, -289.66356818474395
LBFGS Accumulation History: 3 points
Removed measurement 11a14087 to history. Total: 4
Removed measurement 514a2784 to history. Total: 3
th(0)=-2643.5718982311973;dx=-0.07508075136775554
New Minimum: -2643.5718982311973 > -2643.5762678967617
END: th(0.11511877067492017)=-2643.5762678967617; dx=-0.05278334386809011 evalInputDelta=0.004369665564354364
Fitness changed from -2643.5718982311973 to -2643.5762678967617
Iteration 11 complete. Error: -2643.5762678967617 Total: 2.4051; Orientation: 0.6340; Line Search: 1.1897
Adding measurement 5f79e643 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 7.819e+04, gradient 2.742e-01, dot 0.157; [5fa816e7-0558-425d-8570-5cf664ca9888 = 1.000/1.000e+00]
th(0)=-2643.5762678967617;dx=-3371.355965471481
Armijo: th(0.24801587301587316)=-2569.5741200412153; dx=75.077344642215 evalInputDelta=-74.00214785554635
Armijo: th(0.12400793650793658)=-2618.6220369155576; dx=-86.72087601184091 evalInputDelta=-24.95423098120409
Armijo: th(0.04133597883597886)=-2642.669528666487; dx=-326.7428474293175 evalInputDelta=-0.9067392302745247
New Minimum: -2643.5762678967617 > -2644.1688947975504
END: th(0.010333994708994714)=-2644.1688947975504; dx=-448.3344521442838 evalInputDelta=0.5926269007886731
Fitness changed from -2643.5762678967617 to -2644.1688947975504
Iteration 12 complete. Error: -2644.1688947975504 Total: 4.1772; Orientation: 0.2859; Line Search: 3.3174
Adding measurement 1a7ff9e8 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 3.592e+06, gradient 2.727e-01, dot -0.089; [5fa816e7-0558-425d-8570-5cf664ca9888 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2644.1688947975504, -2643.5762678967617, -457.6235208073207, -289.66356818474395, -171.09378139269117
Rejected: LBFGS Orientation magnitude: 8.283e+06, gradient 2.727e-01, dot -0.091; [5fa816e7-0558-425d-8570-5cf664ca9888 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2644.1688947975504, -2643.5762678967617, -457.6235208073207, -289.66356818474395
LBFGS Accumulation History: 3 points
Removed measurement 1a7ff9e8 to history. Total: 4
Removed measurement 5f79e643 to history. Total: 3
th(0)=-2644.1688947975504;dx=-0.07425987711128998
New Minimum: -2644.1688947975504 > -2644.169600939584
END: th(0.022263916687664156)=-2644.169600939584; dx=-0.05192247366520807 evalInputDelta=7.061420337777236E-4
Fitness changed from -2644.1688947975504 to -2644.169600939584
Iteration 13 complete. Error: -2644.169600939584 Total: 2.4180; Orientation: 0.6317; Line Search: 1.2062
Adding measurement 55974d32 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 7.998e+04, gradient 2.727e-01, dot 0.156; [5fa816e7-0558-425d-8570-5cf664ca9888 = 1.000/1.000e+00]
th(0)=-2644.169600939584;dx=-3414.8186644214024
Armijo: th(0.047966154447883415)=-2639.1428687737157; dx=-267.3462197627024 evalInputDelta=-5.026732165868452
Armijo: th(0.023983077223941707)=-2643.3504768031858; dx=-371.440737114663 evalInputDelta=-0.8191241363983863
New Minimum: -2644.169600939584 > -2644.206281722055
END: th(0.007994359074647236)=-2644.206281722055; dx=-436.3251316201298 evalInputDelta=0.03668078247073936
Fitness changed from -2644.169600939584 to -2644.206281722055
Iteration 14 complete. Error: -2644.206281722055 Total: 3.2582; Orientation: 0.2847; Line Search: 2.4139
Adding measurement ea77bc8 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 3.887e+07, gradient 2.725e-01, dot -0.090; [5fa816e7-0558-425d-8570-5cf664ca9888 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2644.206281722055, -2644.169600939584, -457.6235208073207, -289.66356818474395, -171.09378139269117
Rejected: LBFGS Orientation magnitude: 9.236e+07, gradient 2.725e-01, dot -0.090; [5fa816e7-0558-425d-8570-5cf664ca9888 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2644.206281722055, -2644.169600939584, -457.6235208073207, -289.66356818474395
LBFGS Accumulation History: 3 points
Removed measurement ea77bc8 to history. Total: 4
Removed measurement 55974d32 to history. Total: 3
th(0)=-2644.206281722055;dx=-0.0741201552457656
New Minimum: -2644.206281722055 > -2644.2070753316125
END: th(0.017223324514991194)=-2644.2070753316125; dx=-0.05159772930007697 evalInputDelta=7.936095576042135E-4
Fitness changed from -2644.206281722055 to -2644.2070753316125
Iteration 15 complete. Error: -2644.2070753316125 Total: 2.4222; Orientation: 0.6417; Line Search: 1.2255
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/ca6c099f-ab27-48bd-9f49-2931289064ff.jpg)
Final threshold in iteration 16: -2644.2070753316125 (> -Infinity) after 46.935s (< 5400.000s)

Returns

    -2644.2070753316125