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 363.01 seconds (4.212 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: 12956004762487
Reset training subject: 12957176096696
Adding measurement 40ddadea to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.04860715065692506;dx=-2.9232932693935723E-4
New Minimum: -0.04860715065692506 > -0.04923176187432248
WOLFE (weak): th(2.154434690031884)=-0.04923176187432248; dx=-2.9109553716176565E-4 evalInputDelta=6.246112173974236E-4
New Minimum: -0.04923176187432248 > -0.049856451521856096
WOLFE (weak): th(4.308869380063768)=-0.049856451521856096; dx=-2.895796382547362E-4 evalInputDelta=0.0012493008649310383
New Minimum: -0.049856451521856096 > -0.05235964179391778
WOLFE (weak): th(12.926608140191302)=-0.05235964179391778; dx=-2.9245308289151584E-4 evalInputDelta=0.0037524911369927194
New Minimum: -0.05235964179391778 > -0.06385490497674999
WOLFE (weak): th(51.70643256076521)=-0.06385490497674999; dx=-3.059123521916615E-4 evalInputDelta=0.015247754319824933
New Minimum: -0.06385490497674999 > -0.13082895824598753
WOLFE (weak): th(258.53216280382605)=-0.13082895824598753; dx=-3.1785280445229057E-4 evalInputDelta=0.08222180758906247
New Minimum: -0.13082895824598753 > -0.5278617294789584
WOLFE (weak): th(1551.1929768229563)=-0.5278617294789584; dx=-2.9148266225501523E-4 evalInputDelta=0.4792545788220333
New Minimum: -0.5278617294789584 > -2.124312149071611
END: th(10858.350837760694)=-2.124312149071611; dx=-7.287152065351256E-5 evalInputDelta=2.0757049984146856
Fitness changed from -0.04860715065692506 to -2.124312149071611
Iteration 1 complete. Error: -2.124312149071611 Total: 13.3001; Orientation: 0.0184; Line Search: 9.7739
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/c6a0780f-1557-4851-b5ec-b70bc237f15b.jpg)
Adding measurement 2d501ec2 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-2.124312149071611;dx=-9.9451653527334E-4
New Minimum: -2.124312149071611 > -2.1776677128973008
WOLF (strong): th(23393.607721408407)=-2.1776677128973008; dx=1.652401586184171E-5 evalInputDelta=0.053355563825689956
New Minimum: -2.1776677128973008 > -3.714194860735289
WOLF (strong): th(11696.803860704204)=-3.714194860735289; dx=5.389894974651089E-5 evalInputDelta=1.589882711663678
New Minimum: -3.714194860735289 > -4.182562731371624
END: th(3898.9346202347347)=-4.182562731371624; dx=-3.1922215830674394E-4 evalInputDelta=2.058250582300013
Fitness changed from -2.124312149071611 to -4.182562731371624
Iteration 2 complete. Error: -4.182562731371624 Total: 6.1220; Orientation: 0.0185; Line Search: 4.8035
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/9f32c3e4-0be0-4e8d-b231-c54d660534e1.jpg)
Adding measurement 45dda5c4 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-4.182562731371624;dx=-0.0016742762001960621
Armijo: th(8400.000000000002)=-3.3286220049512925; dx=2.3624232997673343E-5 evalInputDelta=-0.8539407264203311
New Minimum: -4.182562731371624 > -4.33857432963375
WOLF (strong): th(4200.000000000001)=-4.33857432963375; dx=1.6726267021781264E-4 evalInputDelta=0.1560115982621264
New Minimum: -4.33857432963375 > -5.310816685325131
END: th(1400.0000000000002)=-5.310816685325131; dx=-3.0954356142088424E-4 evalInputDelta=1.1282539539535072
Fitness changed from -4.182562731371624 to -5.310816685325131
Iteration 3 complete. Error: -5.310816685325131 Total: 6.7376; Orientation: 0.0179; Line Search: 5.3899
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/576413c4-d1e9-45c3-b6a5-3ce9f1eccba1.jpg)
Adding measurement 29d36022 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.340e+03, gradient 3.902e-02, dot -0.286; [113e30e8-62f3-43c4-9411-a66bdf548776 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.310816685325131, -4.182562731371624, -2.124312149071611, -0.04860715065692506
LBFGS Accumulation History: 3 points
Removed measurement 29d36022 to history. Total: 3
th(0)=-5.310816685325131;dx=-0.0014920479979300145
New Minimum: -5.310816685325131 > -6.038671787444951
WOLF (strong): th(3016.208566044638)=-6.038671787444951; dx=1.2590880735876563E-4 evalInputDelta=0.7278551021198201
New Minimum: -6.038671787444951 > -6.583527284659023
END: th(1508.104283022319)=-6.583527284659023; dx=-4.6430823281256965E-4 evalInputDelta=1.2727105993338919
Fitness changed from -5.310816685325131 to -6.583527284659023
Iteration 4 complete. Error: -6.583527284659023 Total: 5.4667; Orientation: 0.4957; Line Search: 3.6326
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/b11b0602-727f-483a-a921-dcf83fd2c335.jpg)
Adding measurement 6988f25a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.149e+04, gradient 4.072e-02, dot -0.353; [113e30e8-62f3-43c4-9411-a66bdf548776 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.583527284659023, -4.182562731371624, -2.124312149071611, -0.04860715065692506
LBFGS Accumulation History: 3 points
Removed measurement 6988f25a to history. Total: 3
th(0)=-6.583527284659023;dx=-0.00164290037218947
New Minimum: -6.583527284659023 > -6.994910700049848
WOLF (strong): th(3249.112183528946)=-6.994910700049848; dx=7.451211768990101E-6 evalInputDelta=0.41138341539082557
New Minimum: -6.994910700049848 > -7.461607029126003
END: th(1624.556091764473)=-7.461607029126003; dx=-2.367486420627536E-4 evalInputDelta=0.8780797444669801
Fitness changed from -6.583527284659023 to -7.461607029126003
Iteration 5 complete. Error: -7.461607029126003 Total: 5.4838; Orientation: 0.4757; Line Search: 3.6499
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/adae97ac-6728-4379-a0d6-5e7a03fffc9e.jpg)
Adding measurement 3621fd3d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.293e+03, gradient 4.420e-02, dot -0.245; [113e30e8-62f3-43c4-9411-a66bdf548776 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.461607029126003, -4.182562731371624, -2.124312149071611, -0.04860715065692506
LBFGS Accumulation History: 3 points
Removed measurement 3621fd3d to history. Total: 3
th(0)=-7.461607029126003;dx=-0.0019314067455154862
Armijo: th(3500.000000000001)=-6.986517789054736; dx=4.4227149495169784E-4 evalInputDelta=-0.4750892400712665
New Minimum: -7.461607029126003 > -8.547393890308168
WOLF (strong): th(1750.0000000000005)=-8.547393890308168; dx=8.833664175744076E-5 evalInputDelta=1.0857868611821653
END: th(583.3333333333335)=-8.359170724058393; dx=-0.0011224195146062473 evalInputDelta=0.8975636949323897
Fitness changed from -7.461607029126003 to -8.547393890308168
Iteration 6 complete. Error: -8.547393890308168 Total: 6.6362; Orientation: 0.4682; Line Search: 4.8780
Adding measurement 1dbb62ab to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.037e+04, gradient 5.259e-02, dot -0.252; [113e30e8-62f3-43c4-9411-a66bdf548776 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.547393890308168, -4.182562731371624, -2.124312149071611, -0.04860715065692506
LBFGS Accumulation History: 3 points
Removed measurement 1dbb62ab to history. Total: 3
th(0)=-8.547393890308168;dx=-0.002756260517232496
New Minimum: -8.547393890308168 > -9.595223410712862
END: th(1256.7535691852659)=-9.595223410712862; dx=-1.5824649271290204E-4 evalInputDelta=1.0478295204046937
Fitness changed from -8.547393890308168 to -9.595223410712862
Iteration 7 complete. Error: -9.595223410712862 Total: 4.0378; Orientation: 0.4706; Line Search: 2.4030
Adding measurement 48105b4a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.091e+03, gradient 4.008e-02, dot -0.266; [113e30e8-62f3-43c4-9411-a66bdf548776 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -9.595223410712862, -4.182562731371624, -2.124312149071611, -0.04860715065692506
LBFGS Accumulation History: 3 points
Removed measurement 48105b4a to history. Total: 3
th(0)=-9.595223410712862;dx=-0.0016008983635671728
New Minimum: -9.595223410712862 > -10.166066230750403
WOLF (strong): th(2707.593486274122)=-10.166066230750403; dx=7.983788948726577E-5 evalInputDelta=0.5708428200375408
New Minimum: -10.166066230750403 > -10.697489863592
END: th(1353.796743137061)=-10.697489863592; dx=-6.590684643953621E-4 evalInputDelta=1.10

...skipping 35419 bytes...

cted. Popping history element from -45.15660926404349, -42.88140439000246, -4.182562731371624, -2.124312149071611
LBFGS Accumulation History: 3 points
Removed measurement 96a5455 to history. Total: 4
Removed measurement 3777afcd to history. Total: 3
th(0)=-45.15660926404349;dx=-0.009212936589076477
New Minimum: -45.15660926404349 > -45.17087407830399
WOLFE (weak): th(1.61505582889846)=-45.17087407830399; dx=-0.008995777143792693 evalInputDelta=0.014264814260499747
New Minimum: -45.17087407830399 > -45.185141115497736
WOLFE (weak): th(3.23011165779692)=-45.185141115497736; dx=-0.00892525378907557 evalInputDelta=0.02853185145424675
New Minimum: -45.185141115497736 > -45.242123966537314
WOLFE (weak): th(9.69033497339076)=-45.242123966537314; dx=-0.009165610056024408 evalInputDelta=0.08551470249382476
New Minimum: -45.242123966537314 > -45.4976452642255
WOLFE (weak): th(38.76133989356304)=-45.4976452642255; dx=-0.009030496105057692 evalInputDelta=0.3410360001820081
New Minimum: -45.4976452642255 > -46.79406440255415
END: th(193.8066994678152)=-46.79406440255415; dx=-0.008137074893307557 evalInputDelta=1.63745513851066
Fitness changed from -45.15660926404349 to -46.79406440255415
Iteration 33 complete. Error: -46.79406440255415 Total: 9.6435; Orientation: 1.0411; Line Search: 7.4490
Adding measurement 24045844 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.518e+05, gradient 9.088e-02, dot -0.126; [113e30e8-62f3-43c4-9411-a66bdf548776 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -46.79406440255415, -4.182562731371624, -2.124312149071611, -0.04860715065692506
LBFGS Accumulation History: 3 points
Removed measurement 24045844 to history. Total: 3
th(0)=-46.79406440255415;dx=-0.008225106527506866
New Minimum: -46.79406440255415 > -49.79441799985091
END: th(417.5438764940449)=-49.79441799985091; dx=-0.006634048793105685 evalInputDelta=3.0003535972967583
Fitness changed from -46.79406440255415 to -49.79441799985091
Iteration 34 complete. Error: -49.79441799985091 Total: 4.0531; Orientation: 0.4593; Line Search: 2.4268
Adding measurement 39b2f0c3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.247e+04, gradient 8.197e-02, dot -0.137; [113e30e8-62f3-43c4-9411-a66bdf548776 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -49.79441799985091, -4.182562731371624, -2.124312149071611, -0.04860715065692506
LBFGS Accumulation History: 3 points
Removed measurement 39b2f0c3 to history. Total: 3
th(0)=-49.79441799985091;dx=-0.0066871419281526534
New Minimum: -49.79441799985091 > -54.150407914623855
END: th(899.5710121291588)=-54.150407914623855; dx=-0.004177272772972354 evalInputDelta=4.355989914772948
Fitness changed from -49.79441799985091 to -54.150407914623855
Iteration 35 complete. Error: -54.150407914623855 Total: 4.0091; Orientation: 0.4600; Line Search: 2.4071
<a id="p-23"></a>Iteration 35
<a id="p-22"></a>![Iteration 35](etc/3351d403-06d1-4b0f-bd03-eadd8712a5aa.jpg)
Adding measurement 5b86b9d5 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.833e+03, gradient 6.931e-02, dot 0.032; [113e30e8-62f3-43c4-9411-a66bdf548776 = 1.000/1.000e+00]
th(0)=-54.150407914623855;dx=-3.5901923088972625
Armijo: th(1938.0669946781522)=-14.192948446350357; dx=-8.695577898629802E-4 evalInputDelta=-39.9574594682735
Armijo: th(969.0334973390761)=-14.776393301538159; dx=-0.0031404786205040244 evalInputDelta=-39.3740146130857
Armijo: th(323.011165779692)=-15.32034847195485; dx=-0.015429514643450826 evalInputDelta=-38.830059442669004
Armijo: th(80.752791444923)=-8.174860493928517; dx=-0.11577874946939443 evalInputDelta=-45.975547420695335
Armijo: th(16.1505582889846)=-1.9997674388217312; dx=-0.15189436080399724 evalInputDelta=-52.15064047580212
Armijo: th(2.691759714830767)=-5.925370617908808; dx=0.4035994532633679 evalInputDelta=-48.225037296715044
Armijo: th(0.384537102118681)=-32.50696976111131; dx=20.722044700483426 evalInputDelta=-21.643438153512548
Armijo: th(0.04806713776483512)=-53.233150585130794; dx=10.816015540282136 evalInputDelta=-0.9172573294930615
Armijo: th(0.0053407930849816805)=-54.09586737155393; dx=-2.1248396583743854 evalInputDelta=-0.05454054306992617
Armijo: th(5.34079308498168E-4)=-54.145558348901005; dx=-3.4847668027636285 evalInputDelta=-0.004849565722850002
Armijo: th(4.855266440892436E-5)=-54.149975737159; dx=-3.790269250133532 evalInputDelta=-4.3217746485879616E-4
Armijo: th(4.046055367410363E-6)=-54.15036862590595; dx=-3.5835788297433777 evalInputDelta=-3.9288717907481896E-5
Armijo: th(3.112350282623356E-7)=-54.15040230195161; dx=-3.7634067374267945 evalInputDelta=-5.6126722469684864E-6
Armijo: th(2.2231073447309688E-8)=-54.150407914623855; dx=-3.601425014393202 evalInputDelta=0.0
Armijo: th(1.4820715631539792E-9)=-54.150407914623855; dx=-3.8286930392525282 evalInputDelta=0.0
MIN ALPHA (9.26294726971237E-11): th(0.0)=-54.150407914623855
Fitness changed from -54.150407914623855 to -54.150407914623855
Static Iteration Total: 22.9034; Orientation: 0.4552; Line Search: 21.1409
Iteration 36 failed. Error: -54.150407914623855
Previous Error: 0.0 -> -54.150407914623855
Retrying iteration 36
Reset training subject: 13284672336897
Adding measurement 6fe5fab9 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-54.150407914623855;dx=-0.004784099139117364
WOLFE (weak): th(2.1544346900318838E-10)=-54.150407914623855; dx=-0.004749909669392937 evalInputDelta=0.0
WOLFE (weak): th(4.3088693800637676E-10)=-54.150407914623855; dx=-0.004720378741617634 evalInputDelta=0.0
WOLFE (weak): th(1.2926608140191302E-9)=-54.150407914623855; dx=-0.0047835378333212 evalInputDelta=0.0
WOLFE (weak): th(5.170643256076521E-9)=-54.150407914623855; dx=-0.004709179967533669 evalInputDelta=0.0
WOLFE (weak): th(2.5853216280382606E-8)=-54.150407914623855; dx=-0.004789866836113995 evalInputDelta=0.0
WOLFE (weak): th(1.5511929768229565E-7)=-54.150407914623855; dx=-0.004750725618954646 evalInputDelta=0.0
Armijo: th(1.0858350837760695E-6)=-54.150407914623855; dx=-0.004688341215821934 evalInputDelta=0.0
WOLFE (weak): th(6.204771907291826E-7)=-54.150407914623855; dx=-0.00474593727996593 evalInputDelta=0.0
Armijo: th(8.531561372526261E-7)=-54.150407914623855; dx=-0.004707831567029191 evalInputDelta=0.0
WOLFE (weak): th(7.368166639909043E-7)=-54.150407914623855; dx=-0.004791109994202281 evalInputDelta=0.0
Armijo: th(7.949864006217652E-7)=-54.150407914623855; dx=-0.004782700215402636 evalInputDelta=0.0
Armijo: th(7.659015323063348E-7)=-54.150407914623855; dx=-0.004764074541250676 evalInputDelta=0.0
Armijo: th(7.513590981486195E-7)=-54.150407914623855; dx=-0.004793031987404919 evalInputDelta=0.0
Armijo: th(7.440878810697619E-7)=-54.150407914623855; dx=-0.004800694256716607 evalInputDelta=0.0
WOLFE (weak): th(7.404522725303331E-7)=-54.150407914623855; dx=-0.004788730318468373 evalInputDelta=0.0
WOLFE (weak): th(7.422700768000476E-7)=-54.150407914623855; dx=-0.004622760170667044 evalInputDelta=0.0
Armijo: th(7.431789789349047E-7)=-54.150407914623855; dx=-0.004789105166164964 evalInputDelta=0.0
Armijo: th(7.427245278674761E-7)=-54.150407914623855; dx=-0.004765844793698702 evalInputDelta=0.0
WOLFE (weak): th(7.424973023337618E-7)=-54.150407914623855; dx=-0.0047863854837178225 evalInputDelta=0.0
Armijo: th(7.42610915100619E-7)=-54.150407914623855; dx=-0.004718411232343443 evalInputDelta=0.0
WOLFE (weak): th(7.425541087171905E-7)=-54.150407914623855; dx=-0.0047860667156032965 evalInputDelta=0.0
WOLFE (weak): th(7.425825119089048E-7)=-54.150407914623855; dx=-0.0047949968215640305 evalInputDelta=0.0
WOLFE (weak): th(7.425967135047619E-7)=-54.150407914623855; dx=-0.0047817526542728 evalInputDelta=0.0
WOLFE (weak): th(7.426038143026905E-7)=-54.150407914623855; dx=-0.0046634215945100775 evalInputDelta=0.0
mu ~= nu (7.426038143026905E-7): th(0.0)=-54.150407914623855
Fitness changed from -54.150407914623855 to -54.150407914623855
Static Iteration Total: 34.3409; Orientation: 0.0170; Line Search: 31.9875
Iteration 37 failed. Error: -54.150407914623855
Previous Error: 0.0 -> -54.150407914623855
Optimization terminated 37
Final threshold in iteration 37: -54.150407914623855 (> -Infinity) after 363.008s (< 3600.000s)

Returns

    -54.150407914623855