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 190.53 seconds (2.942 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: 2161713382043
Reset training subject: 2162694724480
Adding measurement 178bb2a6 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.13726018914416666;dx=-3.619826154414238E-5
New Minimum: -0.13726018914416666 > -0.1373349811566879
WOLFE (weak): th(2.154434690031884)=-0.1373349811566879; dx=-3.624768665691203E-5 evalInputDelta=7.4792012521252E-5
New Minimum: -0.1373349811566879 > -0.1374094139074948
WOLFE (weak): th(4.308869380063768)=-0.1374094139074948; dx=-3.636605527586511E-5 evalInputDelta=1.4922476332815404E-4
New Minimum: -0.1374094139074948 > -0.1377071889530634
WOLFE (weak): th(12.926608140191302)=-0.1377071889530634; dx=-3.6168154703670356E-5 evalInputDelta=4.4699980889673085E-4
New Minimum: -0.1377071889530634 > -0.13904809957587244
WOLFE (weak): th(51.70643256076521)=-0.13904809957587244; dx=-3.632416071132535E-5 evalInputDelta=0.001787910431705786
New Minimum: -0.13904809957587244 > -0.14620545217225991
WOLFE (weak): th(258.53216280382605)=-0.14620545217225991; dx=-3.573910711766641E-5 evalInputDelta=0.008945263028093259
New Minimum: -0.14620545217225991 > -0.19092466142636136
WOLFE (weak): th(1551.1929768229563)=-0.19092466142636136; dx=-3.668672698705344E-5 evalInputDelta=0.0536644722821947
New Minimum: -0.19092466142636136 > -0.43956865275608736
END: th(10858.350837760694)=-0.43956865275608736; dx=-2.2782904411767438E-5 evalInputDelta=0.3023084636119207
Fitness changed from -0.13726018914416666 to -0.43956865275608736
Iteration 1 complete. Error: -0.43956865275608736 Total: 10.1450; Orientation: 0.0192; Line Search: 7.3841
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/d16b6362-8201-48da-9115-413e5430c4a1.jpg)
Adding measurement 6f5ad4d9 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.43956865275608736;dx=-4.6109478010510774E-5
New Minimum: -0.43956865275608736 > -0.8994291389187514
END: th(23393.607721408407)=-0.8994291389187514; dx=-1.6071860053257808E-5 evalInputDelta=0.45986048616266406
Fitness changed from -0.43956865275608736 to -0.8994291389187514
Iteration 2 complete. Error: -0.8994291389187514 Total: 2.8019; Orientation: 0.0205; Line Search: 1.8676
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/06b5d397-8655-4df6-97d5-a769e3711e59.jpg)
Adding measurement 23f0c59 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.8994291389187514;dx=-8.738702515143411E-5
New Minimum: -0.8994291389187514 > -1.171545262040751
WOLF (strong): th(50400.00000000001)=-1.171545262040751; dx=3.4676367742735733E-6 evalInputDelta=0.2721161231219995
New Minimum: -1.171545262040751 > -1.504636037546625
END: th(25200.000000000004)=-1.504636037546625; dx=-9.674010157035382E-6 evalInputDelta=0.6052068986278736
Fitness changed from -0.8994291389187514 to -1.504636037546625
Iteration 3 complete. Error: -1.504636037546625 Total: 3.6854; Orientation: 0.0197; Line Search: 2.7697
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/3ffb50a7-470c-4530-9975-a5be2def35cc.jpg)
Adding measurement 55d454d9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.596e+03, gradient 1.275e-02, dot -0.229; [eecb2f89-d14d-4ab4-92e6-0fe63b446660 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.504636037546625, -0.8994291389187514, -0.43956865275608736, -0.13726018914416666
LBFGS Accumulation History: 3 points
Removed measurement 55d454d9 to history. Total: 3
th(0)=-1.504636037546625;dx=-1.5939925913439684E-4
New Minimum: -1.504636037546625 > -1.6859823395968219
WOLF (strong): th(54291.75418880348)=-1.6859823395968219; dx=4.10437280819541E-6 evalInputDelta=0.18134630205019686
New Minimum: -1.6859823395968219 > -1.9283419717294625
WOLF (strong): th(27145.87709440174)=-1.9283419717294625; dx=1.71240063646621E-6 evalInputDelta=0.42370593418283753
New Minimum: -1.9283419717294625 > -2.1720595247110377
END: th(9048.625698133914)=-2.1720595247110377; dx=-4.3439783863107265E-5 evalInputDelta=0.6674234871644127
Fitness changed from -1.504636037546625 to -2.1720595247110377
Iteration 4 complete. Error: -2.1720595247110377 Total: 5.0256; Orientation: 0.4441; Line Search: 3.6819
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/139ea7b1-f9b1-4405-8368-c53a839f2aa2.jpg)
Adding measurement 63a8a832 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.036e+03, gradient 1.263e-02, dot -0.269; [eecb2f89-d14d-4ab4-92e6-0fe63b446660 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.1720595247110377, -0.8994291389187514, -0.43956865275608736, -0.13726018914416666
LBFGS Accumulation History: 3 points
Removed measurement 63a8a832 to history. Total: 3
th(0)=-2.1720595247110377;dx=-1.5648248483033148E-4
New Minimum: -2.1720595247110377 > -2.802113831837441
WOLF (strong): th(19494.673101173677)=-2.802113831837441; dx=2.374557293635601E-6 evalInputDelta=0.6300543071264033
END: th(9747.336550586839)=-2.793670950161651; dx=-3.797882429486742E-5 evalInputDelta=0.6216114254506131
Fitness changed from -2.1720595247110377 to -2.802113831837441
Iteration 5 complete. Error: -2.802113831837441 Total: 5.1889; Orientation: 0.4354; Line Search: 3.8407
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/f2ed5c99-c078-45fa-a836-aae2978324cf.jpg)
Adding measurement 5045225f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.182e+03, gradient 2.231e-02, dot -0.137; [eecb2f89-d14d-4ab4-92e6-0fe63b446660 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.802113831837441, -0.8994291389187514, -0.43956865275608736, -0.13726018914416666
LBFGS Accumulation History: 3 points
Removed measurement 5045225f to history. Total: 3
th(0)=-2.802113831837441;dx=-4.8528872247283157E-4
New Minimum: -2.802113831837441 > -5.429254879628846
END: th(21000.000000000007)=-5.429254879628846; dx=-3.730440611723235E-5 evalInputDelta=2.6271410477914046
Fitness changed from -2.802113831837441 to -5.429254879628846
Iteration 6 complete. Error: -5.429254879628846 Total: 3.2266; Orientation: 0.4579; Line Search: 1.8614
Adding measurement 2bb8ac5e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.735e+05, gradient 5.551e-02, dot -0.072; [eecb2f89-d14d-4ab4-92e6-0fe63b446660 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.429254879628846, -0.8994291389187514, -0.43956865275608736, -0.13726018914416666
LBFGS Accumulation History: 3 points
Removed measurement 2bb8ac5e to history. Total: 3
th(0)=-5.429254879628846;dx=-0.0029571762016555275
Armijo: th(45243.12849066957)=-2.4651964905520267; dx=2.2059853056525253E-5 evalInputDelta=-2.964058389076819
New Minimum: -5.429254879628846 > -6.577695855211905
WOLF (strong): th(22621.564245334786)=-6.577695855211905; dx=1.4716771014308306E-4 evalInputDelta=1.1484409755830596
New Minimum: -6.577695855211905 > -14.47068243119218
END: th(7540.521415111595)=-14.47068243119218; dx=-6.071365327079302E-4 evalInputDelta=9.041427551563334
Fitness changed from -5.429254879628846 to -14.47068243119218
Iteration 7 complete. Error: -14.47068243119218 Total: 5.0299; Orientation: 0.4406; Line Search: 3.7423
Adding measurement 1091f34c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.852e+03, gradient 6.810e-02, dot -0.016; [eecb2f89-d14d-4ab4-92e6-0fe63b446660 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -14.47068243119218, -0.8994291389187514, -0.43956865275608736, -0.13726018914416666
LBFGS Accumulation History: 3 points
Removed measurement 1091f34c to history. Total: 3
th(0)=-14.47068243119218;dx=-0.004441767214288961
New Minimum: -14.47068243119218 > -16.233704833075592
WOLF (strong): th(16245.56091764473)=-16.233704833075592; dx=9.550923516380893E-5 evalInputDelta=1.7630224018834113
New Minimum: -16.233704833075592 > -24.946458780036547
END: th(8122.780458822365)=-24.946458780036547; dx=-4.932582163634853E-4 evalInputDelta=10.475776348844366
Fitness changed from -14.47068243119218 to -24.946458780036547
Iteration 8 complete. Error: -24.946458780036547 Total: 4.0862; Orientation: 0.4347; Line Search: 2.8030
Adding measurement 1df7068e to history. Total: 3
Accepted

...skipping 16187 bytes...

ints
Removed measurement 719fdba0 to history. Total: 4
Removed measurement 6c987de4 to history. Total: 3
th(0)=-75.94461129254005;dx=-0.0038698935357324533
New Minimum: -75.94461129254005 > -75.94497776968204
WOLFE (weak): th(0.11072137188208621)=-75.94497776968204; dx=-0.003890522579669083 evalInputDelta=3.66477141994892E-4
New Minimum: -75.94497776968204 > -75.94534103036703
WOLFE (weak): th(0.22144274376417242)=-75.94534103036703; dx=-0.0038709001535508353 evalInputDelta=7.297378269868204E-4
New Minimum: -75.94534103036703 > -75.94676512408215
WOLFE (weak): th(0.6643282312925173)=-75.94676512408215; dx=-0.003858774375019056 evalInputDelta=0.00215383154210258
New Minimum: -75.94676512408215 > -75.95326803884906
WOLFE (weak): th(2.657312925170069)=-75.95326803884906; dx=-0.0038526274859040496 evalInputDelta=0.008656746309014807
New Minimum: -75.95326803884906 > -75.98787231052893
WOLFE (weak): th(13.286564625850346)=-75.98787231052893; dx=-0.003897552189704174 evalInputDelta=0.0432610179888826
New Minimum: -75.98787231052893 > -76.20350144719401
WOLFE (weak): th(79.71938775510208)=-76.20350144719401; dx=-0.0038328183057894667 evalInputDelta=0.2588901546539688
New Minimum: -76.20350144719401 > -77.72112167169392
WOLFE (weak): th(558.0357142857146)=-77.72112167169392; dx=-0.0035661938997173285 evalInputDelta=1.7765103791538763
New Minimum: -77.72112167169392 > -85.88432730004497
END: th(4464.2857142857165)=-85.88432730004497; dx=-0.0020755377665148535 evalInputDelta=9.939716007504927
Fitness changed from -75.94461129254005 to -85.88432730004497
Iteration 18 complete. Error: -85.88432730004497 Total: 10.3799; Orientation: 0.9738; Line Search: 8.5170
Adding measurement 6896b799 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 4.232e+03, gradient 5.811e-02, dot 0.160; [eecb2f89-d14d-4ab4-92e6-0fe63b446660 = 1.000/1.000e+00]
th(0)=-85.88432730004497;dx=-38.76649987498291
Armijo: th(9618.012009070915)=-20.531876506565574; dx=0.0036159227680317993 evalInputDelta=-65.35245079347939
Armijo: th(4809.006004535458)=-20.536358109327253; dx=0.007217727880941417 evalInputDelta=-65.34796919071772
Armijo: th(1603.0020015118191)=-20.690504702961725; dx=0.02111293041819041 evalInputDelta=-65.19382259708325
Armijo: th(400.7505003779548)=-22.2274885846174; dx=0.08037405166711803 evalInputDelta=-63.65683871542757
Armijo: th(80.15010007559096)=-24.887170929124682; dx=0.4473518380216366 evalInputDelta=-60.997156370920294
Armijo: th(13.358350012598493)=-35.644022470683986; dx=1.814675528711822 evalInputDelta=-50.24030482936099
Armijo: th(1.908335716085499)=-76.38058745928183; dx=-1.6095605672389144 evalInputDelta=-9.503739840763146
New Minimum: -85.88432730004497 > -88.95427909623713
END: th(0.23854196451068738)=-88.95427909623713; dx=-21.61779693948464 evalInputDelta=3.069951796192157
Fitness changed from -85.88432730004497 to -88.95427909623713
Iteration 19 complete. Error: -88.95427909623713 Total: 11.1000; Orientation: 0.5035; Line Search: 8.6362
Adding measurement 76fbe7c5 to history. Total: 4
Accepted: LBFGS Orientation magnitude: 4.495e+03, gradient 6.234e-02, dot 0.071; [eecb2f89-d14d-4ab4-92e6-0fe63b446660 = 1.000/1.000e+00]
th(0)=-88.95427909623713;dx=-20.969761167581016
Armijo: th(0.5139230833701793)=-83.50378336301596; dx=-0.48877644431271783 evalInputDelta=-5.4504957332211745
Armijo: th(0.25696154168508967)=-87.03429920600986; dx=-3.973393295860301 evalInputDelta=-1.9199798902272676
Armijo: th(0.08565384722836322)=-88.59927507022137; dx=-6.978670259520053 evalInputDelta=-0.355004026015763
Armijo: th(0.021413461807090806)=-88.88080149841134; dx=-8.891846810191561 evalInputDelta=-0.07347759782578578
Armijo: th(0.004282692361418161)=-88.9413238153742; dx=-9.802356062981513 evalInputDelta=-0.012955280862925633
Armijo: th(7.137820602363602E-4)=-88.95217124686306; dx=-10.164080601098679 evalInputDelta=-0.0021078493740702697
Armijo: th(1.0196886574805147E-4)=-88.95398268293697; dx=-9.663973376971922 evalInputDelta=-2.9641330016261236E-4
Armijo: th(1.2746108218506433E-5)=-88.95423792778229; dx=-9.965095725399514 evalInputDelta=-4.116845484247733E-5
Armijo: th(1.4162342465007149E-6)=-88.95426537342097; dx=-10.288793953135992 evalInputDelta=-1.3722816163408424E-5
Armijo: th(1.4162342465007148E-7)=-88.95427360711092; dx=-10.383219294802812 evalInputDelta=-5.489126209567985E-6
Armijo: th(1.2874856786370135E-8)=-88.95427360711092; dx=-10.386211661670584 evalInputDelta=-5.489126209567985E-6
Armijo: th(1.0729047321975112E-9)=-88.95427360711092; dx=-10.03795304896975 evalInputDelta=-5.489126209567985E-6
MIN ALPHA (8.25311332459624E-11): th(0.0)=-88.95427909623713
Fitness changed from -88.95427909623713 to -88.95427909623713
Static Iteration Total: 14.6385; Orientation: 0.5585; Line Search: 13.1887
Iteration 20 failed. Error: -88.95427909623713
Previous Error: 0.0 -> -88.95427909623713
Retrying iteration 20
Reset training subject: 2325017887597
Adding measurement 5cce7751 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-88.95427909623713;dx=-0.003837746838020967
WOLFE (weak): th(2.1544346900318838E-10)=-88.95427909623713; dx=-0.003637777843725947 evalInputDelta=0.0
WOLFE (weak): th(4.3088693800637676E-10)=-88.95427909623713; dx=-0.0036238304122593722 evalInputDelta=0.0
WOLFE (weak): th(1.2926608140191302E-9)=-88.95427909623713; dx=-0.0036444569859058664 evalInputDelta=0.0
WOLFE (weak): th(5.170643256076521E-9)=-88.95427909623713; dx=-0.0036561408189490783 evalInputDelta=0.0
WOLFE (weak): th(2.5853216280382606E-8)=-88.95427909623713; dx=-0.0036284189175256687 evalInputDelta=0.0
WOLFE (weak): th(1.5511929768229565E-7)=-88.95427909623713; dx=-0.0036316297095941533 evalInputDelta=0.0
Armijo: th(1.0858350837760695E-6)=-88.95427360711092; dx=-0.0036211152070245315 evalInputDelta=-5.489126209567985E-6
WOLFE (weak): th(6.204771907291826E-7)=-88.95427909623713; dx=-0.003649180743354361 evalInputDelta=0.0
Armijo: th(8.531561372526261E-7)=-88.95427360711092; dx=-0.0036115141879660547 evalInputDelta=-5.489126209567985E-6
Armijo: th(7.368166639909043E-7)=-88.95427360711092; dx=-0.0036247258324652665 evalInputDelta=-5.489126209567985E-6
Armijo: th(6.786469273600435E-7)=-88.95427360711092; dx=-0.003608633161154569 evalInputDelta=-5.489126209567985E-6
WOLFE (weak): th(6.49562059044613E-7)=-88.95427909623713; dx=-0.003600186163696492 evalInputDelta=0.0
WOLFE (weak): th(6.641044932023282E-7)=-88.95427909623713; dx=-0.0036305576537334736 evalInputDelta=0.0
Armijo: th(6.713757102811858E-7)=-88.95427360711092; dx=-0.0036193876853290534 evalInputDelta=-5.489126209567985E-6
WOLFE (weak): th(6.67740101741757E-7)=-88.95427909623713; dx=-0.003618641275734479 evalInputDelta=0.0
Armijo: th(6.695579060114715E-7)=-88.95427360711092; dx=-0.0036348679331101273 evalInputDelta=-5.489126209567985E-6
Armijo: th(6.686490038766142E-7)=-88.95427360711092; dx=-0.003613062347658626 evalInputDelta=-5.489126209567985E-6
Armijo: th(6.681945528091856E-7)=-88.95427360711092; dx=-0.0036438329724072334 evalInputDelta=-5.489126209567985E-6
WOLFE (weak): th(6.679673272754713E-7)=-88.95427909623713; dx=-0.0036419640647468946 evalInputDelta=0.0
Armijo: th(6.680809400423285E-7)=-88.95427360711092; dx=-0.0036024327835530176 evalInputDelta=-5.489126209567985E-6
Armijo: th(6.680241336588999E-7)=-88.95427360711092; dx=-0.003658450664902198 evalInputDelta=-5.489126209567985E-6
WOLFE (weak): th(6.679957304671856E-7)=-88.95427909623713; dx=-0.0036124183170012734 evalInputDelta=0.0
WOLFE (weak): th(6.680099320630428E-7)=-88.95427909623713; dx=-0.0036005543682327526 evalInputDelta=0.0
Armijo: th(6.680170328609714E-7)=-88.95427360711092; dx=-0.003625436456131981 evalInputDelta=-5.489126209567985E-6
WOLFE (weak): th(6.680134824620071E-7)=-88.95427909623713; dx=-0.003593445325520507 evalInputDelta=0.0
mu ~= nu (6.680134824620071E-7): th(0.0)=-88.95427909623713
Fitness changed from -88.95427909623713 to -88.95427909623713
Static Iteration Total: 27.2209; Orientation: 0.0201; Line Search: 25.4561
Iteration 21 failed. Error: -88.95427909623713
Previous Error: 0.0 -> -88.95427909623713
Optimization terminated 21
Final threshold in iteration 21: -88.95427909623713 (> -Infinity) after 190.525s (< 3600.000s)

Returns

    -88.95427909623713