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 64.68 seconds (1.300 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: 139605056457700
Reset training subject: 139605936425900
Adding measurement 4a78f093 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-70.96903322724222;dx=-0.002165260501989509
New Minimum: -70.96903322724222 > -70.97389239614205
WOLFE (weak): th(2.154434690031884)=-70.97389239614205; dx=-0.0021126675151807222 evalInputDelta=0.004859168899827182
New Minimum: -70.97389239614205 > -70.97876568410916
WOLFE (weak): th(4.308869380063768)=-70.97876568410916; dx=-0.002115281285662773 evalInputDelta=0.00973245686694213
New Minimum: -70.97876568410916 > -70.99821214769716
WOLFE (weak): th(12.926608140191302)=-70.99821214769716; dx=-0.0020990655745437713 evalInputDelta=0.02917892045493886
New Minimum: -70.99821214769716 > -71.08592235508208
WOLFE (weak): th(51.70643256076521)=-71.08592235508208; dx=-0.0021189934882166464 evalInputDelta=0.11688912783985472
New Minimum: -71.08592235508208 > -71.55636029113215
WOLFE (weak): th(258.53216280382605)=-71.55636029113215; dx=-0.0021308477001044388 evalInputDelta=0.58732706388993
New Minimum: -71.55636029113215 > -74.51472243862891
WOLFE (weak): th(1551.1929768229563)=-74.51472243862891; dx=-0.0021448668713379203 evalInputDelta=3.545689211386687
New Minimum: -74.51472243862891 > -95.15449425781084
WOLFE (weak): th(10858.350837760694)=-95.15449425781084; dx=-0.0020242101619957027 evalInputDelta=24.185461030568618
New Minimum: -95.15449425781084 > -167.28649255378434
END: th(86866.80670208555)=-167.28649255378434; dx=-5.451619793517232E-4 evalInputDelta=96.31745932654212
Fitness changed from -70.96903322724222 to -167.28649255378434
Iteration 1 complete. Error: -167.28649255378434 Total: 11.0418; Orientation: 0.0151; Line Search: 8.4446
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/ab601f7e-4356-4b0d-b7e7-b7b0094e5d8f.jpg)
Adding measurement 7df9888 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-167.28649255378434;dx=-0.0032905258023749806
New Minimum: -167.28649255378434 > -287.9133328422396
END: th(187148.86177126726)=-287.9133328422396; dx=-1.877719521068158E-4 evalInputDelta=120.62684028845524
Fitness changed from -167.28649255378434 to -287.9133328422396
Iteration 2 complete. Error: -287.9133328422396 Total: 2.6483; Orientation: 0.0155; Line Search: 1.6868
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/54fb1317-ba81-48a7-926a-03d92fd377e2.jpg)
Adding measurement 6365761f to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-287.9133328422396;dx=-0.0032999968154573565
New Minimum: -287.9133328422396 > -361.04312625797553
WOLF (strong): th(403200.00000000006)=-361.04312625797553; dx=7.186226786364622E-5 evalInputDelta=73.12979341573595
New Minimum: -361.04312625797553 > -440.12898062532145
END: th(201600.00000000003)=-440.12898062532145; dx=-1.4011813156075968E-4 evalInputDelta=152.21564778308186
Fitness changed from -287.9133328422396 to -440.12898062532145
Iteration 3 complete. Error: -440.12898062532145 Total: 3.9363; Orientation: 0.0155; Line Search: 2.9963
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d64ffcf1-894c-43c7-a9e1-2e26dea55e38.jpg)
Adding measurement 4f0b5f27 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.846e+04, gradient 5.406e-02, dot -0.262; [3c21dc32-c666-4d47-bb03-eeb1100b7ed8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -440.12898062532145, -287.9133328422396, -167.28649255378434, -70.96903322724222
LBFGS Accumulation History: 3 points
Removed measurement 4f0b5f27 to history. Total: 3
th(0)=-440.12898062532145;dx=-0.0029005166928479384
New Minimum: -440.12898062532145 > -466.7559816299621
WOLF (strong): th(434334.03351042786)=-466.7559816299621; dx=2.1004941271174062E-4 evalInputDelta=26.627001004640647
New Minimum: -466.7559816299621 > -621.5578552216692
END: th(217167.01675521393)=-621.5578552216692; dx=-2.0836395488493268E-5 evalInputDelta=181.42887459634778
Fitness changed from -440.12898062532145 to -621.5578552216692
Iteration 4 complete. Error: -621.5578552216692 Total: 3.7964; Orientation: 0.2953; Line Search: 2.5820
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/ce5b6e77-e1f3-444d-ae24-5e031cb1e06a.jpg)
Adding measurement 5cf1aaa8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.641e+04, gradient 5.513e-02, dot -0.262; [3c21dc32-c666-4d47-bb03-eeb1100b7ed8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -621.5578552216692, -287.9133328422396, -167.28649255378434, -70.96903322724222
LBFGS Accumulation History: 3 points
Removed measurement 5cf1aaa8 to history. Total: 3
th(0)=-621.5578552216692;dx=-0.003021038795642585
Armijo: th(467872.15442816826)=-571.9084385946544; dx=3.053264244328504E-4 evalInputDelta=-49.64941662701483
New Minimum: -621.5578552216692 > -780.408717745689
WOLF (strong): th(233936.07721408413)=-780.408717745689; dx=4.2193211842324153E-5 evalInputDelta=158.85086252401982
New Minimum: -780.408717745689 > -783.7382356009649
END: th(77978.69240469471)=-783.7382356009649; dx=-0.0012663935445891797 evalInputDelta=162.18038037929568
Fitness changed from -621.5578552216692 to -783.7382356009649
Iteration 5 complete. Error: -783.7382356009649 Total: 4.7036; Orientation: 0.2959; Line Search: 3.4605
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/4a54d838-b830-4a05-a0d8-90aa65dd3927.jpg)
Adding measurement 483de4a5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.103e+04, gradient 4.788e-02, dot -0.325; [3c21dc32-c666-4d47-bb03-eeb1100b7ed8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -783.7382356009649, -287.9133328422396, -167.28649255378434, -70.96903322724222
LBFGS Accumulation History: 3 points
Removed measurement 483de4a5 to history. Total: 3
th(0)=-783.7382356009649;dx=-0.0022814074383271077
New Minimum: -783.7382356009649 > -924.1857460428729
END: th(168000.00000000006)=-924.1857460428729; dx=-6.131011895954464E-4 evalInputDelta=140.44751044190798
Fitness changed from -783.7382356009649 to -924.1857460428729
Iteration 6 complete. Error: -924.1857460428729 Total: 3.0749; Orientation: 0.2874; Line Search: 1.7404
Adding measurement 5a8d1c22 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.292e+04, gradient 5.113e-02, dot -0.347; [3c21dc32-c666-4d47-bb03-eeb1100b7ed8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -924.1857460428729, -287.9133328422396, -167.28649255378434, -70.96903322724222
LBFGS Accumulation History: 3 points
Removed measurement 5a8d1c22 to history. Total: 3
th(0)=-924.1857460428729;dx=-0.0026094386111094004
Armijo: th(361945.0279253566)=-895.9054065077036; dx=8.423685893604695E-5 evalInputDelta=-28.280339535169333
New Minimum: -924.1857460428729 > -1009.6337242262889
END: th(180972.5139626783)=-1009.6337242262889; dx=-2.776512693260049E-4 evalInputDelta=85.44797818341601
Fitness changed from -924.1857460428729 to -1009.6337242262889
Iteration 7 complete. Error: -1009.6337242262889 Total: 3.7574; Orientation: 0.2991; Line Search: 2.6095
Adding measurement 6905b957 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.166e+05, gradient 5.611e-02, dot -0.322; [3c21dc32-c666-4d47-bb03-eeb1100b7ed8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1009.6337242262889, -287.9133328422396, -167.28649255378434, -70.96903322724222
LBFGS Accumulation History: 3 points
Removed measurement 6905b957 to history. Total: 3
th(0)=-1009.6337242262889;dx=-0.0031177913174923197
Armijo: th(389893.4620234736)=-851.095005644932; dx=3.8941980394135945E-4 evalInputDelta=-158.53871858135687
New Minimum: -1009.6337242262889 > -1079.4569283449775
WOLF (strong): th(194946.7310117368)=-1079.4569283449775; dx=2.016059266036929E-4 evalInputDelta=69.82320411868864
New Minimum: -1079.4569283449775 > -1118.0837123460253
END: th(64982.24367057893)=-1118.0837123460253; dx=-0.0010795322252397652 evalInputDelta=108.44998811973642
Fitness changed from -1009.6337242262889 to -1118.0837123460253
Iteration 8 complete. Error: -1118.0837123460253 Total: 4.9167; Orientation: 0.2940; Line Search: 3.8260
Adding measurement 63cd2b1e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.848e+05, gradient 4.814e-02, dot -0.395; [3c21dc32-c666-4d47-bb03-eeb1100b7ed8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1118.0837123460253, -287.9133328422396, -167.28649255378434, -70.96903322724222
LBFGS Accumulation History: 3 points
Removed measurement 63cd2b1e to history. Total: 3
th(0)=-1118.0837123460253;dx=-0.002293192353633209
New Minimum: -1118.0837123460253 > -1206.4870048624039
END: th(140000.00000000006)=-1206.4870048624039; dx=-6.317790736299887E-4 evalInputDelta=88.40329251637854
Fitness changed from -1118.0837123460253 to -1206.4870048624039
Iteration 9 complete. Error: -1206.4870048624039 Total: 3.0133; Orientation: 0.2900; Line Search: 1.8949
Adding measurement 6ad0365b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.552e+05, gradient 5.051e-02, dot -0.392; [3c21dc32-c666-4d47-bb03-eeb1100b7ed8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1206.4870048624039, -287.9133328422396, -167.28649255378434, -70.96903322724222
LBFGS Accumulation History: 3 points
Removed measurement 6ad0365b to history. Total: 3
th(0)=-1206.4870048624039;dx=-0.002526790170921159
Armijo: th(301620.8566044639)=-1167.5605356297838; dx=6.737393360345666E-6 evalInputDelta=-38.92646923262009
New Minimum: -1206.4870048624039 > -1256.6655022861828
END: th(150810.42830223194)=-1256.6655022861828; dx=-3.159066443138907E-4 evalInputDelta=50.178497423778936
Fitness changed from -1206.4870048624039 to -1256.6655022861828
Iteration 10 complete. Error: -1256.6655022861828 Total: 3.7189; Orientation: 0.2974; Line Search: 2.5632
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/d1c6944b-6b26-4a58-a95b-41aa550aff54.jpg)
Adding measurement 62cc71ee to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.733e+05, gradient 5.374e-02, dot -0.362; [3c21dc32-c666-4d47-bb03-eeb1100b7ed8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1256.6655022861828, -287.9133328422396, -167.28649255378434, -70.96903322724222
LBFGS Accumulation History: 3 points
Removed measurement 62cc71ee to history. Total: 3
th(0)=-1256.6655022861828;dx=-0.002876244958465295
Armijo: th(324911.2183528947)=-1118.2216620707477; dx=3.51075494316864E-4 evalInputDelta=-138.4438402154351
New Minimum: -1256.6655022861828 > -1297.119296532283
WOLF (strong): th(162455.60917644735)=-1297.119296532283; dx=1.2304590304889249E-4 evalInputDelta=40.45379424610019
New Minimum: -1297.119296532283 > -1324.332529279439
END: th(54151.86972548245)=-1324.332529279439; dx=-9.412360188896287E-4 evalInputDelta=67.66702699325629
Fitness changed from -1256.6655022861828 to -1324.332529279439
Iteration 11 complete. Error: -1324.332529279439 Total: 4.9332; Orientation: 0.2911; Line Search: 3.7135
Adding measurement 52158b43 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.488e+06, gradient 4.711e-02, dot -0.420; [3c21dc32-c666-4d47-bb03-eeb1100b7ed8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1324.332529279439, -287.9133328422396, -167.28649255378434, -70.96903322724222
LBFGS Accumulation History: 3 points
Removed measurement 52158b43 to history. Total: 3
th(0)=-1324.332529279439;dx=-0.002198884813235021
New Minimum: -1324.332529279439 > -1375.3008031682102
END: th(116666.66666666674)=-1375.3008031682102; dx=-6.09534882792024E-4 evalInputDelta=50.96827388877114
Fitness changed from -1324.332529279439 to -1375.3008031682102
Iteration 12 complete. Error: -1375.3008031682102 Total: 2.8883; Orientation: 0.2946; Line Search: 1.7642
Adding measurement 2cbebd87 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.111e+07, gradient 4.822e-02, dot -0.412; [3c21dc32-c666-4d47-bb03-eeb1100b7ed8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1375.3008031682102, -287.9133328422396, -167.28649255378434, -70.96903322724222
LBFGS Accumulation History: 3 points
Removed measurement 2cbebd87 to history. Total: 3
th(0)=-1375.3008031682102;dx=-0.0023103889174223534
Armijo: th(251350.71383705328)=-1374.4603467698676; dx=-1.5987025711085103E-4 evalInputDelta=-0.8404563983426669
New Minimum: -1375.3008031682102 > -1412.8322231456289
END: th(125675.35691852664)=-1412.8322231456289; dx=-4.1730093016197897E-4 evalInputDelta=37.531419977418636
Fitness changed from -1375.3008031682102 to -1412.8322231456289
Iteration 13 complete. Error: -1412.8322231456289 Total: 3.7084; Orientation: 0.2910; Line Search: 2.5643
Adding measurement 5129d373 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.108e+07, gradient 5.059e-02, dot -0.387; [3c21dc32-c666-4d47-bb03-eeb1100b7ed8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1412.8322231456289, -287.9133328422396, -167.28649255378434, -70.96903322724222
LBFGS Accumulation History: 3 points
Removed measurement 5129d373 to history. Total: 3
th(0)=-1412.8322231456289;dx=-0.0025487699912141995
Armijo: th(270759.3486274123)=-1352.4429523115396; dx=1.1956879377143575E-4 evalInputDelta=-60.3892708340893
New Minimum: -1412.8322231456289 > -1444.2418175067114
END: th(135379.67431370614)=-1444.2418175067114; dx=-1.4976095154316683E-4 evalInputDelta=31.409594361082554
Fitness changed from -1412.8322231456289 to -1444.2418175067114
Iteration 14 complete. Error: -1444.2418175067114 Total: 3.9140; Orientation: 0.3007; Line Search: 2.7517
Adding measurement 3ca177d1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.207e+06, gradient 5.319e-02, dot -0.352; [3c21dc32-c666-4d47-bb03-eeb1100b7ed8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1444.2418175067114, -287.9133328422396, -167.28649255378434, -70.96903322724222
LBFGS Accumulation History: 3 points
Removed measurement 3ca177d1 to history. Total: 3
th(0)=-1444.2418175067114;dx=-0.002805417814080411
Armijo: th(291666.66666666686)=-1317.6890453879457; dx=3.857806269464124E-4 evalInputDelta=-126.55277211876569
New Minimum: -1444.2418175067114 > -1469.180793240274
WOLF (strong): th(145833.33333333343)=-1469.180793240274; dx=1.5768582857868921E-4 evalInputDelta=24.93897573356253
New Minimum: -1469.180793240274 > -1495.1391964753623
END: th(48611.111111111146)=-1495.1391964753623; dx=-8.01266671291967E-4 evalInputDelta=50.897378968650855
Fitness changed from -1444.2418175067114 to -1495.1391964753623
Iteration 15 complete. Error: -1495.1391964753623 Total: 4.5090; Orientation: 0.2937; Line Search: 3.4230
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/8cdbb2e2-1572-478b-9a15-630ccefae5f7.jpg)
Final threshold in iteration 16: -1495.1391964753623 (> -Infinity) after 64.676s (< 5400.000s)

Returns

    -1495.1391964753623