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

Iteration 30 Iteration 30

Iteration 35 Iteration 35

BasicOptimizer.scala:89 executed in 234.80 seconds (2.546 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: 2233528112082
Reset training subject: 2234414440467
Adding measurement 717cba78 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-3.134960627209738;dx=-2.594258918740769E-4
New Minimum: -3.134960627209738 > -3.1354558357166336
WOLFE (weak): th(2.154434690031884)=-3.1354558357166336; dx=-2.609284059323537E-4 evalInputDelta=4.952085068956613E-4
New Minimum: -3.1354558357166336 > -3.135950205748192
WOLFE (weak): th(4.308869380063768)=-3.135950205748192; dx=-2.6020398247684454E-4 evalInputDelta=9.89578538454161E-4
New Minimum: -3.135950205748192 > -3.137937240225845
WOLFE (weak): th(12.926608140191302)=-3.137937240225845; dx=-2.602939905592544E-4 evalInputDelta=0.002976613016107077
New Minimum: -3.137937240225845 > -3.146882158136797
WOLFE (weak): th(51.70643256076521)=-3.146882158136797; dx=-2.6173148610374565E-4 evalInputDelta=0.011921530927059276
New Minimum: -3.146882158136797 > -3.1953671177903886
WOLFE (weak): th(258.53216280382605)=-3.1953671177903886; dx=-2.6442179111995707E-4 evalInputDelta=0.06040649058065073
New Minimum: -3.1953671177903886 > -3.5298371315793133
WOLFE (weak): th(1551.1929768229563)=-3.5298371315793133; dx=-3.007095605967137E-4 evalInputDelta=0.39487650436957544
New Minimum: -3.5298371315793133 > -5.380914317437285
END: th(10858.350837760694)=-5.380914317437285; dx=-1.3078971450744523E-4 evalInputDelta=2.245953690227547
Fitness changed from -3.134960627209738 to -5.380914317437285
Iteration 1 complete. Error: -5.380914317437285 Total: 9.7585; Orientation: 0.0196; Line Search: 7.1415
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/d3668b6e-b92a-405a-baec-6242462f67f9.jpg)
Adding measurement 5089f19 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-5.380914317437285;dx=-9.063805031710218E-4
New Minimum: -5.380914317437285 > -9.70670899867514
END: th(23393.607721408407)=-9.70670899867514; dx=-7.907442579613064E-5 evalInputDelta=4.325794681237855
Fitness changed from -5.380914317437285 to -9.70670899867514
Iteration 2 complete. Error: -9.70670899867514 Total: 2.7154; Orientation: 0.0201; Line Search: 1.8159
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/77c99dd9-8661-4f3e-b149-9147c374cd48.jpg)
Adding measurement c6a8b30 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-9.70670899867514;dx=-0.0015285922214153763
New Minimum: -9.70670899867514 > -11.963350278159112
WOLF (strong): th(50400.00000000001)=-11.963350278159112; dx=1.3611097237791182E-5 evalInputDelta=2.256641279483972
New Minimum: -11.963350278159112 > -14.711209773270316
END: th(25200.000000000004)=-14.711209773270316; dx=-3.925023377171588E-5 evalInputDelta=5.004500774595176
Fitness changed from -9.70670899867514 to -14.711209773270316
Iteration 3 complete. Error: -14.711209773270316 Total: 3.7115; Orientation: 0.0196; Line Search: 2.7079
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/46e28025-e23b-4789-b894-eb00dacc46c2.jpg)
Adding measurement 7f63537d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.041e+03, gradient 5.069e-02, dot -0.074; [8283c894-1c7b-4276-9ccf-bb179316357a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -14.711209773270316, -9.70670899867514, -5.380914317437285, -3.134960627209738
LBFGS Accumulation History: 3 points
Removed measurement 7f63537d to history. Total: 3
th(0)=-14.711209773270316;dx=-0.0025529815234467523
New Minimum: -14.711209773270316 > -14.744490289477096
WOLF (strong): th(54291.75418880348)=-14.744490289477096; dx=3.970536423226779E-5 evalInputDelta=0.033280516206779964
New Minimum: -14.744490289477096 > -20.157050916742662
WOLF (strong): th(27145.87709440174)=-20.157050916742662; dx=2.7809307052025655E-5 evalInputDelta=5.445841143472347
New Minimum: -20.157050916742662 > -22.66108919224551
END: th(9048.625698133914)=-22.66108919224551; dx=-3.0953005123874775E-4 evalInputDelta=7.949879418975193
Fitness changed from -14.711209773270316 to -22.66108919224551
Iteration 4 complete. Error: -22.66108919224551 Total: 4.9611; Orientation: 0.4975; Line Search: 3.6032
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/c1f13001-d437-4f9d-9c78-e0b1ac1e70f8.jpg)
Adding measurement 4ab454f8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.041e+03, gradient 4.865e-02, dot -0.076; [8283c894-1c7b-4276-9ccf-bb179316357a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -22.66108919224551, -9.70670899867514, -5.380914317437285, -3.134960627209738
LBFGS Accumulation History: 3 points
Removed measurement 4ab454f8 to history. Total: 3
th(0)=-22.66108919224551;dx=-0.0023536029334729966
New Minimum: -22.66108919224551 > -25.982246793483814
WOLF (strong): th(19494.673101173677)=-25.982246793483814; dx=6.019077284528534E-5 evalInputDelta=3.321157601238305
New Minimum: -25.982246793483814 > -28.197930615838196
END: th(9747.336550586839)=-28.197930615838196; dx=-1.951579611653389E-4 evalInputDelta=5.536841423592687
Fitness changed from -22.66108919224551 to -28.197930615838196
Iteration 5 complete. Error: -28.197930615838196 Total: 4.7668; Orientation: 0.4859; Line Search: 3.4065
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/e00efc40-0b96-45b4-aef2-a00ce2447931.jpg)
Adding measurement 6d52a1b2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.941e+03, gradient 5.687e-02, dot -0.077; [8283c894-1c7b-4276-9ccf-bb179316357a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -28.197930615838196, -9.70670899867514, -5.380914317437285, -3.134960627209738
LBFGS Accumulation History: 3 points
Removed measurement 6d52a1b2 to history. Total: 3
th(0)=-28.197930615838196;dx=-0.0032176666515585104
Armijo: th(21000.000000000007)=-27.77753244249298; dx=1.8860696949226714E-4 evalInputDelta=-0.420398173345216
New Minimum: -28.197930615838196 > -32.53803926212269
WOLF (strong): th(10500.000000000004)=-32.53803926212269; dx=9.855023465095783E-5 evalInputDelta=4.3401086462844916
New Minimum: -32.53803926212269 > -33.29220036988769
END: th(3500.0000000000014)=-33.29220036988769; dx=-0.0010975619953422222 evalInputDelta=5.094269754049492
Fitness changed from -28.197930615838196 to -33.29220036988769
Iteration 6 complete. Error: -33.29220036988769 Total: 5.0098; Orientation: 0.5030; Line Search: 3.6258
Adding measurement 32cb3367 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.788e+03, gradient 4.494e-02, dot -0.088; [8283c894-1c7b-4276-9ccf-bb179316357a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -33.29220036988769, -9.70670899867514, -5.380914317437285, -3.134960627209738
LBFGS Accumulation History: 3 points
Removed measurement 32cb3367 to history. Total: 3
th(0)=-33.29220036988769;dx=-0.0020076916748410657
New Minimum: -33.29220036988769 > -37.681683902896545
END: th(7540.521415111596)=-37.681683902896545; dx=-5.275609665135795E-4 evalInputDelta=4.389483533008857
Fitness changed from -33.29220036988769 to -37.681683902896545
Iteration 7 complete. Error: -37.681683902896545 Total: 3.2643; Orientation: 0.5856; Line Search: 1.8281
Adding measurement 4980284b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.973e+03, gradient 5.367e-02, dot -0.083; [8283c894-1c7b-4276-9ccf-bb179316357a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -37.681683902896545, -9.70670899867514, -5.380914317437285, -3.134960627209738
LBFGS Accumulation History: 3 points
Removed measurement 4980284b to history. Total: 3
th(0)=-37.681683902896545;dx=-0.0028660698570443363
Armijo: th(16245.560917644734)=-36.49505665369284; dx=2.4992809232299545E-4 evalInputDelta=-1.1866272492037027
New Minimum: -37.681683902896545 > -40.63543585912347
WOLF (strong): th(8122.780458822367)=-40.63543585912347; dx=3.7399057791574354E-5 evalInputDelta=2.953751956226924
New Minimum: -40.63543585912347 > -41.108390631031
END: th(2707.5934862741224)=-41.108390631031; dx=-0.0010291412326233003 evalInputDelta=3.426706728134455
Fitness changed from -37.681683902896545 to -41.108390631031
Iteration 8 complete. Error: -41.108390631031 Total: 4.9512; Orientation: 0.4

...skipping 28697 bytes...

47392734028227; dx=-4.131164143043584 evalInputDelta=-1.0037885063240992E-4
Armijo: th(1.5220092453130858E-6)=-126.47402385840935; dx=-4.142407763422528 evalInputDelta=-3.860723552406853E-6
New Minimum: -126.4740277191329 > -126.47403157985634
WOLFE (weak): th(1.5220092453130858E-7)=-126.47403157985634; dx=-4.208211157960645 evalInputDelta=3.860723438720015E-6
Armijo: th(8.371050849221972E-7)=-126.47402385840935; dx=-4.179515692111277 evalInputDelta=-3.860723552406853E-6
WOLFE (weak): th(4.946530047267529E-7)=-126.47403157985634; dx=-4.185821719125842 evalInputDelta=3.860723438720015E-6
Armijo: th(6.65879044824475E-7)=-126.47402385840935; dx=-4.201659544962041 evalInputDelta=-3.860723552406853E-6
WOLFE (weak): th(5.80266024775614E-7)=-126.47403157985634; dx=-4.152793824725726 evalInputDelta=3.860723438720015E-6
Armijo: th(6.230725348000445E-7)=-126.47402385840935; dx=-4.164320023191991 evalInputDelta=-3.860723552406853E-6
WOLFE (weak): th(6.016692797878293E-7)=-126.47403157985634; dx=-4.214975688890094 evalInputDelta=3.860723438720015E-6
WOLFE (weak): th(6.123709072939369E-7)=-126.47403157985634; dx=-4.13177640649949 evalInputDelta=3.860723438720015E-6
Armijo: th(6.177217210469908E-7)=-126.47402385840935; dx=-4.136800417484753 evalInputDelta=-3.860723552406853E-6
WOLFE (weak): th(6.150463141704638E-7)=-126.47403157985634; dx=-4.101756419020129 evalInputDelta=3.860723438720015E-6
WOLFE (weak): th(6.163840176087273E-7)=-126.47403157985634; dx=-4.12497567147995 evalInputDelta=3.860723438720015E-6
Armijo: th(6.17052869327859E-7)=-126.47402385840935; dx=-4.177798311421577 evalInputDelta=-3.860723552406853E-6
Armijo: th(6.167184434682932E-7)=-126.4740277191329; dx=-4.17116773294468 evalInputDelta=0.0
WOLFE (weak): th(6.165512305385103E-7)=-126.47403157985634; dx=-4.169492770554619 evalInputDelta=3.860723438720015E-6
WOLFE (weak): th(6.166348370034017E-7)=-126.47403157985634; dx=-4.0999408649111055 evalInputDelta=3.860723438720015E-6
END: th(6.166766402358475E-7)=-126.47403157985634; dx=-4.049510187256605 evalInputDelta=3.860723438720015E-6
Fitness changed from -126.4740277191329 to -126.47403157985634
Iteration 37 complete. Error: -126.47403157985634 Total: 25.0964; Orientation: 0.5877; Line Search: 23.6615
Adding measurement 2ceab9fa to history. Total: 5
Rejected: LBFGS Orientation magnitude: 3.736e+09, gradient 5.743e-02, dot -0.058; [8283c894-1c7b-4276-9ccf-bb179316357a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -126.47403157985634, -126.4740277191329, -120.74277766961882, -9.70670899867514, -5.380914317437285, -3.134960627209738
Rejected: LBFGS Orientation magnitude: 2.918e+10, gradient 5.743e-02, dot -0.161; [8283c894-1c7b-4276-9ccf-bb179316357a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -126.47403157985634, -126.4740277191329, -120.74277766961882, -9.70670899867514, -5.380914317437285
Accepted: LBFGS Orientation magnitude: 5.078e+09, gradient 5.743e-02, dot 0.181; [8283c894-1c7b-4276-9ccf-bb179316357a = 1.000/1.000e+00]
Overwriting history with 4 points
th(0)=-126.47403157985634;dx=-5.258808115284956E7
Armijo: th(1.3285895462564215E-6)=-117.65253148174288; dx=-3665131.0618928345 evalInputDelta=-8.82150009811346
New Minimum: -126.47403157985634 > -129.6957226308948
END: th(6.642947731282107E-7)=-129.6957226308948; dx=-1.5518979377073918E7 evalInputDelta=3.221691051038462
Fitness changed from -126.47403157985634 to -129.6957226308948
Iteration 38 complete. Error: -129.6957226308948 Total: 6.0281; Orientation: 2.4900; Line Search: 2.7072
Adding measurement 3f445e5f to history. Total: 4
Accepted: LBFGS Orientation magnitude: 1.819e+09, gradient 9.091e-02, dot 0.041; [8283c894-1c7b-4276-9ccf-bb179316357a = 1.000/1.000e+00]
th(0)=-129.6957226308948;dx=-6745581.850010967
Armijo: th(1.4311797036342772E-6)=-120.73524754602526; dx=-1930999.0595317946 evalInputDelta=-8.960475084869543
Armijo: th(7.155898518171386E-7)=-125.7179382586272; dx=-3506230.3026210596 evalInputDelta=-3.9777843722676067
Armijo: th(2.3852995060571287E-7)=-128.51804803946797; dx=-4813425.715316028 evalInputDelta=-1.177674591426836
Armijo: th(5.963248765142822E-8)=-129.41620720566647; dx=-5295618.334940227 evalInputDelta=-0.2795154252283396
Armijo: th(1.1926497530285643E-8)=-129.64064665692237; dx=-5471817.922804954 evalInputDelta=-0.05507597397243558
Armijo: th(1.9877495883809407E-9)=-129.68661144273915; dx=-5445213.679818001 evalInputDelta=-0.009111188155657146
Armijo: th(2.83964226911563E-10)=-129.69442752581932; dx=-5490844.076512153 evalInputDelta=-0.0012951050754850257
MIN ALPHA (3.549552836394537E-11): th(0.0)=-129.6957226308948
Fitness changed from -129.6957226308948 to -129.6957226308948
Static Iteration Total: 9.6074; Orientation: 0.5936; Line Search: 8.1632
Iteration 39 failed. Error: -129.6957226308948
Previous Error: 0.0 -> -129.6957226308948
Retrying iteration 39
Reset training subject: 2439933675852
Adding measurement f774488 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-129.6957226308948;dx=-0.00823964748599394
WOLFE (weak): th(2.1544346900318838E-10)=-129.6957226308948; dx=-0.008200790380225146 evalInputDelta=0.0
WOLFE (weak): th(4.3088693800637676E-10)=-129.6957226308948; dx=-0.00820067246546747 evalInputDelta=0.0
WOLFE (weak): th(1.2926608140191302E-9)=-129.6957226308948; dx=-0.008200156163726782 evalInputDelta=0.0
WOLFE (weak): th(5.170643256076521E-9)=-129.6957226308948; dx=-0.0082030588227535 evalInputDelta=0.0
WOLFE (weak): th(2.5853216280382606E-8)=-129.6957226308948; dx=-0.008199632305148074 evalInputDelta=0.0
WOLFE (weak): th(1.5511929768229565E-7)=-129.6957226308948; dx=-0.00819947887196876 evalInputDelta=0.0
WOLFE (weak): th(1.0858350837760695E-6)=-129.6957226308948; dx=-0.008203533414215603 evalInputDelta=0.0
Armijo: th(8.686680670208556E-6)=-129.6957226308948; dx=-0.008196251833110658 evalInputDelta=0.0
Armijo: th(4.886257876992313E-6)=-129.6957226308948; dx=-0.008198390729153057 evalInputDelta=0.0
Armijo: th(2.986046480384191E-6)=-129.69571510125152; dx=-0.008196377044585933 evalInputDelta=-7.5296432839877525E-6
Armijo: th(2.0359407820801304E-6)=-129.6957226308948; dx=-0.008198610680238522 evalInputDelta=0.0
WOLFE (weak): th(1.5608879329281E-6)=-129.6957226308948; dx=-0.00819865460168588 evalInputDelta=0.0
Armijo: th(1.7984143575041152E-6)=-129.6957226308948; dx=-0.008199308295329279 evalInputDelta=0.0
WOLFE (weak): th(1.6796511452161077E-6)=-129.6957226308948; dx=-0.008199130052846176 evalInputDelta=0.0
Armijo: th(1.7390327513601115E-6)=-129.6957226308948; dx=-0.008197176608509783 evalInputDelta=0.0
WOLFE (weak): th(1.7093419482881096E-6)=-129.6957226308948; dx=-0.008198783087862836 evalInputDelta=0.0
WOLFE (weak): th(1.7241873498241106E-6)=-129.6957226308948; dx=-0.008202151958867941 evalInputDelta=0.0
Armijo: th(1.731610050592111E-6)=-129.6957226308948; dx=-0.008196440505611559 evalInputDelta=0.0
Armijo: th(1.7278987002081109E-6)=-129.6957226308948; dx=-0.008194957567586914 evalInputDelta=0.0
Armijo: th(1.7260430250161108E-6)=-129.6957226308948; dx=-0.008198264576139948 evalInputDelta=0.0
Armijo: th(1.7251151874201107E-6)=-129.6957226308948; dx=-0.008202664767397581 evalInputDelta=0.0
WOLFE (weak): th(1.7246512686221106E-6)=-129.6957226308948; dx=-0.008201761046523804 evalInputDelta=0.0
Armijo: th(1.7248832280211105E-6)=-129.6957226308948; dx=-0.00819799714964993 evalInputDelta=0.0
Armijo: th(1.7247672483216106E-6)=-129.6957226308948; dx=-0.008194010774437559 evalInputDelta=0.0
Armijo: th(1.7247092584718606E-6)=-129.6957226308948; dx=-0.008206643037449605 evalInputDelta=0.0
WOLFE (weak): th(1.7246802635469856E-6)=-129.6957226308948; dx=-0.008203077098286136 evalInputDelta=0.0
Armijo: th(1.724694761009423E-6)=-129.6957226308948; dx=-0.00819533558288543 evalInputDelta=0.0
mu ~= nu (1.7246802635469856E-6): th(0.0)=-129.6957226308948
Fitness changed from -129.6957226308948 to -129.6957226308948
Static Iteration Total: 28.3920; Orientation: 0.0206; Line Search: 26.6800
Iteration 40 failed. Error: -129.6957226308948
Previous Error: 0.0 -> -129.6957226308948
Optimization terminated 40
Final threshold in iteration 40: -129.6957226308948 (> -Infinity) after 234.798s (< 3600.000s)

Returns

    -129.6957226308948