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 60.18 seconds (1.375 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: 210320182969800
Reset training subject: 210320950679800
Adding measurement 55e94b92 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-29.652295924499043;dx=-0.055543571145073856
New Minimum: -29.652295924499043 > -29.75347449317077
WOLFE (weak): th(2.154434690031884)=-29.75347449317077; dx=-0.05530010263933326 evalInputDelta=0.10117856867172748
New Minimum: -29.75347449317077 > -29.85476442559593
WOLFE (weak): th(4.308869380063768)=-29.85476442559593; dx=-0.05343485095883677 evalInputDelta=0.20246850109688808
New Minimum: -29.85476442559593 > -30.257823250693093
WOLFE (weak): th(12.926608140191302)=-30.257823250693093; dx=-0.05509045291956438 evalInputDelta=0.6055273261940499
New Minimum: -30.257823250693093 > -32.04518553022413
WOLFE (weak): th(51.70643256076521)=-32.04518553022413; dx=-0.05456537247053807 evalInputDelta=2.392889605725088
New Minimum: -32.04518553022413 > -40.89161260018002
END: th(258.53216280382605)=-40.89161260018002; dx=-0.047662159762677306 evalInputDelta=11.239316675680975
Fitness changed from -29.652295924499043 to -40.89161260018002
Iteration 1 complete. Error: -40.89161260018002 Total: 6.7429; Orientation: 0.0155; Line Search: 4.5336
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0db17296-1724-42f5-aeb6-504bf5ee7e95.jpg)
Adding measurement 5673f45a to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-40.89161260018002;dx=-0.04815185987808197
New Minimum: -40.89161260018002 > -58.71915499813896
END: th(556.9906600335335)=-58.71915499813896; dx=-0.03392878293427908 evalInputDelta=17.827542397958943
Fitness changed from -40.89161260018002 to -58.71915499813896
Iteration 2 complete. Error: -58.71915499813896 Total: 2.1927; Orientation: 0.0159; Line Search: 1.4774
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/c70fc415-36c2-4bf2-9ece-129dc1d21571.jpg)
Adding measurement 6e692a8 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-58.71915499813896;dx=-0.040301795975387626
New Minimum: -58.71915499813896 > -87.77655902041977
END: th(1200.0)=-87.77655902041977; dx=-0.027250387299717727 evalInputDelta=29.057404022280807
Fitness changed from -58.71915499813896 to -87.77655902041977
Iteration 3 complete. Error: -87.77655902041977 Total: 2.3034; Orientation: 0.0160; Line Search: 1.5270
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d501b973-9f11-405d-9def-ff95e26671ac.jpg)
Adding measurement 2476d22a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.769e+03, gradient 2.031e-01, dot -0.609; [454a15d6-4f8f-488b-a0d6-ea23ae9eaeee = 1.000/1.000e+00]
Orientation rejected. Popping history element from -87.77655902041977, -58.71915499813896, -40.89161260018002, -29.652295924499043
LBFGS Accumulation History: 3 points
Removed measurement 2476d22a to history. Total: 3
th(0)=-87.77655902041977;dx=-0.040953286175617255
New Minimum: -87.77655902041977 > -143.3913770667426
END: th(2585.3216280382608)=-143.3913770667426; dx=-0.012642929491962968 evalInputDelta=55.614818046322824
Fitness changed from -87.77655902041977 to -143.3913770667426
Iteration 4 complete. Error: -143.3913770667426 Total: 2.5575; Orientation: 0.3299; Line Search: 1.5190
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/e8ad5e95-6e57-4750-a633-504d9a2ca768.jpg)
Adding measurement 47c16b3b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.237e+03, gradient 2.301e-01, dot -0.302; [454a15d6-4f8f-488b-a0d6-ea23ae9eaeee = 1.000/1.000e+00]
Orientation rejected. Popping history element from -143.3913770667426, -58.71915499813896, -40.89161260018002, -29.652295924499043
LBFGS Accumulation History: 3 points
Removed measurement 47c16b3b to history. Total: 3
th(0)=-143.3913770667426;dx=-0.05259506641096635
Armijo: th(5569.9066003353355)=-137.19117077937085; dx=-0.004217867130992358 evalInputDelta=-6.200206287371742
New Minimum: -143.3913770667426 > -155.0417317378763
END: th(2784.9533001676677)=-155.0417317378763; dx=-0.0059378840145151955 evalInputDelta=11.650354671133698
Fitness changed from -143.3913770667426 to -155.0417317378763
Iteration 5 complete. Error: -155.0417317378763 Total: 3.5400; Orientation: 0.3096; Line Search: 2.2700
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/0af5cf6f-4ddd-4025-a389-3f01f3f2b436.jpg)
Adding measurement 3686d4a8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.986e+03, gradient 2.414e-01, dot -0.263; [454a15d6-4f8f-488b-a0d6-ea23ae9eaeee = 1.000/1.000e+00]
Orientation rejected. Popping history element from -155.0417317378763, -58.71915499813896, -40.89161260018002, -29.652295924499043
LBFGS Accumulation History: 3 points
Removed measurement 3686d4a8 to history. Total: 3
th(0)=-155.0417317378763;dx=-0.05832337825927142
New Minimum: -155.0417317378763 > -185.65828441721376
WOLF (strong): th(6000.000000000001)=-185.65828441721376; dx=0.0014618048613373787 evalInputDelta=30.616552679337474
New Minimum: -185.65828441721376 > -235.48815465824865
END: th(3000.0000000000005)=-235.48815465824865; dx=-0.004449438510869165 evalInputDelta=80.44642292037236
Fitness changed from -155.0417317378763 to -235.48815465824865
Iteration 6 complete. Error: -235.48815465824865 Total: 3.3307; Orientation: 0.3002; Line Search: 2.3303
Adding measurement 5878fe to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.147e+03, gradient 2.215e-01, dot -0.193; [454a15d6-4f8f-488b-a0d6-ea23ae9eaeee = 1.000/1.000e+00]
Orientation rejected. Popping history element from -235.48815465824865, -58.71915499813896, -40.89161260018002, -29.652295924499043
LBFGS Accumulation History: 3 points
Removed measurement 5878fe to history. Total: 3
th(0)=-235.48815465824865;dx=-0.048718833657309155
New Minimum: -235.48815465824865 > -244.99239298538146
WOLF (strong): th(6463.304070095653)=-244.99239298538146; dx=0.0022023746196407215 evalInputDelta=9.50423832713281
New Minimum: -244.99239298538146 > -315.5964199739581
END: th(3231.6520350478263)=-315.5964199739581; dx=-0.009059616833330194 evalInputDelta=80.10826531570947
Fitness changed from -235.48815465824865 to -315.5964199739581
Iteration 7 complete. Error: -315.5964199739581 Total: 3.6266; Orientation: 0.3013; Line Search: 2.6410
Adding measurement 383516b3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.437e+03, gradient 2.025e-01, dot -0.263; [454a15d6-4f8f-488b-a0d6-ea23ae9eaeee = 1.000/1.000e+00]
Orientation rejected. Popping history element from -315.5964199739581, -58.71915499813896, -40.89161260018002, -29.652295924499043
LBFGS Accumulation History: 3 points
Removed measurement 383516b3 to history. Total: 3
th(0)=-315.5964199739581;dx=-0.040345655787281345
New Minimum: -315.5964199739581 > -335.74296005911276
WOLF (strong): th(6962.3832504191705)=-335.74296005911276; dx=2.7509100664614434E-4 evalInputDelta=20.14654008515464
New Minimum: -335.74296005911276 > -374.76065003227495
END: th(3481.1916252095853)=-374.76065003227495; dx=-0.008907706002824997 evalInputDelta=59.16423005831683
Fitness changed from -315.5964199739581 to -374.76065003227495
Iteration 8 complete. Error: -374.76065003227495 Total: 3.6412; Orientation: 0.3644; Line Search: 2.4623
Adding measurement 79fe576e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.848e+03, gradient 2.168e-01, dot -0.217; [454a15d6-4f8f-488b-a0d6-ea23ae9eaeee = 1.000/1.000e+00]
Orientation rejected. Popping history element from -374.76065003227495, -58.71915499813896, -40.89161260018002, -29.652295924499043
LBFGS Accumulation History: 3 points
Removed measurement 79fe576e to history. Total: 3
th(0)=-374.76065003227495;dx=-0.04694869467740874
Armijo: th(7500.000000000003)=-366.2289176438311; dx=0.0011748148869480208 evalInputDelta=-8.531732388443857
New Minimum: -374.76065003227495 > -428.92345308175135
END: th(3750.0000000000014)=-428.92345308175135; dx=-0.006330431544589161 evalInputDelta=54.162803049476395
Fitness changed from -374.76065003227495 to -428.92345308175135
Iteration 9 complete. Error: -428.92345308175135 Total: 3.5050; Orientation: 0.3160; Line Search: 2.5131
Adding measurement 2de42dd2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.993e+03, gradient 2.090e-01, dot -0.220; [454a15d6-4f8f-488b-a0d6-ea23ae9eaeee = 1.000/1.000e+00]
Orientation rejected. Popping history element from -428.92345308175135, -58.71915499813896, -40.89161260018002, -29.652295924499043
LBFGS Accumulation History: 3 points
Removed measurement 2de42dd2 to history. Total: 3
th(0)=-428.92345308175135;dx=-0.043500869611296664
New Minimum: -428.92345308175135 > -457.60640366972217
WOLF (strong): th(8079.130087619567)=-457.60640366972217; dx=0.0016637318696758542 evalInputDelta=28.682950587970822
New Minimum: -457.60640366972217 > -512.6075488834048
END: th(4039.5650438097837)=-512.6075488834048; dx=-0.007202415762132926 evalInputDelta=83.68409580165343
Fitness changed from -428.92345308175135 to -512.6075488834048
Iteration 10 complete. Error: -512.6075488834048 Total: 3.4314; Orientation: 0.2914; Line Search: 2.4407
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/064d484d-dca1-41f9-a4ee-336da9f1220d.jpg)
Adding measurement 46ea75b4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.617e+04, gradient 2.175e-01, dot -0.215; [454a15d6-4f8f-488b-a0d6-ea23ae9eaeee = 1.000/1.000e+00]
Orientation rejected. Popping history element from -512.6075488834048, -58.71915499813896, -40.89161260018002, -29.652295924499043
LBFGS Accumulation History: 3 points
Removed measurement 46ea75b4 to history. Total: 3
th(0)=-512.6075488834048;dx=-0.04716846218329395
Armijo: th(8702.979063023964)=-479.08112188789295; dx=0.002700345174008593 evalInputDelta=-33.52642699551183
New Minimum: -512.6075488834048 > -571.295666167363
END: th(4351.489531511982)=-571.295666167363; dx=-0.004926422547494903 evalInputDelta=58.68811728395826
Fitness changed from -512.6075488834048 to -571.295666167363
Iteration 11 complete. Error: -571.295666167363 Total: 3.6039; Orientation: 0.3147; Line Search: 2.5081
Adding measurement 23f269a6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.025e+04, gradient 2.147e-01, dot -0.206; [454a15d6-4f8f-488b-a0d6-ea23ae9eaeee = 1.000/1.000e+00]
Orientation rejected. Popping history element from -571.295666167363, -58.71915499813896, -40.89161260018002, -29.652295924499043
LBFGS Accumulation History: 3 points
Removed measurement 23f269a6 to history. Total: 3
th(0)=-571.295666167363;dx=-0.04595587351614806
New Minimum: -571.295666167363 > -576.4550643518511
WOLF (strong): th(9375.000000000004)=-576.4550643518511; dx=0.00305369582319788 evalInputDelta=5.1593981844880545
New Minimum: -576.4550643518511 > -659.852442916802
END: th(4687.500000000002)=-659.852442916802; dx=-0.006783086042655101 evalInputDelta=88.556776749439
Fitness changed from -571.295666167363 to -659.852442916802
Iteration 12 complete. Error: -659.852442916802 Total: 3.1800; Orientation: 0.2769; Line Search: 2.1686
Adding measurement 3446c0c3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.980e+05, gradient 2.151e-01, dot -0.207; [454a15d6-4f8f-488b-a0d6-ea23ae9eaeee = 1.000/1.000e+00]
Orientation rejected. Popping history element from -659.852442916802, -58.71915499813896, -40.89161260018002, -29.652295924499043
LBFGS Accumulation History: 3 points
Removed measurement 3446c0c3 to history. Total: 3
th(0)=-659.852442916802;dx=-0.04618061485395028
Armijo: th(10098.91260952446)=-618.6850188267188; dx=0.004429607878618359 evalInputDelta=-41.16742409008327
New Minimum: -659.852442916802 > -744.3327306253153
END: th(5049.45630476223)=-744.3327306253153; dx=-0.006256079856288485 evalInputDelta=84.48028770851329
Fitness changed from -659.852442916802 to -744.3327306253153
Iteration 13 complete. Error: -744.3327306253153 Total: 3.2894; Orientation: 0.2939; Line Search: 2.3087
Adding measurement 602aad02 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.039e+04, gradient 2.153e-01, dot 0.250; [454a15d6-4f8f-488b-a0d6-ea23ae9eaeee = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-744.3327306253153;dx=-559.1691936525258
Armijo: th(10878.723828779956)=-76.69811140447291; dx=0.07837052823830093 evalInputDelta=-667.6346192208424
Armijo: th(5439.361914389978)=-82.20177955301278; dx=0.1546256739289456 evalInputDelta=-662.1309510723025
Armijo: th(1813.1206381299926)=-116.25653440827807; dx=0.43288190640262003 evalInputDelta=-628.0761962170372
Armijo: th(453.28015953249815)=-274.7005330795761; dx=1.1397080445388053 evalInputDelta=-469.63219754573925
Armijo: th(90.65603190649963)=-391.2341184344806; dx=3.8171638262115484 evalInputDelta=-353.09861219083473
Armijo: th(15.109338651083272)=-461.2914043724393; dx=17.78853315165387 evalInputDelta=-283.04132625287605
New Minimum: -744.3327306253153 > -773.1888404359657
WOLF (strong): th(2.158476950154753)=-773.1888404359657; dx=40.94051221579354 evalInputDelta=28.856109810650423
New Minimum: -773.1888404359657 > -888.8768237117173
END: th(0.2698096187693441)=-888.8768237117173; dx=-101.64330271825011 evalInputDelta=144.54409308640197
Fitness changed from -744.3327306253153 to -888.8768237117173
Iteration 14 complete. Error: -888.8768237117173 Total: 8.2189; Orientation: 0.2841; Line Search: 7.0300
Adding measurement 71f687c3 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 6.613e+04, gradient 2.344e-01, dot -0.071; [454a15d6-4f8f-488b-a0d6-ea23ae9eaeee = 1.000/1.000e+00]
Orientation rejected. Popping history element from -888.8768237117173, -744.3327306253153, -58.71915499813896, -40.89161260018002, -29.652295924499043
Rejected: LBFGS Orientation magnitude: 9.958e+04, gradient 2.344e-01, dot -0.102; [454a15d6-4f8f-488b-a0d6-ea23ae9eaeee = 1.000/1.000e+00]
Orientation rejected. Popping history element from -888.8768237117173, -744.3327306253153, -58.71915499813896, -40.89161260018002
LBFGS Accumulation History: 3 points
Removed measurement 71f687c3 to history. Total: 4
Removed measurement 602aad02 to history. Total: 3
th(0)=-888.8768237117173;dx=-0.054686235129878524
New Minimum: -888.8768237117173 > -888.912276360978
WOLFE (weak): th(0.5812872023809527)=-888.912276360978; dx=-0.05084058196880548 evalInputDelta=0.03545264926071923
New Minimum: -888.912276360978 > -888.9477621404499
WOLFE (weak): th(1.1625744047619053)=-888.9477621404499; dx=-0.05093107871449806 evalInputDelta=0.07093842873257472
New Minimum: -888.9477621404499 > -889.0893759642162
WOLFE (weak): th(3.487723214285716)=-889.0893759642162; dx=-0.05032142312914978 evalInputDelta=0.212552252498881
New Minimum: -889.0893759642162 > -889.7267062062809
WOLFE (weak): th(13.950892857142865)=-889.7267062062809; dx=-0.05089016539948327 evalInputDelta=0.8498824945636443
New Minimum: -889.7267062062809 > -893.1137074804922
WOLFE (weak): th(69.75446428571432)=-893.1137074804922; dx=-0.050527536273221686 evalInputDelta=4.236883768774874
New Minimum: -893.1137074804922 > -913.5582606630716
END: th(418.5267857142859)=-913.5582606630716; dx=-0.04754782991441725 evalInputDelta=24.68143695135427
Fitness changed from -888.8768237117173 to -913.5582606630716
Iteration 15 complete. Error: -913.5582606630716 Total: 6.9976; Orientation: 0.6392; Line Search: 5.6554
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/acd142b8-e762-4829-8c99-b074a6968412.jpg)
Final threshold in iteration 16: -913.5582606630716 (> -Infinity) after 60.184s (< 5400.000s)

Returns

    -913.5582606630716