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 111.47 seconds (1.603 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: 45028704268200
Reset training subject: 45031148857400
Adding measurement 665e5d2e to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-49.56903148003842;dx=-1.7520848497576944E-6
New Minimum: -49.56903148003842 > -49.56903677277421
WOLFE (weak): th(2.154434690031884)=-49.56903677277421; dx=-1.643353368411089E-6 evalInputDelta=5.292735792750136E-6
WOLFE (weak): th(4.308869380063768)=-49.56903677277421; dx=-1.643606782974242E-6 evalInputDelta=5.292735792750136E-6
New Minimum: -49.56903677277421 > -49.569054415222766
WOLFE (weak): th(12.926608140191302)=-49.569054415222766; dx=-1.6426243784598668E-6 evalInputDelta=2.2935184347261384E-5
New Minimum: -49.569054415222766 > -49.56912322071213
WOLFE (weak): th(51.70643256076521)=-49.56912322071213; dx=-1.643628653499189E-6 evalInputDelta=9.174067371020556E-5
New Minimum: -49.56912322071213 > -49.569495474395865
WOLFE (weak): th(258.53216280382605)=-49.569495474395865; dx=-1.6439154819989644E-6 evalInputDelta=4.6399435744604034E-4
New Minimum: -49.569495474395865 > -49.571834786643265
WOLFE (weak): th(1551.1929768229563)=-49.571834786643265; dx=-1.6434527435821694E-6 evalInputDelta=0.0028033066048465116
New Minimum: -49.571834786643265 > -49.58864248057422
WOLFE (weak): th(10858.350837760694)=-49.58864248057422; dx=-1.6431700992430445E-6 evalInputDelta=0.01961100053580367
New Minimum: -49.58864248057422 > -49.725588610845286
WOLFE (weak): th(86866.80670208555)=-49.725588610845286; dx=-1.6329251726512014E-6 evalInputDelta=0.15655713080686695
New Minimum: -49.725588610845286 > -50.924144649412305
END: th(781801.26031877)=-50.924144649412305; dx=-1.5108423150840927E-6 evalInputDelta=1.3551131693738867
Fitness changed from -49.56903148003842 to -50.924144649412305
Iteration 1 complete. Error: -50.924144649412305 Total: 30.0139; Orientation: 0.0617; Line Search: 23.1175
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/330e1db7-672f-49af-ad3e-e02de68643b7.jpg)
Adding measurement 60ee5ebe to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-50.924144649412305;dx=-1.4571936710525366E-6
New Minimum: -50.924144649412305 > -53.42546698797135
END: th(1684339.7559414052)=-53.42546698797135; dx=-1.2643518279237072E-6 evalInputDelta=2.501322338559042
Fitness changed from -50.924144649412305 to -53.42546698797135
Iteration 2 complete. Error: -53.42546698797135 Total: 7.5024; Orientation: 0.0692; Line Search: 4.6209
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/c8d21996-98e5-43c0-ad58-8826dd65fc7c.jpg)
Adding measurement 7c7f3555 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-53.42546698797135;dx=-1.199418002292523E-6
New Minimum: -53.42546698797135 > -57.63154567665995
END: th(3628800.0)=-57.63154567665995; dx=-9.379946566544058E-7 evalInputDelta=4.206078688688599
Fitness changed from -53.42546698797135 to -57.63154567665995
Iteration 3 complete. Error: -57.63154567665995 Total: 7.5225; Orientation: 0.0641; Line Search: 4.7007
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/2899cd51-73bb-404d-a669-20e04436f5a7.jpg)
Adding measurement 4a0d1182 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.269e+04, gradient 9.347e-04, dot -0.926; [b3a214fd-0167-4453-9b75-58a8454ff5cf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -57.63154567665995, -53.42546698797135, -50.924144649412305, -49.56903148003842
LBFGS Accumulation History: 3 points
Removed measurement 4a0d1182 to history. Total: 3
th(0)=-57.63154567665995;dx=-8.725320071467278E-7
New Minimum: -57.63154567665995 > -63.77914604941254
END: th(7818012.6031877)=-63.77914604941254; dx=-5.974711665034557E-7 evalInputDelta=6.147600372752592
Fitness changed from -57.63154567665995 to -63.77914604941254
Iteration 4 complete. Error: -63.77914604941254 Total: 8.3075; Orientation: 1.0703; Line Search: 4.5557
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/1163dcec-edc6-42c0-83a9-f1f8f77fc4f0.jpg)
Adding measurement 4d0fc0fd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.947e+04, gradient 7.706e-04, dot -0.813; [b3a214fd-0167-4453-9b75-58a8454ff5cf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -63.77914604941254, -53.42546698797135, -50.924144649412305, -49.56903148003842
LBFGS Accumulation History: 3 points
Removed measurement 4d0fc0fd to history. Total: 3
th(0)=-63.77914604941254;dx=-5.928276490661301E-7
New Minimum: -63.77914604941254 > -72.00404600253235
END: th(1.684339755941405E7)=-72.00404600253235; dx=-3.460853908079603E-7 evalInputDelta=8.22489995311981
Fitness changed from -63.77914604941254 to -72.00404600253235
Iteration 5 complete. Error: -72.00404600253235 Total: 8.4982; Orientation: 1.0698; Line Search: 4.8064
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/db9a1c0a-2c3c-44c9-9547-1fbb321a6799.jpg)
Adding measurement 1547c955 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.058e+04, gradient 6.708e-04, dot -0.672; [b3a214fd-0167-4453-9b75-58a8454ff5cf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -72.00404600253235, -53.42546698797135, -50.924144649412305, -49.56903148003842
LBFGS Accumulation History: 3 points
Removed measurement 1547c955 to history. Total: 3
th(0)=-72.00404600253235;dx=-4.4875314863175664E-7
New Minimum: -72.00404600253235 > -81.08461894924213
END: th(3.6288E7)=-81.08461894924213; dx=-1.1382129137691635E-7 evalInputDelta=9.080572946709779
Fitness changed from -72.00404600253235 to -81.08461894924213
Iteration 6 complete. Error: -81.08461894924213 Total: 8.3119; Orientation: 1.0110; Line Search: 4.6696
Adding measurement 7ebd8e3f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.111e+04, gradient 7.898e-04, dot -0.374; [b3a214fd-0167-4453-9b75-58a8454ff5cf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -81.08461894924213, -53.42546698797135, -50.924144649412305, -49.56903148003842
LBFGS Accumulation History: 3 points
Removed measurement 7ebd8e3f to history. Total: 3
th(0)=-81.08461894924213;dx=-6.22871918480018E-7
Armijo: th(7.8180126031877E7)=-75.31528381026891; dx=1.545990974404769E-7 evalInputDelta=-5.769335138973219
New Minimum: -81.08461894924213 > -83.46623707280064
WOLF (strong): th(3.90900630159385E7)=-83.46623707280064; dx=1.7334977157604103E-7 evalInputDelta=2.3816181235585105
New Minimum: -83.46623707280064 > -86.23621260802408
END: th(1.3030021005312832E7)=-86.23621260802408; dx=-1.3973620010671486E-7 evalInputDelta=5.151593658781948
Fitness changed from -81.08461894924213 to -86.23621260802408
Iteration 7 complete. Error: -86.23621260802408 Total: 12.5768; Orientation: 1.0290; Line Search: 9.3843
Adding measurement 53f473ed to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.030e+04, gradient 5.780e-04, dot -0.562; [b3a214fd-0167-4453-9b75-58a8454ff5cf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -86.23621260802408, -53.42546698797135, -50.924144649412305, -49.56903148003842
LBFGS Accumulation History: 3 points
Removed measurement 53f473ed to history. Total: 3
th(0)=-86.23621260802408;dx=-3.3341008428814886E-7
New Minimum: -86.23621260802408 > -90.77427418944718
END: th(2.807232926569009E7)=-90.77427418944718; dx=-3.944723983130175E-8 evalInputDelta=4.538061581423108
Fitness changed from -86.23621260802408 to -90.77427418944718
Iteration 8 complete. Error: -90.77427418944718 Total: 7.9007; Orientation: 1.0075; Line Search: 4.6864
Adding measurement 2b8bb507 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.263e+04, gradient 7.281e-04, dot -0.392; [b3a214fd-0167-4453-9b75-58a8454ff5cf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -90.77427418944718, -53.42546698797135, -50.924144649412305, -49.56903148003842
LBFGS Accumulation History: 3 points
Removed measurement 2b8bb507 to history. Total: 3
th(0)=-90.77427418944718;dx=-5.295696686779841E-7
Armijo: th(6.048000000000001E7)=-86.04117579872977; dx=1.6786305646628845E-7 evalInputDelta=-4.733098390717416
New Minimum: -90.77427418944718 > -92.79778924141318
WOLF (strong): th(3.0240000000000004E7)=-92.79778924141318; dx=1.7753556010768457E-7 evalInputDelta=2.023515051966001
New Minimum: -92.79778924141318 > -94.49809761083769
END: th(1.0080000000000002E7)=-94.49809761083769; dx=-1.6896066063584504E-7 evalInputDelta=3.723823421390506
Fitness changed from -90.77427418944718 to -94.49809761083769
Iteration 9 complete. Error: -94.49809761083769 Total: 12.3572; Orientation: 0.9989; Line Search: 9.2370
Adding measurement 4645a948 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.095e+04, gradient 4.770e-04, dot -0.632; [b3a214fd-0167-4453-9b75-58a8454ff5cf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -94.49809761083769, -53.42546698797135, -50.924144649412305, -49.56903148003842
LBFGS Accumulation History: 3 points
Removed measurement 4645a948 to history. Total: 3
th(0)=-94.49809761083769;dx=-2.2663020734043627E-7
New Minimum: -94.49809761083769 > -98.05823659821054
END: th(2.1716701675521392E7)=-98.05823659821054; dx=-1.1509381612177327E-7 evalInputDelta=3.560138987372852
Fitness changed from -94.49809761083769 to -98.05823659821054
Iteration 10 complete. Error: -98.05823659821054 Total: 8.0620; Orientation: 0.9952; Line Search: 4.6494
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f20a285c-46f9-4156-a315-980bb3df4fc6.jpg)
Final threshold in iteration 11: -98.05823659821054 (> -Infinity) after 111.466s (< 5400.000s)

Returns

    -98.05823659821054