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

Iteration 20 Iteration 20

Iteration 25 Iteration 25

BasicOptimizer.scala:89 executed in 225.07 seconds (2.815 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: 2231562195812
Reset training subject: 2232689181739
Adding measurement 6c1ccab1 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-1.3492186597203562;dx=-1.795924677408442E-4
New Minimum: -1.3492186597203562 > -1.3496413053567071
WOLFE (weak): th(2.154434690031884)=-1.3496413053567071; dx=-1.7956014792841786E-4 evalInputDelta=4.226456363509712E-4
New Minimum: -1.3496413053567071 > -1.3500629857256448
WOLFE (weak): th(4.308869380063768)=-1.3500629857256448; dx=-1.7976409269446783E-4 evalInputDelta=8.443260052886092E-4
New Minimum: -1.3500629857256448 > -1.351749085026735
WOLFE (weak): th(12.926608140191302)=-1.351749085026735; dx=-1.7987929400477238E-4 evalInputDelta=0.002530425306378925
New Minimum: -1.351749085026735 > -1.359376556199302
WOLFE (weak): th(51.70643256076521)=-1.359376556199302; dx=-1.8146039020090543E-4 evalInputDelta=0.010157896478945938
New Minimum: -1.359376556199302 > -1.4010422235783027
WOLFE (weak): th(258.53216280382605)=-1.4010422235783027; dx=-1.882300618170857E-4 evalInputDelta=0.05182356385794651
New Minimum: -1.4010422235783027 > -1.6803925908968598
WOLFE (weak): th(1551.1929768229563)=-1.6803925908968598; dx=-2.0604177951431246E-4 evalInputDelta=0.3311739311765036
New Minimum: -1.6803925908968598 > -3.0049649589696306
END: th(10858.350837760694)=-3.0049649589696306; dx=-7.565983622266448E-5 evalInputDelta=1.6557462992492744
Fitness changed from -1.3492186597203562 to -3.0049649589696306
Iteration 1 complete. Error: -3.0049649589696306 Total: 12.0693; Orientation: 0.0189; Line Search: 8.7982
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/bee86057-9a89-4086-b3f6-de7e8947b449.jpg)
Adding measurement 5ecc38c9 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-3.0049649589696306;dx=-3.381927082685851E-4
New Minimum: -3.0049649589696306 > -3.247263568479641
WOLF (strong): th(23393.607721408407)=-3.247263568479641; dx=5.608902839026156E-5 evalInputDelta=0.24229860951001037
New Minimum: -3.247263568479641 > -4.347616993978502
WOLF (strong): th(11696.803860704204)=-4.347616993978502; dx=1.693683477275415E-5 evalInputDelta=1.342652035008871
END: th(3898.9346202347347)=-4.121942186119291; dx=-1.7791707754998546E-4 evalInputDelta=1.1169772271496607
Fitness changed from -3.0049649589696306 to -4.347616993978502
Iteration 2 complete. Error: -4.347616993978502 Total: 5.4927; Orientation: 0.0191; Line Search: 4.4076
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/b94cb4c1-590a-4809-9816-7ca7e246e848.jpg)
Adding measurement 3b31a3bb to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-4.347616993978502;dx=-0.0010700415056186063
New Minimum: -4.347616993978502 > -6.074792920622623
END: th(8400.000000000002)=-6.074792920622623; dx=-1.96995691616996E-5 evalInputDelta=1.7271759266441213
Fitness changed from -4.347616993978502 to -6.074792920622623
Iteration 3 complete. Error: -6.074792920622623 Total: 3.3582; Orientation: 0.0193; Line Search: 2.2564
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/1f1b0350-d9a9-4b30-bcd4-c52d204770ed.jpg)
Adding measurement 2032e515 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.449e+03, gradient 2.951e-02, dot -0.245; [93445137-75f9-43d1-9801-0801f46d8231 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.074792920622623, -4.347616993978502, -3.0049649589696306, -1.3492186597203562
LBFGS Accumulation History: 3 points
Removed measurement 2032e515 to history. Total: 3
th(0)=-6.074792920622623;dx=-8.671697942460543E-4
Armijo: th(18097.251396267828)=-5.988898411691629; dx=9.802383250320397E-5 evalInputDelta=-0.08589450893099393
New Minimum: -6.074792920622623 > -7.408136760790836
WOLF (strong): th(9048.625698133914)=-7.408136760790836; dx=7.930729512428764E-5 evalInputDelta=1.3333438401682134
New Minimum: -7.408136760790836 > -7.775742770661923
END: th(3016.208566044638)=-7.775742770661923; dx=-2.543194731022911E-4 evalInputDelta=1.7009498500392999
Fitness changed from -6.074792920622623 to -7.775742770661923
Iteration 4 complete. Error: -7.775742770661923 Total: 5.9672; Orientation: 0.4614; Line Search: 4.4264
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/72533bfe-ba2d-4719-9ec1-4ab32621a939.jpg)
Adding measurement 270cf79 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.557e+03, gradient 2.658e-02, dot -0.257; [93445137-75f9-43d1-9801-0801f46d8231 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.775742770661923, -4.347616993978502, -3.0049649589696306, -1.3492186597203562
LBFGS Accumulation History: 3 points
Removed measurement 270cf79 to history. Total: 3
th(0)=-7.775742770661923;dx=-7.039068487065835E-4
New Minimum: -7.775742770661923 > -8.91346365082213
END: th(6498.224367057892)=-8.91346365082213; dx=-5.461088002962089E-5 evalInputDelta=1.1377208801602077
Fitness changed from -7.775742770661923 to -8.91346365082213
Iteration 5 complete. Error: -8.91346365082213 Total: 3.8602; Orientation: 0.5687; Line Search: 2.2163
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/8e3d140b-ce5c-48a4-8a60-9f3c17ec066f.jpg)
Adding measurement 23973191 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.603e+03, gradient 2.978e-02, dot -0.222; [93445137-75f9-43d1-9801-0801f46d8231 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.91346365082213, -4.347616993978502, -3.0049649589696306, -1.3492186597203562
LBFGS Accumulation History: 3 points
Removed measurement 23973191 to history. Total: 3
th(0)=-8.91346365082213;dx=-8.846887782401191E-4
New Minimum: -8.91346365082213 > -9.030034999975264
WOLF (strong): th(14000.000000000004)=-9.030034999975264; dx=1.2331075203740792E-4 evalInputDelta=0.1165713491531335
New Minimum: -9.030034999975264 > -10.100600077714882
WOLF (strong): th(7000.000000000002)=-10.100600077714882; dx=7.409965885122387E-5 evalInputDelta=1.1871364268927511
New Minimum: -10.100600077714882 > -10.127498249090676
END: th(2333.333333333334)=-10.127498249090676; dx=-2.8253739988078356E-4 evalInputDelta=1.2140345982685457
Fitness changed from -8.91346365082213 to -10.127498249090676
Iteration 6 complete. Error: -10.127498249090676 Total: 5.9581; Orientation: 0.4611; Line Search: 4.4161
Adding measurement 22bc759 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.782e+03, gradient 2.384e-02, dot -0.264; [93445137-75f9-43d1-9801-0801f46d8231 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -10.127498249090676, -4.347616993978502, -3.0049649589696306, -1.3492186597203562
LBFGS Accumulation History: 3 points
Removed measurement 22bc759 to history. Total: 3
th(0)=-10.127498249090676;dx=-5.648991612865761E-4
New Minimum: -10.127498249090676 > -11.556634169301955
END: th(5027.014276741063)=-11.556634169301955; dx=-1.5144656854388158E-4 evalInputDelta=1.4291359202112783
Fitness changed from -10.127498249090676 to -11.556634169301955
Iteration 7 complete. Error: -11.556634169301955 Total: 3.7295; Orientation: 0.4834; Line Search: 2.2173
Adding measurement 69a7892f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.106e+03, gradient 2.727e-02, dot -0.238; [93445137-75f9-43d1-9801-0801f46d8231 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -11.556634169301955, -4.347616993978502, -3.0049649589696306, -1.3492186597203562
LBFGS Accumulation History: 3 points
Removed measurement 69a7892f to history. Total: 3
th(0)=-11.556634169301955;dx=-7.398238329291305E-4
New Minimum: -11.556634169301955 > -12.538940989886788
WOLF (strong): th(10830.373945096488)=-12.538940989886788; dx=8.490131880273967E-5 evalInputDelta=0.9823068205848333
New Minimum: -12.538940989886788 > -13.078115894176413
END: th(5415.186972548244)=-13.078115894176413; dx=-2.339219618198514E-5 evalInputDelta=1.5214817248744588
Fitness changed from -11.556634169301955 to -13.078115894176413
Iteration 8 complete. Error: -13.078115894176413 Total: 4.8186; Orientation: 0.4546; Line Search: 3.3164
Adding measurement b97a978 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.200e+03, gradient 3.339

...skipping 18497 bytes...

20174977846, -95.10624797526552, -4.347616993978502, -3.0049649589696306, -1.3492186597203562
Rejected: LBFGS Orientation magnitude: 1.376e+04, gradient 1.221e-01, dot -0.041; [93445137-75f9-43d1-9801-0801f46d8231 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -95.73720174977846, -95.10624797526552, -4.347616993978502, -3.0049649589696306
LBFGS Accumulation History: 3 points
Removed measurement 18d424cb to history. Total: 4
Removed measurement 271bfdb3 to history. Total: 3
th(0)=-95.73720174977846;dx=-0.014917138715204163
New Minimum: -95.73720174977846 > -95.73865713291734
WOLFE (weak): th(0.1252631629482134)=-95.73865713291734; dx=-0.014602631680404392 evalInputDelta=0.001455383138875277
New Minimum: -95.73865713291734 > -95.74004834625454
WOLFE (weak): th(0.2505263258964268)=-95.74004834625454; dx=-0.014601196222382977 evalInputDelta=0.002846596476075547
New Minimum: -95.74004834625454 > -95.74577736624066
WOLFE (weak): th(0.7515789776892805)=-95.74577736624066; dx=-0.01460576393641046 evalInputDelta=0.008575616462195512
New Minimum: -95.74577736624066 > -95.77170801966764
WOLFE (weak): th(3.006315910757122)=-95.77170801966764; dx=-0.014530640396386412 evalInputDelta=0.03450626988917804
New Minimum: -95.77170801966764 > -95.91030132124318
WOLFE (weak): th(15.03157955378561)=-95.91030132124318; dx=-0.014474998573441093 evalInputDelta=0.17309957146471788
New Minimum: -95.91030132124318 > -96.77505381080809
WOLFE (weak): th(90.18947732271366)=-96.77505381080809; dx=-0.01426259026902425 evalInputDelta=1.037852061029625
New Minimum: -96.77505381080809 > -102.36667579199235
END: th(631.3263412589956)=-102.36667579199235; dx=-0.011403193929995791 evalInputDelta=6.629474042213886
Fitness changed from -95.73720174977846 to -102.36667579199235
Iteration 25 complete. Error: -102.36667579199235 Total: 11.0564; Orientation: 1.0173; Line Search: 8.9758
<a id="p-19"></a>Iteration 25
<a id="p-18"></a>![Iteration 25](etc/c77b660b-1df9-4ecb-9d95-0205b04dee97.jpg)
Adding measurement 5557e1cf to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.887e+03, gradient 1.127e-01, dot 0.213; [93445137-75f9-43d1-9801-0801f46d8231 = 1.000/1.000e+00]
th(0)=-102.36667579199235;dx=-45.360199581662265
Armijo: th(1360.1513703392875)=-29.016005736550095; dx=0.01535733771030838 evalInputDelta=-73.35067005544225
Armijo: th(680.0756851696437)=-28.004108127222427; dx=0.02508043162021724 evalInputDelta=-74.36256766476993
Armijo: th(226.6918950565479)=-25.97873558281531; dx=0.06816080134105547 evalInputDelta=-76.38794020917703
Armijo: th(56.67297376413698)=-20.451922379149305; dx=0.5337897392825681 evalInputDelta=-81.91475341284304
Armijo: th(11.334594752827396)=-42.3085052560682; dx=1.7878510981892886 evalInputDelta=-60.05817053592415
Armijo: th(1.8890991254712326)=-96.23104274325452; dx=-4.864342594927866 evalInputDelta=-6.13563304873783
New Minimum: -102.36667579199235 > -109.40005615831541
END: th(0.2698713036387475)=-109.40005615831541; dx=-28.22794125089873 evalInputDelta=7.033380366323058
Fitness changed from -102.36667579199235 to -109.40005615831541
Iteration 26 complete. Error: -109.40005615831541 Total: 11.4416; Orientation: 0.4415; Line Search: 9.9177
Adding measurement 5ac7bab5 to history. Total: 4
Accepted: LBFGS Orientation magnitude: 3.371e+03, gradient 1.220e-01, dot 0.017; [93445137-75f9-43d1-9801-0801f46d8231 = 1.000/1.000e+00]
th(0)=-109.40005615831541;dx=-7.163950457465282
Armijo: th(0.5814200984034453)=-46.22917920392579; dx=40.774871964629305 evalInputDelta=-63.17087695438962
Armijo: th(0.29071004920172266)=-83.14725672734481; dx=45.29920757175687 evalInputDelta=-26.252799430970597
Armijo: th(0.09690334973390756)=-104.22918876653658; dx=16.97324717550228 evalInputDelta=-5.1708673917788275
Armijo: th(0.02422583743347689)=-108.48375476750181; dx=0.0644750404024137 evalInputDelta=-0.9163013908136008
Armijo: th(0.004845167486695378)=-109.24187816021166; dx=-6.462707713160891 evalInputDelta=-0.15817799810375277
Armijo: th(8.075279144492296E-4)=-109.37420855844532; dx=-6.654292150335308 evalInputDelta=-0.02584759987009022
Armijo: th(1.1536113063560423E-4)=-109.3964036166455; dx=-7.109106385754538 evalInputDelta=-0.003652541669907805
Armijo: th(1.4420141329450529E-5)=-109.39956845807679; dx=-7.1472478446710275 evalInputDelta=-4.877002386223239E-4
Armijo: th(1.6022379254945033E-6)=-109.40000703752654; dx=-7.103328897376903 evalInputDelta=-4.9120788872869525E-5
Armijo: th(1.6022379254945032E-7)=-109.40004563243394; dx=-7.138735441140842 evalInputDelta=-1.05258814642184E-5
Armijo: th(1.4565799322677302E-8)=-109.40005615831541; dx=-7.13212697495435 evalInputDelta=0.0
Armijo: th(1.2138166102231084E-9)=-109.40005615831541; dx=-7.131093280482958 evalInputDelta=0.0
MIN ALPHA (9.337050847870064E-11): th(0.0)=-109.40005615831541
Fitness changed from -109.40005615831541 to -109.40005615831541
Static Iteration Total: 17.1064; Orientation: 0.5623; Line Search: 15.4742
Iteration 27 failed. Error: -109.40005615831541
Previous Error: 0.0 -> -109.40005615831541
Retrying iteration 27
Reset training subject: 2424400947622
Adding measurement 65f873d6 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-109.40005615831541;dx=-0.014868393161592646
WOLFE (weak): th(2.1544346900318838E-10)=-109.40005615831541; dx=-0.014550901035044021 evalInputDelta=0.0
WOLFE (weak): th(4.3088693800637676E-10)=-109.40005615831541; dx=-0.014551281001605056 evalInputDelta=0.0
WOLFE (weak): th(1.2926608140191302E-9)=-109.40005615831541; dx=-0.01455135750496504 evalInputDelta=0.0
WOLFE (weak): th(5.170643256076521E-9)=-109.40005615831541; dx=-0.014551931103662381 evalInputDelta=0.0
WOLFE (weak): th(2.5853216280382606E-8)=-109.40005615831541; dx=-0.014552294108276204 evalInputDelta=0.0
WOLFE (weak): th(1.5511929768229565E-7)=-109.40005615831541; dx=-0.014551660012784485 evalInputDelta=0.0
Armijo: th(1.0858350837760695E-6)=-109.40005615831541; dx=-0.014550677310234239 evalInputDelta=0.0
Armijo: th(6.204771907291826E-7)=-109.40005615831541; dx=-0.014551954541608469 evalInputDelta=0.0
WOLFE (weak): th(3.877982442057391E-7)=-109.40005615831541; dx=-0.014552128790768778 evalInputDelta=0.0
Armijo: th(5.041377174674609E-7)=-109.40005615831541; dx=-0.0145507283814854 evalInputDelta=0.0
WOLFE (weak): th(4.459679808366E-7)=-109.40005615831541; dx=-0.014550846517978673 evalInputDelta=0.0
WOLFE (weak): th(4.750528491520304E-7)=-109.40005615831541; dx=-0.014551480836170283 evalInputDelta=0.0
Armijo: th(4.895952833097456E-7)=-109.40005615831541; dx=-0.0145513526742336 evalInputDelta=0.0
Armijo: th(4.82324066230888E-7)=-109.40005615831541; dx=-0.01455054808875334 evalInputDelta=0.0
Armijo: th(4.786884576914592E-7)=-109.40005615831541; dx=-0.014552707067961839 evalInputDelta=0.0
WOLFE (weak): th(4.768706534217448E-7)=-109.40005615831541; dx=-0.014552004882504011 evalInputDelta=0.0
WOLFE (weak): th(4.77779555556602E-7)=-109.40005615831541; dx=-0.014552232179590247 evalInputDelta=0.0
Armijo: th(4.782340066240306E-7)=-109.40005615831541; dx=-0.014551412546758218 evalInputDelta=0.0
Armijo: th(4.780067810903163E-7)=-109.40005615831541; dx=-0.014551623760464137 evalInputDelta=0.0
Armijo: th(4.778931683234591E-7)=-109.40005615831541; dx=-0.014551392661178084 evalInputDelta=0.0
WOLFE (weak): th(4.778363619400306E-7)=-109.40005615831541; dx=-0.014551234391749806 evalInputDelta=0.0
WOLFE (weak): th(4.778647651317449E-7)=-109.40005615831541; dx=-0.01455107815700385 evalInputDelta=0.0
WOLFE (weak): th(4.77878966727602E-7)=-109.40005615831541; dx=-0.014551592040680066 evalInputDelta=0.0
WOLFE (weak): th(4.778860675255306E-7)=-109.40005615831541; dx=-0.0145512475698218 evalInputDelta=0.0
Armijo: th(4.778896179244948E-7)=-109.40005615831541; dx=-0.014551442099752197 evalInputDelta=0.0
mu ~= nu (4.778860675255306E-7): th(0.0)=-109.40005615831541
Fitness changed from -109.40005615831541 to -109.40005615831541
Static Iteration Total: 32.2276; Orientation: 0.0188; Line Search: 30.1077
Iteration 28 failed. Error: -109.40005615831541
Previous Error: 0.0 -> -109.40005615831541
Optimization terminated 28
Final threshold in iteration 28: -109.40005615831541 (> -Infinity) after 225.066s (< 3600.000s)

Returns

    -109.40005615831541