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 146.07 seconds (2.098 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: 4481332602958
Reset training subject: 4482436315777
Adding measurement 1d0cd11c to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.7434133977894378;dx=-0.0022123576966161457
New Minimum: -0.7434133977894378 > -0.7479804042152113
WOLFE (weak): th(2.154434690031884)=-0.7479804042152113; dx=-0.002215414526422542 evalInputDelta=0.004567006425773457
New Minimum: -0.7479804042152113 > -0.7525445611165414
WOLFE (weak): th(4.308869380063768)=-0.7525445611165414; dx=-0.0022178963755686205 evalInputDelta=0.00913116332710362
New Minimum: -0.7525445611165414 > -0.7708033548815472
WOLFE (weak): th(12.926608140191302)=-0.7708033548815472; dx=-0.002230762499096873 evalInputDelta=0.02738995709210934
New Minimum: -0.7708033548815472 > -0.8538102270872359
WOLFE (weak): th(51.70643256076521)=-0.8538102270872359; dx=-0.0022727794623550427 evalInputDelta=0.11039682929779804
New Minimum: -0.8538102270872359 > -1.3507104661642884
WOLFE (weak): th(258.53216280382605)=-1.3507104661642884; dx=-0.0026775888840201052 evalInputDelta=0.6072970683748505
New Minimum: -1.3507104661642884 > -5.127810477830211
WOLFE (weak): th(1551.1929768229563)=-5.127810477830211; dx=-0.0023985701004935233 evalInputDelta=4.384397080040773
New Minimum: -5.127810477830211 > -14.092885313904075
WOLF (strong): th(10858.350837760694)=-14.092885313904075; dx=3.4388874185267716E-5 evalInputDelta=13.349471916114638
END: th(6204.771907291825)=-12.681288190276053; dx=-3.716509919071283E-4 evalInputDelta=11.937874792486616
Fitness changed from -0.7434133977894378 to -14.092885313904075
Iteration 1 complete. Error: -14.092885313904075 Total: 13.5996; Orientation: 0.0194; Line Search: 10.3026
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a8596468-157f-40a2-8210-31f11d470f8d.jpg)
Adding measurement 1594cd1f to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-14.092885313904075;dx=-0.014155250122228064
New Minimum: -14.092885313904075 > -24.551918810801464
END: th(13367.775840804805)=-24.551918810801464; dx=-6.28393280329565E-5 evalInputDelta=10.459033496897389
Fitness changed from -14.092885313904075 to -24.551918810801464
Iteration 2 complete. Error: -24.551918810801464 Total: 3.4200; Orientation: 0.0200; Line Search: 2.2913
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/5eae4517-4443-4f7b-a30c-359b36365dc8.jpg)
Adding measurement 25567d47 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-24.551918810801464;dx=-0.02203434582597152
New Minimum: -24.551918810801464 > -38.48657318153197
WOLF (strong): th(28800.000000000004)=-38.48657318153197; dx=3.992113049120393E-4 evalInputDelta=13.93465437073051
New Minimum: -38.48657318153197 > -54.26790294052522
WOLF (strong): th(14400.000000000002)=-54.26790294052522; dx=6.374857526954125E-4 evalInputDelta=29.715984129723754
New Minimum: -54.26790294052522 > -64.77872863824818
END: th(4800.000000000001)=-64.77872863824818; dx=-0.0012623072248274492 evalInputDelta=40.226809827446715
Fitness changed from -24.551918810801464 to -64.77872863824818
Iteration 3 complete. Error: -64.77872863824818 Total: 5.7407; Orientation: 0.0186; Line Search: 4.6097
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/a231c6a0-7956-4fb3-886a-09f2e896efbb.jpg)
Adding measurement 5adf3b27 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.440e+03, gradient 1.892e-01, dot -0.163; [39499786-2cc1-45e0-8d05-487038ac9671 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -64.77872863824818, -24.551918810801464, -14.092885313904075, -0.7434133977894378
LBFGS Accumulation History: 3 points
Removed measurement 5adf3b27 to history. Total: 3
th(0)=-64.77872863824818;dx=-0.035753753364651766
New Minimum: -64.77872863824818 > -82.01999114732557
WOLF (strong): th(10341.286512153045)=-82.01999114732557; dx=8.398431054965043E-4 evalInputDelta=17.241262509077387
New Minimum: -82.01999114732557 > -103.17919896322658
END: th(5170.643256076522)=-103.17919896322658; dx=-8.348903807392305E-4 evalInputDelta=38.4004703249784
Fitness changed from -64.77872863824818 to -103.17919896322658
Iteration 4 complete. Error: -103.17919896322658 Total: 5.0287; Orientation: 0.4723; Line Search: 3.4317
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/42677947-e7fa-42f2-8855-fcf39219e345.jpg)
Adding measurement 14338fc8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.250e+03, gradient 2.441e-01, dot -0.139; [39499786-2cc1-45e0-8d05-487038ac9671 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -103.17919896322658, -24.551918810801464, -14.092885313904075, -0.7434133977894378
LBFGS Accumulation History: 3 points
Removed measurement 14338fc8 to history. Total: 3
th(0)=-103.17919896322658;dx=-0.05952266625537804
Armijo: th(11139.813200670673)=-98.50195333460549; dx=0.001395187387499394 evalInputDelta=-4.677245628621094
New Minimum: -103.17919896322658 > -142.20551311721115
END: th(5569.906600335336)=-142.20551311721115; dx=-7.850530082541355E-5 evalInputDelta=39.02631415398457
Fitness changed from -103.17919896322658 to -142.20551311721115
Iteration 5 complete. Error: -142.20551311721115 Total: 5.0406; Orientation: 0.4686; Line Search: 3.4503
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/1fc139d9-4cf2-4542-b6e2-eb783a281e1e.jpg)
Adding measurement 28d28e67 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.307e+04, gradient 3.515e-01, dot -0.105; [39499786-2cc1-45e0-8d05-487038ac9671 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -142.20551311721115, -24.551918810801464, -14.092885313904075, -0.7434133977894378
LBFGS Accumulation History: 3 points
Removed measurement 28d28e67 to history. Total: 3
th(0)=-142.20551311721115;dx=-0.1235298853222711
Armijo: th(12000.000000000004)=-129.12377769484198; dx=0.0016701352124911337 evalInputDelta=-13.081735422369178
New Minimum: -142.20551311721115 > -194.83019088534488
WOLF (strong): th(6000.000000000002)=-194.83019088534488; dx=0.0015360033681757848 evalInputDelta=52.62467776813372
New Minimum: -194.83019088534488 > -228.15176131996455
END: th(2000.0000000000007)=-228.15176131996455; dx=-0.011766539083275226 evalInputDelta=85.9462482027534
Fitness changed from -142.20551311721115 to -228.15176131996455
Iteration 6 complete. Error: -228.15176131996455 Total: 6.1834; Orientation: 0.4711; Line Search: 4.5811
Adding measurement 6be7ed61 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.752e+04, gradient 3.058e-01, dot -0.123; [39499786-2cc1-45e0-8d05-487038ac9671 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -228.15176131996455, -24.551918810801464, -14.092885313904075, -0.7434133977894378
LBFGS Accumulation History: 3 points
Removed measurement 6be7ed61 to history. Total: 3
th(0)=-228.15176131996455;dx=-0.09345372363453192
New Minimum: -228.15176131996455 > -283.5493512988861
WOLF (strong): th(4308.869380063769)=-283.5493512988861; dx=0.003644244369775172 evalInputDelta=55.39758997892156
New Minimum: -283.5493512988861 > -311.71714254711327
END: th(2154.4346900318847)=-311.71714254711327; dx=-0.016373533999746 evalInputDelta=83.56538122714872
Fitness changed from -228.15176131996455 to -311.71714254711327
Iteration 7 complete. Error: -311.71714254711327 Total: 5.0092; Orientation: 0.4638; Line Search: 3.4472
Adding measurement 1be735d1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.172e+06, gradient 3.185e-01, dot -0.117; [39499786-2cc1-45e0-8d05-487038ac9671 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -311.71714254711327, -24.551918810801464, -14.092885313904075, -0.7434133977894378
LBFGS Accumulation History: 3 points
Removed measurement 1be735d1 to history. Total: 3
th(0)=-311.71714254711327;dx=-0.10117071249324851
New Minimum: -311.71714254711327 > -392.62424572459463
END: th(4641.588833612781)=-392.62424572459463; dx=-0.003423401872263923 evalInputDelta=80.90710317748136
Fitness changed from -311.71714254711327 to -392.62424572459463
Iteration 8 complete. Error: -392.62424572459463 Total: 3.8468; Orientation: 0.4797; Line 

...skipping 5881 bytes...

.0212; Line Search: 9.2819
Adding measurement 10bada81 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 3.120e+03, gradient 3.301e-01, dot 0.418; [39499786-2cc1-45e0-8d05-487038ac9671 = 1.000/1.000e+00]
th(0)=-640.6273980980052;dx=-430.75524764959533
Armijo: th(1246.779334509193)=-30.77109778470087; dx=0.06828110508995969 evalInputDelta=-609.8563003133044
Armijo: th(623.3896672545965)=-29.58997505890075; dx=0.14435334948248013 evalInputDelta=-611.0374230391044
Armijo: th(207.79655575153217)=-38.468045875472235; dx=0.4293682476948427 evalInputDelta=-602.1593522225329
Armijo: th(51.94913893788304)=-65.55781637704672; dx=1.728241889661271 evalInputDelta=-575.0695817209585
Armijo: th(10.389827787576609)=-298.56870315309266; dx=25.030828166536157 evalInputDelta=-342.05869494491253
New Minimum: -640.6273980980052 > -756.4458553963724
END: th(1.7316379645961015)=-756.4458553963724; dx=-34.43409060086465 evalInputDelta=115.8184572983672
Fitness changed from -640.6273980980052 to -756.4458553963724
Iteration 13 complete. Error: -756.4458553963724 Total: 9.6483; Orientation: 0.4611; Line Search: 8.1078
Adding measurement 5469a40 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 5.764e+03, gradient 4.465e-01, dot -0.092; [39499786-2cc1-45e0-8d05-487038ac9671 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -756.4458553963724, -640.6273980980052, -24.551918810801464, -14.092885313904075, -0.7434133977894378
Rejected: LBFGS Orientation magnitude: 2.574e+03, gradient 4.465e-01, dot -0.326; [39499786-2cc1-45e0-8d05-487038ac9671 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -756.4458553963724, -640.6273980980052, -24.551918810801464, -14.092885313904075
LBFGS Accumulation History: 3 points
Removed measurement 5469a40 to history. Total: 4
Removed measurement 10bada81 to history. Total: 3
th(0)=-756.4458553963724;dx=-0.19911313047526608
New Minimum: -756.4458553963724 > -757.0640079541334
WOLFE (weak): th(3.7307009015020443)=-757.0640079541334; dx=-0.18670014339437235 evalInputDelta=0.61815255776105
New Minimum: -757.0640079541334 > -757.6827493973515
WOLFE (weak): th(7.4614018030040885)=-757.6827493973515; dx=-0.18658046781277904 evalInputDelta=1.2368940009790776
New Minimum: -757.6827493973515 > -760.1411810387776
WOLFE (weak): th(22.384205409012267)=-760.1411810387776; dx=-0.1858406033613113 evalInputDelta=3.695325642405237
New Minimum: -760.1411810387776 > -771.0024148596519
WOLFE (weak): th(89.53682163604907)=-771.0024148596519; dx=-0.18115677240672087 evalInputDelta=14.556559463279541
New Minimum: -771.0024148596519 > -822.9516960525715
END: th(447.68410818024535)=-822.9516960525715; dx=-0.14999489385016118 evalInputDelta=66.5058406561991
Fitness changed from -756.4458553963724 to -822.9516960525715
Iteration 14 complete. Error: -822.9516960525715 Total: 9.0465; Orientation: 1.0410; Line Search: 6.9036
Adding measurement 13a5f91c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.981e+07, gradient 3.940e-01, dot -0.053; [39499786-2cc1-45e0-8d05-487038ac9671 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -822.9516960525715, -24.551918810801464, -14.092885313904075, -0.7434133977894378
LBFGS Accumulation History: 3 points
Removed measurement 13a5f91c to history. Total: 3
th(0)=-822.9516960525715;dx=-0.15497895783075316
New Minimum: -822.9516960525715 > -914.915053476585
END: th(964.5061728395073)=-914.915053476585; dx=-0.09662483531973981 evalInputDelta=91.96335742401345
Fitness changed from -822.9516960525715 to -914.915053476585
Iteration 15 complete. Error: -914.915053476585 Total: 3.9355; Orientation: 0.4634; Line Search: 2.3859
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/45742920-6146-46b5-acad-5895e3bf9c2a.jpg)
Adding measurement 454c0c0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.068e+04, gradient 3.443e-01, dot -0.043; [39499786-2cc1-45e0-8d05-487038ac9671 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -914.915053476585, -24.551918810801464, -14.092885313904075, -0.7434133977894378
LBFGS Accumulation History: 3 points
Removed measurement 454c0c0 to history. Total: 3
th(0)=-914.915053476585;dx=-0.11846685999669682
New Minimum: -914.915053476585 > -1030.982046796292
END: th(2077.9655575153224)=-1030.982046796292; dx=-0.06021164094829605 evalInputDelta=116.06699331970708
Fitness changed from -914.915053476585 to -1030.982046796292
Iteration 16 complete. Error: -1030.982046796292 Total: 3.8724; Orientation: 0.4579; Line Search: 2.3017
Adding measurement 47cbb68 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 5.313e+03, gradient 3.386e-01, dot 0.264; [39499786-2cc1-45e0-8d05-487038ac9671 = 1.000/1.000e+00]
th(0)=-1030.982046796292;dx=-475.17049386743525
Armijo: th(4476.841081802454)=-62.72651447574807; dx=0.037330463044009235 evalInputDelta=-968.2555323205439
Armijo: th(2238.420540901227)=-63.66567987325874; dx=0.07649873456414427 evalInputDelta=-967.3163669230332
Armijo: th(746.140180300409)=-64.60288411706819; dx=0.21738781786892827 evalInputDelta=-966.3791626792238
Armijo: th(186.53504507510226)=-73.97267443011397; dx=0.9002927006583589 evalInputDelta=-957.009372366178
Armijo: th(37.307009015020455)=-134.80700157289343; dx=4.975708413702758 evalInputDelta=-896.1750452233986
Armijo: th(6.217834835836743)=-557.2778516622488; dx=54.22308275546711 evalInputDelta=-473.7041951340432
New Minimum: -1030.982046796292 > -1090.5087541629578
END: th(0.888262119405249)=-1090.5087541629578; dx=-75.28953482269617 evalInputDelta=59.52670736666573
Fitness changed from -1030.982046796292 to -1090.5087541629578
Iteration 17 complete. Error: -1090.5087541629578 Total: 10.8398; Orientation: 0.4520; Line Search: 9.2880
Adding measurement 4b7e278a to history. Total: 4
Accepted: LBFGS Orientation magnitude: 1.847e+03, gradient 3.739e-01, dot 0.009; [39499786-2cc1-45e0-8d05-487038ac9671 = 1.000/1.000e+00]
th(0)=-1090.5087541629578;dx=-6.070750031998964
Armijo: th(1.9137027238879118)=-773.6246599301818; dx=55.05795566419877 evalInputDelta=-316.88409423277596
Armijo: th(0.9568513619439559)=-941.7469278192543; dx=44.53646006633612 evalInputDelta=-148.76182634370343
Armijo: th(0.31895045398131866)=-1046.987937389692; dx=21.683937776550508 evalInputDelta=-43.52081677326578
Armijo: th(0.07973761349532967)=-1080.5977856278143; dx=7.811931953605539 evalInputDelta=-9.910968535143411
Armijo: th(0.015947522699065932)=-1088.6340290900935; dx=-0.09868176553513841 evalInputDelta=-1.874725072864294
Armijo: th(0.002657920449844322)=-1090.1987595089206; dx=-2.0545477533271637 evalInputDelta=-0.30999465403715476
Armijo: th(3.7970292140633176E-4)=-1090.4646467305204; dx=-2.679101129082639 evalInputDelta=-0.044107432437385796
Armijo: th(4.746286517579147E-5)=-1090.5030967773002; dx=-2.764431077142846 evalInputDelta=-0.005657385657514169
Armijo: th(5.273651686199052E-6)=-1090.508020799806; dx=-2.796378331755058 evalInputDelta=-7.333631517667527E-4
Armijo: th(5.273651686199052E-7)=-1090.5086493968233; dx=-2.7644093534945355 evalInputDelta=-1.0476613442733651E-4
Armijo: th(4.7942288056355014E-8)=-1090.5087017798917; dx=-2.780960102843636 evalInputDelta=-5.238306607679988E-5
END: th(3.995190671362918E-9)=-1090.5087541629578; dx=-2.784575372281928 evalInputDelta=0.0
Fitness changed from -1090.5087541629578 to -1090.5087541629578
Static Iteration Total: 17.8928; Orientation: 0.5841; Line Search: 16.2101
Iteration 18 failed. Error: -1090.5087541629578
Previous Error: 0.0 -> -1090.5087541629578
Retrying iteration 18
Reset training subject: 4622885363102
Adding measurement 383d91d8 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-1090.5087541629578;dx=-0.13975062047759432
END: th(8.607377375676041E-9)=-1090.5087541629578; dx=-0.11968595102341209 evalInputDelta=0.0
Fitness changed from -1090.5087541629578 to -1090.5087541629578
Static Iteration Total: 4.5214; Orientation: 0.0197; Line Search: 2.3314
Iteration 19 failed. Error: -1090.5087541629578
Previous Error: 0.0 -> -1090.5087541629578
Optimization terminated 19
Final threshold in iteration 19: -1090.5087541629578 (> -Infinity) after 146.074s (< 3600.000s)

Returns

    -1090.5087541629578