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 336.32 seconds (4.385 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: 572098087510800
Reset training subject: 572104167404400
Adding measurement 7c84b764 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-40.243269061172576;dx=-2.4867027946665578E-6
New Minimum: -40.243269061172576 > -40.24327469147399
WOLFE (weak): th(2.154434690031884)=-40.24327469147399; dx=-2.480824985934491E-6 evalInputDelta=5.63030141620402E-6
New Minimum: -40.24327469147399 > -40.243284075307926
WOLFE (weak): th(4.308869380063768)=-40.243284075307926; dx=-2.480641785082405E-6 evalInputDelta=1.5014135350099878E-5
New Minimum: -40.243284075307926 > -40.24330471973489
WOLFE (weak): th(12.926608140191302)=-40.24330471973489; dx=-2.4803669232409495E-6 evalInputDelta=3.565856231091402E-5
New Minimum: -40.24330471973489 > -40.24340981847159
WOLFE (weak): th(51.70643256076521)=-40.24340981847159; dx=-2.4801812143594734E-6 evalInputDelta=1.4075729901463774E-4
New Minimum: -40.24340981847159 > -40.243972842744505
WOLFE (weak): th(258.53216280382605)=-40.243972842744505; dx=-2.480872051355559E-6 evalInputDelta=7.0378157192863E-4
New Minimum: -40.243972842744505 > -40.24748405972342
WOLFE (weak): th(1551.1929768229563)=-40.24748405972342; dx=-2.480699025790768E-6 evalInputDelta=0.004214998550843063
New Minimum: -40.24748405972342 > -40.272764786940755
WOLFE (weak): th(10858.350837760694)=-40.272764786940755; dx=-2.4782970822491952E-6 evalInputDelta=0.029495725768178715
New Minimum: -40.272764786940755 > -40.47861254990131
WOLFE (weak): th(86866.80670208555)=-40.47861254990131; dx=-2.4650438139113267E-6 evalInputDelta=0.23534348872873068
New Minimum: -40.47861254990131 > -42.304768264393154
WOLFE (weak): th(781801.26031877)=-42.304768264393154; dx=-2.3290620883667974E-6 evalInputDelta=2.0614992032205777
New Minimum: -42.304768264393154 > -53.800355383150126
END: th(7818012.6031877)=-53.800355383150126; dx=-7.09995080299771E-7 evalInputDelta=13.55708632197755
Fitness changed from -40.243269061172576 to -53.800355383150126
Iteration 1 complete. Error: -53.800355383150126 Total: 86.7011; Orientation: 0.1472; Line Search: 68.2742
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/e01ed75b-d17a-4822-886f-78b3b80673c7.jpg)
Adding measurement 17d0293 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-53.800355383150126;dx=-1.3041792337037968E-6
New Minimum: -53.800355383150126 > -62.79438777385795
END: th(1.684339755941405E7)=-62.79438777385795; dx=-2.7989195344441388E-8 evalInputDelta=8.994032390707822
Fitness changed from -53.800355383150126 to -62.79438777385795
Iteration 2 complete. Error: -62.79438777385795 Total: 19.7162; Orientation: 0.1420; Line Search: 12.3026
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/b50f54d1-d7b9-4076-b6dd-767b8a9c6b57.jpg)
Adding measurement 7168eef5 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-62.79438777385795;dx=-1.4926410872399479E-6
Armijo: th(3.6288E7)=-59.26612284826782; dx=4.272908233620712E-7 evalInputDelta=-3.528264925590129
New Minimum: -62.79438777385795 > -69.32383060906233
WOLF (strong): th(1.8144E7)=-69.32383060906233; dx=4.319947255984929E-7 evalInputDelta=6.529442835204378
New Minimum: -69.32383060906233 > -70.10365122759134
END: th(6048000.0)=-70.10365122759134; dx=-6.604113217842934E-7 evalInputDelta=7.309263453733394
Fitness changed from -62.79438777385795 to -70.10365122759134
Iteration 3 complete. Error: -70.10365122759134 Total: 32.9665; Orientation: 0.1337; Line Search: 25.0669
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/3a4dbab0-2f0f-4f4c-8add-3b87c54b4781.jpg)
Adding measurement 73d2c1d2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.246e+04, gradient 8.205e-04, dot -0.757; [02beecd0-ac64-4452-b62d-43c96aedce5a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -70.10365122759134, -62.79438777385795, -53.800355383150126, -40.243269061172576
LBFGS Accumulation History: 3 points
Removed measurement 73d2c1d2 to history. Total: 3
th(0)=-70.10365122759134;dx=-6.724576973536047E-7
New Minimum: -70.10365122759134 > -76.06771532840025
END: th(1.3030021005312834E7)=-76.06771532840025; dx=-2.1888013721624558E-7 evalInputDelta=5.964064100808912
Fitness changed from -70.10365122759134 to -76.06771532840025
Iteration 4 complete. Error: -76.06771532840025 Total: 22.2125; Orientation: 2.6137; Line Search: 12.2008
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/503a31a0-e362-48ac-884c-66166226b68c.jpg)
Adding measurement 520ebb58 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.591e+04, gradient 8.241e-04, dot -0.683; [02beecd0-ac64-4452-b62d-43c96aedce5a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -76.06771532840025, -62.79438777385795, -53.800355383150126, -40.243269061172576
LBFGS Accumulation History: 3 points
Removed measurement 520ebb58 to history. Total: 3
th(0)=-76.06771532840025;dx=-6.778119525851399E-7
New Minimum: -76.06771532840025 > -79.32176616590392
WOLF (strong): th(2.8072329265690092E7)=-79.32176616590392; dx=1.1440898806329751E-7 evalInputDelta=3.2540508375036694
New Minimum: -79.32176616590392 > -80.49404859454164
END: th(1.4036164632845046E7)=-80.49404859454164; dx=-3.119233030313396E-8 evalInputDelta=4.426333266141384
Fitness changed from -76.06771532840025 to -80.49404859454164
Iteration 5 complete. Error: -80.49404859454164 Total: 28.1019; Orientation: 2.5787; Line Search: 18.6235
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/9a1a3458-0ae1-4f8a-bef5-30035927ae40.jpg)
Adding measurement 13e38c24 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.658e+04, gradient 8.941e-04, dot -0.585; [02beecd0-ac64-4452-b62d-43c96aedce5a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -80.49404859454164, -62.79438777385795, -53.800355383150126, -40.243269061172576
LBFGS Accumulation History: 3 points
Removed measurement 13e38c24 to history. Total: 3
th(0)=-80.49404859454164;dx=-7.992995651860664E-7
Armijo: th(3.0240000000000007E7)=-79.83120184881436; dx=3.128584430745796E-7 evalInputDelta=-0.6628467457272791
New Minimum: -80.49404859454164 > -84.65447520382534
WOLF (strong): th(1.5120000000000004E7)=-84.65447520382534; dx=1.627212764863348E-7 evalInputDelta=4.160426609283704
END: th(5040000.000000001)=-83.91324161823871; dx=-4.3799827833786713E-7 evalInputDelta=3.4191930236970762
Fitness changed from -80.49404859454164 to -84.65447520382534
Iteration 6 complete. Error: -84.65447520382534 Total: 35.1369; Orientation: 2.5585; Line Search: 25.0258
Adding measurement 4164f807 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.905e+04, gradient 9.550e-04, dot -0.511; [02beecd0-ac64-4452-b62d-43c96aedce5a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -84.65447520382534, -62.79438777385795, -53.800355383150126, -40.243269061172576
LBFGS Accumulation History: 3 points
Removed measurement 4164f807 to history. Total: 3
th(0)=-84.65447520382534;dx=-9.106807964098936E-7
New Minimum: -84.65447520382534 > -89.82118701079621
WOLF (strong): th(1.0858350837760696E7)=-89.82118701079621; dx=4.08312574279811E-8 evalInputDelta=5.166711806970866
END: th(5429175.418880348)=-88.75978837362902; dx=-4.509726796957713E-7 evalInputDelta=4.105313169803679
Fitness changed from -84.65447520382534 to -89.82118701079621
Iteration 7 complete. Error: -89.82118701079621 Total: 27.5048; Orientation: 2.5551; Line Search: 18.9798
Adding measurement 179f4f1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.887e+04, gradient 7.164e-04, dot -0.623; [02beecd0-ac64-4452-b62d-43c96aedce5a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -89.82118701079621, -62.79438777385795, -53.800355383150126, -40.243269061172576
LBFGS Accumulation History: 3 points
Removed measurement 179f4f1 to history. Total: 3
th(0)=-89.82118701079621;dx=-5.124392344124274E-7
New Minimum: -89.82118701079621 > -93.22113767775996
END: th(1.1696803860704206E7)=-93.22113767775996; dx=-5.867937022492234E-8 evalInputDelta=3.399950666963747
Fitness changed from -89.82118701079621 to -93.22113767775996
Iteration 8 complete. Error: -93.22113767775996 Total: 20.9085; Orientation: 2.5513; Line Search: 12.2654
Adding measurement f2d39ed to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.020e+04, gradient 6.839e-04, dot -0.619; [02beecd0-ac64-4452-b62d-43c96aedce5a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -93.22113767775996, -62.79438777385795, -53.800355383150126, -40.243269061172576
LBFGS Accumulation History: 3 points
Removed measurement f2d39ed to history. Total: 3
th(0)=-93.22113767775996;dx=-4.6678304366199693E-7
New Minimum: -93.22113767775996 > -95.10052399057267
WOLF (strong): th(2.5200000000000007E7)=-95.10052399057267; dx=1.303627538963771E-7 evalInputDelta=1.8793863128127128
New Minimum: -95.10052399057267 > -96.2523542652215
END: th(1.2600000000000004E7)=-96.2523542652215; dx=-2.7829593751007503E-8 evalInputDelta=3.031216587461543
Fitness changed from -93.22113767775996 to -96.2523542652215
Iteration 9 complete. Error: -96.2523542652215 Total: 27.4973; Orientation: 2.5153; Line Search: 18.9139
Adding measurement 26f5f5bb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.929e+04, gradient 6.942e-04, dot -0.588; [02beecd0-ac64-4452-b62d-43c96aedce5a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -96.2523542652215, -62.79438777385795, -53.800355383150126, -40.243269061172576
LBFGS Accumulation History: 3 points
Removed measurement 26f5f5bb to history. Total: 3
th(0)=-96.2523542652215;dx=-4.818174025347874E-7
New Minimum: -96.2523542652215 > -97.02854321069701
WOLF (strong): th(2.7145877094401743E7)=-97.02854321069701; dx=1.8823073270050328E-7 evalInputDelta=0.7761889454755106
New Minimum: -97.02854321069701 > -99.1701530228035
WOLF (strong): th(1.3572938547200872E7)=-99.1701530228035; dx=2.7263252118094248E-8 evalInputDelta=2.9177987575820055
END: th(4524312.849066957)=-98.14812398613675; dx=-2.949962563995842E-7 evalInputDelta=1.8957697209152542
Fitness changed from -96.2523542652215 to -99.1701530228035
Iteration 10 complete. Error: -99.1701530228035 Total: 34.5169; Orientation: 2.4851; Line Search: 25.8799
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/1ed68580-4eb9-4f0b-a18f-e991d897fe96.jpg)
Final threshold in iteration 11: -99.1701530228035 (> -Infinity) after 336.319s (< 5400.000s)

Returns

    -99.1701530228035