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 231.07 seconds (3.153 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: 7772813774354
Reset training subject: 7778008016075
Adding measurement 597ba5b2 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-13.525051355361938;dx=-2.996560249668224E-6
New Minimum: -13.525051355361938 > -13.525058329105377
END: th(2.154434690031884)=-13.525058329105377; dx=-2.548283486054787E-6 evalInputDelta=6.973743438720703E-6
Fitness changed from -13.525051355361938 to -13.525058329105377
Iteration 1 complete. Error: -13.525058329105377 Total: 26.1168; Orientation: 0.0291; Line Search: 11.1314
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/7d97a4c4-d1c5-4900-a687-8475247d0bd9.jpg)

    Adding measurement 5a8c521 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-13.525058329105377;dx=-2.534495197812405E-6
    New Minimum: -13.525058329105377 > -13.525072917342186
    WOLFE (weak): th(4.641588833612779)=-13.525072917342186; dx=-2.533491064496198E-6 evalInputDelta=1.4588236808776855E-5
    New Minimum: -13.525072917342186 > -13.52508720755577
    WOLFE (weak): th(9.283177667225559)=-13.52508720755577; dx=-2.5327043731920435E-6 evalInputDelta=2.8878450393676758E-5
    New Minimum: -13.52508720755577 > -13.525143772363663
    WOLFE (weak): th(27.849533001676676)=-13.525143772363663; dx=-2.530997344910611E-6 evalInputDelta=8.544325828552246E-5
    New Minimum: -13.525143772363663 > -13.525400400161743
    WOLFE (weak): th(111.3981320067067)=-13.525400400161743; dx=-2.5284255300175754E-6 evalInputDelta=3.420710563659668E-4
    New Minimum: -13.525400400161743 > -13.52676747739315
    WOLFE (weak): th(556.9906600335335)=-13.52676747739315; dx=-2.5276099477902478E-6 evalInputDelta=0.0017091482877731323
    New Minimum: -13.52676747739315 > -13.535294577479362
    WOLFE (weak): th(3341.9439602012008)=-13.535294577479362; dx=-2.5201488697405583E-6 evalInputDelta=0.01023624837398529
    New Minimum: -13.535294577479362 > -13.59580197930336
    WOLFE (weak): th(23393.607721408407)=-13.59580197930336; dx=-2.4551730481746974E-6 evalInputDelta=0.07074365019798279
    New Minimum: -13.59580197930336 > -14.02339144051075
    END: th(187148.86177126726)=-14.02339144051075; dx=-1.8428165724911503E-6 evalInputDelta=0.4983331114053726
    Fitness changed from -13.525058329105377 to -14.02339144051075
    Iteration 2 complete. Error: -14.02339144051075 Total: 51.0106; Orientation: 0.0287; Line Search: 45.7294
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/558ba8e7-abaa-40e8-80fd-bea40cfdc3e5.jpg)

    Adding measurement 2669dd1a to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-14.02339144051075;dx=-1.7106725778099769E-6
    New Minimum: -14.02339144051075 > -14.685702711343765
    END: th(403200.00000000006)=-14.685702711343765; dx=-1.109549672165529E-6 evalInputDelta=0.6623112708330154
    Fitness changed from -14.02339144051075 to -14.685702711343765
    Iteration 3 complete. Error: -14.685702711343765 Total: 15.3857; Orientation: 0.0315; Line Search: 9.8088
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/4b717fe8-3096-4e5c-9c16-fcaafccfed41.jpg)

    Adding measurement 2a60a334 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 7.129e+02, gradient 1.037e-03, dot -0.805; [0fa9fc84-00a3-491f-9ac9-4b51b4b0a6c9 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -14.685702711343765, -14.02339144051075, -13.525058329105377, -13.525051355361938
    LBFGS Accumulation History: 3 points
    Removed measurement 2a60a334 to history. Total: 3
    th(0)=-14.685702711343765;dx=-1.075370883736974E-6
    New Minimum: -14.685702711343765 > -15.542793542146683
    END: th(868668.0670208557)=-15.542793542146683; dx=-6.05890029577688E-7 evalInputDelta=0.8570908308029175
    Fitness changed from -14.685702711343765 to -15.542793542146683
    Iteration 4 complete. Error: -15.542793542146683 Total: 16.3876; Orientation: 0.6186; Line Search: 10.1978
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/fd4aa15a-d72a-4f49-8bc2-160271b3240d.jpg)

    Adding measurement 15db62f8 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.037e+03, gradient 8.749e-04, dot -0.680; [0fa9fc84-00a3-491f-9ac9-4b51b4b0a6c9 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -15.542793542146683, -14.02339144051075, -13.525058329105377, -13.525051355361938
    LBFGS Accumulation History: 3 points
    Removed measurement 15db62f8 to history. Total: 3
    th(0)=-15.542793542146683;dx=-7.630205751632484E-7
    New Minimum: -15.542793542146683 > -16.368270933628082
    END: th(1871488.617712673)=-16.368270933628082; dx=-1.7249660664118145E-7 evalInputDelta=0.8254773914813995
    Fitness changed from -15.542793542146683 to -16.368270933628082
    Iteration 5 complete. Error: -16.368270933628082 Total: 16.1282; Orientation: 0.6116; Line Search: 9.9820
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/43a871c2-4bc7-456c-a799-392c1bdc88b4.jpg)

    Adding measurement 747f0a72 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.070e+03, gradient 9.834e-04, dot -0.343; [0fa9fc84-00a3-491f-9ac9-4b51b4b0a6c9 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -16.368270933628082, -14.02339144051075, -13.525058329105377, -13.525051355361938
    LBFGS Accumulation History: 3 points
    Removed measurement 747f0a72 to history. Total: 3
    th(0)=-16.368270933628082;dx=-9.650911584092166E-7
    Armijo: th(4032000.0000000014)=-16.12134101986885; dx=2.0474344708992772E-7 evalInputDelta=-0.24692991375923157
    New Minimum: -16.368270933628082 > -16.734359622001648
    WOLF (strong): th(2016000.0000000007)=-16.734359622001648; dx=2.2520087875831404E-7 evalInputDelta=0.3660886883735657
    New Minimum: -16.734359622001648 > -16.84604638814926
    END: th(672000.0000000002)=-16.84604638814926; dx=-2.6840584781313546E-7 evalInputDelta=0.4777754545211792
    Fitness changed from -16.368270933628082 to -16.84604638814926
    Iteration 6 complete. Error: -16.84604638814926 Total: 26.5577; Orientation: 0.5980; Line Search: 20.7853
    Adding measurement d8f2864 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.482e+03, gradient 6.547e-04, dot -0.594; [0fa9fc84-00a3-491f-9ac9-4b51b4b0a6c9 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -16.84604638814926, -14.02339144051075, -13.525058329105377, -13.525051355361938
    LBFGS Accumulation History: 3 points
    Removed measurement d8f2864 to history. Total: 3
    th(0)=-16.84604638814926;dx=-4.281512040775714E-7
    New Minimum: -16.84604638814926 > -17.30214038491249
    END: th(1447780.1117014263)=-17.30214038491249; dx=-1.217197907583642E-7 evalInputDelta=0.45609399676322937
    Fitness changed from -16.84604638814926 to -17.30214038491249
    Iteration 7 complete. Error: -17.30214038491249 Total: 15.7360; Orientation: 0.6087; Line Search: 10.1554
    Adding measurement 5e4ab8fc to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.809e+03, gradient 6.874e-04, dot -0.530; [0fa9fc84-00a3-491f-9ac9-4b51b4b0a6c9 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -17.30214038491249, -14.02339144051075, -13.525058329105377, -13.525051355361938
    LBFGS Accumulation History: 3 points
    Removed measurement 5e4ab8fc to history. Total: 3
    th(0)=-17.30214038491249;dx=-4.721327434088909E-7
    New Minimum: -17.30214038491249 > -17.406336307525635
    WOLF (strong): th(3119147.6961877886)=-17.406336307525635; dx=9.68583572323111E-8 evalInputDelta=0.10419592261314392
    New Minimum: -17.406336307525635 > -17.59899428486824
    WOLF (strong): th(1559573.8480938943)=-17.59899428486824; dx=3.8143901583950085E-8 evalInputDelta=0.2968538999557495
    END: th(519857.94936463144)=-17.520169764757156; dx=-2.3818799356679457E-7 evalInputDelta=0.21802937984466553
    Fitness changed from -17.30214038491249 to -17.59899428486824
    Iteration 8 complete. Error: -17.59899428486824 Total: 25.6266; Orientation: 0.6225; Line Search: 19.7211
    Adding measurement ea798f5 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.773e+03, gradient 7.569e-04, dot -0.401; [0fa9fc84-00a3-491f-9ac9-4b51b4b0a6c9 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -17.59899428486824, -14.02339144051075, -13.525058329105377, -13.525051355361938
    LBFGS Accumulation History: 3 points
    Removed measurement ea798f5 to history. Total: 3
    th(0)=-17.59899428486824;dx=-5.722772594918074E-7
    New Minimum: -17.59899428486824 > -17.97659468650818
    END: th(1120000.0000000005)=-17.97659468650818; dx=-8.30914416573836E-9 evalInputDelta=0.37760040163993835
    Fitness changed from -17.59899428486824 to -17.97659468650818
    Iteration 9 complete. Error: -17.97659468650818 Total: 16.4211; Orientation: 0.6383; Line Search: 10.3713
    Adding measurement 332951a2 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.059e+03, gradient 5.531e-04, dot -0.562; [0fa9fc84-00a3-491f-9ac9-4b51b4b0a6c9 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -17.97659468650818, -14.02339144051075, -13.525058329105377, -13.525051355361938
    LBFGS Accumulation History: 3 points
    Removed measurement 332951a2 to history. Total: 3
    th(0)=-17.97659468650818;dx=-3.05527160039838E-7
    New Minimum: -17.97659468650818 > -18.191043376922607
    WOLF (strong): th(2412966.852835711)=-18.191043376922607; dx=8.440832752268931E-8 evalInputDelta=0.2144486904144287
    New Minimum: -18.191043376922607 > -18.236135691404343
    END: th(1206483.4264178555)=-18.236135691404343; dx=-6.774246872565641E-8 evalInputDelta=0.25954100489616394
    Fitness changed from -17.97659468650818 to -18.236135691404343
    Iteration 10 complete. Error: -18.236135691404343 Total: 21.4299; Orientation: 0.6120; Line Search: 15.5482
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/2375c6c9-a63c-4937-8d4d-72b21f526daf.jpg)

    Final threshold in iteration 11: -18.236135691404343 (> -Infinity) after 231.066s (< 5400.000s)

Returns

    -18.236135691404343