Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

BasicOptimizer.scala:89 executed in 2259.82 seconds (12.309 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: 16917663916421
Reset training subject: 16965865354414
Adding measurement 3e0d0303 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-3.5613393783569336;dx=-3.15863890390424E-7
New Minimum: -3.5613393783569336 > -3.5613400638103485
WOLFE (weak): th(2.154434690031884)=-3.5613400638103485; dx=-2.9222515677649847E-7 evalInputDelta=6.854534149169922E-7
New Minimum: -3.5613400638103485 > -3.5613409876823425
WOLFE (weak): th(4.308869380063768)=-3.5613409876823425; dx=-3.2835736108108373E-7 evalInputDelta=1.6093254089355469E-6
New Minimum: -3.5613409876823425 > -3.5613441169261932
WOLFE (weak): th(12.926608140191302)=-3.5613441169261932; dx=-3.2835239101995566E-7 evalInputDelta=4.738569259643555E-6
New Minimum: -3.5613441169261932 > -3.5613585710525513
WOLFE (weak): th(51.70643256076521)=-3.5613585710525513; dx=-3.2654814867559446E-7 evalInputDelta=1.919269561767578E-5
New Minimum: -3.5613585710525513 > -3.561435282230377
WOLFE (weak): th(258.53216280382605)=-3.561435282230377; dx=-3.266084998282982E-7 evalInputDelta=9.590387344360352E-5
New Minimum: -3.561435282230377 > -3.561914712190628
WOLFE (weak): th(1551.1929768229563)=-3.561914712190628; dx=-3.264729949264379E-7 evalInputDelta=5.75333833694458E-4
New Minimum: -3.561914712190628 > -3.5653624534606934
WOLFE (weak): th(10858.350837760694)=-3.5653624534606934; dx=-3.260368520371434E-7 evalInputDelta=0.004023075103759766
New Minimum: -3.5653624534606934 > -3.5933403968811035
WOLFE (weak): th(86866.80670208555)=-3.5933403968811035; dx=-3.2225282350588433E-7 evalInputDelta=0.03200101852416992
New Minimum: -3.5933403968811035 > -3.8316239714622498
END: th(781801.26031877)=-3.8316239714622498; dx=-2.811024861110985E-7 evalInputDelta=0.27028459310531616
Fitness changed from -3.5613393783569336 to -3.8316239714622498
Iteration 1 complete. Error: -3.8316239714622498 Total: 637.2915; Orientation: 0.0870; Line Search: 491.1777
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/ed46422c-9bd7-448e-84d2-9450b57250be.jpg)

    Adding measurement 473d1364 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-3.8316239714622498;dx=-2.617562585155909E-7
    New Minimum: -3.8316239714622498 > -4.295152708888054
    END: th(1684339.7559414052)=-4.295152708888054; dx=-1.8223068598382676E-7 evalInputDelta=0.46352873742580414
    Fitness changed from -3.8316239714622498 to -4.295152708888054
    Iteration 2 complete. Error: -4.295152708888054 Total: 148.2134; Orientation: 0.0926; Line Search: 98.0049
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/d81c5999-4a45-4f89-abfd-dd65607dcbb7.jpg)

    Adding measurement 36d012d1 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-4.295152708888054;dx=-1.5134157829230237E-7
    New Minimum: -4.295152708888054 > -4.821722030639648
    END: th(3628800.0)=-4.821722030639648; dx=-1.044480440208483E-7 evalInputDelta=0.5265693217515945
    Fitness changed from -4.295152708888054 to -4.821722030639648
    Iteration 3 complete. Error: -4.821722030639648 Total: 147.4089; Orientation: 0.0871; Line Search: 97.3054
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/11503d58-3aa6-466f-b951-f8584f38d777.jpg)

    Adding measurement 45406c13 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 6.092e+03, gradient 3.233e-04, dot -0.855; [b8d366fd-9816-44b3-8220-6b0a127e53a0 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -4.821722030639648, -4.295152708888054, -3.8316239714622498, -3.5613393783569336
    LBFGS Accumulation History: 3 points
    Removed measurement 45406c13 to history. Total: 3
    th(0)=-4.821722030639648;dx=-1.0328806235639165E-7
    New Minimum: -4.821722030639648 > -5.541742980480194
    END: th(7818012.6031877)=-5.541742980480194; dx=-6.062738427755951E-8 evalInputDelta=0.7200209498405457
    Fitness changed from -4.821722030639648 to -5.541742980480194
    Iteration 4 complete. Error: -5.541742980480194 Total: 150.7878; Orientation: 2.4758; Line Search: 97.7664
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/8056a847-c405-449b-9866-1a431be7998a.jpg)

    Adding measurement 33c528dd to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 5.401e+03, gradient 2.428e-04, dot -0.762; [b8d366fd-9816-44b3-8220-6b0a127e53a0 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -5.541742980480194, -4.295152708888054, -3.8316239714622498, -3.5613393783569336
    LBFGS Accumulation History: 3 points
    Removed measurement 33c528dd to history. Total: 3
    th(0)=-5.541742980480194;dx=-5.4978653115217025E-8
    New Minimum: -5.541742980480194 > -6.283436685800552
    END: th(1.684339755941405E7)=-6.283436685800552; dx=-2.5933044791159093E-8 evalInputDelta=0.7416937053203583
    Fitness changed from -5.541742980480194 to -6.283436685800552
    Iteration 5 complete. Error: -6.283436685800552 Total: 151.0206; Orientation: 2.3788; Line Search: 98.7287
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/c28f8cb5-803f-4f80-ab96-253243fe3d18.jpg)

    Adding measurement 51c4b567 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.967e+03, gradient 2.142e-04, dot -0.574; [b8d366fd-9816-44b3-8220-6b0a127e53a0 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -6.283436685800552, -4.295152708888054, -3.8316239714622498, -3.5613393783569336
    LBFGS Accumulation History: 3 points
    Removed measurement 51c4b567 to history. Total: 3
    th(0)=-6.283436685800552;dx=-4.79971574031064E-8
    New Minimum: -6.283436685800552 > -6.588239386677742
    END: th(3.6288E7)=-6.588239386677742; dx=-2.549595933142845E-9 evalInputDelta=0.30480270087718964
    Fitness changed from -6.283436685800552 to -6.588239386677742
    Iteration 6 complete. Error: -6.588239386677742 Total: 150.7550; Orientation: 2.2746; Line Search: 98.0546
    Adding measurement 1ed82add to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.126e+03, gradient 3.371e-04, dot -0.224; [b8d366fd-9816-44b3-8220-6b0a127e53a0 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -6.588239386677742, -4.295152708888054, -3.8316239714622498, -3.5613393783569336
    LBFGS Accumulation History: 3 points
    Removed measurement 1ed82add to history. Total: 3
    th(0)=-6.588239386677742;dx=-1.0053181111497634E-7
    Armijo: th(7.8180126031877E7)=-4.835533112287521; dx=2.3886556562434018E-8 evalInputDelta=-1.7527062743902206
    Armijo: th(3.90900630159385E7)=-6.249367415904999; dx=2.5774878451544786E-8 evalInputDelta=-0.3388719707727432
    New Minimum: -6.588239386677742 > -6.949446678161621
    WOLF (strong): th(1.3030021005312832E7)=-6.949446678161621; dx=9.685007236607508E-9 evalInputDelta=0.3612072914838791
    END: th(3257505.251328208)=-6.874172791838646; dx=-4.5769000803726076E-8 evalInputDelta=0.28593340516090393
    Fitness changed from -6.588239386677742 to -6.949446678161621
    Iteration 7 complete. Error: -6.949446678161621 Total: 297.0917; Orientation: 2.2922; Line Search: 245.4601
    Adding measurement 36523489 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.698e+03, gradient 2.196e-04, dot -0.242; [b8d366fd-9816-44b3-8220-6b0a127e53a0 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -6.949446678161621, -4.295152708888054, -3.8316239714622498, -3.5613393783569336
    LBFGS Accumulation History: 3 points
    Removed measurement 36523489 to history. Total: 3
    th(0)=-6.949446678161621;dx=-4.8184197013024544E-8
    New Minimum: -6.949446678161621 > -7.12935309112072
    WOLF (strong): th(7018082.316422522)=-7.12935309112072; dx=2.439220021398499E-10 evalInputDelta=0.17990641295909882
    END: th(3509041.158211261)=-7.088812470436096; dx=-2.2289303253731223E-8 evalInputDelta=0.1393657922744751
    Fitness changed from -6.949446678161621 to -7.12935309112072
    Iteration 8 complete. Error: -7.12935309112072 Total: 199.8080; Orientation: 2.3542; Line Search: 148.0838
    Adding measurement 51fcfea8 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.351e+03, gradient 1.868e-04, dot -0.293; [b8d366fd-9816-44b3-8220-6b0a127e53a0 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -7.12935309112072, -4.295152708888054, -3.8316239714622498, -3.5613393783569336
    LBFGS Accumulation History: 3 points
    Removed measurement 51fcfea8 to history. Total: 3
    th(0)=-7.12935309112072;dx=-3.4894786715938783E-8
    New Minimum: -7.12935309112072 > -7.225047588348389
    END: th(7560000.000000001)=-7.225047588348389; dx=-1.2709234961007035E-9 evalInputDelta=0.09569449722766876
    Fitness changed from -7.12935309112072 to -7.225047588348389
    Iteration 9 complete. Error: -7.225047588348389 Total: 150.3059; Orientation: 2.2198; Line Search: 99.1221
    Adding measurement 4b26863a to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.517e+03, gradient 1.358e-04, dot -0.448; [b8d366fd-9816-44b3-8220-6b0a127e53a0 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -7.225047588348389, -4.295152708888054, -3.8316239714622498, -3.5613393783569336
    LBFGS Accumulation History: 3 points
    Removed measurement 4b26863a to history. Total: 3
    th(0)=-7.225047588348389;dx=-1.884103286627958E-8
    New Minimum: -7.225047588348389 > -7.306485891342163
    WOLF (strong): th(1.6287526256641043E7)=-7.306485891342163; dx=6.143000165320649E-9 evalInputDelta=0.08143830299377441
    New Minimum: -7.306485891342163 > -7.326366379857063
    END: th(8143763.128320522)=-7.326366379857063; dx=-4.0012766065273536E-9 evalInputDelta=0.10131879150867462
    Fitness changed from -7.225047588348389 to -7.326366379857063
    Iteration 10 complete. Error: -7.326366379857063 Total: 226.0383; Orientation: 10.5397; Line Search: 149.1384
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/2bc9f5e0-5eb2-475c-8bb9-61a1bdb126c9.jpg)

    Final threshold in iteration 11: -7.326366379857063 (> -Infinity) after 2259.817s (< 5400.000s)

Returns

    -7.326366379857063