Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

BasicOptimizer.scala:89 executed in 200.71 seconds (1.818 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: 20619162878210
Reset training subject: 20623754424227
Adding measurement e920bfa to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.21622973680496216;dx=-9.791279157310684E-7
New Minimum: -0.21622973680496216 > -0.21623064577579498
WOLFE (weak): th(2.154434690031884)=-0.21623064577579498; dx=-8.957160427504182E-7 evalInputDelta=9.08970832824707E-7
New Minimum: -0.21623064577579498 > -0.2162315845489502
WOLFE (weak): th(4.308869380063768)=-0.2162315845489502; dx=-8.957109608028478E-7 evalInputDelta=1.8477439880371094E-6
New Minimum: -0.2162315845489502 > -0.21623554825782776
WOLFE (weak): th(12.926608140191302)=-0.21623554825782776; dx=-8.957084119029141E-7 evalInputDelta=5.811452865600586E-6
New Minimum: -0.21623554825782776 > -0.21625292301177979
WOLFE (weak): th(51.70643256076521)=-0.21625292301177979; dx=-8.95729098350198E-7 evalInputDelta=2.3186206817626953E-5
New Minimum: -0.21625292301177979 > -0.21634547412395477
WOLFE (weak): th(258.53216280382605)=-0.21634547412395477; dx=-8.956768810503555E-7 evalInputDelta=1.1573731899261475E-4
New Minimum: -0.21634547412395477 > -0.21692422032356262
WOLFE (weak): th(1551.1929768229563)=-0.21692422032356262; dx=-8.949160763743216E-7 evalInputDelta=6.944835186004639E-4
New Minimum: -0.21692422032356262 > -0.22108110785484314
WOLFE (weak): th(10858.350837760694)=-0.22108110785484314; dx=-8.914529045876047E-7 evalInputDelta=0.0048513710498809814
New Minimum: -0.22108110785484314 > -0.2544034272432327
END: th(86866.80670208555)=-0.2544034272432327; dx=-8.614790665770929E-7 evalInputDelta=0.03817369043827057
Fitness changed from -0.21622973680496216 to -0.2544034272432327
Iteration 1 complete. Error: -0.2544034272432327 Total: 52.1485; Orientation: 0.0457; Line Search: 38.8306
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/24ce3a76-89ec-4663-b19a-49dcf5d8cac3.jpg)

    Adding measurement bf45e9e to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-0.2544034272432327;dx=-8.367294271350593E-7
    New Minimum: -0.2544034272432327 > -0.329551562666893
    WOLFE (weak): th(187148.86177126726)=-0.329551562666893; dx=-7.687163619841687E-7 evalInputDelta=0.07514813542366028
    New Minimum: -0.329551562666893 > -0.3981388211250305
    END: th(374297.7235425345)=-0.3981388211250305; dx=-6.957892471537848E-7 evalInputDelta=0.1437353938817978
    Fitness changed from -0.2544034272432327 to -0.3981388211250305
    Iteration 2 complete. Error: -0.3981388211250305 Total: 17.1831; Orientation: 0.0433; Line Search: 13.1466
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/960f8384-c288-43d8-b8ad-cafdf6a1ce1a.jpg)

    Adding measurement fc2a621 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-0.3981388211250305;dx=-6.262870524816493E-7
    New Minimum: -0.3981388211250305 > -0.6139257401227951
    END: th(806400.0000000001)=-0.6139257401227951; dx=-4.458393916003276E-7 evalInputDelta=0.2157869189977646
    Fitness changed from -0.3981388211250305 to -0.6139257401227951
    Iteration 3 complete. Error: -0.6139257401227951 Total: 12.6405; Orientation: 0.0472; Line Search: 8.7151
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/cf46fc6a-1030-4864-aac7-391233c183d8.jpg)

    Adding measurement 1ab624b6 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.822e+03, gradient 6.238e-04, dot -0.900; [64c7bc1a-102c-4e9c-b6d6-6bf3355e47e3 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.6139257401227951, -0.3981388211250305, -0.2544034272432327, -0.21622973680496216
    LBFGS Accumulation History: 3 points
    Removed measurement 1ab624b6 to history. Total: 3
    th(0)=-0.6139257401227951;dx=-3.8913430776616867E-7
    New Minimum: -0.6139257401227951 > -0.8815187811851501
    END: th(1737336.1340417115)=-0.8815187811851501; dx=-2.3757828319566393E-7 evalInputDelta=0.26759304106235504
    Fitness changed from -0.6139257401227951 to -0.8815187811851501
    Iteration 4 complete. Error: -0.8815187811851501 Total: 14.5770; Orientation: 1.1172; Line Search: 8.7240
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/6a38f581-3669-43d0-8b4c-5e0bfed731db.jpg)

    Adding measurement 3180ea0d to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.457e+03, gradient 4.764e-04, dot -0.790; [64c7bc1a-102c-4e9c-b6d6-6bf3355e47e3 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.8815187811851501, -0.3981388211250305, -0.2544034272432327, -0.21622973680496216
    LBFGS Accumulation History: 3 points
    Removed measurement 3180ea0d to history. Total: 3
    th(0)=-0.8815187811851501;dx=-2.2699898308377807E-7
    New Minimum: -0.8815187811851501 > -1.176278978586197
    END: th(3742977.235425346)=-1.176278978586197; dx=-1.0824406781328128E-7 evalInputDelta=0.29476019740104675
    Fitness changed from -0.8815187811851501 to -1.176278978586197
    Iteration 5 complete. Error: -1.176278978586197 Total: 13.7238; Orientation: 1.0236; Line Search: 8.4435
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/02b09be9-bba3-4c48-9e94-d7182bbe03cd.jpg)

    Adding measurement 167bd273 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.449e+03, gradient 3.846e-04, dot -0.636; [64c7bc1a-102c-4e9c-b6d6-6bf3355e47e3 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.176278978586197, -0.3981388211250305, -0.2544034272432327, -0.21622973680496216
    LBFGS Accumulation History: 3 points
    Removed measurement 167bd273 to history. Total: 3
    th(0)=-1.176278978586197;dx=-1.479000208402456E-7
    New Minimum: -1.176278978586197 > -1.445866271853447
    END: th(8064000.000000003)=-1.445866271853447; dx=-2.59880596392016E-8 evalInputDelta=0.26958729326725006
    Fitness changed from -1.176278978586197 to -1.445866271853447
    Iteration 6 complete. Error: -1.445866271853447 Total: 14.2621; Orientation: 1.0165; Line Search: 9.1126
    Adding measurement 69329482 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.361e+03, gradient 3.708e-04, dot -0.370; [64c7bc1a-102c-4e9c-b6d6-6bf3355e47e3 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.445866271853447, -0.3981388211250305, -0.2544034272432327, -0.21622973680496216
    LBFGS Accumulation History: 3 points
    Removed measurement 69329482 to history. Total: 3
    th(0)=-1.445866271853447;dx=-1.3746150528772856E-7
    New Minimum: -1.445866271853447 > -1.505393162369728
    WOLF (strong): th(1.7373361340417117E7)=-1.505393162369728; dx=3.008748989529099E-8 evalInputDelta=0.05952689051628113
    New Minimum: -1.505393162369728 > -1.612073615193367
    WOLF (strong): th(8686680.670208558)=-1.612073615193367; dx=1.3412090931447154E-8 evalInputDelta=0.16620734333992004
    END: th(2895560.2234028527)=-1.5763648301362991; dx=-5.1448183418279124E-8 evalInputDelta=0.13049855828285217
    Fitness changed from -1.445866271853447 to -1.612073615193367
    Iteration 7 complete. Error: -1.612073615193367 Total: 21.8544; Orientation: 1.0065; Line Search: 16.5740
    Adding measurement 27701920 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.233e+03, gradient 3.437e-04, dot -0.282; [64c7bc1a-102c-4e9c-b6d6-6bf3355e47e3 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.612073615193367, -0.3981388211250305, -0.2544034272432327, -0.21622973680496216
    LBFGS Accumulation History: 3 points
    Removed measurement 27701920 to history. Total: 3
    th(0)=-1.612073615193367;dx=-1.1815261377713452E-7
    New Minimum: -1.612073615193367 > -1.7746700644493103
    END: th(6238295.392375577)=-1.7746700644493103; dx=-8.06952987506188E-9 evalInputDelta=0.1625964492559433
    Fitness changed from -1.612073615193367 to -1.7746700644493103
    Iteration 8 complete. Error: -1.7746700644493103 Total: 13.9374; Orientation: 1.0999; Line Search: 8.1138
    Adding measurement 4e765740 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.510e+03, gradient 2.270e-04, dot -0.416; [64c7bc1a-102c-4e9c-b6d6-6bf3355e47e3 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.7746700644493103, -0.3981388211250305, -0.2544034272432327, -0.21622973680496216
    LBFGS Accumulation History: 3 points
    Removed measurement 4e765740 to history. Total: 3
    th(0)=-1.7746700644493103;dx=-5.1538383037226424E-8
    New Minimum: -1.7746700644493103 > -1.8788303136825562
    WOLF (strong): th(1.3440000000000006E7)=-1.8788303136825562; dx=9.547593286491735E-9 evalInputDelta=0.10416024923324585
    END: th(6720000.000000003)=-1.8760160058736801; dx=-1.295289512689975E-8 evalInputDelta=0.10134594142436981
    Fitness changed from -1.7746700644493103 to -1.8788303136825562
    Iteration 9 complete. Error: -1.8788303136825562 Total: 17.8722; Orientation: 1.0369; Line Search: 12.6346
    Adding measurement 2087e020 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.298e+03, gradient 2.848e-04, dot -0.235; [64c7bc1a-102c-4e9c-b6d6-6bf3355e47e3 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.8788303136825562, -0.3981388211250305, -0.2544034272432327, -0.21622973680496216
    LBFGS Accumulation History: 3 points
    Removed measurement 2087e020 to history. Total: 3
    th(0)=-1.8788303136825562;dx=-8.1117653892401E-8
    New Minimum: -1.8788303136825562 > -1.8919900506734848
    WOLF (strong): th(1.4477801117014265E7)=-1.8919900506734848; dx=3.655037220169567E-8 evalInputDelta=0.01315973699092865
    New Minimum: -1.8919900506734848 > -1.981185406446457
    WOLF (strong): th(7238900.558507132)=-1.981185406446457; dx=6.2765668654696686E-9 evalInputDelta=0.10235509276390076
    END: th(2412966.8528357106)=-1.949854001402855; dx=-3.8145351363419676E-8 evalInputDelta=0.07102368772029877
    Fitness changed from -1.8788303136825562 to -1.981185406446457
    Iteration 10 complete. Error: -1.981185406446457 Total: 22.4407; Orientation: 1.4674; Line Search: 16.6485
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/a2f954d4-beb9-4b5d-a9a0-8cfb9cab6642.jpg)

    Final threshold in iteration 11: -1.981185406446457 (> -Infinity) after 200.709s (< 5400.000s)

Returns

    -1.981185406446457