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 4877.70 seconds (14.690 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: 2908735033991
Reset training subject: 3011753724607
Adding measurement 44d89f63 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=8.754727467894554;dx=-7.234524254273449E-7
New Minimum: 8.754727467894554 > 8.754724770784378
WOLFE (weak): th(2.154434690031884)=8.754724770784378; dx=-7.105946517485641E-7 evalInputDelta=2.6971101760864258E-6
New Minimum: 8.754724770784378 > 8.75471955537796
WOLFE (weak): th(4.308869380063768)=8.75471955537796; dx=-7.246326811626695E-7 evalInputDelta=7.912516593933105E-6
New Minimum: 8.75471955537796 > 8.754702985286713
WOLFE (weak): th(12.926608140191302)=8.754702985286713; dx=-7.129458278204059E-7 evalInputDelta=2.44826078414917E-5
New Minimum: 8.754702985286713 > 8.754630506038666
WOLFE (weak): th(51.70643256076521)=8.754630506038666; dx=-7.453732624088805E-7 evalInputDelta=9.69618558883667E-5
New Minimum: 8.754630506038666 > 8.754240825772285
WOLFE (weak): th(258.53216280382605)=8.754240825772285; dx=-7.412984353611672E-7 evalInputDelta=4.8664212226867676E-4
New Minimum: 8.754240825772285 > 8.751807525753975
WOLFE (weak): th(1551.1929768229563)=8.751807525753975; dx=-7.226281562117908E-7 evalInputDelta=0.0029199421405792236
New Minimum: 8.751807525753975 > 8.734303668141365
WOLFE (weak): th(10858.350837760694)=8.734303668141365; dx=-7.239956785193478E-7 evalInputDelta=0.020423799753189087
New Minimum: 8.734303668141365 > 8.59203277528286
WOLFE (weak): th(86866.80670208555)=8.59203277528286; dx=-7.372761788369773E-7 evalInputDelta=0.16269469261169434
New Minimum: 8.59203277528286 > 7.371269255876541
END: th(781801.26031877)=7.371269255876541; dx=-6.256021844294155E-7 evalInputDelta=1.383458212018013
Fitness changed from 8.754727467894554 to 7.371269255876541
Iteration 1 complete. Error: 7.371269255876541 Total: 1364.2865; Orientation: 0.0973; Line Search: 1051.3305
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/dc8ea481-e230-49f8-82f3-a59c537602b4.jpg)

    Adding measurement 45d05555 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=7.371269255876541;dx=-6.753574859505583E-7
    New Minimum: 7.371269255876541 > 4.932033479213715
    END: th(1684339.7559414052)=4.932033479213715; dx=-4.6734453325107606E-7 evalInputDelta=2.4392357766628265
    Fitness changed from 7.371269255876541 to 4.932033479213715
    Iteration 2 complete. Error: 4.932033479213715 Total: 319.7502; Orientation: 0.1681; Line Search: 211.1849
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/ed8dc0fe-8eeb-4542-97b9-ed5fd3ab100f.jpg)

    Adding measurement 1268eb02 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=4.932033479213715;dx=-4.964489485507192E-7
    New Minimum: 4.932033479213715 > 2.0630442202091217
    END: th(3628800.0)=2.0630442202091217; dx=-2.580487307707753E-7 evalInputDelta=2.868989259004593
    Fitness changed from 4.932033479213715 to 2.0630442202091217
    Iteration 3 complete. Error: 2.0630442202091217 Total: 320.8257; Orientation: 0.0920; Line Search: 214.8336
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/4a51b54b-694c-49d6-840c-4987fdb56813.jpg)

    Adding measurement 5c55e096 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.148e+04, gradient 6.120e-04, dot -0.574; [8104959b-512f-4adc-b4a9-f076f95c7250 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.0630442202091217, 4.932033479213715, 7.371269255876541, 8.754727467894554
    LBFGS Accumulation History: 3 points
    Removed measurement 5c55e096 to history. Total: 3
    th(0)=2.0630442202091217;dx=-3.5220290629457715E-7
    New Minimum: 2.0630442202091217 > -1.2043526023626328
    END: th(7818012.6031877)=-1.2043526023626328; dx=-1.452447497063873E-7 evalInputDelta=3.2673968225717545
    Fitness changed from 2.0630442202091217 to -1.2043526023626328
    Iteration 4 complete. Error: -1.2043526023626328 Total: 321.3478; Orientation: 2.4725; Line Search: 213.0539
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/dd2a7ceb-3e0a-47c2-bec2-09111bbdb282.jpg)

    Adding measurement 68a316c9 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.018e+04, gradient 4.800e-04, dot -0.507; [8104959b-512f-4adc-b4a9-f076f95c7250 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.2043526023626328, 4.932033479213715, 7.371269255876541, 8.754727467894554
    LBFGS Accumulation History: 3 points
    Removed measurement 68a316c9 to history. Total: 3
    th(0)=-1.2043526023626328;dx=-2.3020586546678003E-7
    New Minimum: -1.2043526023626328 > -4.085236236453056
    END: th(1.684339755941405E7)=-4.085236236453056; dx=-6.046649438461519E-8 evalInputDelta=2.8808836340904236
    Fitness changed from -1.2043526023626328 to -4.085236236453056
    Iteration 5 complete. Error: -4.085236236453056 Total: 317.0789; Orientation: 2.4440; Line Search: 209.3872
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/06ce3609-2453-45ca-81b6-3cbb4846efff.jpg)

    Adding measurement 1addc0ff to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.143e+04, gradient 4.368e-04, dot -0.322; [8104959b-512f-4adc-b4a9-f076f95c7250 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -4.085236236453056, 4.932033479213715, 7.371269255876541, 8.754727467894554
    LBFGS Accumulation History: 3 points
    Removed measurement 1addc0ff to history. Total: 3
    th(0)=-4.085236236453056;dx=-1.8808511842681012E-7
    New Minimum: -4.085236236453056 > -6.067333206534386
    END: th(3.6288E7)=-6.067333206534386; dx=-5.186451363606467E-9 evalInputDelta=1.9820969700813293
    Fitness changed from -4.085236236453056 to -6.067333206534386
    Iteration 6 complete. Error: -6.067333206534386 Total: 322.2908; Orientation: 2.4729; Line Search: 214.8343
    Adding measurement 151cf392 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.194e+04, gradient 3.753e-04, dot -0.184; [8104959b-512f-4adc-b4a9-f076f95c7250 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -6.067333206534386, 4.932033479213715, 7.371269255876541, 8.754727467894554
    LBFGS Accumulation History: 3 points
    Removed measurement 151cf392 to history. Total: 3
    th(0)=-6.067333206534386;dx=-1.3489346233021103E-7
    Armijo: th(7.8180126031877E7)=-4.7859221175313; dx=2.185060424802524E-8 evalInputDelta=-1.281411089003086
    New Minimum: -6.067333206534386 > -6.763180807232857
    WOLF (strong): th(3.90900630159385E7)=-6.763180807232857; dx=4.755166395499903E-10 evalInputDelta=0.6958476006984711
    New Minimum: -6.763180807232857 > -7.304109834134579
    END: th(1.3030021005312832E7)=-7.304109834134579; dx=-2.012013888893979E-8 evalInputDelta=1.236776627600193
    Fitness changed from -6.067333206534386 to -7.304109834134579
    Iteration 7 complete. Error: -7.304109834134579 Total: 525.4002; Orientation: 2.5772; Line Search: 419.5336
    Adding measurement 463e8dac to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.183e+04, gradient 2.644e-04, dot -0.241; [8104959b-512f-4adc-b4a9-f076f95c7250 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -7.304109834134579, 4.932033479213715, 7.371269255876541, 8.754727467894554
    LBFGS Accumulation History: 3 points
    Removed measurement 463e8dac to history. Total: 3
    th(0)=-7.304109834134579;dx=-6.89077092354732E-8
    New Minimum: -7.304109834134579 > -7.789953842759132
    WOLF (strong): th(2.807232926569009E7)=-7.789953842759132; dx=2.603370678427078E-9 evalInputDelta=0.4858440086245537
    New Minimum: -7.789953842759132 > -8.245204009115696
    END: th(1.4036164632845044E7)=-8.245204009115696; dx=-1.3795956111222216E-8 evalInputDelta=0.9410941749811172
    Fitness changed from -7.304109834134579 to -8.245204009115696
    Iteration 8 complete. Error: -8.245204009115696 Total: 423.3345; Orientation: 2.4341; Line Search: 315.0764
    Adding measurement 79e5b712 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 8.783e+03, gradient 2.269e-04, dot -0.212; [8104959b-512f-4adc-b4a9-f076f95c7250 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -8.245204009115696, 4.932033479213715, 7.371269255876541, 8.754727467894554
    LBFGS Accumulation History: 3 points
    Removed measurement 79e5b712 to history. Total: 3
    th(0)=-8.245204009115696;dx=-5.117129612919304E-8
    Armijo: th(3.0240000000000004E7)=-7.7859766483306885; dx=3.4854319587140523E-9 evalInputDelta=-0.4592273607850075
    New Minimum: -8.245204009115696 > -8.50166118890047
    END: th(1.5120000000000002E7)=-8.50166118890047; dx=-6.0381998752830526E-9 evalInputDelta=0.2564571797847748
    Fitness changed from -8.245204009115696 to -8.50166118890047
    Iteration 9 complete. Error: -8.50166118890047 Total: 431.9251; Orientation: 2.5097; Line Search: 322.3458
    Adding measurement 1a84d56b to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 7.786e+03, gradient 2.144e-04, dot -0.202; [8104959b-512f-4adc-b4a9-f076f95c7250 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -8.50166118890047, 4.932033479213715, 7.371269255876541, 8.754727467894554
    LBFGS Accumulation History: 3 points
    Removed measurement 1a84d56b to history. Total: 3
    th(0)=-8.50166118890047;dx=-4.985371370095701E-8
    Armijo: th(3.2575052513282087E7)=-8.127783186733723; dx=1.0725360795133547E-8 evalInputDelta=-0.37387800216674805
    New Minimum: -8.50166118890047 > -8.986595049500465
    WOLF (strong): th(1.6287526256641043E7)=-8.986595049500465; dx=2.3768010569165557E-9 evalInputDelta=0.48493386059999466
    END: th(5429175.418880348)=-8.958700209856033; dx=-2.6233123377934822E-8 evalInputDelta=0.4570390209555626
    Fitness changed from -8.50166118890047 to -8.986595049500465
    Iteration 10 complete. Error: -8.986595049500465 Total: 529.8768; Orientation: 2.4754; Line Search: 421.7814
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/6935fd20-cf75-44d8-919a-d4d8fc33f672.jpg)

    Final threshold in iteration 11: -8.986595049500465 (> -Infinity) after 4877.697s (< 5400.000s)

Returns

    -8.986595049500465