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:75 executed in 981.53 seconds (8.500 gc):

    val lineSearchInstance: LineSearchStrategy = lineSearchFactory
    IterativeTrainer.wrap(trainable)
      .setOrientation(orientation())
      .setMonitor(new TrainingMonitor() {
        override def clear(): Unit = trainingMonitor.clear()
  
        override def log(msg: String): Unit = trainingMonitor.log(msg)
  
        override def onStepFail(currentPoint: Step): Boolean = {
          BasicOptimizer.this.onStepFail(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, currentPoint)
          trainingMonitor.onStepComplete(currentPoint)
          super.onStepComplete(currentPoint)
        }
      })
      .setTimeout(trainingMinutes, TimeUnit.MINUTES)
      .setMaxIterations(trainingIterations)
      .setLineSearchFactory((_: CharSequence) => lineSearchInstance)
      .setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
      .runAndFree
      .asInstanceOf[lang.Double]

Logging:

    Reset training subject: 990574891877000
    Reset training subject: 990583807783200
    Adding measurement 2360ebe2 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=12.432412332320775;dx=-2.987038330771612E-5
    New Minimum: 12.432412332320775 > 12.43233919718593
    WOLFE (weak): th(2.154434690031884)=12.43233919718593; dx=-2.986827801970723E-5 evalInputDelta=7.313513484419332E-5
    New Minimum: 12.43233919718593 > 12.432266225963858
    WOLFE (weak): th(4.308869380063768)=12.432266225963858; dx=-2.9871320149286383E-5 evalInputDelta=1.4610635691703067E-4
    New Minimum: 12.432266225963858 > 12.431972368557927
    WOLFE (weak): th(12.926608140191302)=12.431972368557927; dx=-2.9871089867219527E-5 evalInputDelta=4.3996376284738403E-4
    New Minimum: 12.431972368557927 > 12.430652421248608
    WOLFE (weak): th(51.70643256076521)=12.430652421248608; dx=-2.986100798151322E-5 evalInputDelta=0.0017599110721668865
    New Minimum: 12.430652421248608 > 12.423164484815073
    WOLFE (weak): th(258.53216280382605)=12.423164484815073; dx=-2.9829778122752736E-5 evalInputDelta=0.009247847505701401
    New Minimum: 12.423164484815073 > 12.379343767711172
    WOLFE (weak): th(1551.1929768229563)=12.379343767711172; dx=-2.9603857100232385E-5 evalInputDelta=0.053068564609603186
    New Minimum: 12.379343767711172 > 12.073191045827537
    WOLFE (weak): th(10858.350837760694)=12.073191045827537; dx=-2.792011106100168E-5 evalInputDelta=0.3592212864932378
    New Minimum: 12.073191045827537 > 10.209051056850871
    END: th(86866.80670208555)=10.209051056850871; dx=-1.5458331034737216E-5 evalInputDelta=2.2233612754699035
    Fitness changed from 12.432412332320775 to 10.209051056850871
    Iteration 1 complete. Error: 10.209051056850871 Total: 97.5667; Orientation: 0.0256; Line Search: 72.4724
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/a4a0dbe7-cf1d-4c4e-aa08-01dfd75b245c.jpg)
    
    Adding measurement 35645453 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=10.209051056850871;dx=-1.140542889518

...skipping 23974 bytes...

    3706907424001784 Total: 41.4998; Orientation: 0.3114; Line Search: 32.9959
    Adding measurement 4825c19e to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.142e+03, gradient 1.378e-04, dot -0.718; [b97dbaaf-7b10-4e86-bb23-5b09a45addd8 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.5673558581554352, 0.5283474632892147, 0.49624339853998123, 0.43706907424001784
    LBFGS Accumulation History: 3 points
    Removed measurement 4b833597 to history. Total: 4
    th(0)=0.43706907424001784;dx=-1.8938493850083817E-8
    New Minimum: 0.43706907424001784 > 0.42278372396916986
    WOLF (strong): th(6963975.016137153)=0.42278372396916986; dx=1.517549399374098E-9 evalInputDelta=0.014285350270847985
    New Minimum: 0.42278372396916986 > 0.403930006722391
    END: th(3481987.5080685765)=0.403930006722391; dx=-7.794866884847353E-9 evalInputDelta=0.03313906751762685
    Fitness changed from 0.43706907424001784 to 0.403930006722391
    Iteration 29 complete. Error: 0.403930006722391 Total: 32.9666; Orientation: 0.2343; Line Search: 24.6222
    Adding measurement 3f41ac61 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.955e+03, gradient 1.286e-04, dot -0.768; [b97dbaaf-7b10-4e86-bb23-5b09a45addd8 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.5283474632892147, 0.49624339853998123, 0.43706907424001784, 0.403930006722391
    LBFGS Accumulation History: 3 points
    Removed measurement 5fb87400 to history. Total: 4
    th(0)=0.403930006722391;dx=-1.649069092071032E-8
    New Minimum: 0.403930006722391 > 0.3850360663294077
    END: th(7501714.677640615)=0.3850360663294077; dx=-2.6799712477170954E-9 evalInputDelta=0.01889394039298331
    Fitness changed from 0.403930006722391 to 0.3850360663294077
    Iteration 30 complete. Error: 0.3850360663294077 Total: 24.5076; Orientation: 0.2310; Line Search: 16.0740
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/0a5dd45f-fec3-4e3c-8b5c-d830d9642cc4.jpg)
    
    Final threshold in iteration 31: 0.3850360663294077 (> -Infinity) after 981.507s (< 3600.000s)
    

Returns:

    0.3850360663294077