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 51.57 seconds (0.860 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: 220008246952700
Reset training subject: 220008893622900
Adding measurement 1cdafd96 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-15.62428914981842;dx=-0.0026791410809710783
New Minimum: -15.62428914981842 > -15.626947977182533
WOLFE (weak): th(2.154434690031884)=-15.626947977182533; dx=-0.0026611760016785123 evalInputDelta=0.002658827364113492
New Minimum: -15.626947977182533 > -15.629603419800128
WOLFE (weak): th(4.308869380063768)=-15.629603419800128; dx=-0.0026842247094745033 evalInputDelta=0.005314269981708364
New Minimum: -15.629603419800128 > -15.640220574423743
WOLFE (weak): th(12.926608140191302)=-15.640220574423743; dx=-0.002685311976451118 evalInputDelta=0.015931424605323485
New Minimum: -15.640220574423743 > -15.687989983710896
WOLFE (weak): th(51.70643256076521)=-15.687989983710896; dx=-0.0026592854302247356 evalInputDelta=0.06370083389247583
New Minimum: -15.687989983710896 > -15.942711876977972
WOLFE (weak): th(258.53216280382605)=-15.942711876977972; dx=-0.0026573729349472124 evalInputDelta=0.3184227271595521
New Minimum: -15.942711876977972 > -17.393709255059385
END: th(1551.1929768229563)=-17.393709255059385; dx=-0.0023197030334040016 evalInputDelta=1.7694201052409646
Fitness changed from -15.62428914981842 to -17.393709255059385
Iteration 1 complete. Error: -17.393709255059385 Total: 6.6289; Orientation: 0.0204; Line Search: 4.7597
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/c8a36f3f-2fc9-4317-8241-e15368c00e1e.jpg)
Adding measurement 373fe701 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-17.393709255059385;dx=-0.002812050007506221
New Minimum: -17.393709255059385 > -21.118043206632148
END: th(3341.943960201201)=-21.118043206632148; dx=-0.002012468474934562 evalInputDelta=3.7243339515727634
Fitness changed from -17.393709255059385 to -21.118043206632148
Iteration 2 complete. Error: -21.118043206632148 Total: 2.2487; Orientation: 0.0161; Line Search: 1.5793
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/844bfc1b-a50c-45dc-9433-5dceee2d459f.jpg)
Adding measurement 23405ead to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-21.118043206632148;dx=-0.0034327398727186215
New Minimum: -21.118043206632148 > -28.527704782748827
END: th(7200.000000000001)=-28.527704782748827; dx=-0.00154503598907467 evalInputDelta=7.4096615761166795
Fitness changed from -21.118043206632148 to -28.527704782748827
Iteration 3 complete. Error: -28.527704782748827 Total: 3.2811; Orientation: 0.0945; Line Search: 2.3045
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/3de8d749-796a-4f02-9775-502867c4640a.jpg)
Adding measurement 5c5cb835 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.030e+04, gradient 6.338e-02, dot -0.394; [1558377e-0b6b-4095-87a5-62084f2e141c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -28.527704782748827, -21.118043206632148, -17.393709255059385, -15.62428914981842
LBFGS Accumulation History: 3 points
Removed measurement 5c5cb835 to history. Total: 3
th(0)=-28.527704782748827;dx=-0.003995629496112939
New Minimum: -28.527704782748827 > -39.05106757806368
END: th(15511.929768229566)=-39.05106757806368; dx=-8.412085946177706E-4 evalInputDelta=10.523362795314853
Fitness changed from -28.527704782748827 to -39.05106757806368
Iteration 4 complete. Error: -39.05106757806368 Total: 2.1810; Orientation: 0.3017; Line Search: 1.2333
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/7b8c2f6e-1e01-4e83-b1e8-b3a7a45f2672.jpg)
Adding measurement 5f530492 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.045e+03, gradient 6.533e-02, dot -0.214; [1558377e-0b6b-4095-87a5-62084f2e141c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -39.05106757806368, -21.118043206632148, -17.393709255059385, -15.62428914981842
LBFGS Accumulation History: 3 points
Removed measurement 5f530492 to history. Total: 3
th(0)=-39.05106757806368;dx=-0.004252392840051104
New Minimum: -39.05106757806368 > -51.3276006654914
END: th(33419.43960201202)=-51.3276006654914; dx=-3.9746757790869614E-4 evalInputDelta=12.276533087427723
Fitness changed from -39.05106757806368 to -51.3276006654914
Iteration 5 complete. Error: -51.3276006654914 Total: 2.0706; Orientation: 0.2966; Line Search: 1.1772
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/4b680b91-1360-463b-8844-55460db6b562.jpg)
Adding measurement 2015f56f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.695e+03, gradient 6.655e-02, dot -0.119; [1558377e-0b6b-4095-87a5-62084f2e141c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -51.3276006654914, -21.118043206632148, -17.393709255059385, -15.62428914981842
LBFGS Accumulation History: 3 points
Removed measurement 2015f56f to history. Total: 3
th(0)=-51.3276006654914;dx=-0.004406801068453505
New Minimum: -51.3276006654914 > -63.059345278118286
END: th(72000.00000000003)=-63.059345278118286; dx=-1.430955564623192E-4 evalInputDelta=11.731744612626883
Fitness changed from -51.3276006654914 to -63.059345278118286
Iteration 6 complete. Error: -63.059345278118286 Total: 2.0696; Orientation: 0.2940; Line Search: 1.2193
Adding measurement 1c61623 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.493e+03, gradient 6.083e-02, dot -0.060; [1558377e-0b6b-4095-87a5-62084f2e141c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -63.059345278118286, -21.118043206632148, -17.393709255059385, -15.62428914981842
LBFGS Accumulation History: 3 points
Removed measurement 1c61623 to history. Total: 3
th(0)=-63.059345278118286;dx=-0.0036951404311948368
Armijo: th(155119.2976822957)=-53.99326962338752; dx=3.2519994914904495E-5 evalInputDelta=-9.066075654730767
New Minimum: -63.059345278118286 > -88.19318842004805
END: th(77559.64884114785)=-88.19318842004805; dx=-3.0374666031775764E-4 evalInputDelta=25.13384314192976
Fitness changed from -63.059345278118286 to -88.19318842004805
Iteration 7 complete. Error: -88.19318842004805 Total: 2.6788; Orientation: 0.2907; Line Search: 1.8109
Adding measurement 749c8bab to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.551e+03, gradient 5.888e-02, dot -0.070; [1558377e-0b6b-4095-87a5-62084f2e141c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -88.19318842004805, -21.118043206632148, -17.393709255059385, -15.62428914981842
LBFGS Accumulation History: 3 points
Removed measurement 749c8bab to history. Total: 3
th(0)=-88.19318842004805;dx=-0.003461426096153109
Armijo: th(167097.19801006012)=-70.98132500668733; dx=2.0637639908439563E-5 evalInputDelta=-17.211863413360717
New Minimum: -88.19318842004805 > -113.37101047338423
END: th(83548.59900503006)=-113.37101047338423; dx=-3.4845553738573537E-4 evalInputDelta=25.177822053336186
Fitness changed from -88.19318842004805 to -113.37101047338423
Iteration 8 complete. Error: -113.37101047338423 Total: 3.0918; Orientation: 0.3106; Line Search: 2.2344
Adding measurement 5d426b3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.007e+04, gradient 5.781e-02, dot -0.073; [1558377e-0b6b-4095-87a5-62084f2e141c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -113.37101047338423, -21.118043206632148, -17.393709255059385, -15.62428914981842
LBFGS Accumulation History: 3 points
Removed measurement 5d426b3 to history. Total: 3
th(0)=-113.37101047338423;dx=-0.0033252454736566834
Armijo: th(180000.0000000001)=-87.6439194547904; dx=5.617579376681651E-5 evalInputDelta=-25.727091018593825
New Minimum: -113.37101047338423 > -138.54106251094754
END: th(90000.00000000004)=-138.54106251094754; dx=-3.6707598529776283E-4 evalInputDelta=25.17005203756331
Fitness changed from -113.37101047338423 to -138.54106251094754
Iteration 9 complete. Error: -138.54106251094754 Total: 2.7967; Orientation: 0.2963; Line Search: 1.9323
Adding measurement 302ce550 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.120e+04, gradient 5.521e-02, dot -0.091; [1558377e-0b6b-4095-87a5-62084f2e141c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -138.54106251094754, -21.118043206632148, -17.393709255059385, -15.62428914981842
LBFGS Accumulation History: 3 points
Removed measurement 302ce550 to history. Total: 3
th(0)=-138.54106251094754;dx=-0.0030394230934462953
Armijo: th(193899.12210286965)=-108.74181487916752; dx=6.413389086884044E-6 evalInputDelta=-29.79924763178002
New Minimum: -138.54106251094754 > -165.65580823390655
END: th(96949.56105143482)=-165.65580823390655; dx=-4.222204708952353E-4 evalInputDelta=27.114745722959015
Fitness changed from -138.54106251094754 to -165.65580823390655
Iteration 10 complete. Error: -165.65580823390655 Total: 2.7107; Orientation: 0.2911; Line Search: 1.8563
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/ff21ce94-f527-4d5f-8e58-29b539639b24.jpg)
Adding measurement 54ffa45b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.589e+05, gradient 5.499e-02, dot -0.101; [1558377e-0b6b-4095-87a5-62084f2e141c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -165.65580823390655, -21.118043206632148, -17.393709255059385, -15.62428914981842
LBFGS Accumulation History: 3 points
Removed measurement 54ffa45b to history. Total: 3
th(0)=-165.65580823390655;dx=-0.0030136252921183046
Armijo: th(208871.49751257518)=-132.33243220842718; dx=4.732744854957264E-5 evalInputDelta=-33.32337602547938
New Minimum: -165.65580823390655 > -191.25465265300832
END: th(104435.74875628759)=-191.25465265300832; dx=-3.869906857348267E-4 evalInputDelta=25.598844419101766
Fitness changed from -165.65580823390655 to -191.25465265300832
Iteration 11 complete. Error: -191.25465265300832 Total: 2.7585; Orientation: 0.2893; Line Search: 1.8765
Adding measurement 44f3dc82 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 4.989e+04, gradient 5.660e-02, dot 0.108; [1558377e-0b6b-4095-87a5-62084f2e141c = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-191.25465265300832;dx=-305.77385282776504
Armijo: th(225000.00000000015)=565.1596816260289; dx=0.0017344564399442296 evalInputDelta=-756.4143342790372
Armijo: th(112500.00000000007)=563.4115539123655; dx=0.00345650866629388 evalInputDelta=-754.6662065653738
Armijo: th(37500.00000000002)=560.2490578472787; dx=0.01030317009758975 evalInputDelta=-751.503710500287
Armijo: th(9375.000000000005)=555.2398121013953; dx=0.04085686260013069 evalInputDelta=-746.4944647544036
Armijo: th(1875.0000000000011)=546.9057257645974; dx=0.2016354925562397 evalInputDelta=-738.1603784176057
Armijo: th(312.50000000000017)=523.8550414912355; dx=1.1531840471620889 evalInputDelta=-715.1096941442438
Armijo: th(44.64285714285717)=447.7325297952187; dx=7.019224517630545 evalInputDelta=-638.987182448227
Armijo: th(5.580357142857146)=225.9070914660782; dx=35.81387400892953 evalInputDelta=-417.1617441190865
Armijo: th(0.6200396825396829)=-114.02238814972793; dx=46.2223454725437 evalInputDelta=-77.23226450328039
New Minimum: -191.25465265300832 > -196.11447022876126
END: th(0.06200396825396829)=-196.11447022876126; dx=-126.11050901371496 evalInputDelta=4.859817575752942
Fitness changed from -191.25465265300832 to -196.11447022876126
Iteration 12 complete. Error: -196.11447022876126 Total: 7.7923; Orientation: 0.3107; Line Search: 6.9177
Adding measurement 595e4978 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 3.363e+05, gradient 5.524e-02, dot -0.082; [1558377e-0b6b-4095-87a5-62084f2e141c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -196.11447022876126, -191.25465265300832, -21.118043206632148, -17.393709255059385, -15.62428914981842
Rejected: LBFGS Orientation magnitude: 3.800e+05, gradient 5.524e-02, dot -0.086; [1558377e-0b6b-4095-87a5-62084f2e141c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -196.11447022876126, -191.25465265300832, -21.118043206632148, -17.393709255059385
LBFGS Accumulation History: 3 points
Removed measurement 595e4978 to history. Total: 4
Removed measurement 44f3dc82 to history. Total: 3
th(0)=-196.11447022876126;dx=-0.00304756444308935
New Minimum: -196.11447022876126 > -196.11466015755937
WOLFE (weak): th(0.13358350012598494)=-196.11466015755937; dx=-0.0028217643643517255 evalInputDelta=1.8992879810753038E-4
New Minimum: -196.11466015755937 > -196.11486485081497
WOLFE (weak): th(0.2671670002519699)=-196.11486485081497; dx=-0.00282272614591327 evalInputDelta=3.9462205370455194E-4
New Minimum: -196.11486485081497 > -196.11571452966558
WOLFE (weak): th(0.8015010007559096)=-196.11571452966558; dx=-0.0028225011206864416 evalInputDelta=0.0012443009043181519
New Minimum: -196.11571452966558 > -196.11947499691155
WOLFE (weak): th(3.2060040030236383)=-196.11947499691155; dx=-0.0028241408482203912 evalInputDelta=0.005004768150286054
New Minimum: -196.11947499691155 > -196.13959671724723
WOLFE (weak): th(16.03002001511819)=-196.13959671724723; dx=-0.002823134799557675 evalInputDelta=0.025126488485966547
New Minimum: -196.13959671724723 > -196.26521453472284
WOLFE (weak): th(96.18012009070914)=-196.26521453472284; dx=-0.002819252697647315 evalInputDelta=0.15074430596158095
New Minimum: -196.26521453472284 > -197.1630878134535
WOLFE (weak): th(673.260840634964)=-197.1630878134535; dx=-0.0027829131254580915 evalInputDelta=1.0486175846922379
New Minimum: -197.1630878134535 > -204.0926981152416
END: th(5386.086725079712)=-204.0926981152416; dx=-0.002583632847561998 evalInputDelta=7.97822788648034
Fitness changed from -196.11447022876126 to -204.0926981152416
Iteration 13 complete. Error: -204.0926981152416 Total: 7.1468; Orientation: 0.6416; Line Search: 5.9226
Adding measurement 1656518c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.809e+05, gradient 5.227e-02, dot -0.097; [1558377e-0b6b-4095-87a5-62084f2e141c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -204.0926981152416, -21.118043206632148, -17.393709255059385, -15.62428914981842
LBFGS Accumulation History: 3 points
Removed measurement 1656518c to history. Total: 3
th(0)=-204.0926981152416;dx=-0.0027263088861834268
New Minimum: -204.0926981152416 > -218.06772327002227
END: th(11603.972084031953)=-218.06772327002227; dx=-0.0021578525073732203 evalInputDelta=13.975025154780667
Fitness changed from -204.0926981152416 to -218.06772327002227
Iteration 14 complete. Error: -218.06772327002227 Total: 1.9998; Orientation: 0.2883; Line Search: 1.1774
Adding measurement 4ca11e88 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.743e+05, gradient 4.799e-02, dot -0.115; [1558377e-0b6b-4095-87a5-62084f2e141c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -218.06772327002227, -21.118043206632148, -17.393709255059385, -15.62428914981842
LBFGS Accumulation History: 3 points
Removed measurement 4ca11e88 to history. Total: 3
th(0)=-218.06772327002227;dx=-0.0022985497651200277
New Minimum: -218.06772327002227 > -239.28854428546674
END: th(25000.000000000015)=-239.28854428546674; dx=-0.0016052925796411423 evalInputDelta=21.22082101544447
Fitness changed from -218.06772327002227 to -239.28854428546674
Iteration 15 complete. Error: -239.28854428546674 Total: 2.0931; Orientation: 0.2885; Line Search: 1.2352
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/47743012-6dcd-4225-a9f1-abec1cfa2a3e.jpg)
Final threshold in iteration 16: -239.28854428546674 (> -Infinity) after 51.572s (< 5400.000s)

Returns

    -239.28854428546674