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.98 seconds (0.129 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: 154659116546300
Reset training subject: 154659245951700
Adding measurement 372efae7 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-26.036530873782056;dx=-0.2819555047026183
New Minimum: -26.036530873782056 > -26.768394349216322
WOLFE (weak): th(2.154434690031884)=-26.768394349216322; dx=-0.2893091932242172 evalInputDelta=0.7318634754342668
New Minimum: -26.768394349216322 > -27.509261357754024
WOLFE (weak): th(4.308869380063768)=-27.509261357754024; dx=-0.28993971624320586 evalInputDelta=1.4727304839719686
New Minimum: -27.509261357754024 > -30.609579384526935
WOLFE (weak): th(12.926608140191302)=-30.609579384526935; dx=-0.29777163408291996 evalInputDelta=4.573048510744879
New Minimum: -30.609579384526935 > -47.69322592180283
WOLFE (weak): th(51.70643256076521)=-47.69322592180283; dx=-0.31137478270256724 evalInputDelta=21.656695048020772
New Minimum: -47.69322592180283 > -104.16709270746207
END: th(258.53216280382605)=-104.16709270746207; dx=-0.08037137239601504 evalInputDelta=78.13056183368002
Fitness changed from -26.036530873782056 to -104.16709270746207
Iteration 1 complete. Error: -104.16709270746207 Total: 1.2034; Orientation: 0.0014; Line Search: 0.8284
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/64bbb98e-361a-4154-bd6f-463b11ac1c32.jpg)
Adding measurement 119e4503 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-104.16709270746207;dx=-0.2662008198064659
New Minimum: -104.16709270746207 > -188.50836146906056
END: th(556.9906600335335)=-188.50836146906056; dx=-0.047212528813272134 evalInputDelta=84.34126876159849
Fitness changed from -104.16709270746207 to -188.50836146906056
Iteration 2 complete. Error: -188.50836146906056 Total: 0.3492; Orientation: 0.0016; Line Search: 0.2290
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/61036efd-df90-4f54-8179-faceb3dd0941.jpg)
Adding measurement 4e96dc17 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-188.50836146906056;dx=-0.19456037682470384
New Minimum: -188.50836146906056 > -267.9936158288104
END: th(1200.0)=-267.9936158288104; dx=-0.018339692924970175 evalInputDelta=79.48525435974983
Fitness changed from -188.50836146906056 to -267.9936158288104
Iteration 3 complete. Error: -267.9936158288104 Total: 0.3583; Orientation: 0.0014; Line Search: 0.2306
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/52f36c38-80c8-4bdf-8018-6ed314bcd8f8.jpg)
Adding measurement d751d95 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.641e+02, gradient 5.284e-01, dot -0.335; [bbe02fab-9c3f-4af6-9878-40772af4f61a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -267.9936158288104, -188.50836146906056, -104.16709270746207, -26.036530873782056
LBFGS Accumulation History: 3 points
Removed measurement d751d95 to history. Total: 3
th(0)=-267.9936158288104;dx=-0.27150748086622867
New Minimum: -267.9936158288104 > -352.83716144986766
END: th(2585.3216280382608)=-352.83716144986766; dx=-0.005263046352726808 evalInputDelta=84.84354562105727
Fitness changed from -267.9936158288104 to -352.83716144986766
Iteration 4 complete. Error: -352.83716144986766 Total: 0.3840; Orientation: 0.0281; Line Search: 0.2308
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/010e8738-5a3d-4bfc-ae12-4bb7199ace45.jpg)
Adding measurement 3fa46dce to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.051e+03, gradient 4.209e-01, dot -0.207; [bbe02fab-9c3f-4af6-9878-40772af4f61a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -352.83716144986766, -188.50836146906056, -104.16709270746207, -26.036530873782056
LBFGS Accumulation History: 3 points
Removed measurement 3fa46dce to history. Total: 3
th(0)=-352.83716144986766;dx=-0.17437675591999652
New Minimum: -352.83716144986766 > -577.2818581507651
WOLF (strong): th(5569.9066003353355)=-577.2818581507651; dx=0.007083706299907211 evalInputDelta=224.4446967008974
New Minimum: -577.2818581507651 > -668.107167675965
END: th(2784.9533001676677)=-668.107167675965; dx=-0.027483829452382362 evalInputDelta=315.27000622609734
Fitness changed from -352.83716144986766 to -668.107167675965
Iteration 5 complete. Error: -668.107167675965 Total: 0.4989; Orientation: 0.0278; Line Search: 0.3475
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/c3d3015d-513c-4f4a-adc5-9f32c74c5ccc.jpg)
Adding measurement 67a2c48c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.189e+03, gradient 3.878e-01, dot -0.250; [bbe02fab-9c3f-4af6-9878-40772af4f61a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -668.107167675965, -188.50836146906056, -104.16709270746207, -26.036530873782056
LBFGS Accumulation History: 3 points
Removed measurement 67a2c48c to history. Total: 3
th(0)=-668.107167675965;dx=-0.14716833410680402
Armijo: th(6000.000000000001)=-597.9654306479598; dx=0.0012606766576674434 evalInputDelta=-70.1417370280052
New Minimum: -668.107167675965 > -771.9770883905817
END: th(3000.0000000000005)=-771.9770883905817; dx=-0.017366824443819536 evalInputDelta=103.86992071461668
Fitness changed from -668.107167675965 to -771.9770883905817
Iteration 6 complete. Error: -771.9770883905817 Total: 0.5157; Orientation: 0.0319; Line Search: 0.3585
Adding measurement 570a6d0f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.065e+03, gradient 4.966e-01, dot -0.280; [bbe02fab-9c3f-4af6-9878-40772af4f61a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -771.9770883905817, -188.50836146906056, -104.16709270746207, -26.036530873782056
LBFGS Accumulation History: 3 points
Removed measurement 570a6d0f to history. Total: 3
th(0)=-771.9770883905817;dx=-0.23940387264489021
New Minimum: -771.9770883905817 > -813.4799859246692
WOLF (strong): th(6463.304070095653)=-813.4799859246692; dx=0.006322632331530378 evalInputDelta=41.50289753408754
New Minimum: -813.4799859246692 > -984.0512562869883
WOLF (strong): th(3231.6520350478263)=-984.0512562869883; dx=0.004313917089273316 evalInputDelta=212.0741678964066
END: th(1077.217345015942)=-978.383328506777; dx=-0.06564244746417486 evalInputDelta=206.40624011619536
Fitness changed from -771.9770883905817 to -984.0512562869883
Iteration 7 complete. Error: -984.0512562869883 Total: 0.6298; Orientation: 0.0332; Line Search: 0.4818
Adding measurement 76544ca1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.964e+03, gradient 4.254e-01, dot -0.258; [bbe02fab-9c3f-4af6-9878-40772af4f61a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -984.0512562869883, -188.50836146906056, -104.16709270746207, -26.036530873782056
LBFGS Accumulation History: 3 points
Removed measurement 76544ca1 to history. Total: 3
th(0)=-984.0512562869883;dx=-0.17515728293389146
New Minimum: -984.0512562869883 > -1299.5212099077105
END: th(2320.79441680639)=-1299.5212099077105; dx=-0.05373264169400169 evalInputDelta=315.4699536207222
Fitness changed from -984.0512562869883 to -1299.5212099077105
Iteration 8 complete. Error: -1299.5212099077105 Total: 0.3741; Orientation: 0.0283; Line Search: 0.2350
Adding measurement 177681f6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.478e+04, gradient 3.977e-01, dot -0.347; [bbe02fab-9c3f-4af6-9878-40772af4f61a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1299.5212099077105, -188.50836146906056, -104.16709270746207, -26.036530873782056
LBFGS Accumulation History: 3 points
Removed measurement 177681f6 to history. Total: 3
th(0)=-1299.5212099077105;dx=-0.15194879581175305
New Minimum: -1299.5212099077105 > -1316.613648721598
END: th(5000.000000000002)=-1316.613648721598; dx=-0.0043747925523753995 evalInputDelta=17.09243881388761
Fitness changed from -1299.5212099077105 to -1316.613648721598
Iteration 9 complete. Error: -1316.613648721598 Total: 0.3713; Orientation: 0.0311; Line Search: 0.2293
Adding measurement 2d9dce4e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.609e+04, gradient 4.836e-01, dot -0.293; [bbe02fab-9c3f-4af6-9878-40772af4f61a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1316.613648721598, -188.50836146906056, -104.16709270746207, -26.036530873782056
LBFGS Accumulation History: 3 points
Removed measurement 2d9dce4e to history. Total: 3
th(0)=-1316.613648721598;dx=-0.22569653066685352
Armijo: th(10772.173450159424)=-1169.3787880751045; dx=0.03085974849299658 evalInputDelta=-147.23486064649364
New Minimum: -1316.613648721598 > -1587.1620112641306
WOLF (strong): th(5386.086725079712)=-1587.1620112641306; dx=0.023572088913043167 evalInputDelta=270.54836254253246
New Minimum: -1587.1620112641306 > -1650.3364051004874
END: th(1795.3622416932374)=-1650.3364051004874; dx=-0.05988703422967835 evalInputDelta=333.72275637888924
Fitness changed from -1316.613648721598 to -1650.3364051004874
Iteration 10 complete. Error: -1650.3364051004874 Total: 0.5995; Orientation: 0.0266; Line Search: 0.4613
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/ffe5f212-19cb-497d-ace8-94bc42503807.jpg)
Adding measurement 52a0a5df to history. Total: 3
Accepted: LBFGS Orientation magnitude: 7.682e+03, gradient 3.702e-01, dot 0.538; [bbe02fab-9c3f-4af6-9878-40772af4f61a = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-1650.3364051004874;dx=-1523.860158532385
Armijo: th(3867.990694677318)=-1558.255996298426; dx=0.20257017830034973 evalInputDelta=-92.08040880206136
Armijo: th(1933.995347338659)=-1558.2560765163087; dx=0.41049020847119577 evalInputDelta=-92.08032858417869
Armijo: th(644.665115779553)=-1561.1670314223268; dx=1.1976923203798524 evalInputDelta=-89.16937367816058
Armijo: th(161.16627894488826)=-1567.671043299582; dx=4.933772526054755 evalInputDelta=-82.66536180090543
Armijo: th(32.23325578897765)=-1624.0285557834259; dx=22.710155649483603 evalInputDelta=-26.307849317061482
New Minimum: -1650.3364051004874 > -1824.1931778186213
WOLF (strong): th(5.372209298162942)=-1824.1931778186213; dx=107.0306142180618 evalInputDelta=173.85677271813393
New Minimum: -1824.1931778186213 > -2165.388533266028
END: th(0.7674584711661346)=-2165.388533266028; dx=-284.8256751371392 evalInputDelta=515.0521281655406
Fitness changed from -1650.3364051004874 to -2165.388533266028
Iteration 11 complete. Error: -2165.388533266028 Total: 1.0768; Orientation: 0.0267; Line Search: 0.9316
Adding measurement 23096d7a to history. Total: 4
Rejected: LBFGS Orientation magnitude: 6.841e+05, gradient 4.062e-01, dot -0.308; [bbe02fab-9c3f-4af6-9878-40772af4f61a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2165.388533266028, -1650.3364051004874, -188.50836146906056, -104.16709270746207, -26.036530873782056
Rejected: LBFGS Orientation magnitude: 7.495e+05, gradient 4.062e-01, dot -0.336; [bbe02fab-9c3f-4af6-9878-40772af4f61a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2165.388533266028, -1650.3364051004874, -188.50836146906056, -104.16709270746207
LBFGS Accumulation History: 3 points
Removed measurement 23096d7a to history. Total: 4
Removed measurement 52a0a5df to history. Total: 3
th(0)=-2165.388533266028;dx=-0.1591196278197552
New Minimum: -2165.388533266028 > -2165.5722107563165
END: th(1.6534391534391548)=-2165.5722107563165; dx=-0.09752806103272077 evalInputDelta=0.1836774902885736
Fitness changed from -2165.388533266028 to -2165.5722107563165
Iteration 12 complete. Error: -2165.5722107563165 Total: 0.4307; Orientation: 0.0698; Line Search: 0.2471
Adding measurement 79d9dc00 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.135e+05, gradient 4.054e-01, dot -0.263; [bbe02fab-9c3f-4af6-9878-40772af4f61a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2165.5722107563165, -188.50836146906056, -104.16709270746207, -26.036530873782056
LBFGS Accumulation History: 3 points
Removed measurement 79d9dc00 to history. Total: 3
th(0)=-2165.5722107563165;dx=-0.15792503622705584
New Minimum: -2165.5722107563165 > -2165.968836340911
END: th(3.562226670026266)=-2165.968836340911; dx=-0.09740360532997835 evalInputDelta=0.39662558459440334
Fitness changed from -2165.5722107563165 to -2165.968836340911
Iteration 13 complete. Error: -2165.968836340911 Total: 0.3991; Orientation: 0.0273; Line Search: 0.2528
Adding measurement 721c403d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.933e+05, gradient 4.044e-01, dot -0.263; [bbe02fab-9c3f-4af6-9878-40772af4f61a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2165.968836340911, -188.50836146906056, -104.16709270746207, -26.036530873782056
LBFGS Accumulation History: 3 points
Removed measurement 721c403d to history. Total: 3
th(0)=-2165.968836340911;dx=-0.15960401987573347
New Minimum: -2165.968836340911 > -2166.820366343274
END: th(7.674584711661348)=-2166.820366343274; dx=-0.0965761806455802 evalInputDelta=0.8515300023632335
Fitness changed from -2165.968836340911 to -2166.820366343274
Iteration 14 complete. Error: -2166.820366343274 Total: 0.3804; Orientation: 0.0308; Line Search: 0.2382
Adding measurement 78ead35e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.777e+05, gradient 4.024e-01, dot -0.263; [bbe02fab-9c3f-4af6-9878-40772af4f61a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2166.820366343274, -188.50836146906056, -104.16709270746207, -26.036530873782056
LBFGS Accumulation History: 3 points
Removed measurement 78ead35e to history. Total: 3
th(0)=-2166.820366343274;dx=-0.15928149366122565
New Minimum: -2166.820366343274 > -2168.6302128302095
END: th(16.53439153439155)=-2168.6302128302095; dx=-0.09690106484738192 evalInputDelta=1.8098464869353847
Fitness changed from -2166.820366343274 to -2168.6302128302095
Iteration 15 complete. Error: -2168.6302128302095 Total: 0.4015; Orientation: 0.0328; Line Search: 0.2513
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/e43f79bc-1ba4-4692-b0e7-b3b7607a870a.jpg)
Final threshold in iteration 16: -2168.6302128302095 (> -Infinity) after 7.985s (< 5400.000s)

Returns

    -2168.6302128302095