Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

BasicOptimizer.scala:89 executed in 65.80 seconds (1.190 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: 3915741922111
Reset training subject: 3916376304700
Adding measurement 5e6ce0c8 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-1.5014800569109295;dx=-1.4567008413635777E-5
New Minimum: -1.5014800569109295 > -1.5014808783195264
WOLFE (weak): th(2.154434690031884)=-1.5014808783195264; dx=-1.4569812773635435E-5 evalInputDelta=8.214085969182605E-7
New Minimum: -1.5014808783195264 > -1.5014817583996674
WOLFE (weak): th(4.308869380063768)=-1.5014817583996674; dx=-1.4565304623262969E-5 evalInputDelta=1.7014887379041E-6
New Minimum: -1.5014817583996674 > -1.5014835772303239
WOLFE (weak): th(12.926608140191302)=-1.5014835772303239; dx=-1.4570011328132115E-5 evalInputDelta=3.5203193944344235E-6
New Minimum: -1.5014835772303239 > -1.501495546254529
WOLFE (weak): th(51.70643256076521)=-1.501495546254529; dx=-1.4572677301522542E-5 evalInputDelta=1.548934359951737E-5
New Minimum: -1.501495546254529 > -1.501556387319089
WOLFE (weak): th(258.53216280382605)=-1.501556387319089; dx=-1.4564573455922615E-5 evalInputDelta=7.633040815946401E-5
New Minimum: -1.501556387319089 > -1.50195780615045
WOLFE (weak): th(1551.1929768229563)=-1.50195780615045; dx=-1.4469503709653127E-5 evalInputDelta=4.777492395204863E-4
New Minimum: -1.50195780615045 > -1.5049493760097865
WOLFE (weak): th(10858.350837760694)=-1.5049493760097865; dx=-1.4096889281735051E-5 evalInputDelta=0.00346931909885706
New Minimum: -1.5049493760097865 > -1.5327616008577518
END: th(86866.80670208555)=-1.5327616008577518; dx=-1.0771067643977383E-5 evalInputDelta=0.031281543946822365
Fitness changed from -1.5014800569109295 to -1.5327616008577518
Iteration 1 complete. Error: -1.5327616008577518 Total: 8.0254; Orientation: 0.0163; Line Search: 6.0467
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/7eb8a5d4-9ddc-4f3a-bbcf-34d0eea315ae.jpg)
Adding measurement 147f84fc to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-1.5327616008577518;dx=-1.5847461780003612E-5
New Minimum: -1.5327616008577518 > -1.5936659798374149
END: th(187148.86177126726)=-1.5936659798374149; dx=-7.693572175310406E-6 evalInputDelta=0.060904378979663054
Fitness changed from -1.5327616008577518 to -1.5936659798374149
Iteration 2 complete. Error: -1.5936659798374149 Total: 2.0065; Orientation: 0.0159; Line Search: 1.3322
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/e523958e-26ce-41fa-b1a0-8d3440f470d3.jpg)
Adding measurement 4139f97c to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-1.5936659798374149;dx=-1.7667445821718523E-5
New Minimum: -1.5936659798374149 > -1.799175715899581
END: th(403200.00000000006)=-1.799175715899581; dx=-3.4530218544086575E-6 evalInputDelta=0.20550973606216605
Fitness changed from -1.5936659798374149 to -1.799175715899581
Iteration 3 complete. Error: -1.799175715899581 Total: 2.0978; Orientation: 0.0155; Line Search: 1.3510
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/2fcc62e4-ef29-4374-ad39-91ba267a6fdd.jpg)
Adding measurement 16fa8aeb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.383e+03, gradient 4.617e-03, dot -0.183; [7f6bf74c-f396-4198-baea-6578274544d0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.799175715899581, -1.5936659798374149, -1.5327616008577518, -1.5014800569109295
LBFGS Accumulation History: 3 points
Removed measurement 16fa8aeb to history. Total: 3
th(0)=-1.799175715899581;dx=-2.1303113435712967E-5
Armijo: th(868668.0670208557)=-1.7112006556872956; dx=-9.912885783586636E-7 evalInputDelta=-0.0879750602122853
Armijo: th(434334.03351042786)=-1.788605053848154; dx=-2.992464265096854E-6 evalInputDelta=-0.010570662051426982
New Minimum: -1.799175715899581 > -1.8283987830120423
END: th(144778.01117014262)=-1.8283987830120423; dx=-1.0434079543666059E-5 evalInputDelta=0.029223067112461365
Fitness changed from -1.799175715899581 to -1.8283987830120423
Iteration 4 complete. Error: -1.8283987830120423 Total: 3.7946; Orientation: 0.4213; Line Search: 2.7252
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/b8d25d0e-0855-4de1-b336-890c28407ce4.jpg)
Adding measurement 4bcb3e75 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.774e+03, gradient 4.617e-03, dot -0.210; [7f6bf74c-f396-4198-baea-6578274544d0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8283987830120423, -1.5936659798374149, -1.5327616008577518, -1.5014800569109295
LBFGS Accumulation History: 3 points
Removed measurement 4bcb3e75 to history. Total: 3
th(0)=-1.8283987830120423;dx=-2.1308836704747174E-5
New Minimum: -1.8283987830120423 > -1.9373414968624114
END: th(311914.76961877884)=-1.9373414968624114; dx=-5.299122267562441E-6 evalInputDelta=0.10894271385036913
Fitness changed from -1.8283987830120423 to -1.9373414968624114
Iteration 5 complete. Error: -1.9373414968624114 Total: 3.1182; Orientation: 0.4266; Line Search: 2.0469
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/a3f4607e-e34a-45a3-ac83-c240b6bb362f.jpg)
Adding measurement 6018f799 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.069e+03, gradient 4.604e-03, dot -0.173; [7f6bf74c-f396-4198-baea-6578274544d0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.9373414968624114, -1.5936659798374149, -1.5327616008577518, -1.5014800569109295
LBFGS Accumulation History: 3 points
Removed measurement 6018f799 to history. Total: 3
th(0)=-1.9373414968624114;dx=-2.118728046962028E-5
Armijo: th(672000.0000000002)=-1.840613993960545; dx=-1.8586298937255758E-6 evalInputDelta=-0.09672750290186638
Armijo: th(336000.0000000001)=-1.8290218558743965; dx=-3.92570373913005E-6 evalInputDelta=-0.10831964098801494
New Minimum: -1.9373414968624114 > -1.9530027095321991
END: th(112000.00000000004)=-1.9530027095321991; dx=-1.2545583309137902E-5 evalInputDelta=0.015661212669787705
Fitness changed from -1.9373414968624114 to -1.9530027095321991
Iteration 6 complete. Error: -1.9530027095321991 Total: 3.9139; Orientation: 0.4653; Line Search: 2.7893
Adding measurement 3d030558 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.009e+04, gradient 4.473e-03, dot -0.188; [7f6bf74c-f396-4198-baea-6578274544d0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.9530027095321991, -1.5936659798374149, -1.5327616008577518, -1.5014800569109295
LBFGS Accumulation History: 3 points
Removed measurement 3d030558 to history. Total: 3
th(0)=-1.9530027095321991;dx=-1.999947054600632E-5
Armijo: th(241296.68528357107)=-1.8741097253237975; dx=-5.564399414449928E-6 evalInputDelta=-0.07889298420840163
Armijo: th(120648.34264178554)=-1.906598269370026; dx=-9.18672241422267E-6 evalInputDelta=-0.046404440162173044
Armijo: th(40216.114213928515)=-1.9350413364279815; dx=-1.4972873272330715E-5 evalInputDelta=-0.017961373104217637
Armijo: th(10054.028553482129)=-1.9475922476130867; dx=-1.8645955804395586E-5 evalInputDelta=-0.00541046191911243
Armijo: th(2010.8057106964256)=-1.9519219974435496; dx=-1.969485964331844E-5 evalInputDelta=-0.0010807120886495714
Armijo: th(335.13428511607094)=-1.9528271435372784; dx=-1.9886724117087027E-5 evalInputDelta=-1.7556599492074554E-4
Armijo: th(47.87632644515299)=-1.9529773589940218; dx=-1.9962046181285937E-5 evalInputDelta=-2.5350538177315585E-5
Armijo: th(5.984540805644124)=-1.9529992813647823; dx=-1.996004274380534E-5 evalInputDelta=-3.4281674168301635E-6
Armijo: th(0.6649489784049026)=-1.953002438887622; dx=-1.995771143439871E-5 evalInputDelta=-2.7064457719383483E-7
Armijo: th(0.06649489784049026)=-1.9530022584578828; dx=-1.9952597230451123E-5 evalInputDelta=-4.5107431634328066E-7
Armijo: th(0.006044990712771842)=-1.953002529102485; dx=-1.995146686647596E-5 evalInputDelta=-1.8042971405840547E-7
Armijo: th(5.037492260643201E-4)=-1.953002529102485; dx=-1.9965522718095353E-5 evalInputDelta=-1.8042971405840547E-7
Armijo: th(3.874994046648616E-5)=-1.9530026193173442; dx=-1.99626305235878E-5 evalInputDelta=-9.021485491977899E-8
WOLFE (weak): th(2.767852890463297E-6)=-1.9530027095321991; dx=-1.996248220488807E-5 evalInputDelta=0.0
Armijo: th(2.0758896678474727E-5)=-1.9530026193173442; dx=-1.9963858313218807E-5 evalInputDelta=-9.021485491977899E-8
Armijo: th(1.1763374784469012E-5)=-1.953002529102485; dx=-1.995940270765033E-5 evalInputDelta=-1.8042971405840547E-7
Armijo: th(7.265613837466155E-6)=-1.953002529102485; dx=-1.9965680971946237E-5 evalInputDelta=-1.8042971405840547E-7
Armijo: th(5.016733363964726E-6)=-1.953002529102485; dx=-1.996161796274755E-5 evalInputDelta=-1.8042971405840547E-7
Armijo: th(3.8922931272140115E-6)=-1.9530026193173442; dx=-1.9962483943154023E-5 evalInputDelta=-9.021485491977899E-8
Armijo: th(3.330073008838654E-6)=-1.9530026193173442; dx=-1.996313044662215E-5 evalInputDelta=-9.021485491977899E-8
Armijo: th(3.0489629496509754E-6)=-1.9530026193173442; dx=-1.9961653566316315E-5 evalInputDelta=-9.021485491977899E-8
Armijo: th(2.9084079200571365E-6)=-1.9530026193173442; dx=-1.9962285761979976E-5 evalInputDelta=-9.021485491977899E-8
WOLFE (weak): th(2.838130405260217E-6)=-1.9530027095321991; dx=-1.9962427671252954E-5 evalInputDelta=0.0
WOLFE (weak): th(2.8732691626586768E-6)=-1.9530027095321991; dx=-1.9962115479035957E-5 evalInputDelta=0.0
WOLFE (weak): th(2.8908385413579064E-6)=-1.9530027095321991; dx=-1.9962225759156957E-5 evalInputDelta=0.0
WOLFE (weak): th(2.8996232307075215E-6)=-1.9530027095321991; dx=-1.996004986912528E-5 evalInputDelta=0.0
WOLFE (weak): th(2.904015575382329E-6)=-1.9530027095321991; dx=-1.996222187735544E-5 evalInputDelta=0.0
Armijo: th(2.906211747719733E-6)=-1.9530026193173442; dx=-1.9960783959444628E-5 evalInputDelta=-9.021485491977899E-8
Armijo: th(2.905113661551031E-6)=-1.9530026193173442; dx=-1.9960216828604336E-5 evalInputDelta=-9.021485491977899E-8
WOLFE (weak): th(2.90456461846668E-6)=-1.9530027095321991; dx=-1.9963453584650164E-5 evalInputDelta=0.0
WOLFE (weak): th(2.9048391400088555E-6)=-1.9530027095321991; dx=-1.996444592210027E-5 evalInputDelta=0.0
WOLFE (weak): th(2.9049764007799434E-6)=-1.9530027095321991; dx=-1.9963110688265843E-5 evalInputDelta=0.0
WOLFE (weak): th(2.905045031165487E-6)=-1.9530027095321991; dx=-1.9963235730615866E-5 evalInputDelta=0.0
WOLFE (weak): th(2.905079346358259E-6)=-1.9530027095321991; dx=-1.9962566151056195E-5 evalInputDelta=0.0
WOLFE (weak): th(2.905096503954645E-6)=-1.9530027095321991; dx=-1.9962822442640816E-5 evalInputDelta=0.0
mu ~= nu (2.905096503954645E-6): th(0.0)=-1.9530027095321991
Fitness changed from -1.9530027095321991 to -1.9530027095321991
Static Iteration Total: 26.7884; Orientation: 0.4418; Line Search: 25.6919
Iteration 7 failed. Error: -1.9530027095321991
Previous Error: 0.0 -> -1.9530027095321991
Retrying iteration 7
Reset training subject: 3965486887499
Adding measurement 289fd6a0 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-1.9530027095321991;dx=-2.0004172460538092E-5
Armijo: th(6.258859168470661E-6)=-1.953002529102485; dx=-1.9963085478618126E-5 evalInputDelta=-1.8042971405840547E-7
Armijo: th(3.1294295842353305E-6)=-1.9530026193173442; dx=-1.9960410902509228E-5 evalInputDelta=-9.021485491977899E-8
WOLFE (weak): th(1.0431431947451101E-6)=-1.9530027095321991; dx=-1.9963878056355474E-5 evalInputDelta=0.0
WOLFE (weak): th(2.0862863894902202E-6)=-1.9530027095321991; dx=-1.9961249559691123E-5 evalInputDelta=0.0
WOLFE (weak): th(2.6078579868627754E-6)=-1.9530027095321991; dx=-1.9963195965687306E-5 evalInputDelta=0.0
WOLFE (weak): th(2.868643785549053E-6)=-1.9530027095321991; dx=-1.9963706682894764E-5 evalInputDelta=0.0
Armijo: th(2.9990366848921917E-6)=-1.9530026193173442; dx=-1.9964483235127668E-5 evalInputDelta=-9.021485491977899E-8
Armijo: th(2.9338402352206226E-6)=-1.9530026193173442; dx=-1.9961057338886312E-5 evalInputDelta=-9.021485491977899E-8
WOLFE (weak): th(2.9012420103848376E-6)=-1.9530027095321991; dx=-1.9960548775163683E-5 evalInputDelta=0.0
Armijo: th(2.91754112280273E-6)=-1.9530026193173442; dx=-1.9963217654890827E-5 evalInputDelta=-9.021485491977899E-8
Armijo: th(2.909391566593784E-6)=-1.9530026193173442; dx=-1.996417264576934E-5 evalInputDelta=-9.021485491977899E-8
Armijo: th(2.905316788489311E-6)=-1.9530026193173442; dx=-1.99620438015783E-5 evalInputDelta=-9.021485491977899E-8
WOLFE (weak): th(2.9032793994370742E-6)=-1.9530027095321991; dx=-1.9961241301556516E-5 evalInputDelta=0.0
WOLFE (weak): th(2.9042980939631926E-6)=-1.9530027095321991; dx=-1.9963215911214748E-5 evalInputDelta=0.0
WOLFE (weak): th(2.9048074412262517E-6)=-1.9530027095321991; dx=-1.9962708888806623E-5 evalInputDelta=0.0
WOLFE (weak): th(2.9050621148577813E-6)=-1.9530027095321991; dx=-1.9964353427114673E-5 evalInputDelta=0.0
Armijo: th(2.905189451673546E-6)=-1.9530026193173442; dx=-1.996199490626203E-5 evalInputDelta=-9.021485491977899E-8
Armijo: th(2.905125783265664E-6)=-1.9530026193173442; dx=-1.9962623477670103E-5 evalInputDelta=-9.021485491977899E-8
WOLFE (weak): th(2.9050939490617228E-6)=-1.9530027095321991; dx=-1.9965363091964948E-5 evalInputDelta=0.0
Armijo: th(2.9051098661636933E-6)=-1.9530026193173442; dx=-1.9963349629215975E-5 evalInputDelta=-9.021485491977899E-8
mu ~= nu (2.9050939490617228E-6): th(0.0)=-1.9530027095321991
Fitness changed from -1.9530027095321991 to -1.9530027095321991
Static Iteration Total: 16.0516; Orientation: 0.0175; Line Search: 14.7858
Iteration 8 failed. Error: -1.9530027095321991
Previous Error: 0.0 -> -1.9530027095321991
Optimization terminated 8
Final threshold in iteration 8: -1.9530027095321991 (> -Infinity) after 65.797s (< 3600.000s)

Returns

    -1.9530027095321991