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

BasicOptimizer.scala:89 executed in 213.69 seconds (2.275 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: 4131406716725
Reset training subject: 4133097960617
Adding measurement 1b8a868b to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.09432141683907229;dx=-8.166959920463458E-5
New Minimum: -0.09432141683907229 > -0.09449561960863741
WOLFE (weak): th(2.154434690031884)=-0.09449561960863741; dx=-8.171307051915168E-5 evalInputDelta=1.7420276956511827E-4
New Minimum: -0.09449561960863741 > -0.09467071184513151
WOLFE (weak): th(4.308869380063768)=-0.09467071184513151; dx=-8.108341193466999E-5 evalInputDelta=3.4929500605922204E-4
New Minimum: -0.09467071184513151 > -0.09537365214087873
WOLFE (weak): th(12.926608140191302)=-0.09537365214087873; dx=-8.14585612050554E-5 evalInputDelta=0.0010522353018064395
New Minimum: -0.09537365214087873 > -0.09857174899924612
WOLFE (weak): th(51.70643256076521)=-0.09857174899924612; dx=-8.275149949451746E-5 evalInputDelta=0.004250332160173828
New Minimum: -0.09857174899924612 > -0.11644323356740761
WOLFE (weak): th(258.53216280382605)=-0.11644323356740761; dx=-8.870878263707776E-5 evalInputDelta=0.022121816728335325
New Minimum: -0.11644323356740761 > -0.2456502096328602
WOLFE (weak): th(1551.1929768229563)=-0.2456502096328602; dx=-1.0728599157508532E-4 evalInputDelta=0.15132879279378791
New Minimum: -0.2456502096328602 > -0.9321167566897436
END: th(10858.350837760694)=-0.9321167566897436; dx=-4.557394172217723E-5 evalInputDelta=0.8377953398506713
Fitness changed from -0.09432141683907229 to -0.9321167566897436
Iteration 1 complete. Error: -0.9321167566897436 Total: 13.5108; Orientation: 0.0184; Line Search: 9.4067
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/19ec462a-38f0-4c37-b898-40386c466329.jpg)
Adding measurement fee2691 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.9321167566897436;dx=-4.76532384721003E-4
New Minimum: -0.9321167566897436 > -6.312583394019069
END: th(23393.607721408407)=-6.312583394019069; dx=-3.2121835370544324E-5 evalInputDelta=5.3804666373293255
Fitness changed from -0.9321167566897436 to -6.312583394019069
Iteration 2 complete. Error: -6.312583394019069 Total: 3.6282; Orientation: 0.0172; Line Search: 2.3594
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/a04a87fd-f708-45ac-9359-bffea1a7bfb9.jpg)
Adding measurement 65ec8e57 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-6.312583394019069;dx=-0.0013183309737141513
New Minimum: -6.312583394019069 > -13.326260470951649
END: th(50400.00000000001)=-13.326260470951649; dx=-1.641576403645184E-5 evalInputDelta=7.01367707693258
Fitness changed from -6.312583394019069 to -13.326260470951649
Iteration 3 complete. Error: -13.326260470951649 Total: 3.6737; Orientation: 0.0173; Line Search: 2.4005
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/4e59fa3d-bd5b-4701-b3c4-f0becb2bba6c.jpg)
Adding measurement 46894fcb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.533e+03, gradient 3.811e-02, dot -0.052; [42f402c9-97e6-4c2d-b11f-2e758f233bcd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -13.326260470951649, -6.312583394019069, -0.9321167566897436, -0.09432141683907229
LBFGS Accumulation History: 3 points
Removed measurement 46894fcb to history. Total: 3
th(0)=-13.326260470951649;dx=-0.0014489121745058582
New Minimum: -13.326260470951649 > -20.668502151853477
WOLF (strong): th(108583.50837760697)=-20.668502151853477; dx=1.6498676698904367E-5 evalInputDelta=7.342241680901829
New Minimum: -20.668502151853477 > -29.11784988849462
WOLF (strong): th(54291.75418880348)=-29.11784988849462; dx=7.191203110359411E-6 evalInputDelta=15.791589417542973
END: th(18097.251396267828)=-27.34093289059693; dx=-3.109075412865743E-4 evalInputDelta=14.014672419645283
Fitness changed from -13.326260470951649 to -29.11784988849462
Iteration 4 complete. Error: -29.11784988849462 Total: 6.4755; Orientation: 0.4552; Line Search: 4.7503
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/f72e9eac-84e2-4abf-ab36-b6ee4bb4da25.jpg)
Adding measurement 5ef58173 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.489e+03, gradient 4.224e-02, dot -0.044; [42f402c9-97e6-4c2d-b11f-2e758f233bcd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -29.11784988849462, -6.312583394019069, -0.9321167566897436, -0.09432141683907229
LBFGS Accumulation History: 3 points
Removed measurement 5ef58173 to history. Total: 3
th(0)=-29.11784988849462;dx=-0.001773567820185115
New Minimum: -29.11784988849462 > -44.00391162477774
END: th(38989.346202347355)=-44.00391162477774; dx=-7.777382323504475E-5 evalInputDelta=14.886061736283121
Fitness changed from -29.11784988849462 to -44.00391162477774
Iteration 5 complete. Error: -44.00391162477774 Total: 4.1333; Orientation: 0.4469; Line Search: 2.4266
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/a58cc00b-d588-4acc-8661-e0fb7316633b.jpg)
Adding measurement 71747d33 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.276e+03, gradient 4.379e-02, dot -0.025; [42f402c9-97e6-4c2d-b11f-2e758f233bcd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.00391162477774, -6.312583394019069, -0.9321167566897436, -0.09432141683907229
LBFGS Accumulation History: 3 points
Removed measurement 71747d33 to history. Total: 3
th(0)=-44.00391162477774;dx=-0.001887728367427622
Armijo: th(84000.00000000003)=-28.652766324849093; dx=1.3939392740325876E-4 evalInputDelta=-15.35114529992865
New Minimum: -44.00391162477774 > -47.937930347644595
WOLF (strong): th(42000.000000000015)=-47.937930347644595; dx=1.2730974029767557E-4 evalInputDelta=3.9340187228668526
New Minimum: -47.937930347644595 > -58.16118455354804
END: th(14000.000000000005)=-58.16118455354804; dx=-3.925600351137701E-4 evalInputDelta=14.157272928770297
Fitness changed from -44.00391162477774 to -58.16118455354804
Iteration 6 complete. Error: -58.16118455354804 Total: 6.4401; Orientation: 0.4501; Line Search: 4.7411
Adding measurement 775658e6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.178e+04, gradient 3.990e-02, dot -0.045; [42f402c9-97e6-4c2d-b11f-2e758f233bcd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -58.16118455354804, -6.312583394019069, -0.9321167566897436, -0.09432141683907229
LBFGS Accumulation History: 3 points
Removed measurement 775658e6 to history. Total: 3
th(0)=-58.16118455354804;dx=-0.0015778014880988805
New Minimum: -58.16118455354804 > -67.71105242937632
END: th(30162.085660446384)=-67.71105242937632; dx=-9.534790082574502E-5 evalInputDelta=9.549867875828284
Fitness changed from -58.16118455354804 to -67.71105242937632
Iteration 7 complete. Error: -67.71105242937632 Total: 4.4107; Orientation: 0.8817; Line Search: 2.4004
Adding measurement 31aec362 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.396e+04, gradient 5.731e-02, dot -0.034; [42f402c9-97e6-4c2d-b11f-2e758f233bcd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -67.71105242937632, -6.312583394019069, -0.9321167566897436, -0.09432141683907229
LBFGS Accumulation History: 3 points
Removed measurement 31aec362 to history. Total: 3
th(0)=-67.71105242937632;dx=-0.003255536705825827
Armijo: th(64982.24367057894)=-27.75293503094819; dx=2.1650384600874217E-4 evalInputDelta=-39.95811739842813
Armijo: th(32491.12183528947)=-53.98197579690373; dx=4.5260498105227084E-4 evalInputDelta=-13.72907663247259
New Minimum: -67.71105242937632 > -79.83255486583309
WOLF (strong): th(10830.37394509649)=-79.83255486583309; dx=4.963703611249892E-5 evalInputDelta=12.121502436456765
END: th(2707.5934862741224)=-75.52588740272272; dx=-0.0021652670758038712 evalInputDelta=7.814834973346393
Fitness changed from -67.71105242937632 to -79.83255486583309
Iteration 8 complete. Error: -79.83255486583309 Total: 7.5287; Orientation: 0.4467; Line Search: 5.9719
Adding measurement 24148ab0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.183e+04, gradient 4.951e-02, dot -0.051; [42f402c9-97e6-4c2d-b11f-2e758f233bcd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -79.8325548658330

...skipping 13714 bytes...

3.715e-02, dot 0.158; [42f402c9-97e6-4c2d-b11f-2e758f233bcd = 1.000/1.000e+00]
th(0)=-148.08774584262534;dx=-1308.5014565039908
Armijo: th(5387.31811207676)=-2.1809796840765703; dx=7.48256420816784E-5 evalInputDelta=-145.90676615854878
Armijo: th(2693.65905603838)=-2.194915735630262; dx=1.9850833800448198E-4 evalInputDelta=-145.89283010699506
Armijo: th(897.8863520127934)=-2.226320701988603; dx=3.8824196876949366E-4 evalInputDelta=-145.86142514063673
Armijo: th(224.47158800319835)=-2.228008135583841; dx=0.003287948608250195 evalInputDelta=-145.8597377070415
Armijo: th(44.89431760063967)=-2.181418329864908; dx=0.008189945883326218 evalInputDelta=-145.90632751276044
Armijo: th(7.482386266773278)=-1.990490658237716; dx=0.0492456353967548 evalInputDelta=-146.09725518438762
Armijo: th(1.068912323824754)=-4.994468299281646; dx=1.8524755554678718 evalInputDelta=-143.0932775433437
Armijo: th(0.13361404047809425)=-29.523534665095468; dx=35.874925712442135 evalInputDelta=-118.56421117752987
Armijo: th(0.014846004497566028)=-120.41074316817624; dx=1317.5872481922688 evalInputDelta=-27.6770026744491
New Minimum: -148.08774584262534 > -149.52542112463686
END: th(0.0014846004497566028)=-149.52542112463686; dx=-318.95656228335747 evalInputDelta=1.4376752820115257
Fitness changed from -148.08774584262534 to -149.52542112463686
Iteration 22 complete. Error: -149.52542112463686 Total: 14.6396; Orientation: 0.4402; Line Search: 13.0823
Adding measurement 416c19d0 to history. Total: 4
Accepted: LBFGS Orientation magnitude: 4.369e+04, gradient 3.861e-02, dot 0.062; [42f402c9-97e6-4c2d-b11f-2e758f233bcd = 1.000/1.000e+00]
th(0)=-149.52542112463686;dx=-103.5027896079201
New Minimum: -149.52542112463686 > -149.5785942552443
END: th(0.0031984747097925617)=-149.5785942552443; dx=-8.215257964132881 evalInputDelta=0.05317313060743345
Fitness changed from -149.52542112463686 to -149.5785942552443
Iteration 23 complete. Error: -149.5785942552443 Total: 4.1544; Orientation: 0.6497; Line Search: 2.3774
Adding measurement d8180e9 to history. Total: 5
Accepted: LBFGS Orientation magnitude: 2.529e+04, gradient 3.996e-02, dot 0.019; [42f402c9-97e6-4c2d-b11f-2e758f233bcd = 1.000/1.000e+00]
th(0)=-149.5785942552443;dx=-18.90538034320044
Armijo: th(0.006890904869966757)=-149.20776464799007; dx=37.19374791054134 evalInputDelta=-0.37082960725422254
Armijo: th(0.0034454524349833786)=-149.43851944445248; dx=20.265409573298086 evalInputDelta=-0.14007481079181616
Armijo: th(0.0011484841449944595)=-149.54223771020347; dx=8.380119489877838 evalInputDelta=-0.036356545040831634
Armijo: th(2.871210362486149E-4)=-149.5706746616796; dx=3.846260855698196 evalInputDelta=-0.007919593564707839
Armijo: th(5.7424207249722976E-5)=-149.57709916210436; dx=3.957354352237921 evalInputDelta=-0.0014950931399368983
Armijo: th(9.570701208287163E-6)=-149.57835269098933; dx=3.9764877951586666 evalInputDelta=-2.415642549635777E-4
Armijo: th(1.367243029755309E-6)=-149.57856814020852; dx=3.215343214548051 evalInputDelta=-2.611503578009433E-5
Armijo: th(1.7090537871941362E-7)=-149.5785942552443; dx=3.8214583370149366 evalInputDelta=0.0
Armijo: th(1.8989486524379292E-8)=-149.5785942552443; dx=3.8902186247671757 evalInputDelta=0.0
New Minimum: -149.5785942552443 > -149.57860078400253
WOLF (strong): th(1.898948652437929E-9)=-149.57860078400253; dx=3.568828529909977 evalInputDelta=6.528758234480847E-6
WOLF (strong): th(1.7263169567617536E-10)=-149.5785942552443; dx=3.796029170737258 evalInputDelta=0.0
MIN ALPHA (1.438597463968128E-11): th(1.898948652437929E-9)=-149.57860078400253
Fitness changed from -149.5785942552443 to -149.57860078400253
Iteration 24 complete. Error: -149.57860078400253 Total: 17.6935; Orientation: 0.6688; Line Search: 15.8996
Adding measurement 6b8a79d1 to history. Total: 6
Accepted: LBFGS Orientation magnitude: 1.311e+04, gradient 3.998e-02, dot 0.018; [42f402c9-97e6-4c2d-b11f-2e758f233bcd = 1.000/1.000e+00]
th(0)=-149.57860078400253;dx=-9.859488229932762
Armijo: th(2.1544346900318838E-10)=-149.5785942552443; dx=2.0060892781720288 evalInputDelta=-6.528758234480847E-6
Armijo: th(1.0772173450159419E-10)=-149.5785942552443; dx=2.1416855943399424 evalInputDelta=-6.528758234480847E-6
MIN ALPHA (3.590724483386473E-11): th(0.0)=-149.57860078400253
Fitness changed from -149.57860078400253 to -149.57860078400253
Static Iteration Total: 6.6653; Orientation: 0.8035; Line Search: 4.7237
Iteration 25 failed. Error: -149.57860078400253
Previous Error: 0.0 -> -149.57860078400253
Retrying iteration 25
Reset training subject: 4306673074178
Adding measurement 5b3dfd79 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-149.57860078400253;dx=-0.0015892184159465661
WOLFE (weak): th(2.1544346900318838E-10)=-149.57860078400253; dx=-0.001536702480542024 evalInputDelta=0.0
WOLFE (weak): th(4.3088693800637676E-10)=-149.57860078400253; dx=-0.0015317278735525837 evalInputDelta=0.0
WOLFE (weak): th(1.2926608140191302E-9)=-149.57860078400253; dx=-0.0015244452759409178 evalInputDelta=0.0
WOLFE (weak): th(5.170643256076521E-9)=-149.57860078400253; dx=-0.0015369034127499727 evalInputDelta=0.0
WOLFE (weak): th(2.5853216280382606E-8)=-149.57860078400253; dx=-0.001518914685459841 evalInputDelta=0.0
WOLFE (weak): th(1.5511929768229565E-7)=-149.57860078400253; dx=-0.0015341522125230844 evalInputDelta=0.0
WOLFE (weak): th(1.0858350837760695E-6)=-149.57860078400253; dx=-0.0015305379672474512 evalInputDelta=0.0
Armijo: th(8.686680670208556E-6)=-149.5785942552443; dx=-0.0015349050434766858 evalInputDelta=-6.528758234480847E-6
Armijo: th(4.886257876992313E-6)=-149.5785942552443; dx=-0.001526827698616985 evalInputDelta=-6.528758234480847E-6
Armijo: th(2.986046480384191E-6)=-149.5785942552443; dx=-0.0015306525191087776 evalInputDelta=-6.528758234480847E-6
Armijo: th(2.0359407820801304E-6)=-149.5785942552443; dx=-0.0015193357836118333 evalInputDelta=-6.528758234480847E-6
Armijo: th(1.5608879329281E-6)=-149.5785942552443; dx=-0.001533828793004289 evalInputDelta=-6.528758234480847E-6
Armijo: th(1.3233615083520847E-6)=-149.5785942552443; dx=-0.001534803280776028 evalInputDelta=-6.528758234480847E-6
WOLFE (weak): th(1.2045982960640772E-6)=-149.57860078400253; dx=-0.0015309592373110039 evalInputDelta=0.0
Armijo: th(1.263979902208081E-6)=-149.5785942552443; dx=-0.0015351416966616943 evalInputDelta=-6.528758234480847E-6
WOLFE (weak): th(1.2342890991360792E-6)=-149.57860078400253; dx=-0.001516920287087853 evalInputDelta=0.0
Armijo: th(1.2491345006720802E-6)=-149.5785942552443; dx=-0.0015334001890258608 evalInputDelta=-6.528758234480847E-6
WOLFE (weak): th(1.2417117999040798E-6)=-149.57860078400253; dx=-0.001537030902306857 evalInputDelta=0.0
Armijo: th(1.24542315028808E-6)=-149.5785942552443; dx=-0.001533672135171112 evalInputDelta=-6.528758234480847E-6
WOLFE (weak): th(1.24356747509608E-6)=-149.57860078400253; dx=-0.00152478860495865 evalInputDelta=0.0
WOLFE (weak): th(1.24449531269208E-6)=-149.57860078400253; dx=-0.0015378424474741374 evalInputDelta=0.0
Armijo: th(1.24495923149008E-6)=-149.5785942552443; dx=-0.0015328062160633949 evalInputDelta=-6.528758234480847E-6
Armijo: th(1.2447272720910801E-6)=-149.5785942552443; dx=-0.001529751978022811 evalInputDelta=-6.528758234480847E-6
Armijo: th(1.2446112923915802E-6)=-149.5785942552443; dx=-0.0015058369863116391 evalInputDelta=-6.528758234480847E-6
WOLFE (weak): th(1.2445533025418302E-6)=-149.57860078400253; dx=-0.0015321738263057738 evalInputDelta=0.0
Armijo: th(1.2445822974667052E-6)=-149.5785942552443; dx=-0.001531508612760061 evalInputDelta=-6.528758234480847E-6
WOLFE (weak): th(1.2445678000042678E-6)=-149.57860078400253; dx=-0.001536694659239837 evalInputDelta=0.0
WOLFE (weak): th(1.2445750487354864E-6)=-149.57860078400253; dx=-0.0015347035798291744 evalInputDelta=0.0
mu ~= nu (1.2445750487354864E-6): th(0.0)=-149.57860078400253
Fitness changed from -149.57860078400253 to -149.57860078400253
Static Iteration Total: 38.4194; Orientation: 0.0178; Line Search: 36.1186
Iteration 26 failed. Error: -149.57860078400253
Previous Error: 0.0 -> -149.57860078400253
Optimization terminated 26
Final threshold in iteration 26: -149.57860078400253 (> -Infinity) after 213.686s (< 3600.000s)

Returns

    -149.57860078400253