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 306.93 seconds (4.312 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: 655864319278200
Reset training subject: 655870451859800
Adding measurement 6464fd96 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-37.65423811595725;dx=-1.8175981782816255E-6
New Minimum: -37.65423811595725 > -37.654242127577184
END: th(2.154434690031884)=-37.654242127577184; dx=-1.5955154484575519E-6 evalInputDelta=4.011619935795352E-6
Fitness changed from -37.65423811595725 to -37.654242127577184
Iteration 1 complete. Error: -37.654242127577184 Total: 30.9722; Orientation: 0.1551; Line Search: 12.4319
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/83a15568-997a-4b2f-8e0a-75208787b434.jpg)
Adding measurement 56027efe to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-37.654242127577184;dx=-1.5933921488332968E-6
New Minimum: -37.654242127577184 > -37.65425015081578
WOLFE (weak): th(4.641588833612779)=-37.65425015081578; dx=-1.592637291806359E-6 evalInputDelta=8.02323859261378E-6
New Minimum: -37.65425015081578 > -37.65426017986161
WOLFE (weak): th(9.283177667225559)=-37.65426017986161; dx=-1.5921802420003819E-6 evalInputDelta=1.805228442464113E-5
New Minimum: -37.65426017986161 > -37.65429227279032
WOLFE (weak): th(27.849533001676676)=-37.65429227279032; dx=-1.590858522819545E-6 evalInputDelta=5.014521313739806E-5
New Minimum: -37.65429227279032 > -37.65444070222982
WOLFE (weak): th(111.3981320067067)=-37.65444070222982; dx=-1.5908955633630976E-6 evalInputDelta=1.9857465263584118E-4
New Minimum: -37.65444070222982 > -37.65523097885439
WOLFE (weak): th(556.9906600335335)=-37.65523097885439; dx=-1.591019420034111E-6 evalInputDelta=9.888512772064928E-4
New Minimum: -37.65523097885439 > -37.66015880181877
WOLFE (weak): th(3341.9439602012008)=-37.66015880181877; dx=-1.5907373583625463E-6 evalInputDelta=0.005916674241582598
New Minimum: -37.66015880181877 > -37.695623316218025
WOLFE (weak): th(23393.607721408407)=-37.695623316218025; dx=-1.588435644668638E-6 evalInputDelta=0.04138118864084106
New Minimum: -37.695623316218025 > -37.983351307981316
WOLFE (weak): th(187148.86177126726)=-37.983351307981316; dx=-1.5691210963375954E-6 evalInputDelta=0.3291091804041315
New Minimum: -37.983351307981316 > -40.42504010123935
END: th(1684339.7559414054)=-40.42504010123935; dx=-1.3567811018774902E-6 evalInputDelta=2.7707979736621624
Fitness changed from -37.654242127577184 to -40.42504010123935
Iteration 2 complete. Error: -40.42504010123935 Total: 69.7638; Orientation: 0.1462; Line Search: 61.9851
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/b869eb2d-b223-4ca7-9d4f-4ab6e7e227b7.jpg)
Adding measurement 12e2c645 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-40.42504010123935;dx=-1.2804361430340156E-6
New Minimum: -40.42504010123935 > -44.679300617905184
END: th(3628800.0000000005)=-44.679300617905184; dx=-8.545473945791726E-7 evalInputDelta=4.254260516665838
Fitness changed from -40.42504010123935 to -44.679300617905184
Iteration 3 complete. Error: -44.679300617905184 Total: 19.3675; Orientation: 0.1398; Line Search: 12.0783
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/6fd8a319-797a-437a-b1b7-9b731d98b13c.jpg)
Adding measurement 7207c6e2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.428e+03, gradient 8.988e-04, dot -0.809; [89ce1e86-1904-4d29-a697-d3740f839eb6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.679300617905184, -40.42504010123935, -37.654242127577184, -37.65423811595725
LBFGS Accumulation History: 3 points
Removed measurement 7207c6e2 to history. Total: 3
th(0)=-44.679300617905184;dx=-8.075409057158691E-7
New Minimum: -44.679300617905184 > -50.09996778807503
END: th(7818012.603187701)=-50.09996778807503; dx=-4.624563481100617E-7 evalInputDelta=5.420667170169843
Fitness changed from -44.679300617905184 to -50.09996778807503
Iteration 4 complete. Error: -50.09996778807503 Total: 23.1588; Orientation: 2.6961; Line Search: 13.1296
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/4738459b-8f4e-442a-bb51-efc90ce388f8.jpg)
Adding measurement 6327c717 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.140e+03, gradient 7.858e-04, dot -0.618; [89ce1e86-1904-4d29-a697-d3740f839eb6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -50.09996778807503, -40.42504010123935, -37.654242127577184, -37.65423811595725
LBFGS Accumulation History: 3 points
Removed measurement 6327c717 to history. Total: 3
th(0)=-50.09996778807503;dx=-6.170389394545565E-7
New Minimum: -50.09996778807503 > -56.30774691173774
END: th(1.6843397559414055E7)=-56.30774691173774; dx=-1.7400891889961636E-7 evalInputDelta=6.207779123662711
Fitness changed from -50.09996778807503 to -56.30774691173774
Iteration 5 complete. Error: -56.30774691173774 Total: 22.2354; Orientation: 2.5585; Line Search: 12.5355
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/2545eada-2e40-4486-b15b-b25857318bcf.jpg)
Adding measurement 59aeed4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.347e+04, gradient 9.512e-04, dot -0.375; [89ce1e86-1904-4d29-a697-d3740f839eb6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -56.30774691173774, -40.42504010123935, -37.654242127577184, -37.65423811595725
LBFGS Accumulation History: 3 points
Removed measurement 59aeed4 to history. Total: 3
th(0)=-56.30774691173774;dx=-9.036280544207252E-7
Armijo: th(3.628800000000001E7)=-55.03875701924491; dx=1.7337905890427449E-7 evalInputDelta=-1.2689898924928258
New Minimum: -56.30774691173774 > -59.503600864806636
WOLF (strong): th(1.8144000000000004E7)=-59.503600864806636; dx=2.1370314249516157E-7 evalInputDelta=3.195853953068898
New Minimum: -59.503600864806636 > -60.43184923208002
END: th(6048000.000000001)=-60.43184923208002; dx=-3.001199401951411E-7 evalInputDelta=4.124102320342281
Fitness changed from -56.30774691173774 to -60.43184923208002
Iteration 6 complete. Error: -60.43184923208002 Total: 35.3892; Orientation: 2.5332; Line Search: 25.7109
Adding measurement 7ae12bf9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.275e+04, gradient 6.970e-04, dot -0.636; [89ce1e86-1904-4d29-a697-d3740f839eb6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -60.43184923208002, -40.42504010123935, -37.654242127577184, -37.65423811595725
LBFGS Accumulation History: 3 points
Removed measurement 7ae12bf9 to history. Total: 3
th(0)=-60.43184923208002;dx=-4.846592651654799E-7
New Minimum: -60.43184923208002 > -64.65022614723772
END: th(1.3030021005312836E7)=-64.65022614723772; dx=-1.6238764377034056E-7 evalInputDelta=4.218376915157698
Fitness changed from -60.43184923208002 to -64.65022614723772
Iteration 7 complete. Error: -64.65022614723772 Total: 20.8098; Orientation: 2.5030; Line Search: 12.3699
Adding measurement 6a3661e2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.983e+04, gradient 8.227e-04, dot -0.496; [89ce1e86-1904-4d29-a697-d3740f839eb6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -64.65022614723772, -40.42504010123935, -37.654242127577184, -37.65423811595725
LBFGS Accumulation History: 3 points
Removed measurement 6a3661e2 to history. Total: 3
th(0)=-64.65022614723772;dx=-6.756161006920525E-7
New Minimum: -64.65022614723772 > -65.44978621982067
WOLF (strong): th(2.8072329265690096E7)=-65.44978621982067; dx=1.383360134024495E-7 evalInputDelta=0.799560072582949
New Minimum: -65.44978621982067 > -67.75567248637535
WOLF (strong): th(1.4036164632845048E7)=-67.75567248637535; dx=9.070418212914168E-8 evalInputDelta=3.105446339137629
END: th(4678721.544281683)=-67.2611346260769; dx=-3.2153271259722735E-7 evalInputDelta=2.6109084788391783
Fitness changed from -64.65022614723772 to -67.75567248637535
Iteration 8 complete. Error: -67.75567248637535 Total: 33.2676; Orientation: 2.6025; Line Search: 24.9475
Adding measurement 2c81b581 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.058e+04, gradient 9.556e-04, dot -0.358; [89ce1e86-1904-4d29-a697-d3740f839eb6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -67.75567248637535, -40.42504010123935, -37.654242127577184, -37.65423811595725
LBFGS Accumulation History: 3 points
Removed measurement 2c81b581 to history. Total: 3
th(0)=-67.75567248637535;dx=-9.126284936205642E-7
New Minimum: -67.75567248637535 > -72.76846394958099
WOLF (strong): th(1.0080000000000004E7)=-72.76846394958099; dx=5.2950777091781414E-8 evalInputDelta=5.0127914632056445
END: th(5040000.000000002)=-71.72868671155618; dx=-4.723360760359264E-7 evalInputDelta=3.973014225180833
Fitness changed from -67.75567248637535 to -72.76846394958099
Iteration 9 complete. Error: -72.76846394958099 Total: 27.6645; Orientation: 2.9279; Line Search: 18.4234
Adding measurement 524842c4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.625e+04, gradient 7.503e-04, dot -0.515; [89ce1e86-1904-4d29-a697-d3740f839eb6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -72.76846394958099, -40.42504010123935, -37.654242127577184, -37.65423811595725
LBFGS Accumulation History: 3 points
Removed measurement 524842c4 to history. Total: 3
th(0)=-72.76846394958099;dx=-5.614022297094451E-7
New Minimum: -72.76846394958099 > -76.00832496903406
END: th(1.0858350837760698E7)=-76.00832496903406; dx=-1.9994867914357067E-8 evalInputDelta=3.2398610194530733
Fitness changed from -72.76846394958099 to -76.00832496903406
Iteration 10 complete. Error: -76.00832496903406 Total: 23.0371; Orientation: 2.9605; Line Search: 13.2953
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/3f11cdfc-4e78-44c5-bd47-4b50dff893ad.jpg)
Final threshold in iteration 11: -76.00832496903406 (> -Infinity) after 306.928s (< 5400.000s)

Returns

    -76.00832496903406