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

Code from BasicOptimizer.scala:75 executed in 60.35 seconds (1.625 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: 929450058939500
    Reset training subject: 929451044108000
    Adding measurement 271ac44d to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=3.5730212246999145;dx=-5.058300160096897E-5
    New Minimum: 3.5730212246999145 > 3.5729335164651275
    WOLFE (weak): th(2.154434690031884)=3.5729335164651275; dx=-5.04853744962741E-5 evalInputDelta=8.77082347869873E-5
    New Minimum: 3.5729335164651275 > 3.5728455702774227
    WOLFE (weak): th(4.308869380063768)=3.5728455702774227; dx=-5.04510675742326E-5 evalInputDelta=1.7565442249178886E-4
    New Minimum: 3.5728455702774227 > 3.5724949738942087
    WOLFE (weak): th(12.926608140191302)=3.5724949738942087; dx=-5.012265368971077E-5 evalInputDelta=5.262508057057858E-4
    New Minimum: 3.5724949738942087 > 3.5709319598972797
    WOLFE (weak): th(51.70643256076521)=3.5709319598972797; dx=-4.9469009909354604E-5 evalInputDelta=0.002089264802634716
    New Minimum: 3.5709319598972797 > 3.5632946668192744
    END: th(258.53216280382605)=3.5632946668192744; dx=-4.2613804232162664E-5 evalInputDelta=0.00972655788064003
    Fitness changed from 3.5730212246999145 to 3.5632946668192744
    Iteration 1 complete. Error: 3.5632946668192744 Total: 8.5452; Orientation: 0.0052; Line Search: 5.7809
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/7cdf5ac5-6498-4bc5-add3-a9a3681bad31.jpg)
    
    Adding measurement 17e4e110 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=3.5632946668192744;dx=-4.1406232128756426E-5
    New Minimum: 3.5632946668192744 > 3.5440341257490218
    END: th(556.9906600335335)=3.5440341257490218; dx=-3.185893607086144E-5 evalInputDelta=0.019260541070252657
    Fitness changed from 3.5632946668192744 to 3.5440341257490218
    Iteration 2 complete. Error: 3.5440341257490218 Total: 3.3249; Orientation: 0.0041; Line Search: 2.3575
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/4f6d0c57-18e0-4cb0-a36b-e07bc08e4e2f.jpg)
    
    Adding measurement 386bd946 to history. Total: 2
    LBFGS Accumulation Histor

...skipping 9781 bytes...

    c87 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.703e+01, gradient 2.500e-03, dot -0.649; [c49391f7-0ee5-446b-bcc2-710d8bf84ee4 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.9476626804098487, 2.928121662698686, 2.915529925376177, 2.905809975694865
    LBFGS Accumulation History: 3 points
    Removed measurement b0cb3ee to history. Total: 4
    th(0)=2.905809975694865;dx=-6.251857457235511E-6
    New Minimum: 2.905809975694865 > 2.9012784278020263
    WOLF (strong): th(19339.95347338659)=2.9012784278020263; dx=1.291369783566022E-6 evalInputDelta=0.0045315478928387165
    New Minimum: 2.9012784278020263 > 2.8852854361757636
    WOLF (strong): th(9669.976736693296)=2.8852854361757636; dx=1.627600033308474E-7 evalInputDelta=0.02052453951910138
    END: th(3223.3255788977654)=2.8918233904987574; dx=-3.64640778755121E-6 evalInputDelta=0.013986585196107626
    Fitness changed from 2.905809975694865 to 2.8852854361757636
    Iteration 14 complete. Error: 2.8852854361757636 Total: 4.9272; Orientation: 0.1118; Line Search: 3.8674
    Adding measurement 5f915498 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.497e+01, gradient 2.474e-03, dot -0.629; [c49391f7-0ee5-446b-bcc2-710d8bf84ee4 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.928121662698686, 2.915529925376177, 2.905809975694865, 2.8852854361757636
    LBFGS Accumulation History: 3 points
    Removed measurement 4122ae30 to history. Total: 4
    th(0)=2.8852854361757636;dx=-6.122442777786998E-6
    New Minimum: 2.8852854361757636 > 2.8641056180931628
    END: th(6944.44444444445)=2.8641056180931628; dx=-1.0255844198510966E-7 evalInputDelta=0.021179818082600832
    Fitness changed from 2.8852854361757636 to 2.8641056180931628
    Iteration 15 complete. Error: 2.8641056180931628 Total: 2.9856; Orientation: 0.1150; Line Search: 1.9207
    <a id="p-15"></a>Iteration 15
    <a id="p-14"></a>![Iteration 15](etc/f24d2e6a-019c-406e-947c-3d2262aaeb05.jpg)
    
    Final threshold in iteration 16: 2.8641056180931628 (> -Infinity) after 60.354s (< 1800.000s)
    

Returns:

    2.8641056180931628