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 65.33 seconds (0.790 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: 153723083025700
Reset training subject: 153723999241700
Adding measurement 7c7df9b3 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-79.65775844101;dx=-0.002802401790616277
New Minimum: -79.65775844101 > -79.66539749406564
WOLFE (weak): th(2.154434690031884)=-79.66539749406564; dx=-0.002683336394445423 evalInputDelta=0.007639053055640943
New Minimum: -79.66539749406564 > -79.67303581468866
WOLFE (weak): th(4.308869380063768)=-79.67303581468866; dx=-0.002682935822087836 evalInputDelta=0.015277373678657113
New Minimum: -79.67303581468866 > -79.70360714260069
WOLFE (weak): th(12.926608140191302)=-79.70360714260069; dx=-0.00268679317464705 evalInputDelta=0.04584870159068544
New Minimum: -79.70360714260069 > -79.84125355857934
WOLFE (weak): th(51.70643256076521)=-79.84125355857934; dx=-0.0026673556043900213 evalInputDelta=0.18349511756933623
New Minimum: -79.84125355857934 > -80.57534585317856
WOLFE (weak): th(258.53216280382605)=-80.57534585317856; dx=-0.002679779186668997 evalInputDelta=0.9175874121685581
New Minimum: -80.57534585317856 > -85.20550968140772
WOLFE (weak): th(1551.1929768229563)=-85.20550968140772; dx=-0.002676229283221738 evalInputDelta=5.547751240397716
New Minimum: -85.20550968140772 > -115.86873789019131
END: th(10858.350837760694)=-115.86873789019131; dx=-0.0022023644371484434 evalInputDelta=36.21097944918131
Fitness changed from -79.65775844101 to -115.86873789019131
Iteration 1 complete. Error: -115.86873789019131 Total: 9.7312; Orientation: 0.0148; Line Search: 7.1210
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/4f395c85-3c5b-4ead-b8fc-17cdcf54708a.jpg)
Adding measurement 321d5a17 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-115.86873789019131;dx=-0.002829635582303244
New Minimum: -115.86873789019131 > -183.05479626352255
END: th(23393.607721408407)=-183.05479626352255; dx=-0.0017043074476550167 evalInputDelta=67.18605837333124
Fitness changed from -115.86873789019131 to -183.05479626352255
Iteration 2 complete. Error: -183.05479626352255 Total: 2.6189; Orientation: 0.0156; Line Search: 1.6887
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/03462bfe-d788-445b-8b79-a894289c1210.jpg)
Adding measurement 2c870962 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-183.05479626352255;dx=-0.0024886038130878816
New Minimum: -183.05479626352255 > -287.8206051051274
END: th(50400.00000000001)=-287.8206051051274; dx=-0.001116350946950098 evalInputDelta=104.76580884160487
Fitness changed from -183.05479626352255 to -287.8206051051274
Iteration 3 complete. Error: -287.8206051051274 Total: 2.6357; Orientation: 0.0144; Line Search: 1.6956
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/811da34e-eefb-4b61-b509-95833d8d5d58.jpg)
Adding measurement 6f33c4e0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.066e+04, gradient 5.055e-02, dot -0.429; [3a268b9c-f3c8-43c3-8b2e-337a760ff14f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -287.8206051051274, -183.05479626352255, -115.86873789019131, -79.65775844101
LBFGS Accumulation History: 3 points
Removed measurement 6f33c4e0 to history. Total: 3
th(0)=-287.8206051051274;dx=-0.0025369938040645888
New Minimum: -287.8206051051274 > -428.4947033026662
END: th(108583.50837760697)=-428.4947033026662; dx=-5.017012489190191E-4 evalInputDelta=140.6740981975388
Fitness changed from -287.8206051051274 to -428.4947033026662
Iteration 4 complete. Error: -428.4947033026662 Total: 2.9866; Orientation: 0.2811; Line Search: 1.7513
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/a4ab1882-8a0c-4d92-b48f-5adedd9caeff.jpg)
Adding measurement 3b9b8f0a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.938e+04, gradient 5.738e-02, dot -0.266; [3a268b9c-f3c8-43c3-8b2e-337a760ff14f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -428.4947033026662, -183.05479626352255, -115.86873789019131, -79.65775844101
LBFGS Accumulation History: 3 points
Removed measurement 3b9b8f0a to history. Total: 3
th(0)=-428.4947033026662;dx=-0.0032805733016901036
New Minimum: -428.4947033026662 > -506.7497112087104
WOLF (strong): th(233936.07721408413)=-506.7497112087104; dx=6.335284168702547E-5 evalInputDelta=78.25500790604417
New Minimum: -506.7497112087104 > -547.4295058920359
END: th(116968.03860704206)=-547.4295058920359; dx=-2.796822984802828E-4 evalInputDelta=118.93480258936967
Fitness changed from -428.4947033026662 to -547.4295058920359
Iteration 5 complete. Error: -547.4295058920359 Total: 3.9790; Orientation: 0.2750; Line Search: 2.5621
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/d25512ab-ee92-4c47-a560-260cb96c0e72.jpg)
Adding measurement 75871d3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.808e+04, gradient 5.813e-02, dot -0.254; [3a268b9c-f3c8-43c3-8b2e-337a760ff14f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -547.4295058920359, -183.05479626352255, -115.86873789019131, -79.65775844101
LBFGS Accumulation History: 3 points
Removed measurement 75871d3 to history. Total: 3
th(0)=-547.4295058920359;dx=-0.00335465171671216
New Minimum: -547.4295058920359 > -602.7671611391155
WOLF (strong): th(252000.0000000001)=-602.7671611391155; dx=2.455334464764778E-4 evalInputDelta=55.337655247079624
New Minimum: -602.7671611391155 > -682.9065088100856
END: th(126000.00000000004)=-682.9065088100856; dx=-1.151393800980552E-4 evalInputDelta=135.47700291804972
Fitness changed from -547.4295058920359 to -682.9065088100856
Iteration 6 complete. Error: -682.9065088100856 Total: 3.8380; Orientation: 0.2872; Line Search: 2.6026
Adding measurement 45b07b9b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.032e+04, gradient 5.762e-02, dot -0.268; [3a268b9c-f3c8-43c3-8b2e-337a760ff14f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -682.9065088100856, -183.05479626352255, -115.86873789019131, -79.65775844101
LBFGS Accumulation History: 3 points
Removed measurement 45b07b9b to history. Total: 3
th(0)=-682.9065088100856;dx=-0.003314844453477104
New Minimum: -682.9065088100856 > -693.2669629679189
WOLF (strong): th(271458.77094401745)=-693.2669629679189; dx=3.2927928515626224E-4 evalInputDelta=10.36045415783326
New Minimum: -693.2669629679189 > -793.8378603194959
WOLF (strong): th(135729.38547200873)=-793.8378603194959; dx=2.808856741588131E-5 evalInputDelta=110.93135150941032
END: th(45243.12849066957)=-787.6972604498591; dx=-0.0012142026098803166 evalInputDelta=104.79075163977348
Fitness changed from -682.9065088100856 to -793.8378603194959
Iteration 7 complete. Error: -793.8378603194959 Total: 4.7102; Orientation: 0.2765; Line Search: 3.5985
Adding measurement 60b82de1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.446e+04, gradient 5.825e-02, dot -0.248; [3a268b9c-f3c8-43c3-8b2e-337a760ff14f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -793.8378603194959, -183.05479626352255, -115.86873789019131, -79.65775844101
LBFGS Accumulation History: 3 points
Removed measurement 60b82de1 to history. Total: 3
th(0)=-793.8378603194959;dx=-0.0033852695880187697
New Minimum: -793.8378603194959 > -925.2761651045154
END: th(97473.3655058684)=-925.2761651045154; dx=-2.033689884720843E-4 evalInputDelta=131.43830478501945
Fitness changed from -793.8378603194959 to -925.2761651045154
Iteration 8 complete. Error: -925.2761651045154 Total: 2.7754; Orientation: 0.2738; Line Search: 1.7160
Adding measurement 4e78da6a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.844e+05, gradient 5.252e-02, dot -0.314; [3a268b9c-f3c8-43c3-8b2e-337a760ff14f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -925.2761651045154, -183.05479626352255, -115.86873789019131, -79.65775844101
LBFGS Accumulation History: 3 points
Removed measurement 4e78da6a to history. Total: 3
th(0)=-925.2761651045154;dx=-0.0027489286836490934
New Minimum: -925.2761651045154 > -961.5793106427557
WOLF (strong): th(210000.0000000001)=-961.5793106427557; dx=2.3289656448128522E-4 evalInputDelta=36.3031455382403
New Minimum: -961.5793106427557 > -1019.9690532655728
END: th(105000.00000000004)=-1019.9690532655728; dx=-2.3301454513398364E-4 evalInputDelta=94.69288816105745
Fitness changed from -925.2761651045154 to -1019.9690532655728
Iteration 9 complete. Error: -1019.9690532655728 Total: 3.6571; Orientation: 0.2749; Line Search: 2.5531
Adding measurement 154e2499 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.238e+06, gradient 5.163e-02, dot -0.326; [3a268b9c-f3c8-43c3-8b2e-337a760ff14f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1019.9690532655728, -183.05479626352255, -115.86873789019131, -79.65775844101
LBFGS Accumulation History: 3 points
Removed measurement 154e2499 to history. Total: 3
th(0)=-1019.9690532655728;dx=-0.0026588343073354827
Armijo: th(226215.6424533479)=-1014.0221092346213; dx=3.040531198748393E-4 evalInputDelta=-5.946944030951499
New Minimum: -1019.9690532655728 > -1095.9626814611354
END: th(113107.82122667394)=-1095.9626814611354; dx=-7.36111628111124E-5 evalInputDelta=75.99362819556256
Fitness changed from -1019.9690532655728 to -1095.9626814611354
Iteration 10 complete. Error: -1095.9626814611354 Total: 3.9087; Orientation: 0.2777; Line Search: 2.8124
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/e7432416-a19a-45e6-89e7-a96aa4af4195.jpg)
Adding measurement 1afeea2a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.949e+05, gradient 5.441e-02, dot -0.294; [3a268b9c-f3c8-43c3-8b2e-337a760ff14f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1095.9626814611354, -183.05479626352255, -115.86873789019131, -79.65775844101
LBFGS Accumulation History: 3 points
Removed measurement 1afeea2a to history. Total: 3
th(0)=-1095.9626814611354;dx=-0.002950117757169253
Armijo: th(243683.41376467102)=-1025.3869907635135; dx=4.4544457107224367E-4 evalInputDelta=-70.5756906976219
New Minimum: -1095.9626814611354 > -1148.784201277117
WOLF (strong): th(121841.70688233551)=-1148.784201277117; dx=2.2409795201550287E-4 evalInputDelta=52.821519815981674
New Minimum: -1148.784201277117 > -1166.7140802063172
END: th(40613.90229411184)=-1166.7140802063172; dx=-9.649337021965888E-4 evalInputDelta=70.75139874518186
Fitness changed from -1095.9626814611354 to -1166.7140802063172
Iteration 11 complete. Error: -1166.7140802063172 Total: 4.6977; Orientation: 0.2865; Line Search: 3.4733
Adding measurement 71688a4 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.911e+05, gradient 4.447e-02, dot 0.427; [3a268b9c-f3c8-43c3-8b2e-337a760ff14f = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-1166.7140802063172;dx=-3617.6625014174515
Armijo: th(87500.00000000006)=-290.6074629822309; dx=0.0026120162748443218 evalInputDelta=-876.1066172240863
Armijo: th(43750.00000000003)=-290.5686687709844; dx=0.005253399219040194 evalInputDelta=-876.1454114353328
Armijo: th(14583.333333333343)=-290.5771961493149; dx=0.01575138179819063 evalInputDelta=-876.1368840570024
Armijo: th(3645.8333333333358)=-290.7386236434304; dx=0.06289125036583532 evalInputDelta=-875.9754565628868
Armijo: th(729.1666666666672)=-291.1483504144104; dx=0.31485115525658125 evalInputDelta=-875.5657297919068
Armijo: th(121.52777777777787)=-293.10545953261544; dx=1.8949571972616863 evalInputDelta=-873.6086206737018
Armijo: th(17.361111111111125)=-303.73296380424665; dx=13.60244918310948 evalInputDelta=-862.9811164020706
Armijo: th(2.1701388888888906)=-372.34873236650424; dx=126.82913501570249 evalInputDelta=-794.365347839813
Armijo: th(0.24112654320987673)=-890.520358071166; dx=1008.0604371733137 evalInputDelta=-276.19372213515123
New Minimum: -1166.7140802063172 > -1200.059378975602
END: th(0.02411265432098767)=-1200.059378975602; dx=-727.731959867475 evalInputDelta=33.34529876928468
Fitness changed from -1166.7140802063172 to -1200.059378975602
Iteration 12 complete. Error: -1200.059378975602 Total: 10.8145; Orientation: 0.2857; Line Search: 9.7190
Adding measurement 2ecd59f3 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 1.031e+05, gradient 4.696e-02, dot -0.255; [3a268b9c-f3c8-43c3-8b2e-337a760ff14f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1200.059378975602, -1166.7140802063172, -183.05479626352255, -115.86873789019131, -79.65775844101
Rejected: LBFGS Orientation magnitude: 1.922e+05, gradient 4.696e-02, dot -0.303; [3a268b9c-f3c8-43c3-8b2e-337a760ff14f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1200.059378975602, -1166.7140802063172, -183.05479626352255, -115.86873789019131
LBFGS Accumulation History: 3 points
Removed measurement 2ecd59f3 to history. Total: 4
Removed measurement 71688a4 to history. Total: 3
th(0)=-1200.059378975602;dx=-0.0021895262957981054
New Minimum: -1200.059378975602 > -1200.0595083595495
END: th(0.051949138937883034)=-1200.0595083595495; dx=-0.0013472401408162406 evalInputDelta=1.293839475238201E-4
Fitness changed from -1200.059378975602 to -1200.0595083595495
Iteration 13 complete. Error: -1200.0595083595495 Total: 3.1614; Orientation: 0.6034; Line Search: 1.7331
Adding measurement e694ee6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.570e+05, gradient 4.691e-02, dot -0.268; [3a268b9c-f3c8-43c3-8b2e-337a760ff14f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1200.0595083595495, -183.05479626352255, -115.86873789019131, -79.65775844101
LBFGS Accumulation History: 3 points
Removed measurement e694ee6 to history. Total: 3
th(0)=-1200.0595083595495;dx=-0.0021900192737657016
New Minimum: -1200.0595083595495 > -1200.0596377434827
END: th(0.1119210270450613)=-1200.0596377434827; dx=-0.001338151341031928 evalInputDelta=1.2938393319927854E-4
Fitness changed from -1200.0595083595495 to -1200.0596377434827
Iteration 14 complete. Error: -1200.0596377434827 Total: 2.9681; Orientation: 0.2604; Line Search: 1.7627
Adding measurement 2665a97b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.560e+05, gradient 4.691e-02, dot -0.267; [3a268b9c-f3c8-43c3-8b2e-337a760ff14f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1200.0596377434827, -183.05479626352255, -115.86873789019131, -79.65775844101
LBFGS Accumulation History: 3 points
Removed measurement 2665a97b to history. Total: 3
th(0)=-1200.0596377434827;dx=-0.002192775573529076
New Minimum: -1200.0596377434827 > -1200.0600258951993
END: th(0.24112654320987673)=-1200.0600258951993; dx=-0.0013502040273465656 evalInputDelta=3.881517166064441E-4
Fitness changed from -1200.0596377434827 to -1200.0600258951993
Iteration 15 complete. Error: -1200.0600258951993 Total: 2.7339; Orientation: 0.2729; Line Search: 1.6661
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/ba460e48-2132-41b1-8789-1f8e3a288e4f.jpg)
Final threshold in iteration 16: -1200.0600258951993 (> -Infinity) after 65.329s (< 5400.000s)

Returns

    -1200.0600258951993