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 138.80 seconds (1.886 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: 114441433985000
Reset training subject: 114444129471200
Adding measurement 1e79ca16 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-16.077946857804424;dx=-1.3882301304863531E-6
New Minimum: -16.077946857804424 > -16.077949487636776
END: th(2.154434690031884)=-16.077949487636776; dx=-1.2249174549954426E-6 evalInputDelta=2.6298323518858524E-6
Fitness changed from -16.077946857804424 to -16.077949487636776
Iteration 1 complete. Error: -16.077949487636776 Total: 15.1424; Orientation: 0.0644; Line Search: 6.8531
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/8b6d369e-c98a-4a6f-b36e-0c0e92b6a673.jpg)
Adding measurement 3847ae82 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-16.077949487636776;dx=-1.22428140995528E-6
New Minimum: -16.077949487636776 > -16.077955404757986
WOLFE (weak): th(4.641588833612779)=-16.077955404757986; dx=-1.2236792484688644E-6 evalInputDelta=5.917121210785581E-6
New Minimum: -16.077955404757986 > -16.077962636792066
WOLFE (weak): th(9.283177667225559)=-16.077962636792066; dx=-1.2241618074877621E-6 evalInputDelta=1.3149155289937653E-5
New Minimum: -16.077962636792066 > -16.07798762015749
WOLFE (weak): th(27.849533001676676)=-16.07798762015749; dx=-1.2231963849385979E-6 evalInputDelta=3.8132520714384555E-5
New Minimum: -16.07798762015749 > -16.078099387369598
WOLFE (weak): th(111.3981320067067)=-16.078099387369598; dx=-1.2226268482189865E-6 evalInputDelta=1.4989973282197866E-4
New Minimum: -16.078099387369598 > -16.078697000043647
WOLFE (weak): th(556.9906600335335)=-16.078697000043647; dx=-1.2236120369496485E-6 evalInputDelta=7.475124068712091E-4
New Minimum: -16.078697000043647 > -16.082427468163385
WOLFE (weak): th(3341.9439602012008)=-16.082427468163385; dx=-1.2221580683743446E-6 evalInputDelta=0.00447798052660886
New Minimum: -16.082427468163385 > -16.109267242667897
WOLFE (weak): th(23393.607721408407)=-16.109267242667897; dx=-1.2213351667909203E-6 evalInputDelta=0.031317755031121663
New Minimum: -16.109267242667897 > -16.327064656308
WOLFE (weak): th(187148.86177126726)=-16.327064656308; dx=-1.2048363955484791E-6 evalInputDelta=0.2491151686712243
New Minimum: -16.327064656308 > -18.101846670552863
END: th(1684339.7559414054)=-18.101846670552863; dx=-9.383973350181253E-7 evalInputDelta=2.0238971829160874
Fitness changed from -16.077949487636776 to -18.101846670552863
Iteration 2 complete. Error: -18.101846670552863 Total: 32.2430; Orientation: 0.0747; Line Search: 28.5128
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/beacb7b3-22e6-42b0-adc0-ea7a9c709219.jpg)
Adding measurement 5c320613 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-18.101846670552863;dx=-9.75000062880178E-7
New Minimum: -18.101846670552863 > -21.140064022433705
END: th(3628800.0000000005)=-21.140064022433705; dx=-5.609501151818052E-7 evalInputDelta=3.038217351880842
Fitness changed from -18.101846670552863 to -21.140064022433705
Iteration 3 complete. Error: -21.140064022433705 Total: 9.3298; Orientation: 0.0792; Line Search: 5.9059
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d28c6057-89e9-476c-8bb4-8bd2411784d6.jpg)
Adding measurement 53f1ee0b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.259e+03, gradient 8.607e-04, dot -0.645; [d179d45b-56d7-48f6-8f1f-6c77272a24f9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -21.140064022433705, -18.101846670552863, -16.077949487636776, -16.077946857804424
LBFGS Accumulation History: 3 points
Removed measurement 53f1ee0b to history. Total: 3
th(0)=-21.140064022433705;dx=-7.390793923386081E-7
New Minimum: -21.140064022433705 > -24.859722146793242
END: th(7818012.603187701)=-24.859722146793242; dx=-2.5263377424636126E-7 evalInputDelta=3.719658124359537
Fitness changed from -21.140064022433705 to -24.859722146793242
Iteration 4 complete. Error: -24.859722146793242 Total: 9.9840; Orientation: 1.2781; Line Search: 5.5005
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/41f380c9-f4d1-4710-bf88-3eea95e5a8ed.jpg)
Adding measurement 54c5865 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.610e+03, gradient 8.573e-04, dot -0.435; [d179d45b-56d7-48f6-8f1f-6c77272a24f9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -24.859722146793242, -18.101846670552863, -16.077949487636776, -16.077946857804424
LBFGS Accumulation History: 3 points
Removed measurement 54c5865 to history. Total: 3
th(0)=-24.859722146793242;dx=-7.348730384564571E-7
New Minimum: -24.859722146793242 > -28.60613848770869
END: th(1.6843397559414055E7)=-28.60613848770869; dx=-5.7818003609108406E-8 evalInputDelta=3.7464163409154487
Fitness changed from -24.859722146793242 to -28.60613848770869
Iteration 5 complete. Error: -28.60613848770869 Total: 10.1992; Orientation: 1.1907; Line Search: 5.5876
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/a549d7d8-8241-45e5-b263-a89f36fe1d5e.jpg)
Adding measurement 79449ef9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.131e+04, gradient 8.493e-04, dot -0.260; [d179d45b-56d7-48f6-8f1f-6c77272a24f9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -28.60613848770869, -18.101846670552863, -16.077949487636776, -16.077946857804424
LBFGS Accumulation History: 3 points
Removed measurement 79449ef9 to history. Total: 3
th(0)=-28.60613848770869;dx=-7.209952189555404E-7
New Minimum: -28.60613848770869 > -32.61434660725788
WOLF (strong): th(3.628800000000001E7)=-32.61434660725788; dx=5.5307262232042146E-8 evalInputDelta=4.008208119549188
New Minimum: -32.61434660725788 > -33.81074741088652
WOLF (strong): th(1.8144000000000004E7)=-33.81074741088652; dx=1.2075209393767663E-8 evalInputDelta=5.20460892317783
END: th(6048000.000000001)=-32.23142190541855; dx=-3.5947509637962607E-7 evalInputDelta=3.625283417709859
Fitness changed from -28.60613848770869 to -33.81074741088652
Iteration 6 complete. Error: -33.81074741088652 Total: 15.4560; Orientation: 1.1767; Line Search: 11.1379
Adding measurement 3bb232ac to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.718e+04, gradient 8.117e-04, dot -0.272; [d179d45b-56d7-48f6-8f1f-6c77272a24f9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -33.81074741088652, -18.101846670552863, -16.077949487636776, -16.077946857804424
LBFGS Accumulation History: 3 points
Removed measurement 3bb232ac to history. Total: 3
th(0)=-33.81074741088652;dx=-6.582203231882387E-7
New Minimum: -33.81074741088652 > -38.68039781595921
END: th(1.3030021005312836E7)=-38.68039781595921; dx=-5.318383958802663E-8 evalInputDelta=4.86965040507269
Fitness changed from -33.81074741088652 to -38.68039781595921
Iteration 7 complete. Error: -38.68039781595921 Total: 9.2567; Orientation: 1.1391; Line Search: 5.5054
Adding measurement 694b9b65 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.768e+04, gradient 6.814e-04, dot -0.385; [d179d45b-56d7-48f6-8f1f-6c77272a24f9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -38.68039781595921, -18.101846670552863, -16.077949487636776, -16.077946857804424
LBFGS Accumulation History: 3 points
Removed measurement 694b9b65 to history. Total: 3
th(0)=-38.68039781595921;dx=-4.6403059042126954E-7
New Minimum: -38.68039781595921 > -41.15341805136862
WOLF (strong): th(2.8072329265690096E7)=-41.15341805136862; dx=6.589790757615908E-8 evalInputDelta=2.4730202354094075
New Minimum: -41.15341805136862 > -41.92112142407498
END: th(1.4036164632845048E7)=-41.92112142407498; dx=-2.1080486535283037E-8 evalInputDelta=3.240723608115772
Fitness changed from -38.68039781595921 to -41.92112142407498
Iteration 8 complete. Error: -41.92112142407498 Total: 11.9871; Orientation: 1.0859; Line Search: 8.1292
Adding measurement 4d87c43d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.552e+04, gradient 6.884e-04, dot -0.388; [d179d45b-56d7-48f6-8f1f-6c77272a24f9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -41.92112142407498, -18.101846670552863, -16.077949487636776, -16.077946857804424
LBFGS Accumulation History: 3 points
Removed measurement 4d87c43d to history. Total: 3
th(0)=-41.92112142407498;dx=-4.737301419044143E-7
New Minimum: -41.92112142407498 > -43.02241274961805
WOLF (strong): th(3.024000000000001E7)=-43.02241274961805; dx=9.100425383061105E-8 evalInputDelta=1.101291325543066
New Minimum: -43.02241274961805 > -44.66159134740231
WOLF (strong): th(1.5120000000000006E7)=-44.66159134740231; dx=4.999446399723684E-8 evalInputDelta=2.740469923327325
END: th(5040000.000000002)=-43.9840567142721; dx=-2.6052631182693384E-7 evalInputDelta=2.0629352901971174
Fitness changed from -41.92112142407498 to -44.66159134740231
Iteration 9 complete. Error: -44.66159134740231 Total: 14.8904; Orientation: 1.1412; Line Search: 10.9546
Adding measurement 4f2ef352 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.816e+04, gradient 7.132e-04, dot -0.348; [d179d45b-56d7-48f6-8f1f-6c77272a24f9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.66159134740231, -18.101846670552863, -16.077949487636776, -16.077946857804424
LBFGS Accumulation History: 3 points
Removed measurement 4f2ef352 to history. Total: 3
th(0)=-44.66159134740231;dx=-5.084971619924973E-7
New Minimum: -44.66159134740231 > -47.81937380869834
END: th(1.0858350837760698E7)=-47.81937380869834; dx=-2.0375265398015307E-8 evalInputDelta=3.15778246129603
Fitness changed from -44.66159134740231 to -47.81937380869834
Iteration 10 complete. Error: -47.81937380869834 Total: 9.7883; Orientation: 1.2442; Line Search: 5.9843
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/c40ca2d4-4628-485a-891b-0c16c04b596d.jpg)
Final threshold in iteration 11: -47.81937380869834 (> -Infinity) after 138.801s (< 5400.000s)

Returns

    -47.81937380869834