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

Iteration 20 Iteration 20

Iteration 25 Iteration 25

Iteration 30 Iteration 30

Code from BasicOptimizer.scala:88 executed in 950.24 seconds (9.701 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: 10375032336349
    Reset training subject: 10382140707959
    Adding measurement 44d4e3fe to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.4983997493982315;dx=-4.2830557077001425E-8
    New Minimum: 1.4983997493982315 > 1.4983996897935867
    WOLFE (weak): th(2.154434690031884)=1.4983996897935867; dx=-4.282074885065161E-8 evalInputDelta=5.9604644775390625E-8
    New Minimum: 1.4983996897935867 > 1.4983995109796524
    WOLFE (weak): th(4.308869380063768)=1.4983995109796524; dx=-4.2814076274182924E-8 evalInputDelta=2.384185791015625E-7
    New Minimum: 1.4983995109796524 > 1.498398631811142
    WOLFE (weak): th(12.926608140191302)=1.498398631811142; dx=-4.281985210795001E-8 evalInputDelta=1.1175870895385742E-6
    New Minimum: 1.498398631811142 > 1.4983956664800644
    WOLFE (weak): th(51.70643256076521)=1.4983956664800644; dx=-4.282130529605885E-8 evalInputDelta=4.082918167114258E-6
    New Minimum: 1.4983956664800644 > 1.4983797669410706
    WOLFE (weak): th(258.53216280382605)=1.4983797669410706; dx=-4.2813378306309265E-8 evalInputDelta=1.9982457160949707E-5
    New Minimum: 1.4983797669410706 > 1.4982802718877792
    WOLFE (weak): th(1551.1929768229563)=1.4982802718877792; dx=-4.2819556544031845E-8 evalInputDelta=1.1947751045227051E-4
    New Minimum: 1.4982802718877792 > 1.4975633323192596
    WOLFE (weak): th(10858.350837760694)=1.4975633323192596; dx=-4.280408422301446E-8 evalInputDelta=8.364170789718628E-4
    New Minimum: 1.4975633323192596 > 1.4917137622833252
    WOLFE (weak): th(86866.80670208555)=1.4917137622833252; dx=-4.275816818030889E-8 evalInputDelta=0.006685987114906311
    New Minimum: 1.4917137622833252 > 1.4386688321828842
    WOLFE (weak): th(781801.26031877)=1.4386688321828842; dx=-4.215968553585384E-8 evalInputDelta=0.05973091721534729
    New Minimum: 1.4386688321828842 > 0.968752071261406
    END: th(7818012.6031877)=0.968752071261406; dx=-3.273927546448405E-8 evalInputDelta=0.5296476781368256
    Fitness changed from 1.4983997493982315 to 0.968752071261406
    Iteration 1 complete. Error: 0.96875

...skipping 24883 bytes...

    203044295311 to -2.056412175297737
    Iteration 28 complete. Error: -2.056412175297737 Total: 37.1064; Orientation: 0.9275; Line Search: 28.2808
    Adding measurement 120ab252 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.317e+03, gradient 1.576e-05, dot -0.435; [d4aacdc2-28f5-422c-bf6c-05bafdb22f12 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.056412175297737, 0.2595752477645874, 0.968752071261406, 1.4983997493982315
    LBFGS Accumulation History: 3 points
    Removed measurement 120ab252 to history. Total: 3
    th(0)=-2.056412175297737;dx=-2.4786700471069595E-10
    New Minimum: -2.056412175297737 > -2.058747075498104
    END: th(2.6114906310514316E7)=-2.058747075498104; dx=-1.1234022993616913E-10 evalInputDelta=0.002334900200366974
    Fitness changed from -2.056412175297737 to -2.058747075498104
    Iteration 29 complete. Error: -2.058747075498104 Total: 22.4395; Orientation: 0.8427; Line Search: 14.2467
    Adding measurement 27bf8c36 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.353e+03, gradient 1.655e-05, dot -0.417; [d4aacdc2-28f5-422c-bf6c-05bafdb22f12 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.058747075498104, 0.2595752477645874, 0.968752071261406, 1.4983997493982315
    LBFGS Accumulation History: 3 points
    Removed measurement 27bf8c36 to history. Total: 3
    th(0)=-2.058747075498104;dx=-2.7336146698924394E-10
    Armijo: th(5.62628600823046E7)=-2.0561128929257393; dx=-5.7606975793094264E-11 evalInputDelta=-0.002634182572364807
    New Minimum: -2.058747075498104 > -2.0604345574975014
    END: th(2.81314300411523E7)=-2.0604345574975014; dx=-6.744453118775039E-11 evalInputDelta=0.0016874819993972778
    Fitness changed from -2.058747075498104 to -2.0604345574975014
    Iteration 30 complete. Error: -2.0604345574975014 Total: 29.5252; Orientation: 0.8953; Line Search: 21.2584
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/50d7cd12-1927-429e-abe0-e6964d88f049.jpg)
    
    Final threshold in iteration 31: -2.0604345574975014 (> -Infinity) after 950.235s (< 3600.000s)
    

Returns:

    -2.0604345574975014