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 239.77 seconds (3.337 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: 710384094218
Reset training subject: 715496596534
Adding measurement 4ce2da1b to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=11.134151697158813;dx=-4.186046356894456E-7
New Minimum: 11.134151697158813 > 11.13414816558361
WOLFE (weak): th(2.154434690031884)=11.13414816558361; dx=-4.173095218184822E-7 evalInputDelta=3.5315752029418945E-6
New Minimum: 11.13414816558361 > 11.134144395589828
WOLFE (weak): th(4.308869380063768)=11.134144395589828; dx=-4.1734848395141744E-7 evalInputDelta=7.3015689849853516E-6
New Minimum: 11.134144395589828 > 11.134130224585533
WOLFE (weak): th(12.926608140191302)=11.134130224585533; dx=-4.1796087722189216E-7 evalInputDelta=2.1472573280334473E-5
New Minimum: 11.134130224585533 > 11.134064763784409
WOLFE (weak): th(51.70643256076521)=11.134064763784409; dx=-4.1894555484006493E-7 evalInputDelta=8.693337440490723E-5
New Minimum: 11.134064763784409 > 11.133716642856598
WOLFE (weak): th(258.53216280382605)=11.133716642856598; dx=-4.1656702000966885E-7 evalInputDelta=4.3505430221557617E-4
New Minimum: 11.133716642856598 > 11.13154000043869
WOLFE (weak): th(1551.1929768229563)=11.13154000043869; dx=-4.174658123540404E-7 evalInputDelta=0.002611696720123291
New Minimum: 11.13154000043869 > 11.115542978048325
WOLFE (weak): th(10858.350837760694)=11.115542978048325; dx=-4.182397565560799E-7 evalInputDelta=0.01860871911048889
New Minimum: 11.115542978048325 > 10.98809503018856
WOLFE (weak): th(86866.80670208555)=10.98809503018856; dx=-4.157241814537759E-7 evalInputDelta=0.146056666970253
New Minimum: 10.98809503018856 > 9.942348703742027
END: th(781801.26031877)=9.942348703742027; dx=-3.1516478093188315E-7 evalInputDelta=1.1918029934167862
Fitness changed from 11.134151697158813 to 9.942348703742027
Iteration 1 complete. Error: 9.942348703742027 Total: 66.6429; Orientation: 0.0097; Line Search: 50.8175
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/00990dd1-31a2-40db-a4fa-ddb8f7c5aa2a.jpg)

    Adding measurement 5f4ecd57 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=9.942348703742027;dx=-3.452750843322658E-7
    New Minimum: 9.942348703742027 > 8.192179948091507
    END: th(1684339.7559414052)=8.192179948091507; dx=-1.8389462143568354E-7 evalInputDelta=1.7501687556505203
    Fitness changed from 9.942348703742027 to 8.192179948091507
    Iteration 2 complete. Error: 8.192179948091507 Total: 16.0782; Orientation: 0.0100; Line Search: 10.4931
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/7b016845-3a78-4beb-93ba-86989b5b1812.jpg)

    Adding measurement 3605fbe4 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=8.192179948091507;dx=-2.537186746845682E-7
    New Minimum: 8.192179948091507 > 6.364426553249359
    END: th(3628800.0)=6.364426553249359; dx=-9.571402256125637E-8 evalInputDelta=1.8277533948421478
    Fitness changed from 8.192179948091507 to 6.364426553249359
    Iteration 3 complete. Error: 6.364426553249359 Total: 15.4654; Orientation: 0.0089; Line Search: 10.6162
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/14a7e1d3-0d6a-4626-8e62-015613b30c6b.jpg)

    Adding measurement 7779eef5 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 5.834e+03, gradient 4.207e-04, dot -0.540; [4b34bacb-5aee-463b-91ee-5378e062cf28 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 6.364426553249359, 8.192179948091507, 9.942348703742027, 11.134151697158813
    LBFGS Accumulation History: 3 points
    Removed measurement 7779eef5 to history. Total: 3
    th(0)=6.364426553249359;dx=-1.7426935731581383E-7
    New Minimum: 6.364426553249359 > 4.594062268733978
    END: th(7818012.6031877)=4.594062268733978; dx=-3.125595866430804E-8 evalInputDelta=1.7703642845153809
    Fitness changed from 6.364426553249359 to 4.594062268733978
    Iteration 4 complete. Error: 4.594062268733978 Total: 16.2792; Orientation: 0.2618; Line Search: 10.4310
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/a26d36e9-5029-4cc0-8ec7-5562c7f24511.jpg)

    Adding measurement 6339a0ed to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.080e+03, gradient 3.772e-04, dot -0.365; [4b34bacb-5aee-463b-91ee-5378e062cf28 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 4.594062268733978, 8.192179948091507, 9.942348703742027, 11.134151697158813
    LBFGS Accumulation History: 3 points
    Removed measurement 6339a0ed to history. Total: 3
    th(0)=4.594062268733978;dx=-1.4123010976300974E-7
    New Minimum: 4.594062268733978 > 3.85836361348629
    WOLF (strong): th(1.684339755941405E7)=3.85836361348629; dx=4.12528831386474E-9 evalInputDelta=0.7356986552476883
    New Minimum: 3.85836361348629 > 3.2810173332691193
    END: th(8421698.779707026)=3.2810173332691193; dx=-1.6607177986821456E-8 evalInputDelta=1.313044935464859
    Fitness changed from 4.594062268733978 to 3.2810173332691193
    Iteration 5 complete. Error: 3.2810173332691193 Total: 22.0445; Orientation: 0.2235; Line Search: 16.9327
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/556d57ae-e6ea-463b-8de1-41122b6eb435.jpg)

    Adding measurement 45cb1fc8 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.451e+03, gradient 3.009e-04, dot -0.379; [4b34bacb-5aee-463b-91ee-5378e062cf28 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 3.2810173332691193, 8.192179948091507, 9.942348703742027, 11.134151697158813
    LBFGS Accumulation History: 3 points
    Removed measurement 45cb1fc8 to history. Total: 3
    th(0)=3.2810173332691193;dx=-8.976344741845406E-8
    New Minimum: 3.2810173332691193 > 2.803366392850876
    WOLF (strong): th(1.8144E7)=2.803366392850876; dx=1.000341788686663E-8 evalInputDelta=0.4776509404182434
    New Minimum: 2.803366392850876 > 2.249698430299759
    END: th(9072000.0)=2.249698430299759; dx=-8.980390664624753E-9 evalInputDelta=1.0313189029693604
    Fitness changed from 3.2810173332691193 to 2.249698430299759
    Iteration 6 complete. Error: 2.249698430299759 Total: 21.4176; Orientation: 0.2173; Line Search: 15.4279
    Adding measurement 4d0e22a9 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.460e+03, gradient 2.498e-04, dot -0.335; [4b34bacb-5aee-463b-91ee-5378e062cf28 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.249698430299759, 8.192179948091507, 9.942348703742027, 11.134151697158813
    LBFGS Accumulation History: 3 points
    Removed measurement 4d0e22a9 to history. Total: 3
    th(0)=2.249698430299759;dx=-6.179125230868706E-8
    Armijo: th(1.954503150796925E7)=2.341100662946701; dx=8.670051059569843E-9 evalInputDelta=-0.09140223264694214
    New Minimum: 2.249698430299759 > 1.666798785328865
    END: th(9772515.753984625)=1.666798785328865; dx=-5.63392542008601E-9 evalInputDelta=0.5828996449708939
    Fitness changed from 2.249698430299759 to 1.666798785328865
    Iteration 7 complete. Error: 1.666798785328865 Total: 20.1588; Orientation: 0.2196; Line Search: 14.8076
    Adding measurement 4006d56f to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.901e+03, gradient 2.302e-04, dot -0.352; [4b34bacb-5aee-463b-91ee-5378e062cf28 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.666798785328865, 8.192179948091507, 9.942348703742027, 11.134151697158813
    LBFGS Accumulation History: 3 points
    Removed measurement 4006d56f to history. Total: 3
    th(0)=1.666798785328865;dx=-5.234134707631607E-8
    Armijo: th(2.1054246949267566E7)=1.9483709782361984; dx=1.2272086412224648E-8 evalInputDelta=-0.2815721929073334
    New Minimum: 1.666798785328865 > 1.156878337264061
    END: th(1.0527123474633783E7)=1.156878337264061; dx=-6.447988166568478E-10 evalInputDelta=0.5099204480648041
    Fitness changed from 1.666798785328865 to 1.156878337264061
    Iteration 8 complete. Error: 1.156878337264061 Total: 20.7366; Orientation: 0.2175; Line Search: 15.7073
    Adding measurement 7083ed44 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.098e+03, gradient 2.103e-04, dot -0.304; [4b34bacb-5aee-463b-91ee-5378e062cf28 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.156878337264061, 8.192179948091507, 9.942348703742027, 11.134151697158813
    LBFGS Accumulation History: 3 points
    Removed measurement 7083ed44 to history. Total: 3
    th(0)=1.156878337264061;dx=-4.374653675627302E-8
    Armijo: th(2.2680000000000004E7)=1.60393588244915; dx=1.1026705688076725E-8 evalInputDelta=-0.4470575451850891
    New Minimum: 1.156878337264061 > 0.8141994774341583
    WOLF (strong): th(1.1340000000000002E7)=0.8141994774341583; dx=1.446132407754503E-9 evalInputDelta=0.34267885982990265
    END: th(3780000.0000000005)=0.8240462839603424; dx=-2.2176403301287163E-8 evalInputDelta=0.33283205330371857
    Fitness changed from 1.156878337264061 to 0.8141994774341583
    Iteration 9 complete. Error: 0.8141994774341583 Total: 25.3460; Orientation: 0.2380; Line Search: 20.0741
    Adding measurement b6f1d29 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.382e+03, gradient 1.987e-04, dot -0.309; [4b34bacb-5aee-463b-91ee-5378e062cf28 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.8141994774341583, 8.192179948091507, 9.942348703742027, 11.134151697158813
    LBFGS Accumulation History: 3 points
    Removed measurement b6f1d29 to history. Total: 3
    th(0)=0.8141994774341583;dx=-3.9036905868939966E-8
    New Minimum: 0.8141994774341583 > 0.40049920976161957
    END: th(8143763.128320522)=0.40049920976161957; dx=-4.522992645337655E-9 evalInputDelta=0.41370026767253876
    Fitness changed from 0.8141994774341583 to 0.40049920976161957
    Iteration 10 complete. Error: 0.40049920976161957 Total: 15.4871; Orientation: 0.2244; Line Search: 10.2520
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/f4760544-61c4-40c0-b924-3ab0b6a37ce0.jpg)

    Final threshold in iteration 11: 0.40049920976161957 (> -Infinity) after 239.765s (< 1800.000s)

Returns

    0.40049920976161957