Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Iteration 15 Iteration 15

BasicOptimizer.scala:89 executed in 1709.49 seconds (208.484 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: 452116910536300
Reset training subject: 452143066195900
Adding measurement 37ed9673 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-33.817231177415366;dx=-3.6395391254058084E-6
New Minimum: -33.817231177415366 > -33.8172414467996
WOLFE (weak): th(2.154434690031884)=-33.8172414467996; dx=-3.5047921377278423E-6 evalInputDelta=1.026938423365209E-5
New Minimum: -33.8172414467996 > -33.81725479699443
WOLFE (weak): th(4.308869380063768)=-33.81725479699443; dx=-3.5117602511262557E-6 evalInputDelta=2.3619579067712948E-5
New Minimum: -33.81725479699443 > -33.817301009166634
WOLFE (weak): th(12.926608140191302)=-33.817301009166634; dx=-3.5021966531501134E-6 evalInputDelta=6.983175126862307E-5
New Minimum: -33.817301009166634 > -33.81751050355525
WOLFE (weak): th(51.70643256076521)=-33.81751050355525; dx=-3.5065807742278133E-6 evalInputDelta=2.7932613988213006E-4
New Minimum: -33.81751050355525 > -33.818629838836024
WOLFE (weak): th(258.53216280382605)=-33.818629838836024; dx=-3.5118829168718015E-6 evalInputDelta=0.0013986614206586978
New Minimum: -33.818629838836024 > -33.82561919838537
WOLFE (weak): th(1551.1929768229563)=-33.82561919838537; dx=-3.512170958066969E-6 evalInputDelta=0.008388020970002685
New Minimum: -33.82561919838537 > -33.87594881508142
WOLFE (weak): th(10858.350837760694)=-33.87594881508142; dx=-3.5115527408087988E-6 evalInputDelta=0.05871763766605653
New Minimum: -33.87594881508142 > -34.28695020392861
WOLFE (weak): th(86866.80670208555)=-34.28695020392861; dx=-3.511960727260087E-6 evalInputDelta=0.46971902651324626
New Minimum: -34.28695020392861 > -37.99265224438968
WOLFE (weak): th(781801.26031877)=-37.99265224438968; dx=-3.4097628180598212E-6 evalInputDelta=4.175421066974316
New Minimum: -37.99265224438968 > -65.03839394176659
END: th(7818012.6031877)=-65.03839394176659; dx=-1.5611564776139364E-6 evalInputDelta=31.22116276435122
Fitness changed from -33.817231177415366 to -65.03839394176659
Iteration 1 complete. Error: -65.03839394176659 Total: 340.9492; Orientation: 0.1047; Line Search: 266.5984
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/d3c1d694-c88f-4827-b0b5-a5c43d7dd154.jpg)
Adding measurement 4e479221 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-65.03839394176659;dx=-3.184499684198374E-6
New Minimum: -65.03839394176659 > -103.46769672804218
END: th(1.684339755941405E7)=-103.46769672804218; dx=-4.1884353315432185E-7 evalInputDelta=38.4293027862756
Fitness changed from -65.03839394176659 to -103.46769672804218
Iteration 2 complete. Error: -103.46769672804218 Total: 73.2520; Orientation: 0.1139; Line Search: 47.2086
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/efd2e9ad-c95a-4d2c-b2df-df5e42f66931.jpg)
Adding measurement 76f52eda to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-103.46769672804218;dx=-2.8860396113103476E-6
New Minimum: -103.46769672804218 > -125.73386800554862
WOLF (strong): th(3.6288E7)=-125.73386800554862; dx=3.7057941422764335E-7 evalInputDelta=22.26617127750643
New Minimum: -125.73386800554862 > -134.23303287789804
WOLF (strong): th(1.8144E7)=-134.23303287789804; dx=2.689155915924776E-8 evalInputDelta=30.765336149855855
END: th(6048000.0)=-123.99205800830498; dx=-1.4448235715867355E-6 evalInputDelta=20.524361280262795
Fitness changed from -103.46769672804218 to -134.23303287789804
Iteration 3 complete. Error: -134.23303287789804 Total: 126.6130; Orientation: 0.1078; Line Search: 102.8142
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/4b55c093-74fe-478e-98a6-6a83f585a05d.jpg)
Adding measurement 742850c6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.118e+04, gradient 1.591e-03, dot -0.402; [eb8d9121-ced9-4d1f-ad99-9a1d0749fb73 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -134.23303287789804, -103.46769672804218, -65.03839394176659, -33.817231177415366
LBFGS Accumulation History: 3 points
Removed measurement 742850c6 to history. Total: 3
th(0)=-134.23303287789804;dx=-2.526338235285796E-6
New Minimum: -134.23303287789804 > -160.8557786791435
END: th(1.3030021005312834E7)=-160.8557786791435; dx=-2.171881639704081E-7 evalInputDelta=26.622745801245458
Fitness changed from -134.23303287789804 to -160.8557786791435
Iteration 4 complete. Error: -160.8557786791435 Total: 75.7553; Orientation: 2.0627; Line Search: 49.0276
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/76fd30ec-712c-460b-9da3-604f254f76c1.jpg)
Adding measurement 4b8c4c74 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.009e+04, gradient 1.254e-03, dot -0.436; [eb8d9121-ced9-4d1f-ad99-9a1d0749fb73 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -160.8557786791435, -103.46769672804218, -65.03839394176659, -33.817231177415366
LBFGS Accumulation History: 3 points
Removed measurement 4b8c4c74 to history. Total: 3
th(0)=-160.8557786791435;dx=-1.5672047094774706E-6
New Minimum: -160.8557786791435 > -175.40592220092893
WOLF (strong): th(2.8072329265690092E7)=-175.40592220092893; dx=2.901519498272733E-7 evalInputDelta=14.55014352178543
New Minimum: -175.40592220092893 > -178.64878092117206
END: th(1.4036164632845046E7)=-178.64878092117206; dx=-1.7359620734829097E-7 evalInputDelta=17.793002242028564
Fitness changed from -160.8557786791435 to -178.64878092117206
Iteration 5 complete. Error: -178.64878092117206 Total: 100.4337; Orientation: 2.1050; Line Search: 73.9926
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/452c65bd-8835-4965-95c7-7ee67e11edd4.jpg)
Adding measurement 723f84e0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.767e+04, gradient 1.185e-03, dot -0.435; [eb8d9121-ced9-4d1f-ad99-9a1d0749fb73 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -178.64878092117206, -103.46769672804218, -65.03839394176659, -33.817231177415366
LBFGS Accumulation History: 3 points
Removed measurement 723f84e0 to history. Total: 3
th(0)=-178.64878092117206;dx=-1.394437730513749E-6
New Minimum: -178.64878092117206 > -186.6405813547196
WOLF (strong): th(3.0240000000000007E7)=-186.6405813547196; dx=3.597686510352466E-7 evalInputDelta=7.991800433547525
New Minimum: -186.6405813547196 > -193.2043519137882
WOLF (strong): th(1.5120000000000004E7)=-193.2043519137882; dx=2.7637689901187824E-9 evalInputDelta=14.55557099261614
END: th(5040000.000000001)=-187.7061413255045; dx=-8.093424787815055E-7 evalInputDelta=9.057360404332428
Fitness changed from -178.64878092117206 to -193.2043519137882
Iteration 6 complete. Error: -193.2043519137882 Total: 125.3134; Orientation: 2.0072; Line Search: 97.1747
Adding measurement 6edcee8f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.138e+04, gradient 1.177e-03, dot -0.405; [eb8d9121-ced9-4d1f-ad99-9a1d0749fb73 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -193.2043519137882, -103.46769672804218, -65.03839394176659, -33.817231177415366
LBFGS Accumulation History: 3 points
Removed measurement 6edcee8f to history. Total: 3
th(0)=-193.2043519137882;dx=-1.3803970500955983E-6
New Minimum: -193.2043519137882 > -206.43945439079502
END: th(1.0858350837760696E7)=-206.43945439079502; dx=-1.7345892438325055E-7 evalInputDelta=13.23510247700682
Fitness changed from -193.2043519137882 to -206.43945439079502
Iteration 7 complete. Error: -206.43945439079502 Total: 72.3176; Orientation: 2.0098; Line Search: 47.1720
Adding measurement 52b9de82 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.492e+04, gradient 9.363e-04, dot -0.472; [eb8d9121-ced9-4d1f-ad99-9a1d0749fb73 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -206.43945439079502, -103.46769672804218, -65.03839394176659, -33.817231177415366
LBFGS Accumulation History: 3 points
Removed measurement 52b9de82 to history. Total: 3
th(0)=-206.43945439079502;dx=-8.738601554314676E-7
New Minimum: -206.43945439079502 > -216.68840271806903
WOLF (strong): th(2.339360772140841E7)=-216.68840271806903; dx=7.723237210425477E-8 evalInputDelta=10.248948327274007
END: th(1.1696803860704206E7)=-216.20891446630492; dx=-2.196415173674733E-7 evalInputDelta=9.769460075509897
Fitness changed from -206.43945439079502 to -216.68840271806903
Iteration 8 complete. Error: -216.68840271806903 Total: 100.3679; Orientation: 2.1557; Line Search: 72.7382
Adding measurement 47b349f5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.281e+04, gradient 1.234e-03, dot -0.339; [eb8d9121-ced9-4d1f-ad99-9a1d0749fb73 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -216.68840271806903, -103.46769672804218, -65.03839394176659, -33.817231177415366
LBFGS Accumulation History: 3 points
Removed measurement 47b349f5 to history. Total: 3
th(0)=-216.68840271806903;dx=-1.5191645104788315E-6
New Minimum: -216.68840271806903 > -221.3963214344089
WOLF (strong): th(2.5200000000000007E7)=-221.3963214344089; dx=6.297878194315725E-7 evalInputDelta=4.7079187163398615
New Minimum: -221.3963214344089 > -231.2674653749218
WOLF (strong): th(1.2600000000000004E7)=-231.2674653749218; dx=5.65112778130525E-8 evalInputDelta=14.579062656852784
END: th(4200000.000000001)=-225.504657209953; dx=-9.702023102763101E-7 evalInputDelta=8.816254491883967
Fitness changed from -216.68840271806903 to -231.2674653749218
Iteration 9 complete. Error: -231.2674653749218 Total: 128.0484; Orientation: 2.0802; Line Search: 101.5524
Adding measurement 3fa9d32d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.369e+04, gradient 9.008e-04, dot -0.415; [eb8d9121-ced9-4d1f-ad99-9a1d0749fb73 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -231.2674653749218, -103.46769672804218, -65.03839394176659, -33.817231177415366
LBFGS Accumulation History: 3 points
Removed measurement 3fa9d32d to history. Total: 3
th(0)=-231.2674653749218;dx=-8.080283596454371E-7
New Minimum: -231.2674653749218 > -238.97782322930217
END: th(9048625.698133914)=-238.97782322930217; dx=-2.5653788782565215E-7 evalInputDelta=7.710357854380362
Fitness changed from -231.2674653749218 to -238.97782322930217
Iteration 10 complete. Error: -238.97782322930217 Total: 74.7892; Orientation: 2.0706; Line Search: 48.5299
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/d65eb771-412e-4302-a70e-11803e8896aa.jpg)
Adding measurement 6035defa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.565e+04, gradient 7.208e-04, dot -0.489; [eb8d9121-ced9-4d1f-ad99-9a1d0749fb73 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -238.97782322930217, -103.46769672804218, -65.03839394176659, -33.817231177415366
LBFGS Accumulation History: 3 points
Removed measurement 6035defa to history. Total: 3
th(0)=-238.97782322930217;dx=-5.163613473995228E-7
New Minimum: -238.97782322930217 > -247.480088547375
END: th(1.9494673101173677E7)=-247.480088547375; dx=-1.1100157750499783E-7 evalInputDelta=8.50226531807283
Fitness changed from -238.97782322930217 to -247.480088547375
Iteration 11 complete. Error: -247.480088547375 Total: 76.0234; Orientation: 2.3212; Line Search: 49.0109
Adding measurement fdc0a43 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.765e+04, gradient 8.820e-04, dot -0.393; [eb8d9121-ced9-4d1f-ad99-9a1d0749fb73 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -247.480088547375, -103.46769672804218, -65.03839394176659, -33.817231177415366
LBFGS Accumulation History: 3 points
Removed measurement fdc0a43 to history. Total: 3
th(0)=-247.480088547375;dx=-7.757061353822543E-7
Armijo: th(4.2000000000000015E7)=-239.8925131336581; dx=3.699871209431316E-7 evalInputDelta=-7.587575413716905
New Minimum: -247.480088547375 > -252.47654025401633
WOLF (strong): th(2.1000000000000007E7)=-252.47654025401633; dx=1.9934872090794974E-7 evalInputDelta=4.996451706641324
New Minimum: -252.47654025401633 > -253.54149954828893
END: th(7000000.000000003)=-253.54149954828893; dx=-2.7633386531111963E-7 evalInputDelta=6.061411000913921
Fitness changed from -247.480088547375 to -253.54149954828893
Iteration 12 complete. Error: -253.54149954828893 Total: 120.8630; Orientation: 2.0909; Line Search: 96.0269
Adding measurement 15e2bbf0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.542e+04, gradient 6.422e-04, dot -0.497; [eb8d9121-ced9-4d1f-ad99-9a1d0749fb73 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -253.54149954828893, -103.46769672804218, -65.03839394176659, -33.817231177415366
LBFGS Accumulation History: 3 points
Removed measurement 15e2bbf0 to history. Total: 3
th(0)=-253.54149954828893;dx=-4.1234906973557206E-7
New Minimum: -253.54149954828893 > -259.81311054973946
END: th(1.5081042830223193E7)=-259.81311054973946; dx=-1.603648322797195E-7 evalInputDelta=6.2716110014505375
Fitness changed from -253.54149954828893 to -259.81311054973946
Iteration 13 complete. Error: -259.81311054973946 Total: 74.9949; Orientation: 1.9508; Line Search: 49.4726
Adding measurement 48d3a501 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.776e+04, gradient 7.254e-04, dot -0.435; [eb8d9121-ced9-4d1f-ad99-9a1d0749fb73 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -259.81311054973946, -103.46769672804218, -65.03839394176659, -33.817231177415366
LBFGS Accumulation History: 3 points
Removed measurement 48d3a501 to history. Total: 3
th(0)=-259.81311054973946;dx=-5.23233825500889E-7
New Minimum: -259.81311054973946 > -261.9973204041622
WOLF (strong): th(3.249112183528947E7)=-261.9973204041622; dx=1.4129438531764992E-7 evalInputDelta=2.184209854422761
New Minimum: -261.9973204041622 > -264.94076773027376
END: th(1.6245560917644735E7)=-264.94076773027376; dx=-4.553179182529034E-9 evalInputDelta=5.1276571805343
Fitness changed from -259.81311054973946 to -264.94076773027376
Iteration 14 complete. Error: -264.94076773027376 Total: 96.9325; Orientation: 1.9621; Line Search: 69.2529
Adding measurement 2a893f09 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.798e+04, gradient 8.153e-04, dot -0.379; [eb8d9121-ced9-4d1f-ad99-9a1d0749fb73 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -264.94076773027376, -103.46769672804218, -65.03839394176659, -33.817231177415366
LBFGS Accumulation History: 3 points
Removed measurement 2a893f09 to history. Total: 3
th(0)=-264.94076773027376;dx=-6.625841569908881E-7
Armijo: th(3.500000000000002E7)=-260.7293217438045; dx=3.4602436265652583E-7 evalInputDelta=-4.2114459864692435
New Minimum: -264.94076773027376 > -270.08067263669255
WOLF (strong): th(1.750000000000001E7)=-270.08067263669255; dx=1.5140794697275645E-7 evalInputDelta=5.139904906418792
END: th(5833333.333333337)=-269.7229746518014; dx=-3.1587248421927004E-7 evalInputDelta=4.7822069215276315
Fitness changed from -264.94076773027376 to -270.08067263669255
Iteration 15 complete. Error: -270.08067263669255 Total: 122.1307; Orientation: 1.9507; Line Search: 97.3770
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/a73eb114-b9cd-4393-ad24-c0dff5293d6b.jpg)
Final threshold in iteration 16: -270.08067263669255 (> -Infinity) after 1709.492s (< 5400.000s)

Returns

    -270.08067263669255