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 45.29 seconds (1.225 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: 218120696894600
Reset training subject: 218121355594200
Adding measurement 388b0ba6 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-8.818074849112026;dx=-9.231628027476565E-4
New Minimum: -8.818074849112026 > -8.819585226215978
WOLFE (weak): th(2.154434690031884)=-8.819585226215978; dx=-9.232919636428443E-4 evalInputDelta=0.0015103771039512992
New Minimum: -8.819585226215978 > -8.8210990365567
WOLFE (weak): th(4.308869380063768)=-8.8210990365567; dx=-9.22823313409995E-4 evalInputDelta=0.003024187444673032
New Minimum: -8.8210990365567 > -8.82714962115001
WOLFE (weak): th(12.926608140191302)=-8.82714962115001; dx=-9.230749703962532E-4 evalInputDelta=0.009074772037983792
New Minimum: -8.82714962115001 > -8.854379278713674
WOLFE (weak): th(51.70643256076521)=-8.854379278713674; dx=-9.239729264645001E-4 evalInputDelta=0.036304429601647925
New Minimum: -8.854379278713674 > -8.999302173648502
WOLFE (weak): th(258.53216280382605)=-8.999302173648502; dx=-9.174373868009746E-4 evalInputDelta=0.18122732453647572
New Minimum: -8.999302173648502 > -9.858048862411708
WOLFE (weak): th(1551.1929768229563)=-9.858048862411708; dx=-8.706287692020931E-4 evalInputDelta=1.0399740132996822
New Minimum: -9.858048862411708 > -13.955067721217477
END: th(10858.350837760694)=-13.955067721217477; dx=-4.7409030043018896E-4 evalInputDelta=5.13699287210545
Fitness changed from -8.818074849112026 to -13.955067721217477
Iteration 1 complete. Error: -13.955067721217477 Total: 6.9843; Orientation: 0.0158; Line Search: 5.0154
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/bc0e5519-5b00-4122-8576-42d7076bb53d.jpg)
Adding measurement 1dc81d72 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-13.955067721217477;dx=-0.0017628009420235938
New Minimum: -13.955067721217477 > -20.187807754870498
END: th(23393.607721408407)=-20.187807754870498; dx=-2.2881045113385605E-4 evalInputDelta=6.232740033653021
Fitness changed from -13.955067721217477 to -20.187807754870498
Iteration 2 complete. Error: -20.187807754870498 Total: 1.8150; Orientation: 0.0165; Line Search: 1.2223
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/b3df4456-6ded-445c-81f4-182c3185ac54.jpg)
Adding measurement 7393e1af to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-20.187807754870498;dx=-0.001040354706012962
New Minimum: -20.187807754870498 > -25.82538539433409
END: th(50400.00000000001)=-25.82538539433409; dx=-1.0139729625198423E-4 evalInputDelta=5.6375776394635935
Fitness changed from -20.187807754870498 to -25.82538539433409
Iteration 3 complete. Error: -25.82538539433409 Total: 1.8205; Orientation: 0.0164; Line Search: 1.2417
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/cec7d86e-e081-4040-a708-6cd0c9aa2be9.jpg)
Adding measurement 2745f172 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.428e+03, gradient 3.209e-02, dot -0.185; [23e0a2d5-3ee3-4fe1-8800-04e50fe9e380 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -25.82538539433409, -20.187807754870498, -13.955067721217477, -8.818074849112026
LBFGS Accumulation History: 3 points
Removed measurement 2745f172 to history. Total: 3
th(0)=-25.82538539433409;dx=-0.0010278545994013323
Armijo: th(108583.50837760697)=-25.82430612252826; dx=-2.6177318187567782E-5 evalInputDelta=-0.001079271805831894
New Minimum: -25.82538539433409 > -32.11717689456006
END: th(54291.75418880348)=-32.11717689456006; dx=-9.728579310126712E-5 evalInputDelta=6.291791500225969
Fitness changed from -25.82538539433409 to -32.11717689456006
Iteration 4 complete. Error: -32.11717689456006 Total: 3.1261; Orientation: 0.3054; Line Search: 2.2233
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/8e449fca-ac15-419a-834e-ca60d5dee1fd.jpg)
Adding measurement 6b497fde to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.187e+03, gradient 3.145e-02, dot -0.164; [23e0a2d5-3ee3-4fe1-8800-04e50fe9e380 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -32.11717689456006, -20.187807754870498, -13.955067721217477, -8.818074849112026
LBFGS Accumulation History: 3 points
Removed measurement 6b497fde to history. Total: 3
th(0)=-32.11717689456006;dx=-9.882369476028757E-4
Armijo: th(116968.03860704206)=-29.861717294011918; dx=-4.808450502830106E-6 evalInputDelta=-2.255459600548143
New Minimum: -32.11717689456006 > -39.80702883860801
END: th(58484.01930352103)=-39.80702883860801; dx=-8.565699990317546E-5 evalInputDelta=7.689851944047952
Fitness changed from -32.11717689456006 to -39.80702883860801
Iteration 5 complete. Error: -39.80702883860801 Total: 2.7568; Orientation: 0.2934; Line Search: 1.8328
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/032f3a01-7653-4676-99be-07a7f01d2dba.jpg)
Adding measurement 50b874f9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.729e+03, gradient 3.130e-02, dot -0.165; [23e0a2d5-3ee3-4fe1-8800-04e50fe9e380 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -39.80702883860801, -20.187807754870498, -13.955067721217477, -8.818074849112026
LBFGS Accumulation History: 3 points
Removed measurement 50b874f9 to history. Total: 3
th(0)=-39.80702883860801;dx=-9.777868840141028E-4
Armijo: th(126000.00000000004)=-35.60849337491503; dx=-4.715361581259034E-6 evalInputDelta=-4.198535463692984
New Minimum: -39.80702883860801 > -47.915551133711816
END: th(63000.00000000002)=-47.915551133711816; dx=-9.03823766993777E-5 evalInputDelta=8.108522295103803
Fitness changed from -39.80702883860801 to -47.915551133711816
Iteration 6 complete. Error: -47.915551133711816 Total: 2.9499; Orientation: 0.3391; Line Search: 2.0260
Adding measurement 185631cb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.076e+03, gradient 3.136e-02, dot -0.174; [23e0a2d5-3ee3-4fe1-8800-04e50fe9e380 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -47.915551133711816, -20.187807754870498, -13.955067721217477, -8.818074849112026
LBFGS Accumulation History: 3 points
Removed measurement 185631cb to history. Total: 3
th(0)=-47.915551133711816;dx=-9.813483908529968E-4
Armijo: th(135729.38547200873)=-40.91160672408098; dx=1.624249225424885E-5 evalInputDelta=-7.003944409630833
New Minimum: -47.915551133711816 > -56.17449938300477
END: th(67864.69273600436)=-56.17449938300477; dx=-7.77562542516196E-5 evalInputDelta=8.258948249292956
Fitness changed from -47.915551133711816 to -56.17449938300477
Iteration 7 complete. Error: -56.17449938300477 Total: 2.7288; Orientation: 0.3105; Line Search: 1.8199
Adding measurement 4238e41a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.830e+03, gradient 3.088e-02, dot -0.181; [23e0a2d5-3ee3-4fe1-8800-04e50fe9e380 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -56.17449938300477, -20.187807754870498, -13.955067721217477, -8.818074849112026
LBFGS Accumulation History: 3 points
Removed measurement 4238e41a to history. Total: 3
th(0)=-56.17449938300477;dx=-9.517706275430047E-4
Armijo: th(146210.0482588026)=-46.667649093613285; dx=2.9905260921805737E-5 evalInputDelta=-9.506850289391487
New Minimum: -56.17449938300477 > -64.59878673242822
END: th(73105.0241294013)=-64.59878673242822; dx=-6.82923705320743E-5 evalInputDelta=8.424287349423452
Fitness changed from -56.17449938300477 to -64.59878673242822
Iteration 8 complete. Error: -64.59878673242822 Total: 2.7161; Orientation: 0.3021; Line Search: 1.8353
Adding measurement 2366ef54 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.979e+03, gradient 3.050e-02, dot -0.181; [23e0a2d5-3ee3-4fe1-8800-04e50fe9e380 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -64.59878673242822, -20.187807754870498, -13.955067721217477, -8.818074849112026
LBFGS Accumulation History: 3 points
Removed measurement 2366ef54 to history. Total: 3
th(0)=-64.59878673242822;dx=-9.284538603183693E-4
Armijo: th(157500.00000000006)=-50.23865760131184; dx=4.737141908568569E-5 evalInputDelta=-14.36012913111638
New Minimum: -64.59878673242822 > -71.83122922025747
END: th(78750.00000000003)=-71.83122922025747; dx=-3.7227709850341066E-5 evalInputDelta=7.232442487829246
Fitness changed from -64.59878673242822 to -71.83122922025747
Iteration 9 complete. Error: -71.83122922025747 Total: 3.4231; Orientation: 0.2956; Line Search: 1.8043
Adding measurement 146d1f30 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.170e+04, gradient 3.152e-02, dot -0.177; [23e0a2d5-3ee3-4fe1-8800-04e50fe9e380 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -71.83122922025747, -20.187807754870498, -13.955067721217477, -8.818074849112026
LBFGS Accumulation History: 3 points
Removed measurement 146d1f30 to history. Total: 3
th(0)=-71.83122922025747;dx=-9.91699056339919E-4
Armijo: th(169661.7318400109)=-53.33322173359876; dx=7.344393585749283E-5 evalInputDelta=-18.498007486658707
New Minimum: -71.83122922025747 > -78.3873422428338
WOLF (strong): th(84830.86592000545)=-78.3873422428338; dx=7.932901489815732E-6 evalInputDelta=6.556113022576326
New Minimum: -78.3873422428338 > -83.83136621092228
END: th(28276.955306668486)=-83.83136621092228; dx=-4.367721374126454E-4 evalInputDelta=12.000136990664814
Fitness changed from -71.83122922025747 to -83.83136621092228
Iteration 10 complete. Error: -83.83136621092228 Total: 3.4873; Orientation: 0.2964; Line Search: 2.6274
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/440a2ee2-1b37-4eab-9b4a-2223d0338aa8.jpg)
Adding measurement 3fae087a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.155e+04, gradient 2.390e-02, dot -0.265; [23e0a2d5-3ee3-4fe1-8800-04e50fe9e380 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -83.83136621092228, -20.187807754870498, -13.955067721217477, -8.818074849112026
LBFGS Accumulation History: 3 points
Removed measurement 3fae087a to history. Total: 3
th(0)=-83.83136621092228;dx=-5.690412872122017E-4
New Minimum: -83.83136621092228 > -93.01196362454675
END: th(60920.853441167754)=-93.01196362454675; dx=-2.5091119873524385E-4 evalInputDelta=9.180597413624469
Fitness changed from -83.83136621092228 to -93.01196362454675
Iteration 11 complete. Error: -93.01196362454675 Total: 2.2531; Orientation: 0.3183; Line Search: 1.2819
Adding measurement 5713731d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.761e+04, gradient 2.393e-02, dot -0.272; [23e0a2d5-3ee3-4fe1-8800-04e50fe9e380 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -93.01196362454675, -20.187807754870498, -13.955067721217477, -8.818074849112026
LBFGS Accumulation History: 3 points
Removed measurement 5713731d to history. Total: 3
th(0)=-93.01196362454675;dx=-5.716003083205793E-4
New Minimum: -93.01196362454675 > -93.0951668125778
END: th(131250.00000000006)=-93.0951668125778; dx=-5.977197866835894E-5 evalInputDelta=0.08320318803104954
Fitness changed from -93.01196362454675 to -93.0951668125778
Iteration 12 complete. Error: -93.0951668125778 Total: 2.1265; Orientation: 0.2979; Line Search: 1.2267
Adding measurement 65a68d7d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.787e+04, gradient 3.131e-02, dot -0.190; [23e0a2d5-3ee3-4fe1-8800-04e50fe9e380 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -93.0951668125778, -20.187807754870498, -13.955067721217477, -8.818074849112026
LBFGS Accumulation History: 3 points
Removed measurement 65a68d7d to history. Total: 3
th(0)=-93.0951668125778;dx=-9.7772346423642E-4
Armijo: th(282769.55306668486)=-44.9779126167285; dx=6.989250895450697E-5 evalInputDelta=-48.1172541958493
Armijo: th(141384.77653334243)=-81.30638288843527; dx=7.98987105242292E-5 evalInputDelta=-11.788783924142535
New Minimum: -93.0951668125778 > -106.0114374577826
END: th(47128.258844447475)=-106.0114374577826; dx=-2.4128003907339466E-4 evalInputDelta=12.916270645204804
Fitness changed from -93.0951668125778 to -106.0114374577826
Iteration 13 complete. Error: -106.0114374577826 Total: 3.5848; Orientation: 0.2808; Line Search: 2.5535
Adding measurement 776b467b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.158e+05, gradient 2.548e-02, dot -0.249; [23e0a2d5-3ee3-4fe1-8800-04e50fe9e380 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -106.0114374577826, -20.187807754870498, -13.955067721217477, -8.818074849112026
LBFGS Accumulation History: 3 points
Removed measurement 776b467b to history. Total: 3
th(0)=-106.0114374577826;dx=-6.466672969986259E-4
New Minimum: -106.0114374577826 > -109.70499128988455
END: th(101534.75573527958)=-109.70499128988455; dx=-8.645729022427545E-5 evalInputDelta=3.6935538321019408
Fitness changed from -106.0114374577826 to -109.70499128988455
Iteration 14 complete. Error: -109.70499128988455 Total: 2.0781; Orientation: 0.3043; Line Search: 1.2381
Adding measurement 26b4f4dc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.643e+04, gradient 2.999e-02, dot -0.159; [23e0a2d5-3ee3-4fe1-8800-04e50fe9e380 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -109.70499128988455, -20.187807754870498, -13.955067721217477, -8.818074849112026
LBFGS Accumulation History: 3 points
Removed measurement 26b4f4dc to history. Total: 3
th(0)=-109.70499128988455;dx=-8.986427570659957E-4
Armijo: th(218750.00000000012)=-73.33424838976205; dx=7.174158395976802E-5 evalInputDelta=-36.370742900122494
Armijo: th(109375.00000000006)=-106.32485274676343; dx=3.52670672153275E-5 evalInputDelta=-3.38013854312112
New Minimum: -109.70499128988455 > -119.98281942291183
END: th(36458.33333333335)=-119.98281942291183; dx=-3.436448019611821E-4 evalInputDelta=10.277828133027285
Fitness changed from -109.70499128988455 to -119.98281942291183
Iteration 15 complete. Error: -119.98281942291183 Total: 3.4170; Orientation: 0.3167; Line Search: 2.4906
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/93bbb4fd-ae8a-450a-b24e-d61843883b98.jpg)
Final threshold in iteration 16: -119.98281942291183 (> -Infinity) after 45.290s (< 5400.000s)

Returns

    -119.98281942291183