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 43.93 seconds (0.769 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: 216317214067400
Reset training subject: 216317840514300
Adding measurement 246b550e to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-72.93674686307821;dx=-0.02838379008777628
New Minimum: -72.93674686307821 > -73.00141792556084
WOLFE (weak): th(2.154434690031884)=-73.00141792556084; dx=-0.028389658746865526 evalInputDelta=0.06467106248263121
New Minimum: -73.00141792556084 > -73.06608170212007
WOLFE (weak): th(4.308869380063768)=-73.06608170212007; dx=-0.028401415408250252 evalInputDelta=0.12933483904186005
New Minimum: -73.06608170212007 > -73.32528362265921
WOLFE (weak): th(12.926608140191302)=-73.32528362265921; dx=-0.02850006855789053 evalInputDelta=0.388536759581001
New Minimum: -73.32528362265921 > -74.5060765112034
WOLFE (weak): th(51.70643256076521)=-74.5060765112034; dx=-0.028699232806297964 evalInputDelta=1.5693296481251906
New Minimum: -74.5060765112034 > -80.98140841718119
WOLFE (weak): th(258.53216280382605)=-80.98140841718119; dx=-0.02843037199705846 evalInputDelta=8.044661554102973
New Minimum: -80.98140841718119 > -110.68405805923844
END: th(1551.1929768229563)=-110.68405805923844; dx=-0.02440586388539666 evalInputDelta=37.747311196160226
Fitness changed from -72.93674686307821 to -110.68405805923844
Iteration 1 complete. Error: -110.68405805923844 Total: 6.1154; Orientation: 0.0159; Line Search: 4.4133
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/c8fb31b7-d464-44b1-866a-fc9586e4da11.jpg)
Adding measurement 44e1157 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-110.68405805923844;dx=-0.055980001614746755
New Minimum: -110.68405805923844 > -189.6992360829485
END: th(3341.943960201201)=-189.6992360829485; dx=-0.02486788342378187 evalInputDelta=79.01517802371005
Fitness changed from -110.68405805923844 to -189.6992360829485
Iteration 2 complete. Error: -189.6992360829485 Total: 2.0350; Orientation: 0.0161; Line Search: 1.2434
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/2e3b72f0-7a83-4bcc-8e65-41b8f96670c2.jpg)
Adding measurement 125e6138 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-189.6992360829485;dx=-0.06802010471742835
New Minimum: -189.6992360829485 > -304.6676566167862
END: th(7200.000000000001)=-304.6676566167862; dx=-0.01633752711452032 evalInputDelta=114.9684205338377
Fitness changed from -189.6992360829485 to -304.6676566167862
Iteration 3 complete. Error: -304.6676566167862 Total: 1.8031; Orientation: 0.0159; Line Search: 1.2187
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/eb68d4f3-8ad3-4790-b621-dd21092c1c39.jpg)
Adding measurement 6e5c2d85 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.212e+04, gradient 2.735e-01, dot -0.152; [dac7e855-f54e-48ea-aa31-cfb1e2406c8f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -304.6676566167862, -189.6992360829485, -110.68405805923844, -72.93674686307821
LBFGS Accumulation History: 3 points
Removed measurement 6e5c2d85 to history. Total: 3
th(0)=-304.6676566167862;dx=-0.07480716727343115
New Minimum: -304.6676566167862 > -411.1030050309227
END: th(15511.929768229566)=-411.1030050309227; dx=-0.0070547438318271215 evalInputDelta=106.43534841413651
Fitness changed from -304.6676566167862 to -411.1030050309227
Iteration 4 complete. Error: -411.1030050309227 Total: 2.1311; Orientation: 0.3022; Line Search: 1.2321
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/0b3c9ad3-8d1b-4faf-b5a4-83976e566693.jpg)
Adding measurement 14786078 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.208e+04, gradient 2.515e-01, dot -0.105; [dac7e855-f54e-48ea-aa31-cfb1e2406c8f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -411.1030050309227, -189.6992360829485, -110.68405805923844, -72.93674686307821
LBFGS Accumulation History: 3 points
Removed measurement 14786078 to history. Total: 3
th(0)=-411.1030050309227;dx=-0.06325660282210194
New Minimum: -411.1030050309227 > -509.7976623421388
END: th(33419.43960201202)=-509.7976623421388; dx=-0.0031463157243012147 evalInputDelta=98.69465731121608
Fitness changed from -411.1030050309227 to -509.7976623421388
Iteration 5 complete. Error: -509.7976623421388 Total: 2.0767; Orientation: 0.2908; Line Search: 1.2177
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/2afa378e-053a-4b8d-9713-a502664ca43c.jpg)
Adding measurement 46fe58e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.522e+04, gradient 2.367e-01, dot -0.094; [dac7e855-f54e-48ea-aa31-cfb1e2406c8f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -509.7976623421388, -189.6992360829485, -110.68405805923844, -72.93674686307821
LBFGS Accumulation History: 3 points
Removed measurement 46fe58e to history. Total: 3
th(0)=-509.7976623421388;dx=-0.05601499897777618
New Minimum: -509.7976623421388 > -582.4456860624817
WOLF (strong): th(72000.00000000003)=-582.4456860624817; dx=7.035685221662441E-6 evalInputDelta=72.64802372034296
New Minimum: -582.4456860624817 > -846.4300816349911
END: th(36000.000000000015)=-846.4300816349911; dx=-0.0062403122893371805 evalInputDelta=336.6324192928523
Fitness changed from -509.7976623421388 to -846.4300816349911
Iteration 6 complete. Error: -846.4300816349911 Total: 2.7130; Orientation: 0.2922; Line Search: 1.8376
Adding measurement 16c09273 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.820e+04, gradient 2.290e-01, dot -0.097; [dac7e855-f54e-48ea-aa31-cfb1e2406c8f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -846.4300816349911, -189.6992360829485, -110.68405805923844, -72.93674686307821
LBFGS Accumulation History: 3 points
Removed measurement 16c09273 to history. Total: 3
th(0)=-846.4300816349911;dx=-0.05245718541247202
Armijo: th(77559.64884114785)=-840.0132418453467; dx=1.6750004267659512E-4 evalInputDelta=-6.416839789644428
New Minimum: -846.4300816349911 > -1173.5870735462183
END: th(38779.824420573925)=-1173.5870735462183; dx=-0.006620369641470916 evalInputDelta=327.15699191122724
Fitness changed from -846.4300816349911 to -1173.5870735462183
Iteration 7 complete. Error: -1173.5870735462183 Total: 2.9344; Orientation: 0.5049; Line Search: 1.8659
Adding measurement 5dba7d63 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.356e+05, gradient 2.339e-01, dot -0.096; [dac7e855-f54e-48ea-aa31-cfb1e2406c8f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1173.5870735462183, -189.6992360829485, -110.68405805923844, -72.93674686307821
LBFGS Accumulation History: 3 points
Removed measurement 5dba7d63 to history. Total: 3
th(0)=-1173.5870735462183;dx=-0.05468237701572394
Armijo: th(83548.59900503006)=-1038.1701226641853; dx=5.689755586588993E-4 evalInputDelta=-135.416950882033
New Minimum: -1173.5870735462183 > -1462.0060597796112
END: th(41774.29950251503)=-1462.0060597796112; dx=-0.006676722041136023 evalInputDelta=288.41898623339284
Fitness changed from -1173.5870735462183 to -1462.0060597796112
Iteration 8 complete. Error: -1462.0060597796112 Total: 2.6872; Orientation: 0.2760; Line Search: 1.8506
Adding measurement 670bbe5a to history. Total: 3
Accepted: LBFGS Orientation magnitude: 3.430e+05, gradient 2.364e-01, dot 0.110; [dac7e855-f54e-48ea-aa31-cfb1e2406c8f = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-1462.0060597796112;dx=-8941.529085434138
Armijo: th(90000.00000000004)=143.48122798022894; dx=0.0067003217774856795 evalInputDelta=-1605.48728775984
Armijo: th(45000.00000000002)=138.36667973623753; dx=0.013304345937947288 evalInputDelta=-1600.3727395158487
Armijo: th(15000.000000000007)=128.74280762211322; dx=0.03915311831207289 evalInputDelta=-1590.7488674017245
Armijo: th(3750.000000000002)=110.62885181850311; dx=0.1517529752043747 evalInputDelta=-1572.6349115981143
Armijo: th(750.0000000000003)=89.45955632253515; dx=0.735840430839384 evalInputDelta=-1551.4656161021462
Armijo: th(125.00000000000006)=52.19437709384147; dx=4.077522187181441 evalInputDelta=-1514.2004368734526
Armijo: th(17.857142857142865)=-29.274927601908644; dx=24.756483306492285 evalInputDelta=-1432.7311321777024
Armijo: th(2.232142857142858)=-233.75183674867048; dx=137.18583369735512 evalInputDelta=-1228.2542230309407
Armijo: th(0.24801587301587313)=-788.0281209332228; dx=594.1987972499668 evalInputDelta=-673.9779388463884
Armijo: th(0.024801587301587314)=-1352.6118480141984; dx=2469.921677049325 evalInputDelta=-109.39421176541282
New Minimum: -1462.0060597796112 > -1463.1049255616072
END: th(0.002254689754689756)=-1463.1049255616072; dx=-411.85785814041117 evalInputDelta=1.0988657819959826
Fitness changed from -1462.0060597796112 to -1463.1049255616072
Iteration 9 complete. Error: -1463.1049255616072 Total: 8.5350; Orientation: 0.2793; Line Search: 7.7075
Adding measurement 7148b3fe to history. Total: 4
Rejected: LBFGS Orientation magnitude: 9.931e+06, gradient 2.365e-01, dot -0.093; [dac7e855-f54e-48ea-aa31-cfb1e2406c8f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1463.1049255616072, -1462.0060597796112, -189.6992360829485, -110.68405805923844, -72.93674686307821
Rejected: LBFGS Orientation magnitude: 1.132e+07, gradient 2.365e-01, dot -0.208; [dac7e855-f54e-48ea-aa31-cfb1e2406c8f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1463.1049255616072, -1462.0060597796112, -189.6992360829485, -110.68405805923844
LBFGS Accumulation History: 3 points
Removed measurement 7148b3fe to history. Total: 4
Removed measurement 670bbe5a to history. Total: 3
th(0)=-1463.1049255616072;dx=-0.055903840649877905
New Minimum: -1463.1049255616072 > -1463.10500854129
END: th(0.004857581822763088)=-1463.10500854129; dx=-0.04394228223763806 evalInputDelta=8.297968292936275E-5
Fitness changed from -1463.1049255616072 to -1463.10500854129
Iteration 10 complete. Error: -1463.10500854129 Total: 2.3590; Orientation: 0.6203; Line Search: 1.2050
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/beee599e-2aca-4a59-be9d-3c379a844998.jpg)
Adding measurement 301aa608 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.286e+07, gradient 2.365e-01, dot -0.094; [dac7e855-f54e-48ea-aa31-cfb1e2406c8f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1463.10500854129, -189.6992360829485, -110.68405805923844, -72.93674686307821
LBFGS Accumulation History: 3 points
Removed measurement 301aa608 to history. Total: 3
th(0)=-1463.10500854129;dx=-0.05587668801714068
New Minimum: -1463.10500854129 > -1463.1054186712652
END: th(0.010465342788629107)=-1463.1054186712652; dx=-0.04402939999140782 evalInputDelta=4.1012997508005355E-4
Fitness changed from -1463.10500854129 to -1463.1054186712652
Iteration 11 complete. Error: -1463.1054186712652 Total: 2.1258; Orientation: 0.2872; Line Search: 1.2445
Adding measurement 3dcc0b29 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.578e+07, gradient 2.365e-01, dot -0.094; [dac7e855-f54e-48ea-aa31-cfb1e2406c8f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1463.1054186712652, -189.6992360829485, -110.68405805923844, -72.93674686307821
LBFGS Accumulation History: 3 points
Removed measurement 3dcc0b29 to history. Total: 3
th(0)=-1463.1054186712652;dx=-0.05590173002032281
New Minimum: -1463.1054186712652 > -1463.1059995287583
END: th(0.02254689754689756)=-1463.1059995287583; dx=-0.043889565363871105 evalInputDelta=5.808574931052135E-4
Fitness changed from -1463.1054186712652 to -1463.1059995287583
Iteration 12 complete. Error: -1463.1059995287583 Total: 2.0418; Orientation: 0.2847; Line Search: 1.2148
Adding measurement 24b7d49a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.790e+07, gradient 2.365e-01, dot -0.094; [dac7e855-f54e-48ea-aa31-cfb1e2406c8f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1463.1059995287583, -189.6992360829485, -110.68405805923844, -72.93674686307821
LBFGS Accumulation History: 3 points
Removed measurement 24b7d49a to history. Total: 3
th(0)=-1463.1059995287583;dx=-0.05587969224582328
New Minimum: -1463.1059995287583 > -1463.1074006449946
END: th(0.04857581822763089)=-1463.1074006449946; dx=-0.04401647709096514 evalInputDelta=0.0014011162363658514
Fitness changed from -1463.1059995287583 to -1463.1074006449946
Iteration 13 complete. Error: -1463.1074006449946 Total: 2.2885; Orientation: 0.2846; Line Search: 1.4728
Adding measurement 487ddd04 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.311e+07, gradient 2.365e-01, dot -0.094; [dac7e855-f54e-48ea-aa31-cfb1e2406c8f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1463.1074006449946, -189.6992360829485, -110.68405805923844, -72.93674686307821
LBFGS Accumulation History: 3 points
Removed measurement 487ddd04 to history. Total: 3
th(0)=-1463.1074006449946;dx=-0.05591021479557953
New Minimum: -1463.1074006449946 > -1463.1102953896382
END: th(0.10465342788629109)=-1463.1102953896382; dx=-0.044036252368825315 evalInputDelta=0.002894744643526792
Fitness changed from -1463.1074006449946 to -1463.1102953896382
Iteration 14 complete. Error: -1463.1102953896382 Total: 2.0043; Orientation: 0.2739; Line Search: 1.1835
Adding measurement 40bc4105 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.360e+07, gradient 2.365e-01, dot -0.094; [dac7e855-f54e-48ea-aa31-cfb1e2406c8f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1463.1102953896382, -189.6992360829485, -110.68405805923844, -72.93674686307821
LBFGS Accumulation History: 3 points
Removed measurement 40bc4105 to history. Total: 3
th(0)=-1463.1102953896382;dx=-0.055906185130029054
New Minimum: -1463.1102953896382 > -1463.1166561787495
END: th(0.22546897546897565)=-1463.1166561787495; dx=-0.044033335572143256 evalInputDelta=0.006360789111340637
Fitness changed from -1463.1102953896382 to -1463.1166561787495
Iteration 15 complete. Error: -1463.1166561787495 Total: 2.0529; Orientation: 0.2843; Line Search: 1.1951
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/654c491d-0d1f-42a7-9bc5-68d22a819193.jpg)
Final threshold in iteration 16: -1463.1166561787495 (> -Infinity) after 43.925s (< 5400.000s)

Returns

    -1463.1166561787495