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 199.87 seconds (2.070 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: 3924558790502
Reset training subject: 3928985353974
Adding measurement 654b411a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.2937116026878357;dx=-5.680147466710981E-7
New Minimum: -0.2937116026878357 > -0.2937120050191879
WOLFE (weak): th(2.154434690031884)=-0.2937120050191879; dx=-5.456036175110048E-7 evalInputDelta=4.023313522338867E-7
New Minimum: -0.2937120050191879 > -0.29371246695518494
WOLFE (weak): th(4.308869380063768)=-0.29371246695518494; dx=-5.456048254150906E-7 evalInputDelta=8.642673492431641E-7
New Minimum: -0.29371246695518494 > -0.29371507465839386
WOLFE (weak): th(12.926608140191302)=-0.29371507465839386; dx=-5.456092406066844E-7 evalInputDelta=3.471970558166504E-6
New Minimum: -0.29371507465839386 > -0.2937256842851639
WOLFE (weak): th(51.70643256076521)=-0.2937256842851639; dx=-5.456073321095942E-7 evalInputDelta=1.4081597328186035E-5
New Minimum: -0.2937256842851639 > -0.2937822639942169
WOLFE (weak): th(258.53216280382605)=-0.2937822639942169; dx=-5.455625822648377E-7 evalInputDelta=7.066130638122559E-5
New Minimum: -0.2937822639942169 > -0.2941347509622574
WOLFE (weak): th(1551.1929768229563)=-0.2941347509622574; dx=-5.452777140703596E-7 evalInputDelta=4.231482744216919E-4
New Minimum: -0.2941347509622574 > -0.29666881263256073
WOLFE (weak): th(10858.350837760694)=-0.29666881263256073; dx=-5.437574396195526E-7 evalInputDelta=0.0029572099447250366
New Minimum: -0.29666881263256073 > -0.3171147555112839
WOLFE (weak): th(86866.80670208555)=-0.3171147555112839; dx=-5.316983263748851E-7 evalInputDelta=0.02340315282344818
New Minimum: -0.3171147555112839 > -0.48109525442123413
END: th(781801.26031877)=-0.48109525442123413; dx=-4.120932638489984E-7 evalInputDelta=0.18738365173339844
Fitness changed from -0.2937116026878357 to -0.48109525442123413
Iteration 1 complete. Error: -0.48109525442123413 Total: 56.1583; Orientation: 0.0430; Line Search: 43.3492
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/4d4987f7-733d-4be7-97e7-fa29502fee8f.jpg)

    Adding measurement 57ff929a to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-0.48109525442123413;dx=-3.6815525999941644E-7
    New Minimum: -0.48109525442123413 > -0.7354910522699356
    END: th(1684339.7559414052)=-0.7354910522699356; dx=-2.419150572431576E-7 evalInputDelta=0.2543957978487015
    Fitness changed from -0.48109525442123413 to -0.7354910522699356
    Iteration 2 complete. Error: -0.7354910522699356 Total: 12.4259; Orientation: 0.0432; Line Search: 8.0746
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/56c2b7af-ed59-49c8-b795-5bde9994f171.jpg)

    Adding measurement 1fca25a5 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-0.7354910522699356;dx=-2.2609881208336715E-7
    New Minimum: -0.7354910522699356 > -1.0417776852846146
    END: th(3628800.0)=-1.0417776852846146; dx=-1.2376635564890724E-7 evalInputDelta=0.30628663301467896
    Fitness changed from -0.7354910522699356 to -1.0417776852846146
    Iteration 3 complete. Error: -1.0417776852846146 Total: 13.3669; Orientation: 0.0483; Line Search: 8.4173
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/f3ad3b6c-b845-410d-9957-99cc4b47dc9e.jpg)

    Adding measurement 2dfac762 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.453e+03, gradient 3.817e-04, dot -0.806; [fde0934d-a90d-418d-bf5e-26249d288fb1 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.0417776852846146, -0.7354910522699356, -0.48109525442123413, -0.2937116026878357
    LBFGS Accumulation History: 3 points
    Removed measurement 2dfac762 to history. Total: 3
    th(0)=-1.0417776852846146;dx=-1.4565703555634017E-7
    New Minimum: -1.0417776852846146 > -1.359499029815197
    END: th(7818012.6031877)=-1.359499029815197; dx=-4.302429912940043E-8 evalInputDelta=0.31772134453058243
    Fitness changed from -1.0417776852846146 to -1.359499029815197
    Iteration 4 complete. Error: -1.359499029815197 Total: 13.6447; Orientation: 0.9939; Line Search: 8.2174
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/f518dc23-55f8-41e3-a961-833d6a4f1e3c.jpg)

    Adding measurement 115145b9 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.961e+03, gradient 3.534e-04, dot -0.572; [fde0934d-a90d-418d-bf5e-26249d288fb1 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.359499029815197, -0.7354910522699356, -0.48109525442123413, -0.2937116026878357
    LBFGS Accumulation History: 3 points
    Removed measurement 115145b9 to history. Total: 3
    th(0)=-1.359499029815197;dx=-1.2485929714746974E-7
    New Minimum: -1.359499029815197 > -1.5068254247307777
    WOLF (strong): th(1.684339755941405E7)=-1.5068254247307777; dx=1.6156192485353493E-8 evalInputDelta=0.14732639491558075
    New Minimum: -1.5068254247307777 > -1.5490810498595238
    WOLF (strong): th(8421698.779707026)=-1.5490810498595238; dx=4.6341554339956014E-10 evalInputDelta=0.18958202004432678
    END: th(2807232.9265690087)=-1.4855201095342636; dx=-5.826184725092117E-8 evalInputDelta=0.12602107971906662
    Fitness changed from -1.359499029815197 to -1.5490810498595238
    Iteration 5 complete. Error: -1.5490810498595238 Total: 22.4603; Orientation: 0.9866; Line Search: 17.6603
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/48f74987-38f8-4463-aca6-9ef2387e8609.jpg)

    Adding measurement 30387773 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.931e+03, gradient 3.384e-04, dot -0.470; [fde0934d-a90d-418d-bf5e-26249d288fb1 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.5490810498595238, -0.7354910522699356, -0.48109525442123413, -0.2937116026878357
    LBFGS Accumulation History: 3 points
    Removed measurement 30387773 to history. Total: 3
    th(0)=-1.5490810498595238;dx=-1.14543689555763E-7
    New Minimum: -1.5490810498595238 > -1.7128290608525276
    END: th(6048000.0)=-1.7128290608525276; dx=-1.1020566782879696E-8 evalInputDelta=0.16374801099300385
    Fitness changed from -1.5490810498595238 to -1.7128290608525276
    Iteration 6 complete. Error: -1.7128290608525276 Total: 13.3703; Orientation: 1.0002; Line Search: 8.2326
    Adding measurement 2b1ab5d9 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.101e+03, gradient 2.391e-04, dot -0.554; [fde0934d-a90d-418d-bf5e-26249d288fb1 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.7128290608525276, -0.7354910522699356, -0.48109525442123413, -0.2937116026878357
    LBFGS Accumulation History: 3 points
    Removed measurement 2b1ab5d9 to history. Total: 3
    th(0)=-1.7128290608525276;dx=-5.71477287252435E-8
    New Minimum: -1.7128290608525276 > -1.8278243094682693
    WOLF (strong): th(1.3030021005312834E7)=-1.8278243094682693; dx=1.2156577172196848E-8 evalInputDelta=0.11499524861574173
    END: th(6515010.502656417)=-1.825487531721592; dx=-1.584638519420113E-8 evalInputDelta=0.11265847086906433
    Fitness changed from -1.7128290608525276 to -1.8278243094682693
    Iteration 7 complete. Error: -1.8278243094682693 Total: 18.8376; Orientation: 1.7956; Line Search: 12.7840
    Adding measurement 676f755c to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.605e+03, gradient 3.105e-04, dot -0.368; [fde0934d-a90d-418d-bf5e-26249d288fb1 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.8278243094682693, -0.7354910522699356, -0.48109525442123413, -0.2937116026878357
    LBFGS Accumulation History: 3 points
    Removed measurement 676f755c to history. Total: 3
    th(0)=-1.8278243094682693;dx=-9.643790370141284E-8
    New Minimum: -1.8278243094682693 > -1.8345892131328583
    WOLF (strong): th(1.4036164632845046E7)=-1.8345892131328583; dx=4.18771098889629E-8 evalInputDelta=0.006764903664588928
    New Minimum: -1.8345892131328583 > -1.9417747259140015
    WOLF (strong): th(7018082.316422523)=-1.9417747259140015; dx=8.870334029002074E-9 evalInputDelta=0.11395041644573212
    END: th(2339360.772140841)=-1.90896575152874; dx=-4.3631807833372785E-8 evalInputDelta=0.08114144206047058
    Fitness changed from -1.8278243094682693 to -1.9417747259140015
    Iteration 8 complete. Error: -1.9417747259140015 Total: 22.4285; Orientation: 1.0267; Line Search: 16.9267
    Adding measurement 341481e to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.746e+03, gradient 2.034e-04, dot -0.447; [fde0934d-a90d-418d-bf5e-26249d288fb1 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.9417747259140015, -0.7354910522699356, -0.48109525442123413, -0.2937116026878357
    LBFGS Accumulation History: 3 points
    Removed measurement 341481e to history. Total: 3
    th(0)=-1.9417747259140015;dx=-4.13639118023166E-8
    New Minimum: -1.9417747259140015 > -2.0117966011166573
    END: th(5040000.000000001)=-2.0117966011166573; dx=-1.545212638779892E-8 evalInputDelta=0.07002187520265579
    Fitness changed from -1.9417747259140015 to -2.0117966011166573
    Iteration 9 complete. Error: -2.0117966011166573 Total: 13.7470; Orientation: 1.0014; Line Search: 8.3531
    Adding measurement 8d6779 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.007e+03, gradient 1.466e-04, dot -0.575; [fde0934d-a90d-418d-bf5e-26249d288fb1 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.0117966011166573, -0.7354910522699356, -0.48109525442123413, -0.2937116026878357
    LBFGS Accumulation History: 3 points
    Removed measurement 8d6779 to history. Total: 3
    th(0)=-2.0117966011166573;dx=-2.1486140745521683E-8
    New Minimum: -2.0117966011166573 > -2.0832703933119774
    END: th(1.0858350837760696E7)=-2.0832703933119774; dx=-6.318010202044532E-9 evalInputDelta=0.07147379219532013
    Fitness changed from -2.0117966011166573 to -2.0832703933119774
    Iteration 10 complete. Error: -2.0832703933119774 Total: 13.3661; Orientation: 0.9845; Line Search: 8.3315
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/522c01b1-ea0c-4f98-8337-11d08cb1e2af.jpg)

    Final threshold in iteration 11: -2.0832703933119774 (> -Infinity) after 199.874s (< 5400.000s)

Returns

    -2.0832703933119774