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 86.49 seconds (1.446 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: 306691861597800
Reset training subject: 306693711664700
Adding measurement 2a977fac to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-154.57431892646792;dx=-2.936495747075164E-5
New Minimum: -154.57431892646792 > -154.57436552901848
END: th(2.154434690031884)=-154.57436552901848; dx=-1.8072030544827913E-5 evalInputDelta=4.660255055455309E-5
Fitness changed from -154.57431892646792 to -154.57436552901848
Iteration 1 complete. Error: -154.57436552901848 Total: 8.2365; Orientation: 0.0640; Line Search: 3.2286
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/c8d777f6-bf7a-41ae-8541-6f0d0080e610.jpg)
Adding measurement 75151f73 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-154.57436552901848;dx=-1.792482422742617E-5
New Minimum: -154.57436552901848 > -154.57445873407747
WOLFE (weak): th(4.641588833612779)=-154.57445873407747; dx=-1.7912744773119852E-5 evalInputDelta=9.32050589881328E-5
New Minimum: -154.57445873407747 > -154.57455193908024
WOLFE (weak): th(9.283177667225559)=-154.57455193908024; dx=-1.7901013439071318E-5 evalInputDelta=1.8641006175812436E-4
New Minimum: -154.57455193908024 > -154.574918101047
WOLFE (weak): th(27.849533001676676)=-154.574918101047; dx=-1.7883336136149407E-5 evalInputDelta=5.525720285106672E-4
New Minimum: -154.574918101047 > -154.57657580528073
WOLFE (weak): th(111.3981320067067)=-154.57657580528073; dx=-1.7867589009816093E-5 evalInputDelta=0.00221027626224668
New Minimum: -154.57657580528073 > -154.58540328024117
WOLFE (weak): th(556.9906600335335)=-154.58540328024117; dx=-1.786764862395975E-5 evalInputDelta=0.011037751222687575
New Minimum: -154.58540328024117 > -154.64056690945137
WOLFE (weak): th(3341.9439602012008)=-154.64056690945137; dx=-1.7838964793576947E-5 evalInputDelta=0.06620138043288648
New Minimum: -154.64056690945137 > -155.03700898235317
WOLFE (weak): th(23393.607721408407)=-155.03700898235317; dx=-1.779883301808458E-5 evalInputDelta=0.46264345333469237
New Minimum: -155.03700898235317 > -158.21569976514536
WOLFE (weak): th(187148.86177126726)=-158.21569976514536; dx=-1.7195745337119464E-5 evalInputDelta=3.6413342361268803
New Minimum: -158.21569976514536 > -181.15635355946145
END: th(1684339.7559414054)=-181.15635355946145; dx=-1.016409164652925E-5 evalInputDelta=26.58198803044297
Fitness changed from -154.57436552901848 to -181.15635355946145
Iteration 2 complete. Error: -181.15635355946145 Total: 18.1497; Orientation: 0.0705; Line Search: 16.2061
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/587e7763-8bc1-46b5-bf38-88cbfcf500e8.jpg)
Adding measurement 3f4194ea to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-181.15635355946145;dx=-1.2299005738976611E-5
New Minimum: -181.15635355946145 > -211.16680383480974
END: th(3628800.0000000005)=-211.16680383480974; dx=-4.210072455170828E-6 evalInputDelta=30.01045027534829
Fitness changed from -181.15635355946145 to -211.16680383480974
Iteration 3 complete. Error: -211.16680383480974 Total: 5.3119; Orientation: 0.0613; Line Search: 3.4427
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/0aa1770d-9f63-415d-be84-afa29fd3b6a4.jpg)
Adding measurement 71b47899 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.263e+04, gradient 3.074e-03, dot -0.413; [8755ceaa-c698-496d-bc17-517fc1b808a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -211.16680383480974, -181.15635355946145, -154.57436552901848, -154.57431892646792
LBFGS Accumulation History: 3 points
Removed measurement 71b47899 to history. Total: 3
th(0)=-211.16680383480974;dx=-9.418679589259372E-6
New Minimum: -211.16680383480974 > -235.47383486030222
END: th(7818012.603187701)=-235.47383486030222; dx=-1.1374130078597952E-7 evalInputDelta=24.307031025492478
Fitness changed from -211.16680383480974 to -235.47383486030222
Iteration 4 complete. Error: -235.47383486030222 Total: 6.2550; Orientation: 1.0769; Line Search: 3.3813
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/9ce98970-01bc-4525-bd61-7c19c74b1c29.jpg)
Adding measurement 412a52ad to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.771e+03, gradient 3.701e-03, dot -0.164; [8755ceaa-c698-496d-bc17-517fc1b808a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -235.47383486030222, -181.15635355946145, -154.57436552901848, -154.57431892646792
LBFGS Accumulation History: 3 points
Removed measurement 412a52ad to history. Total: 3
th(0)=-235.47383486030222;dx=-1.3678214845422201E-5
Armijo: th(1.6843397559414055E7)=-208.61252060101887; dx=3.1771469935489093E-6 evalInputDelta=-26.861314259283347
New Minimum: -235.47383486030222 > -246.73372069775658
WOLF (strong): th(8421698.779707028)=-246.73372069775658; dx=4.097154354869662E-6 evalInputDelta=11.259885837454362
New Minimum: -246.73372069775658 > -261.0545540141922
END: th(2807232.926569009)=-261.0545540141922; dx=-3.039989404134922E-6 evalInputDelta=25.580719153889987
Fitness changed from -235.47383486030222 to -261.0545540141922
Iteration 5 complete. Error: -261.0545540141922 Total: 9.4422; Orientation: 1.0610; Line Search: 6.4738
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/7d9ca68b-8182-4e5a-bb20-ce758edf8fc6.jpg)
Adding measurement 5086e9c3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.383e+04, gradient 2.494e-03, dot -0.401; [8755ceaa-c698-496d-bc17-517fc1b808a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -261.0545540141922, -181.15635355946145, -154.57436552901848, -154.57431892646792
LBFGS Accumulation History: 3 points
Removed measurement 5086e9c3 to history. Total: 3
th(0)=-261.0545540141922;dx=-6.2180321805203966E-6
New Minimum: -261.0545540141922 > -278.39482702327655
END: th(6048000.000000001)=-278.39482702327655; dx=-2.4271871230195124E-7 evalInputDelta=17.340273009084342
Fitness changed from -261.0545540141922 to -278.39482702327655
Iteration 6 complete. Error: -278.39482702327655 Total: 6.4297; Orientation: 1.0065; Line Search: 3.2932
Adding measurement 60b8bef9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.344e+04, gradient 2.952e-03, dot -0.268; [8755ceaa-c698-496d-bc17-517fc1b808a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -278.39482702327655, -181.15635355946145, -154.57436552901848, -154.57431892646792
LBFGS Accumulation History: 3 points
Removed measurement 60b8bef9 to history. Total: 3
th(0)=-278.39482702327655;dx=-8.715443104724977E-6
Armijo: th(1.3030021005312836E7)=-258.87628021126926; dx=3.0658518452041403E-6 evalInputDelta=-19.518546812007287
New Minimum: -278.39482702327655 > -284.8538205587168
WOLF (strong): th(6515010.502656418)=-284.8538205587168; dx=3.147304359172217E-6 evalInputDelta=6.458993535440243
New Minimum: -284.8538205587168 > -291.72536613522874
END: th(2171670.167552139)=-291.72536613522874; dx=-2.542942163717561E-6 evalInputDelta=13.330539111952191
Fitness changed from -278.39482702327655 to -291.72536613522874
Iteration 7 complete. Error: -291.72536613522874 Total: 9.4706; Orientation: 1.0089; Line Search: 6.8586
Adding measurement 280c006 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.254e+04, gradient 1.903e-03, dot -0.492; [8755ceaa-c698-496d-bc17-517fc1b808a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -291.72536613522874, -181.15635355946145, -154.57436552901848, -154.57431892646792
LBFGS Accumulation History: 3 points
Removed measurement 280c006 to history. Total: 3
th(0)=-291.72536613522874;dx=-3.6058482305986224E-6
New Minimum: -291.72536613522874 > -303.4296949995193
END: th(4678721.544281682)=-303.4296949995193; dx=-1.4016667747729057E-6 evalInputDelta=11.704328864290574
Fitness changed from -291.72536613522874 to -303.4296949995193
Iteration 8 complete. Error: -303.4296949995193 Total: 5.8170; Orientation: 1.0226; Line Search: 3.2827
Adding measurement 63ce0b0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.273e+04, gradient 2.028e-03, dot -0.415; [8755ceaa-c698-496d-bc17-517fc1b808a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -303.4296949995193, -181.15635355946145, -154.57436552901848, -154.57431892646792
LBFGS Accumulation History: 3 points
Removed measurement 63ce0b0 to history. Total: 3
th(0)=-303.4296949995193;dx=-4.1047911075628366E-6
New Minimum: -303.4296949995193 > -306.1438957644119
WOLF (strong): th(1.0080000000000002E7)=-306.1438957644119; dx=1.1772848375293675E-6 evalInputDelta=2.7142007648926096
New Minimum: -306.1438957644119 > -311.3834745527681
WOLF (strong): th(5040000.000000001)=-311.3834745527681; dx=1.2266465793320025E-7 evalInputDelta=7.953779553248808
END: th(1680000.0000000002)=-308.9453172669436; dx=-2.120919439172834E-6 evalInputDelta=5.515622267424305
Fitness changed from -303.4296949995193 to -311.3834745527681
Iteration 9 complete. Error: -311.3834745527681 Total: 9.1121; Orientation: 1.0211; Line Search: 6.5761
Adding measurement 17f764e6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.938e+04, gradient 2.352e-03, dot -0.300; [8755ceaa-c698-496d-bc17-517fc1b808a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -311.3834745527681, -181.15635355946145, -154.57436552901848, -154.57431892646792
LBFGS Accumulation History: 3 points
Removed measurement 17f764e6 to history. Total: 3
th(0)=-311.3834745527681;dx=-5.530071849552409E-6
New Minimum: -311.3834745527681 > -320.60675141200204
WOLF (strong): th(3619450.2792535652)=-320.60675141200204; dx=4.967211529031329E-7 evalInputDelta=9.22327685923392
END: th(1809725.1396267826)=-319.14803789567; dx=-2.4140493228365E-6 evalInputDelta=7.764563342901852
Fitness changed from -311.3834745527681 to -320.60675141200204
Iteration 10 complete. Error: -320.60675141200204 Total: 7.9898; Orientation: 1.0388; Line Search: 5.3716
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/da30597c-9dd7-4991-b7f7-b32cfce4842a.jpg)
Final threshold in iteration 11: -320.60675141200204 (> -Infinity) after 86.491s (< 5400.000s)

Returns

    -320.60675141200204