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:88 executed in 48.92 seconds (1.305 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: 5016826700443
Reset training subject: 5018064321970
Adding measurement 48b31036 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=35.41259718313813;dx=-1.3194316782385546E-4
New Minimum: 35.41259718313813 > 35.411669882014394
WOLFE (weak): th(2.154434690031884)=35.411669882014394; dx=-1.3298977342193844E-4 evalInputDelta=9.273011237382889E-4
New Minimum: 35.411669882014394 > 35.4107389356941
WOLFE (weak): th(4.308869380063768)=35.4107389356941; dx=-1.3132647996652526E-4 evalInputDelta=0.0018582474440336227
New Minimum: 35.4107389356941 > 35.407015120610595
WOLFE (weak): th(12.926608140191302)=35.407015120610595; dx=-1.3344553558404152E-4 evalInputDelta=0.005582062527537346
New Minimum: 35.407015120610595 > 35.391949134878814
WOLFE (weak): th(51.70643256076521)=35.391949134878814; dx=-1.3397681020241797E-4 evalInputDelta=0.020648048259317875
New Minimum: 35.391949134878814 > 35.30686575546861
WOLFE (weak): th(258.53216280382605)=35.30686575546861; dx=-1.3324252995830862E-4 evalInputDelta=0.10573142766952515
New Minimum: 35.30686575546861 > 34.77089659683406
WOLFE (weak): th(1551.1929768229563)=34.77089659683406; dx=-1.2079783064843026E-4 evalInputDelta=0.6417005863040686
New Minimum: 34.77089659683406 > 31.62595902942121
END: th(10858.350837760694)=31.62595902942121; dx=-7.577435722197812E-5 evalInputDelta=3.786638153716922
Fitness changed from 35.41259718313813 to 31.62595902942121
Iteration 1 complete. Error: 31.62595902942121 Total: 13.2259; Orientation: 0.0020; Line Search: 9.6000
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/17fd215d-afa1-4662-b959-f18c55a01b44.jpg)

    Adding measurement 67816101 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=31.62595902942121;dx=-9.000098884812519E-5
    New Minimum: 31.62595902942121 > 27.27256059460342
    END: th(23393.607721408407)=27.27256059460342; dx=-4.04468407897123E-5 evalInputDelta=4.353398434817791
    Fitness changed from 31.62595902942121 to 27.27256059460342
    Iteration 2 complete. Error: 27.27256059460342 Total: 4.9231; Orientation: 0.0022; Line Search: 3.7494
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/8bdf4885-e1c0-49cf-a959-0c6d6ba88b98.jpg)

    Adding measurement 992d67c to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=27.27256059460342;dx=-4.952784058249532E-5
    New Minimum: 27.27256059460342 > 24.025018241256475
    END: th(50400.00000000001)=24.025018241256475; dx=-1.673835240608225E-5 evalInputDelta=3.247542353346944
    Fitness changed from 27.27256059460342 to 24.025018241256475
    Iteration 3 complete. Error: 24.025018241256475 Total: 3.6209; Orientation: 0.0021; Line Search: 2.2945
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/9662c36a-343f-47ec-8500-30d0fd9d7a25.jpg)

    Adding measurement 7d4f5bfc to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 5.719e+02, gradient 5.020e-03, dot -0.562; [60332497-2736-404e-b682-a04975926ee6 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 24.025018241256475, 27.27256059460342, 31.62595902942121, 35.41259718313813
    LBFGS Accumulation History: 3 points
    Removed measurement 7d4f5bfc to history. Total: 3
    th(0)=24.025018241256475;dx=-2.41605932791309E-5
    New Minimum: 24.025018241256475 > 21.484497617930174
    END: th(108583.50837760697)=21.484497617930174; dx=-7.25093762763783E-6 evalInputDelta=2.5405206233263016
    Fitness changed from 24.025018241256475 to 21.484497617930174
    Iteration 4 complete. Error: 21.484497617930174 Total: 3.5916; Orientation: 0.0598; Line Search: 2.3019
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/6b110f1e-a30a-42b2-a81d-14e625a51449.jpg)

    Adding measurement 63690a61 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 5.465e+02, gradient 3.786e-03, dot -0.498; [60332497-2736-404e-b682-a04975926ee6 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 21.484497617930174, 27.27256059460342, 31.62595902942121, 35.41259718313813
    LBFGS Accumulation History: 3 points
    Removed measurement 63690a61 to history. Total: 3
    th(0)=21.484497617930174;dx=-1.3698378926358896E-5
    New Minimum: 21.484497617930174 > 18.78443429619074
    END: th(233936.07721408413)=18.78443429619074; dx=-2.928506201556953E-6 evalInputDelta=2.700063321739435
    Fitness changed from 21.484497617930174 to 18.78443429619074
    Iteration 5 complete. Error: 18.78443429619074 Total: 3.7194; Orientation: 0.1149; Line Search: 2.3750
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/4d8d2136-b6bd-41ba-9999-dd5f7177cfa3.jpg)

    Adding measurement 473f8a91 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.843e+02, gradient 2.638e-03, dot -0.417; [60332497-2736-404e-b682-a04975926ee6 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 18.78443429619074, 27.27256059460342, 31.62595902942121, 35.41259718313813
    LBFGS Accumulation History: 3 points
    Removed measurement 473f8a91 to history. Total: 3
    th(0)=18.78443429619074;dx=-6.803606851191191E-6
    New Minimum: 18.78443429619074 > 15.481116622686386
    END: th(504000.0000000002)=15.481116622686386; dx=-1.8173909102274294E-6 evalInputDelta=3.3033176735043526
    Fitness changed from 18.78443429619074 to 15.481116622686386
    Iteration 6 complete. Error: 15.481116622686386 Total: 3.6265; Orientation: 0.1210; Line Search: 2.3405
    Adding measurement 2c0c9005 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 8.266e+02, gradient 1.953e-03, dot -0.515; [60332497-2736-404e-b682-a04975926ee6 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 15.481116622686386, 27.27256059460342, 31.62595902942121, 35.41259718313813
    LBFGS Accumulation History: 3 points
    Removed measurement 2c0c9005 to history. Total: 3
    th(0)=15.481116622686386;dx=-3.6918241266826234E-6
    New Minimum: 15.481116622686386 > 11.829209670424461
    END: th(1085835.0837760698)=11.829209670424461; dx=-8.222384586708912E-7 evalInputDelta=3.6519069522619247
    Fitness changed from 15.481116622686386 to 11.829209670424461
    Iteration 7 complete. Error: 11.829209670424461 Total: 3.6095; Orientation: 0.0464; Line Search: 2.3656
    Adding measurement 4a8b74c9 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 6.357e+02, gradient 1.134e-03, dot -0.444; [60332497-2736-404e-b682-a04975926ee6 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 11.829209670424461, 27.27256059460342, 31.62595902942121, 35.41259718313813
    LBFGS Accumulation History: 3 points
    Removed measurement 4a8b74c9 to history. Total: 3
    th(0)=11.829209670424461;dx=-1.2289711988559595E-6
    New Minimum: 11.829209670424461 > 9.291359320282936
    END: th(2339360.7721408415)=9.291359320282936; dx=-3.141780410736527E-7 evalInputDelta=2.5378503501415253
    Fitness changed from 11.829209670424461 to 9.291359320282936
    Iteration 8 complete. Error: 9.291359320282936 Total: 3.8592; Orientation: 0.0445; Line Search: 2.5716
    Adding measurement 75dac568 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 6.181e+02, gradient 7.830e-04, dot -0.430; [60332497-2736-404e-b682-a04975926ee6 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 9.291359320282936, 27.27256059460342, 31.62595902942121, 35.41259718313813
    LBFGS Accumulation History: 3 points
    Removed measurement 75dac568 to history. Total: 3
    th(0)=9.291359320282936;dx=-5.853685015948218E-7
    New Minimum: 9.291359320282936 > 7.917860716581345
    END: th(5040000.000000002)=7.917860716581345; dx=-8.113531646718179E-8 evalInputDelta=1.3734986037015915
    Fitness changed from 9.291359320282936 to 7.917860716581345
    Iteration 9 complete. Error: 7.917860716581345 Total: 3.7379; Orientation: 0.1437; Line Search: 2.4108
    Adding measurement 7a594b9c to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.873e+02, gradient 7.015e-04, dot -0.215; [60332497-2736-404e-b682-a04975926ee6 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 7.917860716581345, 27.27256059460342, 31.62595902942121, 35.41259718313813
    LBFGS Accumulation History: 3 points
    Removed measurement 7a594b9c to history. Total: 3
    th(0)=7.917860716581345;dx=-4.6316331888275163E-7
    Armijo: th(1.0858350837760698E7)=9.478478237986565; dx=3.163816250389209E-8 evalInputDelta=-1.56061752140522
    New Minimum: 7.917860716581345 > 7.297225266695023
    END: th(5429175.418880349)=7.297225266695023; dx=-1.821443418412117E-8 evalInputDelta=0.620635449886322
    Fitness changed from 7.917860716581345 to 7.297225266695023
    Iteration 10 complete. Error: 7.297225266695023 Total: 4.9895; Orientation: 0.0591; Line Search: 3.6423
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/e9c39c5a-97e8-4d34-a788-72e44b714d78.jpg)

    Final threshold in iteration 11: 7.297225266695023 (> -Infinity) after 48.917s (< 1800.000s)

Returns

    7.297225266695023