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 55.74 seconds (0.706 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: 169173602266200
Reset training subject: 169174473945400
Adding measurement e7f8305 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-5.480300998635434;dx=-0.058798447436624435
New Minimum: -5.480300998635434 > -5.586067080828743
WOLFE (weak): th(2.154434690031884)=-5.586067080828743; dx=-0.05818093718468079 evalInputDelta=0.10576608219330907
New Minimum: -5.586067080828743 > -5.691884792424595
WOLFE (weak): th(4.308869380063768)=-5.691884792424595; dx=-0.061485182122471865 evalInputDelta=0.2115837937891616
New Minimum: -5.691884792424595 > -6.124064471363284
WOLFE (weak): th(12.926608140191302)=-6.124064471363284; dx=-0.06203684466909236 evalInputDelta=0.6437634727278505
New Minimum: -6.124064471363284 > -8.258118767233277
WOLFE (weak): th(51.70643256076521)=-8.258118767233277; dx=-0.06418464999708165 evalInputDelta=2.777817768597844
New Minimum: -8.258118767233277 > -19.851215069765722
END: th(258.53216280382605)=-19.851215069765722; dx=-0.04355538609937136 evalInputDelta=14.370914071130288
Fitness changed from -5.480300998635434 to -19.851215069765722
Iteration 1 complete. Error: -19.851215069765722 Total: 7.6502; Orientation: 0.0164; Line Search: 5.1117
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/5840aa47-52f6-45bd-a00f-a02b4a41ea07.jpg)
Adding measurement 7c3758c4 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-19.851215069765722;dx=-0.06487391088523423
New Minimum: -19.851215069765722 > -57.645156876602606
END: th(556.9906600335335)=-57.645156876602606; dx=-0.02821234343963494 evalInputDelta=37.793941806836884
Fitness changed from -19.851215069765722 to -57.645156876602606
Iteration 2 complete. Error: -57.645156876602606 Total: 2.6170; Orientation: 0.0143; Line Search: 1.6575
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/1cb5e337-1c49-4c10-b6d0-9ff8b65c4f8f.jpg)
Adding measurement 2b5a7207 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-57.645156876602606;dx=-0.08736930039804455
New Minimum: -57.645156876602606 > -124.25087634877067
END: th(1200.0)=-124.25087634877067; dx=-0.004922753553745227 evalInputDelta=66.60571947216806
Fitness changed from -57.645156876602606 to -124.25087634877067
Iteration 3 complete. Error: -124.25087634877067 Total: 2.5313; Orientation: 0.0155; Line Search: 1.6193
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/3ef55521-d426-430e-bc0e-baaab0bbaec4.jpg)
Adding measurement 216a77fe to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.386e+03, gradient 3.343e-01, dot -0.196; [ee7b4b34-cc81-41d4-8917-6182fb3285f1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -124.25087634877067, -57.645156876602606, -19.851215069765722, -5.480300998635434
LBFGS Accumulation History: 3 points
Removed measurement 216a77fe to history. Total: 3
th(0)=-124.25087634877067;dx=-0.10984601547778816
New Minimum: -124.25087634877067 > -144.56764068896953
WOLF (strong): th(2585.3216280382608)=-144.56764068896953; dx=0.004497731076150577 evalInputDelta=20.31676434019886
New Minimum: -144.56764068896953 > -174.1412243428448
WOLF (strong): th(1292.6608140191304)=-174.1412243428448; dx=0.0022261493181389962 evalInputDelta=49.89034799407412
New Minimum: -174.1412243428448 > -176.39304921821608
END: th(430.8869380063768)=-176.39304921821608; dx=-0.04308708311370455 evalInputDelta=52.1421728694454
Fitness changed from -124.25087634877067 to -176.39304921821608
Iteration 4 complete. Error: -176.39304921821608 Total: 4.5996; Orientation: 0.2531; Line Search: 3.4620
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/16d0d2d6-1db2-4f7e-bead-a12089f7200c.jpg)
Adding measurement 34ad4a65 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.522e+03, gradient 2.601e-01, dot -0.223; [ee7b4b34-cc81-41d4-8917-6182fb3285f1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -176.39304921821608, -57.645156876602606, -19.851215069765722, -5.480300998635434
LBFGS Accumulation History: 3 points
Removed measurement 34ad4a65 to history. Total: 3
th(0)=-176.39304921821608;dx=-0.06641479379966797
New Minimum: -176.39304921821608 > -226.911997672005
END: th(928.3177667225559)=-226.911997672005; dx=-0.0189165461172066 evalInputDelta=50.51894845378891
Fitness changed from -176.39304921821608 to -226.911997672005
Iteration 5 complete. Error: -226.911997672005 Total: 2.8486; Orientation: 0.2541; Line Search: 1.6961
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/b27dbdeb-fb85-414b-b2b7-48c679045df7.jpg)
Adding measurement 5bfe6b31 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.711e+03, gradient 2.261e-01, dot -0.245; [ee7b4b34-cc81-41d4-8917-6182fb3285f1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -226.911997672005, -57.645156876602606, -19.851215069765722, -5.480300998635434
LBFGS Accumulation History: 3 points
Removed measurement 5bfe6b31 to history. Total: 3
th(0)=-226.911997672005;dx=-0.04990053320709306
New Minimum: -226.911997672005 > -266.1679304264509
END: th(2000.0000000000005)=-266.1679304264509; dx=-0.0033452270495400553 evalInputDelta=39.255932754445894
Fitness changed from -226.911997672005 to -266.1679304264509
Iteration 6 complete. Error: -266.1679304264509 Total: 2.7702; Orientation: 0.2625; Line Search: 1.6212
Adding measurement 25fabd9f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.050e+03, gradient 2.702e-01, dot -0.200; [ee7b4b34-cc81-41d4-8917-6182fb3285f1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -266.1679304264509, -57.645156876602606, -19.851215069765722, -5.480300998635434
LBFGS Accumulation History: 3 points
Removed measurement 25fabd9f to history. Total: 3
th(0)=-266.1679304264509;dx=-0.07214450876393363
Armijo: th(4308.869380063768)=-254.029018396521; dx=0.004969348131981974 evalInputDelta=-12.138912029929884
New Minimum: -266.1679304264509 > -301.6411749703611
WOLF (strong): th(2154.434690031884)=-301.6411749703611; dx=0.005412968100349104 evalInputDelta=35.4732445439102
New Minimum: -301.6411749703611 > -315.1128642050337
END: th(718.1448966772947)=-315.1128642050337; dx=-0.020932909561728323 evalInputDelta=48.94493377858282
Fitness changed from -266.1679304264509 to -315.1128642050337
Iteration 7 complete. Error: -315.1128642050337 Total: 4.5154; Orientation: 0.2539; Line Search: 3.4613
Adding measurement 2d5d2fd8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.257e+03, gradient 1.956e-01, dot -0.257; [ee7b4b34-cc81-41d4-8917-6182fb3285f1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -315.1128642050337, -57.645156876602606, -19.851215069765722, -5.480300998635434
LBFGS Accumulation History: 3 points
Removed measurement 2d5d2fd8 to history. Total: 3
th(0)=-315.1128642050337;dx=-0.037675856117990125
New Minimum: -315.1128642050337 > -358.19881438245994
END: th(1547.1962778709267)=-358.19881438245994; dx=-0.009687615301384803 evalInputDelta=43.08595017742624
Fitness changed from -315.1128642050337 to -358.19881438245994
Iteration 8 complete. Error: -358.19881438245994 Total: 2.6971; Orientation: 0.2578; Line Search: 1.6555
Adding measurement 4ee07003 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.016e+03, gradient 2.028e-01, dot -0.262; [ee7b4b34-cc81-41d4-8917-6182fb3285f1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -358.19881438245994, -57.645156876602606, -19.851215069765722, -5.480300998635434
LBFGS Accumulation History: 3 points
Removed measurement 4ee07003 to history. Total: 3
th(0)=-358.19881438245994;dx=-0.040497163720605314
New Minimum: -358.19881438245994 > -366.793709051832
WOLF (strong): th(3333.3333333333344)=-366.793709051832; dx=0.0010489356070902728 evalInputDelta=8.594894669372081
New Minimum: -366.793709051832 > -389.6264837956989
END: th(1666.6666666666672)=-389.6264837956989; dx=-0.00442895579210242 evalInputDelta=31.42766941323896
Fitness changed from -358.19881438245994 to -389.6264837956989
Iteration 9 complete. Error: -389.6264837956989 Total: 3.6133; Orientation: 0.2531; Line Search: 2.5424
Adding measurement 4c853953 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.123e+03, gradient 1.923e-01, dot -0.264; [ee7b4b34-cc81-41d4-8917-6182fb3285f1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -389.6264837956989, -57.645156876602606, -19.851215069765722, -5.480300998635434
LBFGS Accumulation History: 3 points
Removed measurement 4c853953 to history. Total: 3
th(0)=-389.6264837956989;dx=-0.0358560974586702
New Minimum: -389.6264837956989 > -396.51781170585514
WOLF (strong): th(3590.7244833864743)=-396.51781170585514; dx=0.004361897259265279 evalInputDelta=6.891327910156235
New Minimum: -396.51781170585514 > -433.74331767186914
END: th(1795.3622416932371)=-433.74331767186914; dx=-0.0027702416329208673 evalInputDelta=44.11683387617023
Fitness changed from -389.6264837956989 to -433.74331767186914
Iteration 10 complete. Error: -433.74331767186914 Total: 3.5846; Orientation: 0.2658; Line Search: 2.5308
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/9d00f8a4-5295-462e-a0af-a1bd4bedba5a.jpg)
Adding measurement 2625d5b7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.291e+03, gradient 1.991e-01, dot -0.270; [ee7b4b34-cc81-41d4-8917-6182fb3285f1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -433.74331767186914, -57.645156876602606, -19.851215069765722, -5.480300998635434
LBFGS Accumulation History: 3 points
Removed measurement 2625d5b7 to history. Total: 3
th(0)=-433.74331767186914;dx=-0.03889493582770923
Armijo: th(3867.9906946773176)=-433.22547535896365; dx=0.002753142627352884 evalInputDelta=-0.5178423129054863
New Minimum: -433.74331767186914 > -468.07444653601846
END: th(1933.9953473386588)=-468.07444653601846; dx=-9.329662074103187E-4 evalInputDelta=34.33112886414932
Fitness changed from -433.74331767186914 to -468.07444653601846
Iteration 11 complete. Error: -468.07444653601846 Total: 3.5969; Orientation: 0.2584; Line Search: 2.4509
Adding measurement 23c851cf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.265e+03, gradient 1.881e-01, dot -0.264; [ee7b4b34-cc81-41d4-8917-6182fb3285f1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -468.07444653601846, -57.645156876602606, -19.851215069765722, -5.480300998635434
LBFGS Accumulation History: 3 points
Removed measurement 23c851cf to history. Total: 3
th(0)=-468.07444653601846;dx=-0.034605297562798606
New Minimum: -468.07444653601846 > -476.7957339102354
WOLF (strong): th(4166.666666666669)=-476.7957339102354; dx=0.004006820036788667 evalInputDelta=8.721287374216956
New Minimum: -476.7957339102354 > -517.3773405358994
END: th(2083.3333333333344)=-517.3773405358994; dx=-0.0030975559065126107 evalInputDelta=49.30289399988095
Fitness changed from -468.07444653601846 to -517.3773405358994
Iteration 12 complete. Error: -517.3773405358994 Total: 3.5642; Orientation: 0.2529; Line Search: 2.5019
Adding measurement 652edcb5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.951e+03, gradient 1.864e-01, dot -0.292; [ee7b4b34-cc81-41d4-8917-6182fb3285f1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -517.3773405358994, -57.645156876602606, -19.851215069765722, -5.480300998635434
LBFGS Accumulation History: 3 points
Removed measurement 652edcb5 to history. Total: 3
th(0)=-517.3773405358994;dx=-0.0342430883233793
New Minimum: -517.3773405358994 > -534.1620482119635
WOLF (strong): th(4488.405604233094)=-534.1620482119635; dx=0.0015339570756923713 evalInputDelta=16.784707676064045
New Minimum: -534.1620482119635 > -564.1696054822521
END: th(2244.202802116547)=-564.1696054822521; dx=-0.0032515105199629624 evalInputDelta=46.7922649463527
Fitness changed from -517.3773405358994 to -564.1696054822521
Iteration 13 complete. Error: -564.1696054822521 Total: 3.7335; Orientation: 0.2400; Line Search: 2.6003
Adding measurement 5b1a025d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.085e+03, gradient 1.892e-01, dot -0.285; [ee7b4b34-cc81-41d4-8917-6182fb3285f1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -564.1696054822521, -57.645156876602606, -19.851215069765722, -5.480300998635434
LBFGS Accumulation History: 3 points
Removed measurement 5b1a025d to history. Total: 3
th(0)=-564.1696054822521;dx=-0.0353122575966931
New Minimum: -564.1696054822521 > -590.6454890626018
WOLF (strong): th(4834.988368346648)=-590.6454890626018; dx=0.0027427863140243127 evalInputDelta=26.47588358034966
New Minimum: -590.6454890626018 > -625.6575790718115
END: th(2417.494184173324)=-625.6575790718115; dx=-0.004332572707080478 evalInputDelta=61.487973589559374
Fitness changed from -564.1696054822521 to -625.6575790718115
Iteration 14 complete. Error: -625.6575790718115 Total: 3.5293; Orientation: 0.2514; Line Search: 2.4696
Adding measurement 5eeffef6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.045e+04, gradient 1.925e-01, dot -0.308; [ee7b4b34-cc81-41d4-8917-6182fb3285f1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -625.6575790718115, -57.645156876602606, -19.851215069765722, -5.480300998635434
LBFGS Accumulation History: 3 points
Removed measurement 5eeffef6 to history. Total: 3
th(0)=-625.6575790718115;dx=-0.036445867144771715
New Minimum: -625.6575790718115 > -656.6616090118258
WOLF (strong): th(5208.333333333337)=-656.6616090118258; dx=0.0010135130452482858 evalInputDelta=31.004029940014334
New Minimum: -656.6616090118258 > -687.0373215844974
END: th(2604.1666666666683)=-687.0373215844974; dx=-0.0046119250166357035 evalInputDelta=61.37974251268588
Fitness changed from -625.6575790718115 to -687.0373215844974
Iteration 15 complete. Error: -687.0373215844974 Total: 3.7900; Orientation: 0.2632; Line Search: 2.7545
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/9a0f4c17-df82-4f52-9110-fb76a7087368.jpg)
Final threshold in iteration 16: -687.0373215844974 (> -Infinity) after 55.737s (< 5400.000s)

Returns

    -687.0373215844974