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 203.01 seconds (2.111 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: 23124708438197
Reset training subject: 23128574809106
Adding measurement 1f6baf55 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.6040554493665695;dx=-8.255044763207859E-7
New Minimum: -0.6040554493665695 > -0.6040560007095337
END: th(2.154434690031884)=-0.6040560007095337; dx=-6.86517719520608E-7 evalInputDelta=5.513429641723633E-7
Fitness changed from -0.6040554493665695 to -0.6040560007095337
Iteration 1 complete. Error: -0.6040560007095337 Total: 21.3751; Orientation: 0.0439; Line Search: 8.9284
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/e4e5145e-929e-4bae-ae7d-5bee12fe12c7.jpg)

    Adding measurement 71966b21 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-0.6040560007095337;dx=-6.865145706684981E-7
    New Minimum: -0.6040560007095337 > -0.6040577739477158
    WOLFE (weak): th(4.641588833612779)=-0.6040577739477158; dx=-6.865076880769057E-7 evalInputDelta=1.773238182067871E-6
    New Minimum: -0.6040577739477158 > -0.6040592938661575
    WOLFE (weak): th(9.283177667225559)=-0.6040592938661575; dx=-6.865079598546921E-7 evalInputDelta=3.293156623840332E-6
    New Minimum: -0.6040592938661575 > -0.6040656566619873
    WOLFE (weak): th(27.849533001676676)=-0.6040656566619873; dx=-6.865075648088587E-7 evalInputDelta=9.655952453613281E-6
    New Minimum: -0.6040656566619873 > -0.6040943413972855
    WOLFE (weak): th(111.3981320067067)=-0.6040943413972855; dx=-6.865077044687378E-7 evalInputDelta=3.834068775177002E-5
    New Minimum: -0.6040943413972855 > -0.6042472869157791
    WOLFE (weak): th(556.9906600335335)=-0.6042472869157791; dx=-6.86410383191879E-7 evalInputDelta=1.9128620624542236E-4
    New Minimum: -0.6042472869157791 > -0.6052025109529495
    WOLFE (weak): th(3341.9439602012008)=-0.6052025109529495; dx=-6.855715306567582E-7 evalInputDelta=0.0011465102434158325
    New Minimum: -0.6052025109529495 > -0.6120446920394897
    WOLFE (weak): th(23393.607721408407)=-0.6120446920394897; dx=-6.794637306345206E-7 evalInputDelta=0.007988691329956055
    New Minimum: -0.6120446920394897 > -0.6656551510095596
    WOLFE (weak): th(187148.86177126726)=-0.6656551510095596; dx=-6.300017096815108E-7 evalInputDelta=0.06159915030002594
    New Minimum: -0.6656551510095596 > -0.9781922250986099
    END: th(1684339.7559414054)=-0.9781922250986099; dx=-2.5249327398539305E-7 evalInputDelta=0.37413622438907623
    Fitness changed from -0.6040560007095337 to -0.9781922250986099
    Iteration 2 complete. Error: -0.9781922250986099 Total: 48.8827; Orientation: 0.0451; Line Search: 44.1543
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/02b56383-57b9-45fd-b9d8-cff66195baa0.jpg)

    Adding measurement 6183f2b7 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-0.9781922250986099;dx=-2.683521432618998E-7
    New Minimum: -0.9781922250986099 > -1.2771272137761116
    END: th(3628800.0000000005)=-1.2771272137761116; dx=-9.545586123347275E-8 evalInputDelta=0.2989349886775017
    Fitness changed from -0.9781922250986099 to -1.2771272137761116
    Iteration 3 complete. Error: -1.2771272137761116 Total: 12.6584; Orientation: 0.0454; Line Search: 8.1519
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/89985d29-0bf6-483f-9a5d-550c2a214d88.jpg)

    Adding measurement 39d7961c to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.499e+03, gradient 3.824e-04, dot -0.536; [5d4f8118-bfb6-43df-9a00-a69e33cc737d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.2771272137761116, -0.9781922250986099, -0.6040560007095337, -0.6040554493665695
    LBFGS Accumulation History: 3 points
    Removed measurement 39d7961c to history. Total: 3
    th(0)=-1.2771272137761116;dx=-1.4624116017805645E-7
    New Minimum: -1.2771272137761116 > -1.531265638768673
    END: th(7818012.603187701)=-1.531265638768673; dx=-1.927360796098254E-8 evalInputDelta=0.25413842499256134
    Fitness changed from -1.2771272137761116 to -1.531265638768673
    Iteration 4 complete. Error: -1.531265638768673 Total: 13.5235; Orientation: 1.0091; Line Search: 8.3802
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/7cd80427-725e-4ec5-b7f6-73f7b8b40f80.jpg)

    Adding measurement 57090f17 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.392e+03, gradient 3.613e-04, dot -0.311; [5d4f8118-bfb6-43df-9a00-a69e33cc737d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.531265638768673, -0.9781922250986099, -0.6040560007095337, -0.6040554493665695
    LBFGS Accumulation History: 3 points
    Removed measurement 57090f17 to history. Total: 3
    th(0)=-1.531265638768673;dx=-1.3055669840865164E-7
    New Minimum: -1.531265638768673 > -1.5879649966955185
    WOLF (strong): th(1.6843397559414055E7)=-1.5879649966955185; dx=2.7864185632440446E-8 evalInputDelta=0.05669935792684555
    New Minimum: -1.5879649966955185 > -1.6901304349303246
    WOLF (strong): th(8421698.779707028)=-1.6901304349303246; dx=1.4502458469648982E-8 evalInputDelta=0.1588647961616516
    END: th(2807232.926569009)=-1.6545180454850197; dx=-5.19769718018803E-8 evalInputDelta=0.12325240671634674
    Fitness changed from -1.531265638768673 to -1.6901304349303246
    Iteration 5 complete. Error: -1.6901304349303246 Total: 23.4551; Orientation: 1.1071; Line Search: 17.6331
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/586a3c77-c8ea-4808-a963-5b05f2905d66.jpg)

    Adding measurement 497777a1 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.422e+03, gradient 3.312e-04, dot -0.243; [5d4f8118-bfb6-43df-9a00-a69e33cc737d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.6901304349303246, -0.9781922250986099, -0.6040560007095337, -0.6040554493665695
    LBFGS Accumulation History: 3 points
    Removed measurement 497777a1 to history. Total: 3
    th(0)=-1.6901304349303246;dx=-1.0966264747123514E-7
    New Minimum: -1.6901304349303246 > -1.8424182012677193
    END: th(6048000.000000001)=-1.8424182012677193; dx=-1.1050914605697911E-8 evalInputDelta=0.15228776633739471
    Fitness changed from -1.6901304349303246 to -1.8424182012677193
    Iteration 6 complete. Error: -1.8424182012677193 Total: 14.0705; Orientation: 1.0163; Line Search: 8.9868
    Adding measurement 935e871 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.023e+03, gradient 2.172e-04, dot -0.434; [5d4f8118-bfb6-43df-9a00-a69e33cc737d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.8424182012677193, -0.9781922250986099, -0.6040560007095337, -0.6040554493665695
    LBFGS Accumulation History: 3 points
    Removed measurement 935e871 to history. Total: 3
    th(0)=-1.8424182012677193;dx=-4.718616889683765E-8
    New Minimum: -1.8424182012677193 > -1.9486581683158875
    WOLF (strong): th(1.3030021005312836E7)=-1.9486581683158875; dx=5.942127161753142E-9 evalInputDelta=0.10623996704816818
    END: th(6515010.502656418)=-1.93812495470047; dx=-1.4263925970613644E-8 evalInputDelta=0.0957067534327507
    Fitness changed from -1.8424182012677193 to -1.9486581683158875
    Iteration 7 complete. Error: -1.9486581683158875 Total: 18.0247; Orientation: 1.0499; Line Search: 12.3422
    Adding measurement cd92034 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.710e+03, gradient 2.746e-04, dot -0.226; [5d4f8118-bfb6-43df-9a00-a69e33cc737d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.9486581683158875, -0.9781922250986099, -0.6040560007095337, -0.6040554493665695
    LBFGS Accumulation History: 3 points
    Removed measurement cd92034 to history. Total: 3
    th(0)=-1.9486581683158875;dx=-7.538379872266715E-8
    New Minimum: -1.9486581683158875 > -1.9740218073129654
    WOLF (strong): th(1.4036164632845048E7)=-1.9740218073129654; dx=2.7817558018923172E-8 evalInputDelta=0.025363638997077942
    New Minimum: -1.9740218073129654 > -2.042522616684437
    WOLF (strong): th(7018082.316422524)=-2.042522616684437; dx=5.405485339235405E-9 evalInputDelta=0.09386444836854935
    END: th(2339360.7721408415)=-2.0137345269322395; dx=-3.68107857831002E-8 evalInputDelta=0.06507635861635208
    Fitness changed from -1.9486581683158875 to -2.042522616684437
    Iteration 8 complete. Error: -2.042522616684437 Total: 23.2973; Orientation: 1.0212; Line Search: 17.9008
    Adding measurement 4f86a06d to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.109e+03, gradient 1.877e-04, dot -0.364; [5d4f8118-bfb6-43df-9a00-a69e33cc737d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.042522616684437, -0.9781922250986099, -0.6040560007095337, -0.6040554493665695
    LBFGS Accumulation History: 3 points
    Removed measurement 4f86a06d to history. Total: 3
    th(0)=-2.042522616684437;dx=-3.524788309091674E-8
    New Minimum: -2.042522616684437 > -2.101752854883671
    END: th(5040000.000000002)=-2.101752854883671; dx=-1.2601333390839658E-8 evalInputDelta=0.05923023819923401
    Fitness changed from -2.042522616684437 to -2.101752854883671
    Iteration 9 complete. Error: -2.101752854883671 Total: 13.7817; Orientation: 1.0129; Line Search: 8.3629
    Adding measurement 34a44e17 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.365e+03, gradient 1.373e-04, dot -0.515; [5d4f8118-bfb6-43df-9a00-a69e33cc737d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.101752854883671, -0.9781922250986099, -0.6040560007095337, -0.6040554493665695
    LBFGS Accumulation History: 3 points
    Removed measurement 34a44e17 to history. Total: 3
    th(0)=-2.101752854883671;dx=-1.8863730574410125E-8
    New Minimum: -2.101752854883671 > -2.1630757823586464
    END: th(1.0858350837760698E7)=-2.1630757823586464; dx=-5.345122178365685E-9 evalInputDelta=0.061322927474975586
    Fitness changed from -2.101752854883671 to -2.1630757823586464
    Iteration 10 complete. Error: -2.1630757823586464 Total: 13.8584; Orientation: 0.9995; Line Search: 8.9548
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/a253c0f1-8fd8-447f-9ce6-a7510bdbd2a8.jpg)

    Final threshold in iteration 11: -2.1630757823586464 (> -Infinity) after 203.007s (< 5400.000s)

Returns

    -2.1630757823586464