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 7.84 seconds (0.000 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: 143342353839000
Reset training subject: 143342484065900
Adding measurement 352ca0eb to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-5.9808954892206145;dx=-8.072900138910073E-4
New Minimum: -5.9808954892206145 > -5.982942968740092
WOLFE (weak): th(2.154434690031884)=-5.982942968740092; dx=-8.107231725164666E-4 evalInputDelta=0.0020474795194775908
New Minimum: -5.982942968740092 > -5.9849927371171825
WOLFE (weak): th(4.308869380063768)=-5.9849927371171825; dx=-8.183524634086962E-4 evalInputDelta=0.004097247896567957
New Minimum: -5.9849927371171825 > -5.993179327179573
WOLFE (weak): th(12.926608140191302)=-5.993179327179573; dx=-8.140323682386081E-4 evalInputDelta=0.012283837958958266
New Minimum: -5.993179327179573 > -6.030174923408594
WOLFE (weak): th(51.70643256076521)=-6.030174923408594; dx=-8.067752876100348E-4 evalInputDelta=0.0492794341879792
New Minimum: -6.030174923408594 > -6.2288198474495005
WOLFE (weak): th(258.53216280382605)=-6.2288198474495005; dx=-8.32365428155788E-4 evalInputDelta=0.24792435822888592
New Minimum: -6.2288198474495005 > -7.509574835823993
WOLFE (weak): th(1551.1929768229563)=-7.509574835823993; dx=-8.292125140045748E-4 evalInputDelta=1.5286793466033783
New Minimum: -7.509574835823993 > -12.119072291016266
END: th(10858.350837760694)=-12.119072291016266; dx=-1.2841148033214454E-4 evalInputDelta=6.138176801795652
Fitness changed from -5.9808954892206145 to -12.119072291016266
Iteration 1 complete. Error: -12.119072291016266 Total: 1.2710; Orientation: 0.0016; Line Search: 0.9181
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/c7e4f59e-5548-4670-b577-f871e3e4eee8.jpg)
Adding measurement 2f59659f to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-12.119072291016266;dx=-0.001712298061239972
New Minimum: -12.119072291016266 > -21.312996064026805
END: th(23393.607721408407)=-21.312996064026805; dx=-2.4529175726436625E-6 evalInputDelta=9.193923773010539
Fitness changed from -12.119072291016266 to -21.312996064026805
Iteration 2 complete. Error: -21.312996064026805 Total: 0.3561; Orientation: 0.0015; Line Search: 0.2306
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/2a94049e-c394-402d-88b2-3034c1107058.jpg)
Adding measurement 127fcf6 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-21.312996064026805;dx=-0.001763284740123224
New Minimum: -21.312996064026805 > -38.21951268155529
END: th(50400.00000000001)=-38.21951268155529; dx=-8.39935558975273E-6 evalInputDelta=16.90651661752848
Fitness changed from -21.312996064026805 to -38.21951268155529
Iteration 3 complete. Error: -38.21951268155529 Total: 0.3527; Orientation: 0.0015; Line Search: 0.2283
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/c0680164-0738-413d-bf72-099c18d61389.jpg)
Adding measurement 58f71bb9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.740e+03, gradient 3.741e-02, dot -0.323; [0a949033-3888-48be-9da0-d67c7e8854c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -38.21951268155529, -21.312996064026805, -12.119072291016266, -5.9808954892206145
LBFGS Accumulation History: 3 points
Removed measurement 58f71bb9 to history. Total: 3
th(0)=-38.21951268155529;dx=-0.0013846164825135425
New Minimum: -38.21951268155529 > -77.13899279078561
WOLF (strong): th(108583.50837760697)=-77.13899279078561; dx=6.531375892592139E-5 evalInputDelta=38.91948010923032
New Minimum: -77.13899279078561 > -84.0916745682271
END: th(54291.75418880348)=-84.0916745682271; dx=-4.674306116924398E-5 evalInputDelta=45.87216188667182
Fitness changed from -38.21951268155529 to -84.0916745682271
Iteration 4 complete. Error: -84.0916745682271 Total: 0.4995; Orientation: 0.0281; Line Search: 0.3462
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/301379c1-0454-46d4-b194-81a7e73fb4eb.jpg)
Adding measurement 5739e011 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.856e+03, gradient 3.947e-02, dot -0.286; [0a949033-3888-48be-9da0-d67c7e8854c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -84.0916745682271, -21.312996064026805, -12.119072291016266, -5.9808954892206145
LBFGS Accumulation History: 3 points
Removed measurement 5739e011 to history. Total: 3
th(0)=-84.0916745682271;dx=-0.0015277428303452174
New Minimum: -84.0916745682271 > -107.1773488060829
WOLF (strong): th(116968.03860704206)=-107.1773488060829; dx=2.0471675595155507E-4 evalInputDelta=23.085674237855798
New Minimum: -107.1773488060829 > -123.53267824044549
END: th(58484.01930352103)=-123.53267824044549; dx=-6.520241259210264E-5 evalInputDelta=39.441003672218386
Fitness changed from -84.0916745682271 to -123.53267824044549
Iteration 5 complete. Error: -123.53267824044549 Total: 0.4925; Orientation: 0.0284; Line Search: 0.3394
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/4624870a-0a15-44c5-9d24-bd7bf9f3940a.jpg)
Adding measurement 1ff9c4d1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.280e+04, gradient 4.068e-02, dot -0.390; [0a949033-3888-48be-9da0-d67c7e8854c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -123.53267824044549, -21.312996064026805, -12.119072291016266, -5.9808954892206145
LBFGS Accumulation History: 3 points
Removed measurement 1ff9c4d1 to history. Total: 3
th(0)=-123.53267824044549;dx=-0.0016128663966748437
New Minimum: -123.53267824044549 > -136.7884979648767
WOLF (strong): th(126000.00000000004)=-136.7884979648767; dx=1.4766015601656336E-4 evalInputDelta=13.25581972443122
New Minimum: -136.7884979648767 > -155.87525250241907
END: th(63000.00000000002)=-155.87525250241907; dx=-4.5673337620529456E-5 evalInputDelta=32.34257426197358
Fitness changed from -123.53267824044549 to -155.87525250241907
Iteration 6 complete. Error: -155.87525250241907 Total: 0.4932; Orientation: 0.0271; Line Search: 0.3426
Adding measurement 3a35230d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.676e+04, gradient 3.883e-02, dot -0.374; [0a949033-3888-48be-9da0-d67c7e8854c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -155.87525250241907, -21.312996064026805, -12.119072291016266, -5.9808954892206145
LBFGS Accumulation History: 3 points
Removed measurement 3a35230d to history. Total: 3
th(0)=-155.87525250241907;dx=-0.001480631586873424
New Minimum: -155.87525250241907 > -185.066291930447
WOLF (strong): th(135729.38547200873)=-185.066291930447; dx=2.2316796599585064E-4 evalInputDelta=29.19103942802792
New Minimum: -185.066291930447 > -203.89924628853277
END: th(67864.69273600436)=-203.89924628853277; dx=-1.11797504618775E-4 evalInputDelta=48.02399378611369
Fitness changed from -155.87525250241907 to -203.89924628853277
Iteration 7 complete. Error: -203.89924628853277 Total: 0.4785; Orientation: 0.0273; Line Search: 0.3428
Adding measurement 3e0c636d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.444e+04, gradient 3.728e-02, dot -0.416; [0a949033-3888-48be-9da0-d67c7e8854c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -203.89924628853277, -21.312996064026805, -12.119072291016266, -5.9808954892206145
LBFGS Accumulation History: 3 points
Removed measurement 3e0c636d to history. Total: 3
th(0)=-203.89924628853277;dx=-0.0013480106625819435
New Minimum: -203.89924628853277 > -211.21168008609934
WOLF (strong): th(146210.0482588026)=-211.21168008609934; dx=2.0926087590548997E-4 evalInputDelta=7.31243379756657
New Minimum: -211.21168008609934 > -237.87033125239154
END: th(73105.0241294013)=-237.87033125239154; dx=-4.1761542324126236E-6 evalInputDelta=33.97108496385877
Fitness changed from -203.89924628853277 to -237.87033125239154
Iteration 8 complete. Error: -237.87033125239154 Total: 0.4819; Orientation: 0.0277; Line Search: 0.3434
Adding measurement 5bb9ed79 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.696e+04, gradient 3.916e-02, dot -0.358; [0a949033-3888-48be-9da0-d67c7e8854c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -237.87033125239154, -21.312996064026805, -12.119072291016266, -5.9808954892206145
LBFGS Accumulation History: 3 points
Removed measurement 5bb9ed79 to history. Total: 3
th(0)=-237.87033125239154;dx=-0.0014899174592527744
Armijo: th(157500.00000000006)=-212.62623636426258; dx=2.625955977342588E-4 evalInputDelta=-25.244094888128956
New Minimum: -237.87033125239154 > -255.10355762249205
WOLF (strong): th(78750.00000000003)=-255.10355762249205; dx=1.4637519089991902E-4 evalInputDelta=17.23322637010051
New Minimum: -255.10355762249205 > -261.34436148656715
END: th(26250.00000000001)=-261.34436148656715; dx=-4.571052734960781E-4 evalInputDelta=23.474030234175615
Fitness changed from -237.87033125239154 to -261.34436148656715
Iteration 9 complete. Error: -261.34436148656715 Total: 0.6014; Orientation: 0.0281; Line Search: 0.4633
Adding measurement c4e41f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.944e+04, gradient 3.059e-02, dot -0.503; [0a949033-3888-48be-9da0-d67c7e8854c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -261.34436148656715, -21.312996064026805, -12.119072291016266, -5.9808954892206145
LBFGS Accumulation History: 3 points
Removed measurement c4e41f to history. Total: 3
th(0)=-261.34436148656715;dx=-8.928723069859334E-4
New Minimum: -261.34436148656715 > -284.1273907860527
END: th(56553.91061333697)=-284.1273907860527; dx=-2.6004755608396806E-4 evalInputDelta=22.78302929948552
Fitness changed from -261.34436148656715 to -284.1273907860527
Iteration 10 complete. Error: -284.1273907860527 Total: 0.3638; Orientation: 0.0274; Line Search: 0.2259
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/892bdd34-4c64-4efb-b8cb-f6b61a239b88.jpg)
Adding measurement 6d070bf2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.019e+04, gradient 3.377e-02, dot -0.470; [0a949033-3888-48be-9da0-d67c7e8854c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -284.1273907860527, -21.312996064026805, -12.119072291016266, -5.9808954892206145
LBFGS Accumulation History: 3 points
Removed measurement 6d070bf2 to history. Total: 3
th(0)=-284.1273907860527;dx=-0.001097670225123261
Armijo: th(121841.70688233551)=-279.879896540729; dx=5.7906770459232184E-5 evalInputDelta=-4.247494245323651
New Minimum: -284.1273907860527 > -295.8044995306975
END: th(60920.853441167754)=-295.8044995306975; dx=-5.059189823957996E-5 evalInputDelta=11.67710874464484
Fitness changed from -284.1273907860527 to -295.8044995306975
Iteration 11 complete. Error: -295.8044995306975 Total: 0.4921; Orientation: 0.0273; Line Search: 0.3430
Adding measurement 7644ce1e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.176e+04, gradient 3.787e-02, dot -0.387; [0a949033-3888-48be-9da0-d67c7e8854c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -295.8044995306975, -21.312996064026805, -12.119072291016266, -5.9808954892206145
LBFGS Accumulation History: 3 points
Removed measurement 7644ce1e to history. Total: 3
th(0)=-295.8044995306975;dx=-0.001393785384161969
Armijo: th(131250.00000000006)=-277.0345207290883; dx=2.57458658326285E-4 evalInputDelta=-18.769978801609227
New Minimum: -295.8044995306975 > -307.46479719973985
WOLF (strong): th(65625.00000000003)=-307.46479719973985; dx=1.5634063514915046E-4 evalInputDelta=11.660297669042336
New Minimum: -307.46479719973985 > -314.22593293329004
END: th(21875.00000000001)=-314.22593293329004; dx=-4.308679393753743E-4 evalInputDelta=18.421433402592527
Fitness changed from -295.8044995306975 to -314.22593293329004
Iteration 12 complete. Error: -314.22593293329004 Total: 0.6040; Orientation: 0.0279; Line Search: 0.4672
Adding measurement 3c560ea6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.052e+05, gradient 3.091e-02, dot -0.506; [0a949033-3888-48be-9da0-d67c7e8854c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -314.22593293329004, -21.312996064026805, -12.119072291016266, -5.9808954892206145
LBFGS Accumulation History: 3 points
Removed measurement 3c560ea6 to history. Total: 3
th(0)=-314.22593293329004;dx=-9.174049889873284E-4
New Minimum: -314.22593293329004 > -328.380805822973
END: th(47128.25884444748)=-328.380805822973; dx=-2.6821200944030063E-4 evalInputDelta=14.154872889682963
Fitness changed from -314.22593293329004 to -328.380805822973
Iteration 13 complete. Error: -328.380805822973 Total: 0.3727; Orientation: 0.0273; Line Search: 0.2338
Adding measurement c2e547b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.022e+05, gradient 2.989e-02, dot -0.523; [0a949033-3888-48be-9da0-d67c7e8854c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -328.380805822973, -21.312996064026805, -12.119072291016266, -5.9808954892206145
LBFGS Accumulation History: 3 points
Removed measurement c2e547b to history. Total: 3
th(0)=-328.380805822973;dx=-8.633647718243661E-4
New Minimum: -328.380805822973 > -341.30712072456424
END: th(101534.7557352796)=-341.30712072456424; dx=-7.464830746541396E-5 evalInputDelta=12.92631490159124
Fitness changed from -328.380805822973 to -341.30712072456424
Iteration 14 complete. Error: -341.30712072456424 Total: 0.3665; Orientation: 0.0273; Line Search: 0.2277
Adding measurement 6e286e20 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.418e+05, gradient 3.772e-02, dot -0.383; [0a949033-3888-48be-9da0-d67c7e8854c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -341.30712072456424, -21.312996064026805, -12.119072291016266, -5.9808954892206145
LBFGS Accumulation History: 3 points
Removed measurement 6e286e20 to history. Total: 3
th(0)=-341.30712072456424;dx=-0.0013650531082945647
Armijo: th(218750.00000000015)=-280.0869505538336; dx=3.48778301096479E-4 evalInputDelta=-61.220170170730626
Armijo: th(109375.00000000007)=-339.61014354198693; dx=2.5083466579459493E-4 evalInputDelta=-1.6969771825773137
New Minimum: -341.30712072456424 > -360.6516064335011
END: th(36458.33333333336)=-360.6516064335011; dx=-1.4838228932738016E-4 evalInputDelta=19.344485708936872
Fitness changed from -341.30712072456424 to -360.6516064335011
Iteration 15 complete. Error: -360.6516064335011 Total: 0.6021; Orientation: 0.0285; Line Search: 0.4642
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/6fd74959-b65d-46da-b49d-c3e65ded36b2.jpg)
Final threshold in iteration 16: -360.6516064335011 (> -Infinity) after 7.839s (< 5400.000s)

Returns

    -360.6516064335011