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 12.23 seconds (0.643 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: 678323884420500
Reset training subject: 678324102931400
Adding measurement 5c270c8 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-49.95262892700193;dx=-0.08219121245182981
New Minimum: -49.95262892700193 > -50.337137310122486
WOLFE (weak): th(2.154434690031884)=-50.337137310122486; dx=-0.0833986615651454 evalInputDelta=0.38450838312055424
New Minimum: -50.337137310122486 > -50.723404553827514
WOLFE (weak): th(4.308869380063768)=-50.723404553827514; dx=-0.0831980903292523 evalInputDelta=0.7707756268255821
New Minimum: -50.723404553827514 > -52.27571137727348
WOLFE (weak): th(12.926608140191302)=-52.27571137727348; dx=-0.0839009616975528 evalInputDelta=2.3230824502715492
New Minimum: -52.27571137727348 > -59.5475002427159
WOLFE (weak): th(51.70643256076521)=-59.5475002427159; dx=-0.0865171362314043 evalInputDelta=9.594871315713966
New Minimum: -59.5475002427159 > -102.78718818358395
WOLFE (weak): th(258.53216280382605)=-102.78718818358395; dx=-0.08849786931706055 evalInputDelta=52.83455925658202
New Minimum: -102.78718818358395 > -282.0018423033793
END: th(1551.1929768229563)=-282.0018423033793; dx=-0.025267816003322188 evalInputDelta=232.04921337637737
Fitness changed from -49.95262892700193 to -282.0018423033793
Iteration 1 complete. Error: -282.0018423033793 Total: 1.7295; Orientation: 0.0022; Line Search: 1.1787
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/e81f5564-98ba-4bd9-a31a-6e7da7a37a56.jpg)
Adding measurement 5c8ae131 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-282.0018423033793;dx=-0.08860535992918915
New Minimum: -282.0018423033793 > -587.3947778113115
END: th(3341.943960201201)=-587.3947778113115; dx=-3.975659535279442E-4 evalInputDelta=305.39293550793224
Fitness changed from -282.0018423033793 to -587.3947778113115
Iteration 2 complete. Error: -587.3947778113115 Total: 0.5391; Orientation: 0.0022; Line Search: 0.3444
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/66f0965d-7731-478b-aa2a-25e8dc4551b0.jpg)
Adding measurement 74e5ba92 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-587.3947778113115;dx=-0.0957504624866968
New Minimum: -587.3947778113115 > -696.7901854216949
WOLF (strong): th(7200.000000000001)=-696.7901854216949; dx=0.0064112328919540395 evalInputDelta=109.39540761038336
New Minimum: -696.7901854216949 > -781.2170393046993
WOLF (strong): th(3600.0000000000005)=-781.2170393046993; dx=0.006741358994356053 evalInputDelta=193.8222614933877
END: th(1200.0000000000002)=-770.3692702204573; dx=-0.02391586384261894 evalInputDelta=182.9744924091458
Fitness changed from -587.3947778113115 to -781.2170393046993
Iteration 3 complete. Error: -781.2170393046993 Total: 0.8543; Orientation: 0.0022; Line Search: 0.6692
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/dc4000c9-e3cf-4c7c-b489-a86a30739b89.jpg)
Adding measurement a856781 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.038e+03, gradient 2.703e-01, dot -0.406; [d7291875-57ef-4ada-9ff1-5d87556f16f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -781.2170393046993, -587.3947778113115, -282.0018423033793, -49.95262892700193
LBFGS Accumulation History: 3 points
Removed measurement a856781 to history. Total: 3
th(0)=-781.2170393046993;dx=-0.0720020242396237
New Minimum: -781.2170393046993 > -1092.9386419191153
END: th(2585.321628038261)=-1092.9386419191153; dx=-0.01363720522880748 evalInputDelta=311.72160261441604
Fitness changed from -781.2170393046993 to -1092.9386419191153
Iteration 4 complete. Error: -1092.9386419191153 Total: 0.5560; Orientation: 0.0374; Line Search: 0.3307
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/67244b41-e97b-4cc4-9c1f-f49bec9ad6ff.jpg)
Adding measurement 310f2a5b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.421e+03, gradient 2.324e-01, dot -0.421; [d7291875-57ef-4ada-9ff1-5d87556f16f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1092.9386419191153, -587.3947778113115, -282.0018423033793, -49.95262892700193
LBFGS Accumulation History: 3 points
Removed measurement 310f2a5b to history. Total: 3
th(0)=-1092.9386419191153;dx=-0.05360746888349556
New Minimum: -1092.9386419191153 > -1270.7381221164335
WOLF (strong): th(5569.906600335336)=-1270.7381221164335; dx=0.007882489431363118 evalInputDelta=177.7994801973182
New Minimum: -1270.7381221164335 > -1290.5461053368067
END: th(2784.953300167668)=-1290.5461053368067; dx=-0.001954149069036575 evalInputDelta=197.6074634176914
Fitness changed from -1092.9386419191153 to -1290.5461053368067
Iteration 5 complete. Error: -1290.5461053368067 Total: 0.7368; Orientation: 0.0370; Line Search: 0.5204
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/18ee0d01-a5a0-4b31-9786-bff96672a9b8.jpg)
Adding measurement 63537dd0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.617e+03, gradient 2.484e-01, dot -0.426; [d7291875-57ef-4ada-9ff1-5d87556f16f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1290.5461053368067, -587.3947778113115, -282.0018423033793, -49.95262892700193
LBFGS Accumulation History: 3 points
Removed measurement 63537dd0 to history. Total: 3
th(0)=-1290.5461053368067;dx=-0.06116085376899881
New Minimum: -1290.5461053368067 > -1396.8833612725152
WOLF (strong): th(6000.000000000002)=-1396.8833612725152; dx=0.0069149434617084725 evalInputDelta=106.33725593570853
New Minimum: -1396.8833612725152 > -1439.6905483471091
WOLF (strong): th(3000.000000000001)=-1439.6905483471091; dx=0.007728517294083371 evalInputDelta=149.14444301030244
END: th(1000.0000000000003)=-1401.0086991164617; dx=-0.026927070290729167 evalInputDelta=110.46259377965498
Fitness changed from -1290.5461053368067 to -1439.6905483471091
Iteration 6 complete. Error: -1439.6905483471091 Total: 1.2232; Orientation: 0.0366; Line Search: 0.9989
Adding measurement 49054bdc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.317e+03, gradient 2.533e-01, dot -0.406; [d7291875-57ef-4ada-9ff1-5d87556f16f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1439.6905483471091, -587.3947778113115, -282.0018423033793, -49.95262892700193
LBFGS Accumulation History: 3 points
Removed measurement 49054bdc to history. Total: 3
th(0)=-1439.6905483471091;dx=-0.06399731184917958
New Minimum: -1439.6905483471091 > -1633.646534596759
END: th(2154.4346900318847)=-1633.646534596759; dx=-0.007542392851443454 evalInputDelta=193.95598624964987
Fitness changed from -1439.6905483471091 to -1633.646534596759
Iteration 7 complete. Error: -1633.646534596759 Total: 0.5365; Orientation: 0.0373; Line Search: 0.3329
Adding measurement 1ac4bf72 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.668e+03, gradient 2.021e-01, dot -0.507; [d7291875-57ef-4ada-9ff1-5d87556f16f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1633.646534596759, -587.3947778113115, -282.0018423033793, -49.95262892700193
LBFGS Accumulation History: 3 points
Removed measurement 1ac4bf72 to history. Total: 3
th(0)=-1633.646534596759;dx=-0.04054481507360371
New Minimum: -1633.646534596759 > -1814.541057678222
WOLF (strong): th(4641.588833612781)=-1814.541057678222; dx=0.0011672498145747527 evalInputDelta=180.89452308146292
END: th(2320.7944168063905)=-1775.8954079562232; dx=-0.01013996384657732 evalInputDelta=142.24887335946414
Fitness changed from -1633.646534596759 to -1814.541057678222
Iteration 8 complete. Error: -1814.541057678222 Total: 0.7069; Orientation: 0.0369; Line Search: 0.5015
Adding measurement 5dd0b1d1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.434e+03, gradient 2.558e-01, dot -0.394; [d7291875-57ef-4ada-9ff1-5d87556f16f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1814.541057678222, -587.3947778113115, -282.0018423033793, -49.95262892700193
LBFGS Accumulation History: 3 points
Removed measurement 5dd0b1d1 to history. Total: 3
th(0)=-1814.541057678222;dx=-0.06474402739472926
New Minimum: -1814.541057678222 > -1885.569211140233
WOLF (strong): th(5000.000000000003)=-1885.569211140233; dx=0.02043875776853132 evalInputDelta=71.028153462011
New Minimum: -1885.569211140233 > -1990.303745662958
WOLF (strong): th(2500.0000000000014)=-1990.303745662958; dx=7.176809384233228E-4 evalInputDelta=175.76268798473598
END: th(833.3333333333338)=-1921.033380761511; dx=-0.040114315922058955 evalInputDelta=106.49232308328897
Fitness changed from -1814.541057678222 to -1990.303745662958
Iteration 9 complete. Error: -1990.303745662958 Total: 0.8974; Orientation: 0.0384; Line Search: 0.6896
Adding measurement 670d2610 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.122e+03, gradient 2.012e-01, dot -0.470; [d7291875-57ef-4ada-9ff1-5d87556f16f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1990.303745662958, -587.3947778113115, -282.0018423033793, -49.95262892700193
LBFGS Accumulation History: 3 points
Removed measurement 670d2610 to history. Total: 3
th(0)=-1990.303745662958;dx=-0.040119736357475476
New Minimum: -1990.303745662958 > -2109.0664996628248
END: th(1795.3622416932376)=-2109.0664996628248; dx=-0.01282843005147148 evalInputDelta=118.76275399986685
Fitness changed from -1990.303745662958 to -2109.0664996628248
Iteration 10 complete. Error: -2109.0664996628248 Total: 0.5361; Orientation: 0.0376; Line Search: 0.3311
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/8d436bd8-18d2-4b45-ab6e-704b9e0260e6.jpg)
Adding measurement 6dde244e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.657e+03, gradient 1.697e-01, dot -0.570; [d7291875-57ef-4ada-9ff1-5d87556f16f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2109.0664996628248, -587.3947778113115, -282.0018423033793, -49.95262892700193
LBFGS Accumulation History: 3 points
Removed measurement 6dde244e to history. Total: 3
th(0)=-2109.0664996628248;dx=-0.028374967474319966
New Minimum: -2109.0664996628248 > -2255.297430495588
END: th(3867.9906946773185)=-2255.297430495588; dx=-0.006595371630444251 evalInputDelta=146.23093083276308
Fitness changed from -2109.0664996628248 to -2255.297430495588
Iteration 11 complete. Error: -2255.297430495588 Total: 0.5492; Orientation: 0.0379; Line Search: 0.3306
Adding measurement 5f13d4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.401e+03, gradient 2.088e-01, dot -0.465; [d7291875-57ef-4ada-9ff1-5d87556f16f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2255.297430495588, -587.3947778113115, -282.0018423033793, -49.95262892700193
LBFGS Accumulation History: 3 points
Removed measurement 5f13d4 to history. Total: 3
th(0)=-2255.297430495588;dx=-0.04179992259267757
New Minimum: -2255.297430495588 > -2313.624753498285
WOLF (strong): th(8333.33333333334)=-2313.624753498285; dx=0.006848777403792782 evalInputDelta=58.327323002697085
New Minimum: -2313.624753498285 > -2377.2586102483674
WOLF (strong): th(4166.66666666667)=-2377.2586102483674; dx=0.003883083414970379 evalInputDelta=121.96117975277957
END: th(1388.8888888888898)=-2348.1206314838255; dx=-0.015271709427952754 evalInputDelta=92.82320098823766
Fitness changed from -2255.297430495588 to -2377.2586102483674
Iteration 12 complete. Error: -2377.2586102483674 Total: 0.8682; Orientation: 0.0363; Line Search: 0.6693
Adding measurement 3bbf1a7a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.741e+03, gradient 2.308e-01, dot -0.392; [d7291875-57ef-4ada-9ff1-5d87556f16f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2377.2586102483674, -587.3947778113115, -282.0018423033793, -49.95262892700193
LBFGS Accumulation History: 3 points
Removed measurement 3bbf1a7a to history. Total: 3
th(0)=-2377.2586102483674;dx=-0.05295214101175748
New Minimum: -2377.2586102483674 > -2544.192897561032
WOLF (strong): th(2992.270402822063)=-2544.192897561032; dx=0.001652727784798001 evalInputDelta=166.93428731266476
END: th(1496.1352014110314)=-2509.6369259317175; dx=-0.02067566279965908 evalInputDelta=132.37831568335014
Fitness changed from -2377.2586102483674 to -2544.192897561032
Iteration 13 complete. Error: -2544.192897561032 Total: 0.7018; Orientation: 0.0370; Line Search: 0.4979
Adding measurement 1233a715 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.811e+03, gradient 2.020e-01, dot -0.428; [d7291875-57ef-4ada-9ff1-5d87556f16f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2544.192897561032, -587.3947778113115, -282.0018423033793, -49.95262892700193
LBFGS Accumulation History: 3 points
Removed measurement 1233a715 to history. Total: 3
th(0)=-2544.192897561032;dx=-0.03918274122879778
New Minimum: -2544.192897561032 > -2660.929254978418
WOLF (strong): th(3223.3255788977654)=-2660.929254978418; dx=0.0021035519515621532 evalInputDelta=116.73635741738599
END: th(1611.6627894488827)=-2640.345716000085; dx=-0.012193983271402174 evalInputDelta=96.15281843905268
Fitness changed from -2544.192897561032 to -2660.929254978418
Iteration 14 complete. Error: -2660.929254978418 Total: 0.7041; Orientation: 0.0385; Line Search: 0.5042
Adding measurement 2b5b9b2c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.101e+04, gradient 1.998e-01, dot -0.435; [d7291875-57ef-4ada-9ff1-5d87556f16f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2660.929254978418, -587.3947778113115, -282.0018423033793, -49.95262892700193
LBFGS Accumulation History: 3 points
Removed measurement 2b5b9b2c to history. Total: 3
th(0)=-2660.929254978418;dx=-0.03922203642007122
New Minimum: -2660.929254978418 > -2776.551818353117
WOLF (strong): th(3472.222222222225)=-2776.551818353117; dx=0.005517241343387292 evalInputDelta=115.62256337469898
END: th(1736.1111111111125)=-2761.7021019653803; dx=-0.010928138923592463 evalInputDelta=100.77284698696212
Fitness changed from -2660.929254978418 to -2776.551818353117
Iteration 15 complete. Error: -2776.551818353117 Total: 1.0773; Orientation: 0.0374; Line Search: 0.8758
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/900ea5f6-c3d0-4431-8bb1-a30d8509d04e.jpg)
Final threshold in iteration 16: -2776.551818353117 (> -Infinity) after 12.234s (< 5400.000s)

Returns

    -2776.551818353117