Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Iteration 15 Iteration 15

BasicOptimizer.scala:89 executed in 43.04 seconds (0.650 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: 221850047848700
Reset training subject: 221850666332700
Adding measurement 258937ad to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-7.446268902149442;dx=-7.488389039718052E-4
New Minimum: -7.446268902149442 > -7.447418459367093
WOLFE (weak): th(2.154434690031884)=-7.447418459367093; dx=-7.498483134257451E-4 evalInputDelta=0.001149557217650532
New Minimum: -7.447418459367093 > -7.448562640204041
WOLFE (weak): th(4.308869380063768)=-7.448562640204041; dx=-7.474944373062689E-4 evalInputDelta=0.0022937380545986485
New Minimum: -7.448562640204041 > -7.4531463534692906
WOLFE (weak): th(12.926608140191302)=-7.4531463534692906; dx=-7.504127942924562E-4 evalInputDelta=0.006877451319848404
New Minimum: -7.4531463534692906 > -7.473773730948825
WOLFE (weak): th(51.70643256076521)=-7.473773730948825; dx=-7.469766072582742E-4 evalInputDelta=0.02750482879938243
New Minimum: -7.473773730948825 > -7.584981097280901
WOLFE (weak): th(258.53216280382605)=-7.584981097280901; dx=-7.570060905251175E-4 evalInputDelta=0.1387121951314585
New Minimum: -7.584981097280901 > -8.293781347657559
WOLFE (weak): th(1551.1929768229563)=-8.293781347657559; dx=-7.550180120676267E-4 evalInputDelta=0.8475124455081167
New Minimum: -8.293781347657559 > -12.783226223939913
END: th(10858.350837760694)=-12.783226223939913; dx=-5.460032119413134E-4 evalInputDelta=5.336957321790471
Fitness changed from -7.446268902149442 to -12.783226223939913
Iteration 1 complete. Error: -12.783226223939913 Total: 6.6385; Orientation: 0.0165; Line Search: 4.8986
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/03187a3c-73a1-427d-9ca8-9fe8921f9f34.jpg)
Adding measurement 3c31b90c to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-12.783226223939913;dx=-8.9956765407286E-4
New Minimum: -12.783226223939913 > -19.380891597304164
END: th(23393.607721408407)=-19.380891597304164; dx=-2.852948166729857E-4 evalInputDelta=6.597665373364251
Fitness changed from -12.783226223939913 to -19.380891597304164
Iteration 2 complete. Error: -19.380891597304164 Total: 1.7323; Orientation: 0.0163; Line Search: 1.1569
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/8e6a55b4-dc23-4054-905a-1bbd18cfa2b0.jpg)
Adding measurement 4011eaa5 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-19.380891597304164;dx=-9.327375071062351E-4
New Minimum: -19.380891597304164 > -22.425725501189817
END: th(50400.00000000001)=-22.425725501189817; dx=-9.576774941091267E-5 evalInputDelta=3.044833903885653
Fitness changed from -19.380891597304164 to -22.425725501189817
Iteration 3 complete. Error: -22.425725501189817 Total: 1.8086; Orientation: 0.0213; Line Search: 1.2080
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/6f6d2f78-caa0-4165-8cfa-8feb157695dc.jpg)
Adding measurement 623356d4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.396e+03, gradient 2.927e-02, dot -0.186; [5bc2924a-5e98-4f41-b719-ac7c24d4959a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -22.425725501189817, -19.380891597304164, -12.783226223939913, -7.446268902149442
LBFGS Accumulation History: 3 points
Removed measurement 623356d4 to history. Total: 3
th(0)=-22.425725501189817;dx=-8.534863858422572E-4
Armijo: th(108583.50837760697)=-19.429342321800977; dx=-4.149990318601283E-5 evalInputDelta=-2.9963831793888396
New Minimum: -22.425725501189817 > -28.622960591282418
END: th(54291.75418880348)=-28.622960591282418; dx=-1.5140806958172212E-4 evalInputDelta=6.197235090092601
Fitness changed from -22.425725501189817 to -28.622960591282418
Iteration 4 complete. Error: -28.622960591282418 Total: 2.8593; Orientation: 0.2909; Line Search: 1.7649
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/38d4edb0-c439-4c49-9698-edef489b5db4.jpg)
Adding measurement 454c2eb0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.301e+03, gradient 2.572e-02, dot -0.161; [5bc2924a-5e98-4f41-b719-ac7c24d4959a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -28.622960591282418, -19.380891597304164, -12.783226223939913, -7.446268902149442
LBFGS Accumulation History: 3 points
Removed measurement 454c2eb0 to history. Total: 3
th(0)=-28.622960591282418;dx=-6.587301272564696E-4
Armijo: th(116968.03860704206)=-25.625356483598882; dx=-4.629226206855468E-5 evalInputDelta=-2.997604107683536
New Minimum: -28.622960591282418 > -36.07025790060051
END: th(58484.01930352103)=-36.07025790060051; dx=-1.8279416469421466E-4 evalInputDelta=7.447297309318092
Fitness changed from -28.622960591282418 to -36.07025790060051
Iteration 5 complete. Error: -36.07025790060051 Total: 2.6676; Orientation: 0.2894; Line Search: 1.8191
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/75f3de22-fe8e-4b65-be8c-7ae0bd3d2613.jpg)
Adding measurement 5cfc737 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.581e+03, gradient 2.450e-02, dot -0.180; [5bc2924a-5e98-4f41-b719-ac7c24d4959a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -36.07025790060051, -19.380891597304164, -12.783226223939913, -7.446268902149442
LBFGS Accumulation History: 3 points
Removed measurement 5cfc737 to history. Total: 3
th(0)=-36.07025790060051;dx=-5.973861307013371E-4
Armijo: th(126000.00000000004)=-32.40787745928277; dx=-5.4870256738895404E-5 evalInputDelta=-3.6623804413177368
New Minimum: -36.07025790060051 > -43.886019203403116
END: th(63000.00000000002)=-43.886019203403116; dx=-1.8890678296828463E-4 evalInputDelta=7.815761302802606
Fitness changed from -36.07025790060051 to -43.886019203403116
Iteration 6 complete. Error: -43.886019203403116 Total: 2.7176; Orientation: 0.2919; Line Search: 1.8369
Adding measurement 1355abe5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.941e+03, gradient 2.386e-02, dot -0.196; [5bc2924a-5e98-4f41-b719-ac7c24d4959a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -43.886019203403116, -19.380891597304164, -12.783226223939913, -7.446268902149442
LBFGS Accumulation History: 3 points
Removed measurement 1355abe5 to history. Total: 3
th(0)=-43.886019203403116;dx=-5.661840856235292E-4
Armijo: th(135729.38547200873)=-37.20163902205428; dx=-4.6574016102654696E-5 evalInputDelta=-6.6843801813488355
New Minimum: -43.886019203403116 > -50.24449961500063
END: th(67864.69273600436)=-50.24449961500063; dx=-1.8158148225463184E-4 evalInputDelta=6.358480411597512
Fitness changed from -43.886019203403116 to -50.24449961500063
Iteration 7 complete. Error: -50.24449961500063 Total: 2.7162; Orientation: 0.3306; Line Search: 1.7988
Adding measurement 730b58dd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.162e+03, gradient 2.454e-02, dot -0.190; [5bc2924a-5e98-4f41-b719-ac7c24d4959a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -50.24449961500063, -19.380891597304164, -12.783226223939913, -7.446268902149442
LBFGS Accumulation History: 3 points
Removed measurement 730b58dd to history. Total: 3
th(0)=-50.24449961500063;dx=-5.995259329189482E-4
Armijo: th(146210.0482588026)=-38.086876545763474; dx=-5.3378666354626726E-5 evalInputDelta=-12.157623069237154
New Minimum: -50.24449961500063 > -54.857159371156996
END: th(73105.0241294013)=-54.857159371156996; dx=-1.8787985028587804E-4 evalInputDelta=4.6126597561563685
Fitness changed from -50.24449961500063 to -54.857159371156996
Iteration 8 complete. Error: -54.857159371156996 Total: 2.9966; Orientation: 0.5284; Line Search: 1.9305
Adding measurement 61dc5488 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.052e+04, gradient 2.529e-02, dot -0.192; [5bc2924a-5e98-4f41-b719-ac7c24d4959a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -54.857159371156996, -19.380891597304164, -12.783226223939913, -7.446268902149442
LBFGS Accumulation History: 3 points
Removed measurement 61dc5488 to history. Total: 3
th(0)=-54.857159371156996;dx=-6.387814541089014E-4
Armijo: th(157500.00000000006)=-40.437079625067234; dx=-3.260451446615317E-5 evalInputDelta=-14.420079746089762
New Minimum: -54.857159371156996 > -59.212291667896395
END: th(78750.00000000003)=-59.212291667896395; dx=-1.6551400346218712E-4 evalInputDelta=4.355132296739399
Fitness changed from -54.857159371156996 to -59.212291667896395
Iteration 9 complete. Error: -59.212291667896395 Total: 2.6218; Orientation: 0.2870; Line Search: 1.7849
Adding measurement 1d3a6f0b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.289e+04, gradient 2.598e-02, dot -0.183; [5bc2924a-5e98-4f41-b719-ac7c24d4959a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.212291667896395, -19.380891597304164, -12.783226223939913, -7.446268902149442
LBFGS Accumulation History: 3 points
Removed measurement 1d3a6f0b to history. Total: 3
th(0)=-59.212291667896395;dx=-6.726831506403446E-4
Armijo: th(169661.7318400109)=-40.997068079637536; dx=-1.8636442473626622E-5 evalInputDelta=-18.21522358825886
New Minimum: -59.212291667896395 > -63.23708194051429
END: th(84830.86592000545)=-63.23708194051429; dx=-1.6016808090568992E-4 evalInputDelta=4.024790272617892
Fitness changed from -59.212291667896395 to -63.23708194051429
Iteration 10 complete. Error: -63.23708194051429 Total: 2.6658; Orientation: 0.2889; Line Search: 1.7999
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/2271573a-025a-49ae-89c4-77c3d5c3f1d3.jpg)
Adding measurement 7249b5f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.075e+04, gradient 2.574e-02, dot -0.195; [5bc2924a-5e98-4f41-b719-ac7c24d4959a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -63.23708194051429, -19.380891597304164, -12.783226223939913, -7.446268902149442
LBFGS Accumulation History: 3 points
Removed measurement 7249b5f to history. Total: 3
th(0)=-63.23708194051429;dx=-6.585310628497107E-4
Armijo: th(182762.56032350325)=-45.81008590832079; dx=-1.120328081564505E-5 evalInputDelta=-17.4269960321935
New Minimum: -63.23708194051429 > -68.5711164226871
END: th(91381.28016175162)=-68.5711164226871; dx=-1.3964226687292625E-4 evalInputDelta=5.334034482172811
Fitness changed from -63.23708194051429 to -68.5711164226871
Iteration 11 complete. Error: -68.5711164226871 Total: 2.6729; Orientation: 0.2922; Line Search: 1.8083
Adding measurement 7a444b18 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.312e+04, gradient 2.512e-02, dot -0.204; [5bc2924a-5e98-4f41-b719-ac7c24d4959a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -68.5711164226871, -19.380891597304164, -12.783226223939913, -7.446268902149442
LBFGS Accumulation History: 3 points
Removed measurement 7a444b18 to history. Total: 3
th(0)=-68.5711164226871;dx=-6.262703695122111E-4
Armijo: th(196875.0000000001)=-48.72890169853301; dx=-3.2024660300845E-6 evalInputDelta=-19.84221472415409
New Minimum: -68.5711164226871 > -74.28573000328711
END: th(98437.50000000004)=-74.28573000328711; dx=-1.3513456033195968E-4 evalInputDelta=5.714613580600016
Fitness changed from -68.5711164226871 to -74.28573000328711
Iteration 12 complete. Error: -74.28573000328711 Total: 2.9412; Orientation: 0.5173; Line Search: 1.8819
Adding measurement 6681c84a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.168e+04, gradient 2.434e-02, dot -0.199; [5bc2924a-5e98-4f41-b719-ac7c24d4959a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -74.28573000328711, -19.380891597304164, -12.783226223939913, -7.446268902149442
LBFGS Accumulation History: 3 points
Removed measurement 6681c84a to history. Total: 3
th(0)=-74.28573000328711;dx=-5.886098438249783E-4
Armijo: th(212077.16480001365)=-52.70492063419937; dx=-6.408439150903268E-7 evalInputDelta=-21.580809369087746
New Minimum: -74.28573000328711 > -79.53478914239892
END: th(106038.58240000682)=-79.53478914239892; dx=-1.268032960985094E-4 evalInputDelta=5.249059139111807
Fitness changed from -74.28573000328711 to -79.53478914239892
Iteration 13 complete. Error: -79.53478914239892 Total: 2.6358; Orientation: 0.2837; Line Search: 1.8030
Adding measurement 2c04d7f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.369e+04, gradient 2.396e-02, dot -0.197; [5bc2924a-5e98-4f41-b719-ac7c24d4959a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -79.53478914239892, -19.380891597304164, -12.783226223939913, -7.446268902149442
LBFGS Accumulation History: 3 points
Removed measurement 2c04d7f to history. Total: 3
th(0)=-79.53478914239892;dx=-5.724243170063077E-4
Armijo: th(228453.20040437908)=-52.87529264078108; dx=7.930626145589742E-6 evalInputDelta=-26.659496501617838
New Minimum: -79.53478914239892 > -82.32074715331392
END: th(114226.60020218954)=-82.32074715331392; dx=-1.0706263735932249E-4 evalInputDelta=2.785958010914996
Fitness changed from -79.53478914239892 to -82.32074715331392
Iteration 14 complete. Error: -82.32074715331392 Total: 2.6354; Orientation: 0.2897; Line Search: 1.8050
Adding measurement 5f313035 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.290e+05, gradient 2.407e-02, dot -0.189; [5bc2924a-5e98-4f41-b719-ac7c24d4959a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -82.32074715331392, -19.380891597304164, -12.783226223939913, -7.446268902149442
LBFGS Accumulation History: 3 points
Removed measurement 5f313035 to history. Total: 3
th(0)=-82.32074715331392;dx=-5.784075592163386E-4
Armijo: th(246093.75000000015)=-54.30620325445075; dx=1.864880832278158E-5 evalInputDelta=-28.014543898863167
New Minimum: -82.32074715331392 > -87.01736466647054
END: th(123046.87500000007)=-87.01736466647054; dx=-9.978397342404884E-5 evalInputDelta=4.696617513156625
Fitness changed from -82.32074715331392 to -87.01736466647054
Iteration 15 complete. Error: -87.01736466647054 Total: 2.7098; Orientation: 0.2975; Line Search: 1.8397
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/2abdba78-8f95-4bd4-8661-e6a684398665.jpg)
Final threshold in iteration 16: -87.01736466647054 (> -Infinity) after 43.041s (< 5400.000s)

Returns

    -87.01736466647054