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 331.58 seconds (4.368 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: 570612246483900
Reset training subject: 570618884129900
Adding measurement 3af3c1a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-65.56231027904892;dx=-1.8404651810188742E-6
New Minimum: -65.56231027904892 > -65.56231719099993
WOLFE (weak): th(2.154434690031884)=-65.56231719099993; dx=-1.8377098530607766E-6 evalInputDelta=6.9119510186510524E-6
New Minimum: -65.56231719099993 > -65.56232410295021
WOLFE (weak): th(4.308869380063768)=-65.56232410295021; dx=-1.8374027374700405E-6 evalInputDelta=1.382390129833766E-5
New Minimum: -65.56232410295021 > -65.56233562286575
WOLFE (weak): th(12.926608140191302)=-65.56233562286575; dx=-1.836937501041392E-6 evalInputDelta=2.534381683005904E-5
New Minimum: -65.56233562286575 > -65.56241626221775
WOLFE (weak): th(51.70643256076521)=-65.56241626221775; dx=-1.837761295657504E-6 evalInputDelta=1.0598316883658754E-4
New Minimum: -65.56241626221775 > -65.56284019317985
WOLFE (weak): th(258.53216280382605)=-65.56284019317985; dx=-1.8375177942337927E-6 evalInputDelta=5.299141309365041E-4
New Minimum: -65.56284019317985 > -65.56549661120718
WOLFE (weak): th(1551.1929768229563)=-65.56549661120718; dx=-1.8375184512642136E-6 evalInputDelta=0.003186332158264804
New Minimum: -65.56549661120718 > -65.58458601807922
WOLFE (weak): th(10858.350837760694)=-65.58458601807922; dx=-1.8362008351249616E-6 evalInputDelta=0.022275739030305886
New Minimum: -65.58458601807922 > -65.74006128582948
WOLFE (weak): th(86866.80670208555)=-65.74006128582948; dx=-1.8272612983122376E-6 evalInputDelta=0.17775100678056788
New Minimum: -65.74006128582948 > -67.12412755671359
WOLFE (weak): th(781801.26031877)=-67.12412755671359; dx=-1.7392606053193248E-6 evalInputDelta=1.561817277664673
New Minimum: -67.12412755671359 > -77.05102194110175
END: th(7818012.6031877)=-77.05102194110175; dx=-8.09973614905772E-7 evalInputDelta=11.488711662052836
Fitness changed from -65.56231027904892 to -77.05102194110175
Iteration 1 complete. Error: -77.05102194110175 Total: 86.8576; Orientation: 0.1450; Line Search: 67.5336
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/b9e21566-7be3-4280-84be-b32115d8dd88.jpg)
Adding measurement 540b0f19 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-77.05102194110175;dx=-9.619134830145986E-7
New Minimum: -77.05102194110175 > -88.55212240771445
END: th(1.684339755941405E7)=-88.55212240771445; dx=-3.6871555820013823E-7 evalInputDelta=11.501100466612698
Fitness changed from -77.05102194110175 to -88.55212240771445
Iteration 2 complete. Error: -88.55212240771445 Total: 20.1305; Orientation: 0.1615; Line Search: 12.8180
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/5ef3ea9d-ed11-4ecf-bf2e-cb50fe0ef8ac.jpg)
Adding measurement 14512a5c to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-88.55212240771445;dx=-9.165792634331183E-7
New Minimum: -88.55212240771445 > -94.8936047319488
WOLF (strong): th(3.6288E7)=-94.8936047319488; dx=1.280488238528986E-7 evalInputDelta=6.341482324234349
New Minimum: -94.8936047319488 > -96.45724826972953
END: th(1.8144E7)=-96.45724826972953; dx=-4.892277265614742E-8 evalInputDelta=7.905125862015083
Fitness changed from -88.55212240771445 to -96.45724826972953
Iteration 3 complete. Error: -96.45724826972953 Total: 25.8319; Orientation: 0.1493; Line Search: 18.2411
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/5925d91b-bfb8-497c-9c36-97f43695dd85.jpg)
Adding measurement 53f07af4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.986e+04, gradient 9.775e-04, dot -0.631; [a21d8865-9679-4b43-b96f-a7da516ef7ca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -96.45724826972953, -88.55212240771445, -77.05102194110175, -65.56231027904892
LBFGS Accumulation History: 3 points
Removed measurement 53f07af4 to history. Total: 3
th(0)=-96.45724826972953;dx=-9.55030661132644E-7
New Minimum: -96.45724826972953 > -96.63230260735813
WOLF (strong): th(3.90900630159385E7)=-96.63230260735813; dx=3.4738455240267663E-7 evalInputDelta=0.17505433762859468
New Minimum: -96.63230260735813 > -103.39349691735225
WOLF (strong): th(1.954503150796925E7)=-103.39349691735225; dx=1.5788160989381065E-7 evalInputDelta=6.936248647622719
END: th(6515010.502656416)=-101.82646925561862; dx=-5.28663555491948E-7 evalInputDelta=5.369220985889086
Fitness changed from -96.45724826972953 to -103.39349691735225
Iteration 4 complete. Error: -103.39349691735225 Total: 34.7589; Orientation: 2.6479; Line Search: 24.7853
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/2a1e3614-c7ae-4dfd-9fd2-fac6cfba64ec.jpg)
Adding measurement 6300d002 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.584e+04, gradient 9.519e-04, dot -0.519; [a21d8865-9679-4b43-b96f-a7da516ef7ca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -103.39349691735225, -88.55212240771445, -77.05102194110175, -65.56231027904892
LBFGS Accumulation History: 3 points
Removed measurement 6300d002 to history. Total: 3
th(0)=-103.39349691735225;dx=-9.056722154039856E-7
New Minimum: -103.39349691735225 > -110.57601808531797
END: th(1.4036164632845044E7)=-110.57601808531797; dx=-2.2629688267319358E-8 evalInputDelta=7.182521167965717
Fitness changed from -103.39349691735225 to -110.57601808531797
Iteration 5 complete. Error: -110.57601808531797 Total: 23.4771; Orientation: 2.7249; Line Search: 13.5084
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/2442eed8-e711-48cc-87cf-edffc2f54b73.jpg)
Adding measurement 15a764aa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.164e+04, gradient 6.675e-04, dot -0.663; [a21d8865-9679-4b43-b96f-a7da516ef7ca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -110.57601808531797, -88.55212240771445, -77.05102194110175, -65.56231027904892
LBFGS Accumulation History: 3 points
Removed measurement 15a764aa to history. Total: 3
th(0)=-110.57601808531797;dx=-4.446323237417353E-7
New Minimum: -110.57601808531797 > -114.6205887613691
WOLF (strong): th(3.0240000000000004E7)=-114.6205887613691; dx=7.127006687195825E-8 evalInputDelta=4.044570676051137
New Minimum: -114.6205887613691 > -114.85014715618352
END: th(1.5120000000000002E7)=-114.85014715618352; dx=-1.0509594180388911E-7 evalInputDelta=4.2741290708655555
Fitness changed from -110.57601808531797 to -114.85014715618352
Iteration 6 complete. Error: -114.85014715618352 Total: 29.1520; Orientation: 2.7979; Line Search: 18.7456
Adding measurement 5416ddf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.654e+04, gradient 6.112e-04, dot -0.665; [a21d8865-9679-4b43-b96f-a7da516ef7ca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -114.85014715618352, -88.55212240771445, -77.05102194110175, -65.56231027904892
LBFGS Accumulation History: 3 points
Removed measurement 5416ddf to history. Total: 3
th(0)=-114.85014715618352;dx=-3.7224539181740874E-7
New Minimum: -114.85014715618352 > -118.1704541926444
WOLF (strong): th(3.2575052513282087E7)=-118.1704541926444; dx=5.052131802748169E-8 evalInputDelta=3.320307036460875
New Minimum: -118.1704541926444 > -118.43660351695785
END: th(1.6287526256641043E7)=-118.43660351695785; dx=-7.396049815924703E-8 evalInputDelta=3.5864563607743207
Fitness changed from -114.85014715618352 to -118.43660351695785
Iteration 7 complete. Error: -118.43660351695785 Total: 27.7184; Orientation: 2.5807; Line Search: 19.1111
Adding measurement 2f73a487 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.559e+04, gradient 6.003e-04, dot -0.634; [a21d8865-9679-4b43-b96f-a7da516ef7ca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -118.43660351695785, -88.55212240771445, -77.05102194110175, -65.56231027904892
LBFGS Accumulation History: 3 points
Removed measurement 2f73a487 to history. Total: 3
th(0)=-118.43660351695785;dx=-3.6007387891505044E-7
New Minimum: -118.43660351695785 > -120.46750488421767
WOLF (strong): th(3.509041158211262E7)=-120.46750488421767; dx=9.513911465729297E-8 evalInputDelta=2.0309013672598297
New Minimum: -120.46750488421767 > -121.67795477016465
END: th(1.754520579105631E7)=-121.67795477016465; dx=-2.740234770563218E-8 evalInputDelta=3.241351253206801
Fitness changed from -118.43660351695785 to -121.67795477016465
Iteration 8 complete. Error: -121.67795477016465 Total: 28.3941; Orientation: 2.6314; Line Search: 19.3841
Adding measurement 52a9a08a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.733e+04, gradient 6.061e-04, dot -0.586; [a21d8865-9679-4b43-b96f-a7da516ef7ca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -121.67795477016465, -88.55212240771445, -77.05102194110175, -65.56231027904892
LBFGS Accumulation History: 3 points
Removed measurement 52a9a08a to history. Total: 3
th(0)=-121.67795477016465;dx=-3.6686823586874707E-7
New Minimum: -121.67795477016465 > -122.24588400061927
WOLF (strong): th(3.7800000000000015E7)=-122.24588400061927; dx=1.4657060339052937E-7 evalInputDelta=0.5679292304546237
New Minimum: -122.24588400061927 > -124.65975443083971
WOLF (strong): th(1.8900000000000007E7)=-124.65975443083971; dx=2.0671870719979335E-8 evalInputDelta=2.9817996606750654
END: th(6300000.000000003)=-123.66098739418645; dx=-2.197104099544376E-7 evalInputDelta=1.9830326240218028
Fitness changed from -121.67795477016465 to -124.65975443083971
Iteration 9 complete. Error: -124.65975443083971 Total: 32.8699; Orientation: 2.5293; Line Search: 24.3090
Adding measurement 70609644 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.648e+04, gradient 6.168e-04, dot -0.546; [a21d8865-9679-4b43-b96f-a7da516ef7ca = 1.000/1.000e+00]
Orientation rejected. Popping history element from -124.65975443083971, -88.55212240771445, -77.05102194110175, -65.56231027904892
LBFGS Accumulation History: 3 points
Removed measurement 70609644 to history. Total: 3
th(0)=-124.65975443083971;dx=-3.8026738740254854E-7
New Minimum: -124.65975443083971 > -127.73472160967631
END: th(1.3572938547200873E7)=-127.73472160967631; dx=-5.0562997560898464E-8 evalInputDelta=3.0749671788366015
Fitness changed from -124.65975443083971 to -127.73472160967631
Iteration 10 complete. Error: -127.73472160967631 Total: 21.3062; Orientation: 2.6023; Line Search: 12.4632
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/32dadfce-d91d-42ce-9aed-ab8bb366e690.jpg)
Final threshold in iteration 11: -127.73472160967631 (> -Infinity) after 331.580s (< 5400.000s)

Returns

    -127.73472160967631