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 222.27 seconds (2.403 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: 2908824746504
Reset training subject: 2914115783954
Adding measurement 75e776ce to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=13.04182517528534;dx=-1.5191093793814374E-6
New Minimum: 13.04182517528534 > 13.041814468801022
WOLFE (weak): th(2.154434690031884)=13.041814468801022; dx=-1.5188049000716507E-6 evalInputDelta=1.0706484317779541E-5
New Minimum: 13.041814468801022 > 13.041803032159805
WOLFE (weak): th(4.308869380063768)=13.041803032159805; dx=-1.5171870281337306E-6 evalInputDelta=2.2143125534057617E-5
New Minimum: 13.041803032159805 > 13.041760049760342
WOLFE (weak): th(12.926608140191302)=13.041760049760342; dx=-1.5166364089541648E-6 evalInputDelta=6.512552499771118E-5
New Minimum: 13.041760049760342 > 13.041565522551537
WOLFE (weak): th(51.70643256076521)=13.041565522551537; dx=-1.514329767575778E-6 evalInputDelta=2.596527338027954E-4
New Minimum: 13.041565522551537 > 13.040526308119297
WOLFE (weak): th(258.53216280382605)=13.040526308119297; dx=-1.5145149292654636E-6 evalInputDelta=0.0012988671660423279
New Minimum: 13.040526308119297 > 13.034019939601421
WOLFE (weak): th(1551.1929768229563)=13.034019939601421; dx=-1.5284277390812019E-6 evalInputDelta=0.007805235683917999
New Minimum: 13.034019939601421 > 12.985814735293388
WOLFE (weak): th(10858.350837760694)=12.985814735293388; dx=-1.5186883974314717E-6 evalInputDelta=0.05601043999195099
New Minimum: 12.985814735293388 > 12.649104595184326
END: th(86866.80670208555)=12.649104595184326; dx=-9.407215022859619E-7 evalInputDelta=0.3927205801010132
Fitness changed from 13.04182517528534 to 12.649104595184326
Iteration 1 complete. Error: 12.649104595184326 Total: 62.8822; Orientation: 0.0089; Line Search: 47.4729
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0b953395-24c2-4529-a4ee-0a551a8c358f.jpg)

    Adding measurement 32b7e588 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=12.649104595184326;dx=-7.409638830245027E-7
    New Minimum: 12.649104595184326 > 12.193596832454205
    END: th(187148.86177126726)=12.193596832454205; dx=-4.0212855241226497E-7 evalInputDelta=0.4555077627301216
    Fitness changed from 12.649104595184326 to 12.193596832454205
    Iteration 2 complete. Error: 12.193596832454205 Total: 14.7192; Orientation: 0.0096; Line Search: 9.5535
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/349dbc16-ba3c-4ebd-ba5c-d2dea101647a.jpg)

    Adding measurement 51096bc5 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=12.193596832454205;dx=-4.321202283857791E-7
    New Minimum: 12.193596832454205 > 11.490952469408512
    END: th(403200.00000000006)=11.490952469408512; dx=-3.362938162456618E-7 evalInputDelta=0.7026443630456924
    Fitness changed from 12.193596832454205 to 11.490952469408512
    Iteration 3 complete. Error: 11.490952469408512 Total: 16.3948; Orientation: 0.0092; Line Search: 10.8381
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/37f2de48-484f-4190-9fd5-1e2a70a3315f.jpg)

    Adding measurement 403d0987 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.554e+03, gradient 5.951e-04, dot -0.923; [ac085d41-0008-4b0f-a84f-78d92f2cd84d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 11.490952469408512, 12.193596832454205, 12.649104595184326, 13.04182517528534
    LBFGS Accumulation History: 3 points
    Removed measurement 403d0987 to history. Total: 3
    th(0)=11.490952469408512;dx=-3.5151851118374883E-7
    New Minimum: 11.490952469408512 > 10.308259211480618
    END: th(868668.0670208557)=10.308259211480618; dx=-2.5192120786357553E-7 evalInputDelta=1.1826932579278946
    Fitness changed from 11.490952469408512 to 10.308259211480618
    Iteration 4 complete. Error: 10.308259211480618 Total: 15.6123; Orientation: 0.2207; Line Search: 10.1994
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/a36836d1-971e-4ef4-9865-900cc8eaad6a.jpg)

    Adding measurement 68e08503 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.038e+03, gradient 5.440e-04, dot -0.836; [ac085d41-0008-4b0f-a84f-78d92f2cd84d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 10.308259211480618, 12.193596832454205, 12.649104595184326, 13.04182517528534
    LBFGS Accumulation History: 3 points
    Removed measurement 68e08503 to history. Total: 3
    th(0)=10.308259211480618;dx=-2.920264843346995E-7
    New Minimum: 10.308259211480618 > 8.5535679012537
    END: th(1871488.617712673)=8.5535679012537; dx=-1.8378200644283107E-7 evalInputDelta=1.7546913102269173
    Fitness changed from 10.308259211480618 to 8.5535679012537
    Iteration 5 complete. Error: 8.5535679012537 Total: 16.2662; Orientation: 0.2581; Line Search: 10.7115
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/fa3874cf-4d20-4972-9438-26e67eb5b855.jpg)

    Adding measurement 4063d915 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.927e+03, gradient 4.851e-04, dot -0.720; [ac085d41-0008-4b0f-a84f-78d92f2cd84d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 8.5535679012537, 12.193596832454205, 12.649104595184326, 13.04182517528534
    LBFGS Accumulation History: 3 points
    Removed measurement 4063d915 to history. Total: 3
    th(0)=8.5535679012537;dx=-2.3348196523205344E-7
    New Minimum: 8.5535679012537 > 6.460163563489914
    END: th(4032000.0000000014)=6.460163563489914; dx=-9.298298991124508E-8 evalInputDelta=2.0934043377637863
    Fitness changed from 8.5535679012537 to 6.460163563489914
    Iteration 6 complete. Error: 6.460163563489914 Total: 15.8637; Orientation: 0.2172; Line Search: 10.2484
    Adding measurement 458e8e9c to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.924e+03, gradient 8.272e-04, dot -0.336; [ac085d41-0008-4b0f-a84f-78d92f2cd84d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 6.460163563489914, 12.193596832454205, 12.649104595184326, 13.04182517528534
    LBFGS Accumulation History: 3 points
    Removed measurement 458e8e9c to history. Total: 3
    th(0)=6.460163563489914;dx=-6.724919555840377E-7
    New Minimum: 6.460163563489914 > 4.779226675629616
    END: th(8686680.670208558)=4.779226675629616; dx=-2.9722237621811022E-8 evalInputDelta=1.6809368878602982
    Fitness changed from 6.460163563489914 to 4.779226675629616
    Iteration 7 complete. Error: 4.779226675629616 Total: 16.1935; Orientation: 0.2825; Line Search: 10.4964
    Adding measurement 3426ea99 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.697e+03, gradient 4.167e-04, dot -0.175; [ac085d41-0008-4b0f-a84f-78d92f2cd84d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 4.779226675629616, 12.193596832454205, 12.649104595184326, 13.04182517528534
    LBFGS Accumulation History: 3 points
    Removed measurement 3426ea99 to history. Total: 3
    th(0)=4.779226675629616;dx=-1.723869304852181E-7
    New Minimum: 4.779226675629616 > 4.654269099235535
    WOLF (strong): th(1.871488617712673E7)=4.654269099235535; dx=1.3711341071617834E-8 evalInputDelta=0.12495757639408112
    New Minimum: 4.654269099235535 > 3.4357046484947205
    END: th(9357443.088563366)=3.4357046484947205; dx=-5.6120804090919185E-9 evalInputDelta=1.3435220271348953
    Fitness changed from 4.779226675629616 to 3.4357046484947205
    Iteration 8 complete. Error: 3.4357046484947205 Total: 20.8065; Orientation: 0.2611; Line Search: 15.3462
    Adding measurement 1ef9275d to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.905e+03, gradient 3.084e-04, dot -0.214; [ac085d41-0008-4b0f-a84f-78d92f2cd84d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 3.4357046484947205, 12.193596832454205, 12.649104595184326, 13.04182517528534
    LBFGS Accumulation History: 3 points
    Removed measurement 1ef9275d to history. Total: 3
    th(0)=3.4357046484947205;dx=-9.407905560637124E-8
    New Minimum: 3.4357046484947205 > 3.2253240793943405
    WOLF (strong): th(2.0160000000000007E7)=3.2253240793943405; dx=1.36718306455486E-8 evalInputDelta=0.21038056910037994
    New Minimum: 3.2253240793943405 > 2.353914111852646
    END: th(1.0080000000000004E7)=2.353914111852646; dx=-7.639960392726177E-9 evalInputDelta=1.0817905366420746
    Fitness changed from 3.4357046484947205 to 2.353914111852646
    Iteration 9 complete. Error: 2.353914111852646 Total: 21.1128; Orientation: 0.2176; Line Search: 15.2424
    Adding measurement 78368d72 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.843e+03, gradient 2.485e-04, dot -0.227; [ac085d41-0008-4b0f-a84f-78d92f2cd84d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.353914111852646, 12.193596832454205, 12.649104595184326, 13.04182517528534
    LBFGS Accumulation History: 3 points
    Removed measurement 78368d72 to history. Total: 3
    th(0)=2.353914111852646;dx=-6.083324212677553E-8
    Armijo: th(2.1716701675521396E7)=2.4644350111484528; dx=9.972956027640566E-9 evalInputDelta=-0.11052089929580688
    New Minimum: 2.353914111852646 > 1.6165397316217422
    END: th(1.0858350837760698E7)=1.6165397316217422; dx=-4.096500431898612E-9 evalInputDelta=0.7373743802309036
    Fitness changed from 2.353914111852646 to 1.6165397316217422
    Iteration 10 complete. Error: 1.6165397316217422 Total: 22.3165; Orientation: 0.3495; Line Search: 16.7403
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/ff26967d-7b96-4439-aebe-99237609c7fa.jpg)

    Final threshold in iteration 11: 1.6165397316217422 (> -Infinity) after 222.266s (< 1800.000s)

Returns

    1.6165397316217422