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 61.42 seconds (1.282 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: 145677702028800
Reset training subject: 145678632155600
Adding measurement 43b0f2f2 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-14.587200124448254;dx=-0.02206953569026152
New Minimum: -14.587200124448254 > -14.638245933804866
WOLFE (weak): th(2.154434690031884)=-14.638245933804866; dx=-0.022106122225164268 evalInputDelta=0.05104580935661218
New Minimum: -14.638245933804866 > -14.689577645604723
WOLFE (weak): th(4.308869380063768)=-14.689577645604723; dx=-0.022222306503968545 evalInputDelta=0.1023775211564697
New Minimum: -14.689577645604723 > -14.898406774352166
WOLFE (weak): th(12.926608140191302)=-14.898406774352166; dx=-0.022794267999430025 evalInputDelta=0.31120664990391234
New Minimum: -14.898406774352166 > -15.909085423852545
WOLFE (weak): th(51.70643256076521)=-15.909085423852545; dx=-0.02539927838635561 evalInputDelta=1.3218852994042916
New Minimum: -15.909085423852545 > -22.17566324336666
WOLFE (weak): th(258.53216280382605)=-22.17566324336666; dx=-0.02890650773684506 evalInputDelta=7.588463118918407
New Minimum: -22.17566324336666 > -54.43699321664221
END: th(1551.1929768229563)=-54.43699321664221; dx=-0.011530149671863095 evalInputDelta=39.849793092193956
Fitness changed from -14.587200124448254 to -54.43699321664221
Iteration 1 complete. Error: -54.43699321664221 Total: 9.5105; Orientation: 0.0177; Line Search: 6.1418
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/f92d9077-1a5d-43e0-9b7c-4e795ac026c9.jpg)
Adding measurement 22786f94 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-54.43699321664221;dx=-0.056602069865763986
New Minimum: -54.43699321664221 > -102.76051592324991
END: th(3341.943960201201)=-102.76051592324991; dx=-3.5526653774599435E-4 evalInputDelta=48.323522706607704
Fitness changed from -54.43699321664221 to -102.76051592324991
Iteration 2 complete. Error: -102.76051592324991 Total: 2.6902; Orientation: 0.0156; Line Search: 1.7414
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/09d131a9-80a5-4cd0-a3b7-7286674ca11e.jpg)
Adding measurement 68088a43 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-102.76051592324991;dx=-0.08131044781916433
Armijo: th(7200.000000000001)=-102.37317325140654; dx=0.0021294700412793723 evalInputDelta=-0.38734267184337057
New Minimum: -102.76051592324991 > -143.56970350887056
WOLF (strong): th(3600.0000000000005)=-143.56970350887056; dx=0.00433516938859746 evalInputDelta=40.80918758562065
New Minimum: -143.56970350887056 > -156.31453042463775
END: th(1200.0000000000002)=-156.31453042463775; dx=-0.019536592163658106 evalInputDelta=53.55401450138784
Fitness changed from -102.76051592324991 to -156.31453042463775
Iteration 3 complete. Error: -156.31453042463775 Total: 4.6824; Orientation: 0.0168; Line Search: 3.6547
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/a8d55cc8-8bf0-4416-b9b6-8987a46a6b89.jpg)
Adding measurement 1570819b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.122e+03, gradient 2.642e-01, dot -0.174; [461dc685-afda-4950-8d6a-e596040f9d30 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -156.31453042463775, -102.76051592324991, -54.43699321664221, -14.587200124448254
LBFGS Accumulation History: 3 points
Removed measurement 1570819b to history. Total: 3
th(0)=-156.31453042463775;dx=-0.06986257563521156
New Minimum: -156.31453042463775 > -176.91284378720218
WOLF (strong): th(2585.321628038261)=-176.91284378720218; dx=0.005813481622438693 evalInputDelta=20.598313362564426
New Minimum: -176.91284378720218 > -191.435612543748
WOLF (strong): th(1292.6608140191306)=-191.435612543748; dx=4.8434612295553863E-4 evalInputDelta=35.12108211911024
END: th(430.88693800637685)=-185.25840272778453; dx=-0.03286760537106913 evalInputDelta=28.943872303146776
Fitness changed from -156.31453042463775 to -191.435612543748
Iteration 4 complete. Error: -191.435612543748 Total: 4.7100; Orientation: 0.2875; Line Search: 3.4807
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/6205b90e-c194-493a-814c-a9a8f38470ab.jpg)
Adding measurement e8a3a1c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.000e+02, gradient 2.760e-01, dot -0.177; [461dc685-afda-4950-8d6a-e596040f9d30 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -191.435612543748, -102.76051592324991, -54.43699321664221, -14.587200124448254
LBFGS Accumulation History: 3 points
Removed measurement e8a3a1c to history. Total: 3
th(0)=-191.435612543748;dx=-0.07586959943703539
New Minimum: -191.435612543748 > -233.0168650012269
END: th(928.317766722556)=-233.0168650012269; dx=-0.005520168610379864 evalInputDelta=41.58125245747891
Fitness changed from -191.435612543748 to -233.0168650012269
Iteration 5 complete. Error: -233.0168650012269 Total: 3.2212; Orientation: 0.4497; Line Search: 1.8229
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/1a551d25-ca99-45c0-8628-9d677a2c1c36.jpg)
Adding measurement 17cc8f93 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.227e+03, gradient 2.352e-01, dot -0.248; [461dc685-afda-4950-8d6a-e596040f9d30 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -233.0168650012269, -102.76051592324991, -54.43699321664221, -14.587200124448254
LBFGS Accumulation History: 3 points
Removed measurement 17cc8f93 to history. Total: 3
th(0)=-233.0168650012269;dx=-0.05531492217868877
New Minimum: -233.0168650012269 > -251.39519281153727
WOLF (strong): th(2000.0000000000007)=-251.39519281153727; dx=0.0061950604732276 evalInputDelta=18.378327810310367
New Minimum: -251.39519281153727 > -261.49341232141967
END: th(1000.0000000000003)=-261.49341232141967; dx=-0.0055587350309558355 evalInputDelta=28.476547320192765
Fitness changed from -233.0168650012269 to -261.49341232141967
Iteration 6 complete. Error: -261.49341232141967 Total: 3.7669; Orientation: 0.2685; Line Search: 2.5968
Adding measurement 468e294f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.109e+03, gradient 1.953e-01, dot -0.222; [461dc685-afda-4950-8d6a-e596040f9d30 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -261.49341232141967, -102.76051592324991, -54.43699321664221, -14.587200124448254
LBFGS Accumulation History: 3 points
Removed measurement 468e294f to history. Total: 3
th(0)=-261.49341232141967;dx=-0.03794296734360676
New Minimum: -261.49341232141967 > -270.283300446032
WOLF (strong): th(2154.4346900318847)=-270.283300446032; dx=0.010119532696396719 evalInputDelta=8.789888124612332
New Minimum: -270.283300446032 > -290.58326313210125
END: th(1077.2173450159423)=-290.58326313210125; dx=-0.007143082666884596 evalInputDelta=29.089850810681583
Fitness changed from -261.49341232141967 to -290.58326313210125
Iteration 7 complete. Error: -290.58326313210125 Total: 3.9971; Orientation: 0.2646; Line Search: 2.9338
Adding measurement 4e0d7a51 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.867e+03, gradient 1.856e-01, dot -0.297; [461dc685-afda-4950-8d6a-e596040f9d30 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -290.58326313210125, -102.76051592324991, -54.43699321664221, -14.587200124448254
LBFGS Accumulation History: 3 points
Removed measurement 4e0d7a51 to history. Total: 3
th(0)=-290.58326313210125;dx=-0.034399355160721394
New Minimum: -290.58326313210125 > -308.4362525304054
END: th(2320.7944168063905)=-308.4362525304054; dx=-0.0011392058459546303 evalInputDelta=17.852989398304146
Fitness changed from -290.58326313210125 to -308.4362525304054
Iteration 8 complete. Error: -308.4362525304054 Total: 2.9979; Orientation: 0.2708; Line Search: 1.7123
Adding measurement 3ce435ec to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.037e+03, gradient 2.190e-01, dot -0.248; [461dc685-afda-4950-8d6a-e596040f9d30 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -308.4362525304054, -102.76051592324991, -54.43699321664221, -14.587200124448254
LBFGS Accumulation History: 3 points
Removed measurement 3ce435ec to history. Total: 3
th(0)=-308.4362525304054;dx=-0.047615912899129906
Armijo: th(5000.000000000003)=-259.8852811819092; dx=2.5009283045817997E-4 evalInputDelta=-48.550971348496205
New Minimum: -308.4362525304054 > -314.8771089647515
WOLF (strong): th(2500.0000000000014)=-314.8771089647515; dx=0.017215610915076375 evalInputDelta=6.440856434346131
New Minimum: -314.8771089647515 > -348.13817300031894
END: th(833.3333333333338)=-348.13817300031894; dx=-0.022933008044798562 evalInputDelta=39.701920469913546
Fitness changed from -308.4362525304054 to -348.13817300031894
Iteration 9 complete. Error: -348.13817300031894 Total: 4.6544; Orientation: 0.2786; Line Search: 3.5551
Adding measurement 44774fc0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.985e+03, gradient 1.620e-01, dot -0.296; [461dc685-afda-4950-8d6a-e596040f9d30 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -348.13817300031894, -102.76051592324991, -54.43699321664221, -14.587200124448254
LBFGS Accumulation History: 3 points
Removed measurement 44774fc0 to history. Total: 3
th(0)=-348.13817300031894;dx=-0.02606120864375181
New Minimum: -348.13817300031894 > -379.0657306127791
END: th(1795.3622416932376)=-379.0657306127791; dx=-0.009374215108187495 evalInputDelta=30.927557612460134
Fitness changed from -348.13817300031894 to -379.0657306127791
Iteration 10 complete. Error: -379.0657306127791 Total: 2.9753; Orientation: 0.3102; Line Search: 1.8258
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/6d9616ab-7bc8-40bb-95cc-359e2dc547f5.jpg)
Adding measurement 570323d4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.834e+03, gradient 1.734e-01, dot -0.298; [461dc685-afda-4950-8d6a-e596040f9d30 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -379.0657306127791, -102.76051592324991, -54.43699321664221, -14.587200124448254
LBFGS Accumulation History: 3 points
Removed measurement 570323d4 to history. Total: 3
th(0)=-379.0657306127791;dx=-0.02987176273388098
New Minimum: -379.0657306127791 > -394.94176785951623
END: th(3867.9906946773185)=-394.94176785951623; dx=-0.003928560909051821 evalInputDelta=15.876037246737155
Fitness changed from -379.0657306127791 to -394.94176785951623
Iteration 11 complete. Error: -394.94176785951623 Total: 3.1461; Orientation: 0.2984; Line Search: 1.7697
Adding measurement dfdae4d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.859e+03, gradient 1.955e-01, dot -0.224; [461dc685-afda-4950-8d6a-e596040f9d30 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -394.94176785951623, -102.76051592324991, -54.43699321664221, -14.587200124448254
LBFGS Accumulation History: 3 points
Removed measurement dfdae4d to history. Total: 3
th(0)=-394.94176785951623;dx=-0.03807809801321915
Armijo: th(8333.33333333334)=-345.7417750287055; dx=0.002302808207428132 evalInputDelta=-49.19999283081074
New Minimum: -394.94176785951623 > -412.5020643887737
WOLF (strong): th(4166.66666666667)=-412.5020643887737; dx=0.006821756328222039 evalInputDelta=17.56029652925747
New Minimum: -412.5020643887737 > -442.83087911752494
END: th(1388.8888888888898)=-442.83087911752494; dx=-0.01474419131600625 evalInputDelta=47.88911125800871
Fitness changed from -394.94176785951623 to -442.83087911752494
Iteration 12 complete. Error: -442.83087911752494 Total: 4.6479; Orientation: 0.2902; Line Search: 3.5326
Adding measurement 78f28a49 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.743e+03, gradient 1.609e-01, dot -0.292; [461dc685-afda-4950-8d6a-e596040f9d30 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -442.83087911752494, -102.76051592324991, -54.43699321664221, -14.587200124448254
LBFGS Accumulation History: 3 points
Removed measurement 78f28a49 to history. Total: 3
th(0)=-442.83087911752494;dx=-0.025863093399041873
New Minimum: -442.83087911752494 > -487.92138839161373
END: th(2992.270402822063)=-487.92138839161373; dx=-0.003787726735801243 evalInputDelta=45.09050927408879
Fitness changed from -442.83087911752494 to -487.92138839161373
Iteration 13 complete. Error: -487.92138839161373 Total: 2.9010; Orientation: 0.2670; Line Search: 1.7810
Adding measurement 559b1b0e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.924e+04, gradient 2.076e-01, dot -0.313; [461dc685-afda-4950-8d6a-e596040f9d30 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -487.92138839161373, -102.76051592324991, -54.43699321664221, -14.587200124448254
LBFGS Accumulation History: 3 points
Removed measurement 559b1b0e to history. Total: 3
th(0)=-487.92138839161373;dx=-0.04299743197534951
Armijo: th(6446.651157795531)=-435.6489053699091; dx=0.007385569426501051 evalInputDelta=-52.27248302170466
New Minimum: -487.92138839161373 > -498.4646740241479
WOLF (strong): th(3223.3255788977654)=-498.4646740241479; dx=0.007217408114170831 evalInputDelta=10.54328563253415
New Minimum: -498.4646740241479 > -523.1306899332135
END: th(1074.4418596325884)=-523.1306899332135; dx=-0.010141972814892902 evalInputDelta=35.20930154159976
Fitness changed from -487.92138839161373 to -523.1306899332135
Iteration 14 complete. Error: -523.1306899332135 Total: 4.6121; Orientation: 0.2545; Line Search: 3.4326
Adding measurement 38e7a31e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.388e+04, gradient 1.480e-01, dot -0.326; [461dc685-afda-4950-8d6a-e596040f9d30 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -523.1306899332135, -102.76051592324991, -54.43699321664221, -14.587200124448254
LBFGS Accumulation History: 3 points
Removed measurement 38e7a31e to history. Total: 3
th(0)=-523.1306899332135;dx=-0.021834549235016328
New Minimum: -523.1306899332135 > -557.1463003556606
END: th(2314.814814814816)=-557.1463003556606; dx=-0.006969160505091583 evalInputDelta=34.01561042244714
Fitness changed from -523.1306899332135 to -557.1463003556606
Iteration 15 complete. Error: -557.1463003556606 Total: 2.8000; Orientation: 0.2740; Line Search: 1.6981
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/96d43396-01e4-4dd9-ba9d-ce489ab8b65e.jpg)
Final threshold in iteration 16: -557.1463003556606 (> -Infinity) after 61.416s (< 5400.000s)

Returns

    -557.1463003556606