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 132.44 seconds (1.898 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: 109258169222700
Reset training subject: 109260831727900
Adding measurement 4a8e9a96 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-28.202379170611348;dx=-1.25537406977606E-6
New Minimum: -28.202379170611348 > -28.202382169103476
WOLFE (weak): th(2.154434690031884)=-28.202382169103476; dx=-1.1569982931408583E-6 evalInputDelta=2.9984921283698895E-6
New Minimum: -28.202382169103476 > -28.20238366834942
WOLFE (weak): th(4.308869380063768)=-28.20238366834942; dx=-1.1566625233854152E-6 evalInputDelta=4.497738071762569E-6
New Minimum: -28.20238366834942 > -28.202397161559333
WOLFE (weak): th(12.926608140191302)=-28.202397161559333; dx=-1.1569657914164831E-6 evalInputDelta=1.7990947984714012E-5
New Minimum: -28.202397161559333 > -28.202445137364503
WOLFE (weak): th(51.70643256076521)=-28.202445137364503; dx=-1.1565123200119953E-6 evalInputDelta=6.596675315506673E-5
New Minimum: -28.202445137364503 > -28.20270900283414
WOLFE (weak): th(258.53216280382605)=-28.20270900283414; dx=-1.156110766228729E-6 evalInputDelta=3.298322227927031E-4
New Minimum: -28.20270900283414 > -28.20435360866718
WOLFE (weak): th(1551.1929768229563)=-28.20435360866718; dx=-1.1564022447199028E-6 evalInputDelta=0.001974438055832195
New Minimum: -28.20435360866718 > -28.216200332624464
WOLFE (weak): th(10858.350837760694)=-28.216200332624464; dx=-1.1558592913053775E-6 evalInputDelta=0.013821162013115895
New Minimum: -28.216200332624464 > -28.31251164731808
WOLFE (weak): th(86866.80670208555)=-28.31251164731808; dx=-1.1457964843417687E-6 evalInputDelta=0.1101324767067311
New Minimum: -28.31251164731808 > -29.151044635414397
END: th(781801.26031877)=-29.151044635414397; dx=-1.0556241856176938E-6 evalInputDelta=0.9486654648030495
Fitness changed from -28.202379170611348 to -29.151044635414397
Iteration 1 complete. Error: -29.151044635414397 Total: 34.9167; Orientation: 0.0664; Line Search: 27.0550
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/54621f5e-ad1b-4999-8e05-c01af7155285.jpg)
Adding measurement 2e7e0b7a to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-29.151044635414397;dx=-1.0298264373864212E-6
New Minimum: -29.151044635414397 > -30.916379599803697
END: th(1684339.7559414052)=-30.916379599803697; dx=-8.759409549684111E-7 evalInputDelta=1.7653349643893002
Fitness changed from -29.151044635414397 to -30.916379599803697
Iteration 2 complete. Error: -30.916379599803697 Total: 8.4782; Orientation: 0.0651; Line Search: 5.4319
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/a5057336-bd27-4bd6-a094-ba436efa9aff.jpg)
Adding measurement 3082a241 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-30.916379599803697;dx=-8.431583202976002E-7
New Minimum: -30.916379599803697 > -33.822113074819626
END: th(3628800.0)=-33.822113074819626; dx=-6.204032017809504E-7 evalInputDelta=2.9057334750159285
Fitness changed from -30.916379599803697 to -33.822113074819626
Iteration 3 complete. Error: -33.822113074819626 Total: 8.5174; Orientation: 0.0589; Line Search: 5.3753
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/fcb612d4-f8ae-4aff-ba3f-1886851fb407.jpg)
Adding measurement 6a9164d1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.934e+04, gradient 7.884e-04, dot -0.866; [d6980f31-7cf1-4206-aa79-b1c9b55bf8f1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -33.822113074819626, -30.916379599803697, -29.151044635414397, -28.202379170611348
LBFGS Accumulation History: 3 points
Removed measurement 6a9164d1 to history. Total: 3
th(0)=-33.822113074819626;dx=-6.189932141426034E-7
New Minimum: -33.822113074819626 > -37.97922952698617
END: th(7818012.6031877)=-37.97922952698617; dx=-3.68899776568601E-7 evalInputDelta=4.157116452166541
Fitness changed from -33.822113074819626 to -37.97922952698617
Iteration 4 complete. Error: -37.97922952698617 Total: 9.8979; Orientation: 1.1634; Line Search: 5.4527
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/1335dd48-0a83-4a10-9dfc-c7c29cf0ce55.jpg)
Adding measurement 3fc3adea to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.776e+04, gradient 7.083e-04, dot -0.677; [d6980f31-7cf1-4206-aa79-b1c9b55bf8f1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -37.97922952698617, -30.916379599803697, -29.151044635414397, -28.202379170611348
LBFGS Accumulation History: 3 points
Removed measurement 3fc3adea to history. Total: 3
th(0)=-37.97922952698617;dx=-5.014887233190138E-7
New Minimum: -37.97922952698617 > -42.84006731389366
END: th(1.684339755941405E7)=-42.84006731389366; dx=-1.4484856860644988E-7 evalInputDelta=4.860837786907496
Fitness changed from -37.97922952698617 to -42.84006731389366
Iteration 5 complete. Error: -42.84006731389366 Total: 9.7487; Orientation: 1.3100; Line Search: 5.3260
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/f8dcf032-c7b4-4220-bff6-fda88bd09ea8.jpg)
Adding measurement 163135 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.843e+04, gradient 7.786e-04, dot -0.438; [d6980f31-7cf1-4206-aa79-b1c9b55bf8f1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -42.84006731389366, -30.916379599803697, -29.151044635414397, -28.202379170611348
LBFGS Accumulation History: 3 points
Removed measurement 163135 to history. Total: 3
th(0)=-42.84006731389366;dx=-6.056925812759664E-7
New Minimum: -42.84006731389366 > -44.698867344962174
WOLF (strong): th(3.6288E7)=-44.698867344962174; dx=6.548894532558415E-8 evalInputDelta=1.8588000310685118
New Minimum: -44.698867344962174 > -46.124755013277394
WOLF (strong): th(1.8144E7)=-46.124755013277394; dx=4.2171119741325005E-8 evalInputDelta=3.2846876993837313
END: th(6048000.0)=-45.638481383872055; dx=-2.4351222002628263E-7 evalInputDelta=2.798414069978392
Fitness changed from -42.84006731389366 to -46.124755013277394
Iteration 6 complete. Error: -46.124755013277394 Total: 15.4419; Orientation: 1.1130; Line Search: 10.9646
Adding measurement 319f3eb2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.769e+04, gradient 8.369e-04, dot -0.323; [d6980f31-7cf1-4206-aa79-b1c9b55bf8f1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -46.124755013277394, -30.916379599803697, -29.151044635414397, -28.202379170611348
LBFGS Accumulation History: 3 points
Removed measurement 319f3eb2 to history. Total: 3
th(0)=-46.124755013277394;dx=-6.989074535005428E-7
New Minimum: -46.124755013277394 > -50.82993801512793
WOLF (strong): th(1.3030021005312834E7)=-50.82993801512793; dx=2.3481683636101877E-8 evalInputDelta=4.705183001850536
END: th(6515010.502656417)=-49.895014345817366; dx=-3.341076762374678E-7 evalInputDelta=3.770259332539972
Fitness changed from -46.124755013277394 to -50.82993801512793
Iteration 7 complete. Error: -50.82993801512793 Total: 11.8342; Orientation: 1.1182; Line Search: 8.0754
Adding measurement 26e32ea5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.748e+04, gradient 7.058e-04, dot -0.417; [d6980f31-7cf1-4206-aa79-b1c9b55bf8f1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -50.82993801512793, -30.916379599803697, -29.151044635414397, -28.202379170611348
LBFGS Accumulation History: 3 points
Removed measurement 26e32ea5 to history. Total: 3
th(0)=-50.82993801512793;dx=-4.98061816367611E-7
New Minimum: -50.82993801512793 > -53.61335563642599
WOLF (strong): th(1.4036164632845046E7)=-53.61335563642599; dx=5.5381472278899815E-8 evalInputDelta=2.7834176212980637
END: th(7018082.316422523)=-53.384881989466564; dx=-1.6688058437812792E-7 evalInputDelta=2.5549439743386344
Fitness changed from -50.82993801512793 to -53.61335563642599
Iteration 8 complete. Error: -53.61335563642599 Total: 12.0498; Orientation: 1.0984; Line Search: 8.0718
Adding measurement 7b28d8fa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.986e+04, gradient 7.254e-04, dot -0.383; [d6980f31-7cf1-4206-aa79-b1c9b55bf8f1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -53.61335563642599, -30.916379599803697, -29.151044635414397, -28.202379170611348
LBFGS Accumulation History: 3 points
Removed measurement 7b28d8fa to history. Total: 3
th(0)=-53.61335563642599;dx=-5.252259841198183E-7
New Minimum: -53.61335563642599 > -55.919264003908275
WOLF (strong): th(1.5120000000000004E7)=-55.919264003908275; dx=1.311286159217616E-7 evalInputDelta=2.3059083674822816
New Minimum: -55.919264003908275 > -56.31005541759172
END: th(7560000.000000002)=-56.31005541759172; dx=-1.1082397979326612E-7 evalInputDelta=2.6966997811657265
Fitness changed from -53.61335563642599 to -56.31005541759172
Iteration 9 complete. Error: -56.31005541759172 Total: 11.9828; Orientation: 1.1970; Line Search: 8.2475
Adding measurement 107bbe08 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.846e+04, gradient 5.161e-04, dot -0.570; [d6980f31-7cf1-4206-aa79-b1c9b55bf8f1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -56.31005541759172, -30.916379599803697, -29.151044635414397, -28.202379170611348
LBFGS Accumulation History: 3 points
Removed measurement 107bbe08 to history. Total: 3
th(0)=-56.31005541759172;dx=-2.6610572202190076E-7
New Minimum: -56.31005541759172 > -58.49005256882387
END: th(1.6287526256641045E7)=-58.49005256882387; dx=-4.322650117557617E-8 evalInputDelta=2.1799971512321505
Fitness changed from -56.31005541759172 to -58.49005256882387
Iteration 10 complete. Error: -58.49005256882387 Total: 9.1202; Orientation: 1.1277; Line Search: 5.4179
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/424d6c40-4fd7-4125-bcc0-097e516536e0.jpg)
Final threshold in iteration 11: -58.49005256882387 (> -Infinity) after 132.440s (< 5400.000s)

Returns

    -58.49005256882387