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 86.69 seconds (1.180 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: 306485786527700
Reset training subject: 306487518356300
Adding measurement 301c9cf7 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-155.4549024953332;dx=-2.9080882724953747E-5
New Minimum: -155.4549024953332 > -155.4549488339009
END: th(2.154434690031884)=-155.4549488339009; dx=-1.7930695167165653E-5 evalInputDelta=4.633856769942213E-5
Fitness changed from -155.4549024953332 to -155.4549488339009
Iteration 1 complete. Error: -155.4549488339009 Total: 8.3596; Orientation: 0.0607; Line Search: 3.4965
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/f1d55e77-49bc-4f83-bdbe-c6f78b1a7844.jpg)
Adding measurement 5feddca7 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-155.4549488339009;dx=-1.7803112217447966E-5
New Minimum: -155.4549488339009 > -155.4550348912043
WOLFE (weak): th(4.641588833612779)=-155.4550348912043; dx=-1.7812462642293268E-5 evalInputDelta=8.605730340605078E-5
New Minimum: -155.4550348912043 > -155.45512756824695
WOLFE (weak): th(9.283177667225559)=-155.45512756824695; dx=-1.7795248481402773E-5 evalInputDelta=1.7873434606485716E-4
New Minimum: -155.45512756824695 > -155.45549827586515
WOLFE (weak): th(27.849533001676676)=-155.45549827586515; dx=-1.7752160605343805E-5 evalInputDelta=5.494419642673165E-4
New Minimum: -155.45549827586515 > -155.45713997040542
WOLFE (weak): th(111.3981320067067)=-155.45713997040542; dx=-1.7766840907456974E-5 evalInputDelta=0.002191136504535507
New Minimum: -155.45713997040542 > -155.46591744626
WOLFE (weak): th(556.9906600335335)=-155.46591744626; dx=-1.7762424078174775E-5 evalInputDelta=0.01096861235910751
New Minimum: -155.46591744626 > -155.5207356701062
WOLFE (weak): th(3341.9439602012008)=-155.5207356701062; dx=-1.7759056987826036E-5 evalInputDelta=0.06578683620531933
New Minimum: -155.5207356701062 > -155.91482096521804
WOLFE (weak): th(23393.607721408407)=-155.91482096521804; dx=-1.7676843732256206E-5 evalInputDelta=0.4598721313171552
New Minimum: -155.91482096521804 > -159.07438714480233
WOLFE (weak): th(187148.86177126726)=-159.07438714480233; dx=-1.7081392359716963E-5 evalInputDelta=3.619438310901444
New Minimum: -159.07438714480233 > -182.0020751512865
END: th(1684339.7559414054)=-182.0020751512865; dx=-1.030685179591113E-5 evalInputDelta=26.54712631738562
Fitness changed from -155.4549488339009 to -182.0020751512865
Iteration 2 complete. Error: -182.0020751512865 Total: 18.4260; Orientation: 0.0623; Line Search: 16.4305
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/aae4c094-e6e9-411c-be46-7d3f2b1bf5d6.jpg)
Adding measurement 4c60e9b8 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-182.0020751512865;dx=-1.2431788764165716E-5
New Minimum: -182.0020751512865 > -212.71569720584998
END: th(3628800.0000000005)=-212.71569720584998; dx=-4.393157335658686E-6 evalInputDelta=30.713622054563473
Fitness changed from -182.0020751512865 to -212.71569720584998
Iteration 3 complete. Error: -212.71569720584998 Total: 5.0838; Orientation: 0.0612; Line Search: 3.1863
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/0b71dd6c-787c-40df-be2d-0261cde3f914.jpg)
Adding measurement 33e59799 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.323e+04, gradient 3.065e-03, dot -0.421; [3aa3c559-9e5e-4493-8c98-c66e107aa5bd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -212.71569720584998, -182.0020751512865, -155.4549488339009, -155.4549024953332
LBFGS Accumulation History: 3 points
Removed measurement 33e59799 to history. Total: 3
th(0)=-212.71569720584998;dx=-9.371776034129416E-6
New Minimum: -212.71569720584998 > -237.68989277224486
END: th(7818012.603187701)=-237.68989277224486; dx=-7.315174876042614E-8 evalInputDelta=24.974195566394883
Fitness changed from -212.71569720584998 to -237.68989277224486
Iteration 4 complete. Error: -237.68989277224486 Total: 6.3612; Orientation: 1.1281; Line Search: 3.3323
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/6ced8906-79ad-4697-aa11-2612971d4841.jpg)
Adding measurement 8982970 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.027e+04, gradient 3.696e-03, dot -0.169; [3aa3c559-9e5e-4493-8c98-c66e107aa5bd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -237.68989277224486, -182.0020751512865, -155.4549488339009, -155.4549024953332
LBFGS Accumulation History: 3 points
Removed measurement 8982970 to history. Total: 3
th(0)=-237.68989277224486;dx=-1.365774308163982E-5
Armijo: th(1.6843397559414055E7)=-208.01268686453867; dx=3.162370823957709E-6 evalInputDelta=-29.677205907706195
New Minimum: -237.68989277224486 > -246.81841533975333
WOLF (strong): th(8421698.779707028)=-246.81841533975333; dx=4.340173447283212E-6 evalInputDelta=9.128522567508469
New Minimum: -246.81841533975333 > -262.95098663255993
END: th(2807232.926569009)=-262.95098663255993; dx=-2.8418646190088934E-6 evalInputDelta=25.26109386031507
Fitness changed from -237.68989277224486 to -262.95098663255993
Iteration 5 complete. Error: -262.95098663255993 Total: 9.4678; Orientation: 1.0507; Line Search: 6.5643
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/1cca141a-59c4-4660-813b-9f0d79fe7024.jpg)
Adding measurement 589d5a4e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.344e+04, gradient 2.488e-03, dot -0.394; [3aa3c559-9e5e-4493-8c98-c66e107aa5bd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -262.95098663255993, -182.0020751512865, -155.4549488339009, -155.4549024953332
LBFGS Accumulation History: 3 points
Removed measurement 589d5a4e to history. Total: 3
th(0)=-262.95098663255993;dx=-6.183368428013751E-6
New Minimum: -262.95098663255993 > -279.31725520311926
END: th(6048000.000000001)=-279.31725520311926; dx=-5.2122101396017884E-8 evalInputDelta=16.366268570559328
Fitness changed from -262.95098663255993 to -279.31725520311926
Iteration 6 complete. Error: -279.31725520311926 Total: 6.3476; Orientation: 0.9869; Line Search: 3.3609
Adding measurement 4f65ffda to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.275e+04, gradient 3.008e-03, dot -0.256; [3aa3c559-9e5e-4493-8c98-c66e107aa5bd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -279.31725520311926, -182.0020751512865, -155.4549488339009, -155.4549024953332
LBFGS Accumulation History: 3 points
Removed measurement 4f65ffda to history. Total: 3
th(0)=-279.31725520311926;dx=-9.036736277672363E-6
Armijo: th(1.3030021005312836E7)=-257.3986867670063; dx=3.117737910526427E-6 evalInputDelta=-21.918568436112935
New Minimum: -279.31725520311926 > -284.6027312293266
WOLF (strong): th(6515010.502656418)=-284.6027312293266; dx=3.4984955709964134E-6 evalInputDelta=5.285476026207334
New Minimum: -284.6027312293266 > -293.0797556202327
END: th(2171670.167552139)=-293.0797556202327; dx=-2.4943516631189386E-6 evalInputDelta=13.762500417113415
Fitness changed from -279.31725520311926 to -293.0797556202327
Iteration 7 complete. Error: -293.0797556202327 Total: 9.5597; Orientation: 1.1012; Line Search: 6.8947
Adding measurement 156e7836 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.156e+04, gradient 1.910e-03, dot -0.480; [3aa3c559-9e5e-4493-8c98-c66e107aa5bd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -293.0797556202327, -182.0020751512865, -155.4549488339009, -155.4549024953332
LBFGS Accumulation History: 3 points
Removed measurement 156e7836 to history. Total: 3
th(0)=-293.0797556202327;dx=-3.6288987774344087E-6
New Minimum: -293.0797556202327 > -304.5298950504941
END: th(4678721.544281682)=-304.5298950504941; dx=-1.2683567098494199E-6 evalInputDelta=11.450139430261402
Fitness changed from -293.0797556202327 to -304.5298950504941
Iteration 8 complete. Error: -304.5298950504941 Total: 5.7922; Orientation: 1.0136; Line Search: 3.1970
Adding measurement 2af5c112 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.129e+04, gradient 2.061e-03, dot -0.397; [3aa3c559-9e5e-4493-8c98-c66e107aa5bd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -304.5298950504941, -182.0020751512865, -155.4549488339009, -155.4549024953332
LBFGS Accumulation History: 3 points
Removed measurement 2af5c112 to history. Total: 3
th(0)=-304.5298950504941;dx=-4.2393125089783055E-6
New Minimum: -304.5298950504941 > -305.0275479469596
WOLF (strong): th(1.0080000000000002E7)=-305.0275479469596; dx=1.4052639308419378E-6 evalInputDelta=0.49765289646552446
New Minimum: -305.0275479469596 > -311.8036621883966
WOLF (strong): th(5040000.000000001)=-311.8036621883966; dx=4.052557589216386E-7 evalInputDelta=7.273767137902496
END: th(1680000.0000000002)=-310.09930634060794; dx=-2.0664405010758117E-6 evalInputDelta=5.569411290113862
Fitness changed from -304.5298950504941 to -311.8036621883966
Iteration 9 complete. Error: -311.8036621883966 Total: 9.5267; Orientation: 0.9877; Line Search: 6.7784
Adding measurement 7a9c8847 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.704e+04, gradient 2.410e-03, dot -0.278; [3aa3c559-9e5e-4493-8c98-c66e107aa5bd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -311.8036621883966, -182.0020751512865, -155.4549488339009, -155.4549024953332
LBFGS Accumulation History: 3 points
Removed measurement 7a9c8847 to history. Total: 3
th(0)=-311.8036621883966;dx=-5.7951500975978966E-6
New Minimum: -311.8036621883966 > -320.8936423214956
WOLF (strong): th(3619450.2792535652)=-320.8936423214956; dx=8.152889214607828E-7 evalInputDelta=9.089980133099004
END: th(1809725.1396267826)=-319.8466841708569; dx=-2.372369170654349E-6 evalInputDelta=8.043021982460345
Fitness changed from -311.8036621883966 to -320.8936423214956
Iteration 10 complete. Error: -320.8936423214956 Total: 7.4345; Orientation: 1.0015; Line Search: 4.8807
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/e53689e2-04a0-4d49-95ad-1cd4e819a6dc.jpg)
Final threshold in iteration 11: -320.8936423214956 (> -Infinity) after 86.694s (< 5400.000s)

Returns

    -320.8936423214956