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.54 seconds (1.400 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: 140779049493300
Reset training subject: 140779961325500
Adding measurement 638a3d3c to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-11.043294229162614;dx=-0.006628238834905469
New Minimum: -11.043294229162614 > -11.055500168599183
WOLFE (weak): th(2.154434690031884)=-11.055500168599183; dx=-0.006642692323948622 evalInputDelta=0.012205939436569224
New Minimum: -11.055500168599183 > -11.067681779223612
WOLFE (weak): th(4.308869380063768)=-11.067681779223612; dx=-0.006626360350230424 evalInputDelta=0.024387550060998464
New Minimum: -11.067681779223612 > -11.116523190213876
WOLFE (weak): th(12.926608140191302)=-11.116523190213876; dx=-0.0066287795032581535 evalInputDelta=0.07322896105126198
New Minimum: -11.116523190213876 > -11.335094552506735
WOLFE (weak): th(51.70643256076521)=-11.335094552506735; dx=-0.006586351333442433 evalInputDelta=0.29180032334412154
New Minimum: -11.335094552506735 > -12.506019690306234
WOLFE (weak): th(258.53216280382605)=-12.506019690306234; dx=-0.006340824430335254 evalInputDelta=1.46272546114362
New Minimum: -12.506019690306234 > -18.225545803719776
END: th(1551.1929768229563)=-18.225545803719776; dx=-0.0035423008155065806 evalInputDelta=7.182251574557162
Fitness changed from -11.043294229162614 to -18.225545803719776
Iteration 1 complete. Error: -18.225545803719776 Total: 10.0957; Orientation: 0.0156; Line Search: 7.4289
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/e48bb2a0-d5ea-4620-8ddd-8750d3b40c6c.jpg)
Adding measurement 68021b98 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-18.225545803719776;dx=-0.006486804354387079
New Minimum: -18.225545803719776 > -30.046150285356333
END: th(3341.943960201201)=-30.046150285356333; dx=-0.0024801212495312833 evalInputDelta=11.820604481636558
Fitness changed from -18.225545803719776 to -30.046150285356333
Iteration 2 complete. Error: -30.046150285356333 Total: 2.7837; Orientation: 0.0146; Line Search: 1.8334
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/36baacbd-2e57-405c-b7c1-b50ab69afa7f.jpg)
Adding measurement 14d9bd22 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-30.046150285356333;dx=-0.008720568326420134
New Minimum: -30.046150285356333 > -47.88819864035486
END: th(7200.000000000001)=-47.88819864035486; dx=-0.0012478829904431499 evalInputDelta=17.842048354998525
Fitness changed from -30.046150285356333 to -47.88819864035486
Iteration 3 complete. Error: -47.88819864035486 Total: 2.7457; Orientation: 0.0145; Line Search: 1.7756
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/cf5f7e58-766c-4440-8ad7-7eb311a42f26.jpg)
Adding measurement 5f544761 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.488e+03, gradient 1.028e-01, dot -0.301; [4fc090ee-04c6-47bc-9760-9a862b0f01b9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -47.88819864035486, -30.046150285356333, -18.225545803719776, -11.043294229162614
LBFGS Accumulation History: 3 points
Removed measurement 5f544761 to history. Total: 3
th(0)=-47.88819864035486;dx=-0.010461614136073008
New Minimum: -47.88819864035486 > -79.76873468447101
END: th(15511.929768229566)=-79.76873468447101; dx=-2.1635603289085162E-4 evalInputDelta=31.880536044116155
Fitness changed from -47.88819864035486 to -79.76873468447101
Iteration 4 complete. Error: -79.76873468447101 Total: 2.9710; Orientation: 0.2732; Line Search: 1.7377
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/22152313-c137-41a3-8800-fb8c09d6ca79.jpg)
Adding measurement 663660d0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.587e+03, gradient 1.105e-01, dot -0.168; [4fc090ee-04c6-47bc-9760-9a862b0f01b9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -79.76873468447101, -30.046150285356333, -18.225545803719776, -11.043294229162614
LBFGS Accumulation History: 3 points
Removed measurement 663660d0 to history. Total: 3
th(0)=-79.76873468447101;dx=-0.012171793594755401
New Minimum: -79.76873468447101 > -142.38912489008393
WOLF (strong): th(33419.43960201202)=-142.38912489008393; dx=3.710244110347622E-4 evalInputDelta=62.62039020561292
END: th(16709.71980100601)=-136.57664518287368; dx=-2.0904437068041665E-4 evalInputDelta=56.80791049840266
Fitness changed from -79.76873468447101 to -142.38912489008393
Iteration 5 complete. Error: -142.38912489008393 Total: 3.7079; Orientation: 0.2724; Line Search: 2.5242
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/1704020d-8aca-41df-ba26-7dc30de32ddb.jpg)
Adding measurement 4cbf0fb7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.608e+03, gradient 1.076e-01, dot -0.109; [4fc090ee-04c6-47bc-9760-9a862b0f01b9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -142.38912489008393, -30.046150285356333, -18.225545803719776, -11.043294229162614
LBFGS Accumulation History: 3 points
Removed measurement 4cbf0fb7 to history. Total: 3
th(0)=-142.38912489008393;dx=-0.011506016528740367
New Minimum: -142.38912489008393 > -244.88637332622434
WOLF (strong): th(36000.000000000015)=-244.88637332622434; dx=5.886036251624348E-5 evalInputDelta=102.49724843614041
END: th(18000.000000000007)=-234.56378380851604; dx=-0.0014756195401943602 evalInputDelta=92.1746589184321
Fitness changed from -142.38912489008393 to -244.88637332622434
Iteration 6 complete. Error: -244.88637332622434 Total: 3.8430; Orientation: 0.2737; Line Search: 2.6664
Adding measurement d1c3d68 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.282e+03, gradient 1.001e-01, dot -0.143; [4fc090ee-04c6-47bc-9760-9a862b0f01b9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -244.88637332622434, -30.046150285356333, -18.225545803719776, -11.043294229162614
LBFGS Accumulation History: 3 points
Removed measurement d1c3d68 to history. Total: 3
th(0)=-244.88637332622434;dx=-0.010008492593015677
New Minimum: -244.88637332622434 > -357.03852130054264
WOLF (strong): th(38779.824420573925)=-357.03852130054264; dx=3.012780785655485E-4 evalInputDelta=112.1521479743183
END: th(19389.912210286962)=-350.60912701864754; dx=-0.0022429625752383104 evalInputDelta=105.7227536924232
Fitness changed from -244.88637332622434 to -357.03852130054264
Iteration 7 complete. Error: -357.03852130054264 Total: 3.6922; Orientation: 0.2694; Line Search: 2.6253
Adding measurement 11f6d51f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.148e+04, gradient 1.069e-01, dot -0.172; [4fc090ee-04c6-47bc-9760-9a862b0f01b9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -357.03852130054264, -30.046150285356333, -18.225545803719776, -11.043294229162614
LBFGS Accumulation History: 3 points
Removed measurement 11f6d51f to history. Total: 3
th(0)=-357.03852130054264;dx=-0.011411690623885152
New Minimum: -357.03852130054264 > -438.95188733329695
WOLF (strong): th(41774.29950251503)=-438.95188733329695; dx=3.5060973390057713E-4 evalInputDelta=81.91336603275431
New Minimum: -438.95188733329695 > -451.9664352259427
END: th(20887.149751257515)=-451.9664352259427; dx=-0.0012744139929530196 evalInputDelta=94.92791392540005
Fitness changed from -357.03852130054264 to -451.9664352259427
Iteration 8 complete. Error: -451.9664352259427 Total: 3.7215; Orientation: 0.2715; Line Search: 2.6188
Adding measurement 6ddee3e to history. Total: 3
Accepted: LBFGS Orientation magnitude: 2.552e+04, gradient 9.361e-02, dot 0.309; [4fc090ee-04c6-47bc-9760-9a862b0f01b9 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-451.9664352259427;dx=-738.4575582027088
New Minimum: -451.9664352259427 > -513.7536940341497
WOLF (strong): th(45000.00000000002)=-513.7536940341497; dx=0.006481516577492822 evalInputDelta=61.787258808207014
New Minimum: -513.7536940341497 > -513.7628217035204
WOLF (strong): th(22500.00000000001)=-513.7628217035204; dx=0.012971661431838678 evalInputDelta=61.796386477577755
New Minimum: -513.7628217035204 > -513.9221568739305
WOLF (strong): th(7500.000000000004)=-513.9221568739305; dx=0.038828183523730055 evalInputDelta=61.95572164798779
New Minimum: -513.9221568739305 > -514.5887373188885
WOLF (strong): th(1875.000000000001)=-514.5887373188885; dx=0.1551729472862602 evalInputDelta=62.62230209294586
New Minimum: -514.5887373188885 > -515.99218399453
WOLF (strong): th(375.00000000000017)=-515.99218399453; dx=0.7661134452388301 evalInputDelta=64.02574876858733
New Minimum: -515.99218399453 > -520.0612992564844
WOLF (strong): th(62.50000000000003)=-520.0612992564844; dx=4.501775616474261 evalInputDelta=68.09486403054171
New Minimum: -520.0612992564844 > -545.9262537855541
WOLF (strong): th(8.928571428571432)=-545.9262537855541; dx=24.637243715645468 evalInputDelta=93.95981855961139
New Minimum: -545.9262537855541 > -591.9293184248451
WOLF (strong): th(1.116071428571429)=-591.9293184248451; dx=30.66760560583151 evalInputDelta=139.96288319890238
END: th(0.12400793650793657)=-518.9850874303411; dx=-309.6908307232606 evalInputDelta=67.01865220439839
Fitness changed from -451.9664352259427 to -591.9293184248451
Iteration 9 complete. Error: -591.9293184248451 Total: 10.0800; Orientation: 0.2674; Line Search: 8.9967
Adding measurement 32e4acba to history. Total: 4
Rejected: LBFGS Orientation magnitude: 1.275e+05, gradient 7.426e-02, dot -0.141; [4fc090ee-04c6-47bc-9760-9a862b0f01b9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -591.9293184248451, -451.9664352259427, -30.046150285356333, -18.225545803719776, -11.043294229162614
Rejected: LBFGS Orientation magnitude: 1.315e+05, gradient 7.426e-02, dot -0.147; [4fc090ee-04c6-47bc-9760-9a862b0f01b9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -591.9293184248451, -451.9664352259427, -30.046150285356333, -18.225545803719776
LBFGS Accumulation History: 3 points
Removed measurement 32e4acba to history. Total: 4
Removed measurement 6ddee3e to history. Total: 3
th(0)=-591.9293184248451;dx=-0.005483247093434256
New Minimum: -591.9293184248451 > -591.9303973303025
END: th(0.2671670002519698)=-591.9303973303025; dx=-0.0036643138052331204 evalInputDelta=0.0010789054574615875
Fitness changed from -591.9293184248451 to -591.9303973303025
Iteration 10 complete. Error: -591.9303973303025 Total: 3.2971; Orientation: 0.6046; Line Search: 1.8950
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/ce79bb54-c698-487f-a072-c57d66f87c7a.jpg)
Adding measurement 23e2c4ba to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.185e+04, gradient 7.414e-02, dot -0.101; [4fc090ee-04c6-47bc-9760-9a862b0f01b9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -591.9303973303025, -30.046150285356333, -18.225545803719776, -11.043294229162614
LBFGS Accumulation History: 3 points
Removed measurement 23e2c4ba to history. Total: 3
th(0)=-591.9303973303025;dx=-0.005476298112931249
New Minimum: -591.9303973303025 > -591.9328325668206
END: th(0.5755938533746008)=-591.9328325668206; dx=-0.003665859473081374 evalInputDelta=0.0024352365180675406
Fitness changed from -591.9303973303025 to -591.9328325668206
Iteration 11 complete. Error: -591.9328325668206 Total: 3.1127; Orientation: 0.5153; Line Search: 1.7138
Adding measurement 5da33b8e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.194e+04, gradient 7.413e-02, dot -0.102; [4fc090ee-04c6-47bc-9760-9a862b0f01b9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -591.9328325668206, -30.046150285356333, -18.225545803719776, -11.043294229162614
LBFGS Accumulation History: 3 points
Removed measurement 5da33b8e to history. Total: 3
th(0)=-591.9328325668206;dx=-0.005492777121025371
New Minimum: -591.9328325668206 > -591.9380420897824
END: th(1.2400793650793656)=-591.9380420897824; dx=-0.0036766995560418244 evalInputDelta=0.005209522961763469
Fitness changed from -591.9328325668206 to -591.9380420897824
Iteration 12 complete. Error: -591.9380420897824 Total: 2.7900; Orientation: 0.2722; Line Search: 1.7216
Adding measurement 1f20aa05 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.189e+04, gradient 7.410e-02, dot -0.102; [4fc090ee-04c6-47bc-9760-9a862b0f01b9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -591.9380420897824, -30.046150285356333, -18.225545803719776, -11.043294229162614
LBFGS Accumulation History: 3 points
Removed measurement 1f20aa05 to history. Total: 3
th(0)=-591.9380420897824;dx=-0.005471628002974587
New Minimum: -591.9380420897824 > -591.9492932699185
END: th(2.6716700025196984)=-591.9492932699185; dx=-0.0036735795422485154 evalInputDelta=0.011251180136127914
Fitness changed from -591.9380420897824 to -591.9492932699185
Iteration 13 complete. Error: -591.9492932699185 Total: 2.7838; Orientation: 0.2700; Line Search: 1.7233
Adding measurement 36a16c0f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.194e+04, gradient 7.406e-02, dot -0.102; [4fc090ee-04c6-47bc-9760-9a862b0f01b9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -591.9492932699185, -30.046150285356333, -18.225545803719776, -11.043294229162614
LBFGS Accumulation History: 3 points
Removed measurement 36a16c0f to history. Total: 3
th(0)=-591.9492932699185;dx=-0.00547407691858762
New Minimum: -591.9492932699185 > -591.9735211125843
END: th(5.755938533746009)=-591.9735211125843; dx=-0.003659622986072297 evalInputDelta=0.02422784266582312
Fitness changed from -591.9492932699185 to -591.9735211125843
Iteration 14 complete. Error: -591.9735211125843 Total: 2.9007; Orientation: 0.2623; Line Search: 1.7083
Adding measurement 5467addf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.197e+04, gradient 7.412e-02, dot -0.102; [4fc090ee-04c6-47bc-9760-9a862b0f01b9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -591.9735211125843, -30.046150285356333, -18.225545803719776, -11.043294229162614
LBFGS Accumulation History: 3 points
Removed measurement 5467addf to history. Total: 3
th(0)=-591.9735211125843;dx=-0.005490297904626391
New Minimum: -591.9735211125843 > -592.0257031616123
END: th(12.400793650793657)=-592.0257031616123; dx=-0.003683851979539036 evalInputDelta=0.05218204902803336
Fitness changed from -591.9735211125843 to -592.0257031616123
Iteration 15 complete. Error: -592.0257031616123 Total: 2.8983; Orientation: 0.2734; Line Search: 1.7749
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/a58f3eeb-b49b-44e9-b549-b194f8459ab9.jpg)
Final threshold in iteration 16: -592.0257031616123 (> -Infinity) after 61.534s (< 5400.000s)

Returns

    -592.0257031616123