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 301.39 seconds (7.495 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: 587506365705500
Reset training subject: 587512431233600
Adding measurement 39075f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-37.89679374111085;dx=-2.0289061441891323E-6
New Minimum: -37.89679374111085 > -37.89679573408283
END: th(2.154434690031884)=-37.89679573408283; dx=-1.7823435855859491E-6 evalInputDelta=1.9929719812239455E-6
Fitness changed from -37.89679374111085 to -37.89679573408283
Iteration 1 complete. Error: -37.89679573408283 Total: 30.7207; Orientation: 0.1489; Line Search: 12.4845
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/5fb29966-6965-428d-997e-25f4cee60952.jpg)
Adding measurement 59c07e3c to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-37.89679573408283;dx=-1.7820020186372421E-6
New Minimum: -37.89679573408283 > -37.89680569894118
WOLFE (weak): th(4.641588833612779)=-37.89680569894118; dx=-1.780596537157469E-6 evalInputDelta=9.964858350031136E-6
New Minimum: -37.89680569894118 > -37.8968156637969
WOLFE (weak): th(9.283177667225559)=-37.8968156637969; dx=-1.7789782282998974E-6 evalInputDelta=1.992971407105415E-5
New Minimum: -37.8968156637969 > -37.89685153725581
WOLFE (weak): th(27.849533001676676)=-37.89685153725581; dx=-1.778018040330397E-6 evalInputDelta=5.5803172983814875E-5
New Minimum: -37.89685153725581 > -37.89701695332149
WOLFE (weak): th(111.3981320067067)=-37.89701695332149; dx=-1.777340832001011E-6 evalInputDelta=2.2121923866080806E-4
New Minimum: -37.89701695332149 > -37.89788985987854
WOLFE (weak): th(556.9906600335335)=-37.89788985987854; dx=-1.7778642895658293E-6 evalInputDelta=0.0010941257957099992
New Minimum: -37.89788985987854 > -37.903354037227544
WOLFE (weak): th(3341.9439602012008)=-37.903354037227544; dx=-1.7769328436175485E-6 evalInputDelta=0.006558303144714728
New Minimum: -37.903354037227544 > -37.94267208852192
WOLFE (weak): th(23393.607721408407)=-37.94267208852192; dx=-1.7744037321046252E-6 evalInputDelta=0.04587635443908766
New Minimum: -37.94267208852192 > -38.26161898672218
WOLFE (weak): th(187148.86177126726)=-38.26161898672218; dx=-1.7533176071573252E-6 evalInputDelta=0.3648232526393542
New Minimum: -38.26161898672218 > -40.97197026526345
END: th(1684339.7559414054)=-40.97197026526345; dx=-1.5199578952571275E-6 evalInputDelta=3.075174531180622
Fitness changed from -37.89679573408283 to -40.97197026526345
Iteration 2 complete. Error: -40.97197026526345 Total: 68.8419; Orientation: 0.1414; Line Search: 61.5327
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/5cfca789-c46b-4147-9995-4c18edd94872.jpg)
Adding measurement af2986b to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-40.97197026526345;dx=-1.4519359363470105E-6
New Minimum: -40.97197026526345 > -45.77311639548907
END: th(3628800.0000000005)=-45.77311639548907; dx=-9.783151269521796E-7 evalInputDelta=4.801146130225618
Fitness changed from -40.97197026526345 to -45.77311639548907
Iteration 3 complete. Error: -45.77311639548907 Total: 19.2910; Orientation: 0.1335; Line Search: 12.0918
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/0d1eb846-b47d-4bd4-884b-f1c6ba8321b4.jpg)
Adding measurement 390d0669 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.077e+04, gradient 9.691e-04, dot -0.814; [c7ded81a-75a7-4d70-9b09-c1749e783fae = 1.000/1.000e+00]
Orientation rejected. Popping history element from -45.77311639548907, -40.97197026526345, -37.89679573408283, -37.89679374111085
LBFGS Accumulation History: 3 points
Removed measurement 390d0669 to history. Total: 3
th(0)=-45.77311639548907;dx=-9.389039890687563E-7
New Minimum: -45.77311639548907 > -51.89383417474962
END: th(7818012.603187701)=-51.89383417474962; dx=-5.133282515908665E-7 evalInputDelta=6.120717779260552
Fitness changed from -45.77311639548907 to -51.89383417474962
Iteration 4 complete. Error: -51.89383417474962 Total: 22.0754; Orientation: 2.6113; Line Search: 12.0290
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/82cb1d7f-fee7-4905-b608-29e1840edba8.jpg)
Adding measurement 192a7077 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.805e+03, gradient 8.402e-04, dot -0.603; [c7ded81a-75a7-4d70-9b09-c1749e783fae = 1.000/1.000e+00]
Orientation rejected. Popping history element from -51.89383417474962, -40.97197026526345, -37.89679573408283, -37.89679374111085
LBFGS Accumulation History: 3 points
Removed measurement 192a7077 to history. Total: 3
th(0)=-51.89383417474962;dx=-7.049949423973579E-7
New Minimum: -51.89383417474962 > -58.29137656587835
END: th(1.6843397559414055E7)=-58.29137656587835; dx=-1.5393068798929627E-7 evalInputDelta=6.397542391128731
Fitness changed from -51.89383417474962 to -58.29137656587835
Iteration 5 complete. Error: -58.29137656587835 Total: 21.6894; Orientation: 2.4843; Line Search: 12.0646
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/dded4aa1-aed5-4da4-a283-1d28f38113e6.jpg)
Adding measurement 489960fc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.189e+04, gradient 9.992e-04, dot -0.338; [c7ded81a-75a7-4d70-9b09-c1749e783fae = 1.000/1.000e+00]
Orientation rejected. Popping history element from -58.29137656587835, -40.97197026526345, -37.89679573408283, -37.89679374111085
LBFGS Accumulation History: 3 points
Removed measurement 489960fc to history. Total: 3
th(0)=-58.29137656587835;dx=-9.970609720973074E-7
Armijo: th(3.628800000000001E7)=-56.12750026763055; dx=2.2186203978635843E-7 evalInputDelta=-2.1638762982478
New Minimum: -58.29137656587835 > -61.70289876355034
WOLF (strong): th(1.8144000000000004E7)=-61.70289876355034; dx=2.5146729260297045E-7 evalInputDelta=3.411522197671985
New Minimum: -61.70289876355034 > -62.852399474904566
END: th(6048000.000000001)=-62.852399474904566; dx=-3.428856507408669E-7 evalInputDelta=4.561022909026214
Fitness changed from -58.29137656587835 to -62.852399474904566
Iteration 6 complete. Error: -62.852399474904566 Total: 34.4256; Orientation: 2.3873; Line Search: 24.9481
Adding measurement 7dbddf25 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.052e+04, gradient 7.110e-04, dot -0.620; [c7ded81a-75a7-4d70-9b09-c1749e783fae = 1.000/1.000e+00]
Orientation rejected. Popping history element from -62.852399474904566, -40.97197026526345, -37.89679573408283, -37.89679374111085
LBFGS Accumulation History: 3 points
Removed measurement 7dbddf25 to history. Total: 3
th(0)=-62.852399474904566;dx=-5.052141791890476E-7
New Minimum: -62.852399474904566 > -67.15858321611118
END: th(1.3030021005312836E7)=-67.15858321611118; dx=-1.6655454836027334E-7 evalInputDelta=4.306183741206617
Fitness changed from -62.852399474904566 to -67.15858321611118
Iteration 7 complete. Error: -67.15858321611118 Total: 20.7955; Orientation: 2.4159; Line Search: 12.5383
Adding measurement 79b42026 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.624e+04, gradient 8.217e-04, dot -0.495; [c7ded81a-75a7-4d70-9b09-c1749e783fae = 1.000/1.000e+00]
Orientation rejected. Popping history element from -67.15858321611118, -40.97197026526345, -37.89679573408283, -37.89679374111085
LBFGS Accumulation History: 3 points
Removed measurement 79b42026 to history. Total: 3
th(0)=-67.15858321611118;dx=-6.751670892175329E-7
New Minimum: -67.15858321611118 > -68.08527235900107
WOLF (strong): th(2.8072329265690096E7)=-68.08527235900107; dx=1.4563794398987534E-7 evalInputDelta=0.9266891428898845
New Minimum: -68.08527235900107 > -70.34164022076621
WOLF (strong): th(1.4036164632845048E7)=-70.34164022076621; dx=6.881010049337141E-8 evalInputDelta=3.1830570046550264
END: th(4678721.544281683)=-69.73792934294859; dx=-3.227602058308137E-7 evalInputDelta=2.5793461268374074
Fitness changed from -67.15858321611118 to -70.34164022076621
Iteration 8 complete. Error: -70.34164022076621 Total: 33.6511; Orientation: 2.6027; Line Search: 25.0255
Adding measurement 6d757a32 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.799e+04, gradient 9.380e-04, dot -0.375; [c7ded81a-75a7-4d70-9b09-c1749e783fae = 1.000/1.000e+00]
Orientation rejected. Popping history element from -70.34164022076621, -40.97197026526345, -37.89679573408283, -37.89679374111085
LBFGS Accumulation History: 3 points
Removed measurement 6d757a32 to history. Total: 3
th(0)=-70.34164022076621;dx=-8.788682648941569E-7
New Minimum: -70.34164022076621 > -75.26072682597949
WOLF (strong): th(1.0080000000000004E7)=-75.26072682597949; dx=2.059363427728856E-8 evalInputDelta=4.9190866052132804
END: th(5040000.000000002)=-74.1600749543846; dx=-4.6399503549460696E-7 evalInputDelta=3.818434733618389
Fitness changed from -70.34164022076621 to -75.26072682597949
Iteration 9 complete. Error: -75.26072682597949 Total: 28.6139; Orientation: 2.4025; Line Search: 18.8103
Adding measurement 6f399060 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.964e+04, gradient 7.387e-04, dot -0.525; [c7ded81a-75a7-4d70-9b09-c1749e783fae = 1.000/1.000e+00]
Orientation rejected. Popping history element from -75.26072682597949, -40.97197026526345, -37.89679573408283, -37.89679374111085
LBFGS Accumulation History: 3 points
Removed measurement 6f399060 to history. Total: 3
th(0)=-75.26072682597949;dx=-5.448114558716297E-7
New Minimum: -75.26072682597949 > -78.44369268647236
END: th(1.0858350837760698E7)=-78.44369268647236; dx=-4.114711310027147E-8 evalInputDelta=3.182965860492871
Fitness changed from -75.26072682597949 to -78.44369268647236
Iteration 10 complete. Error: -78.44369268647236 Total: 20.1259; Orientation: 2.4333; Line Search: 12.0303
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f9e6af3d-ad35-43f4-a63d-cf20ea5f42c5.jpg)
Final threshold in iteration 11: -78.44369268647236 (> -Infinity) after 301.391s (< 5400.000s)

Returns

    -78.44369268647236