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

Iteration 35 Iteration 35

Iteration 40 Iteration 40

Iteration 45 Iteration 45

Iteration 50 Iteration 50

Code from BasicOptimizer.scala:75 executed in 588.71 seconds (7.285 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: 5993639432152
    Reset training subject: 5995997128367
    Adding measurement 77acc85a to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=0.9887920402528395;dx=-2.432191845794677E-8
    New Minimum: 0.9887920402528395 > 0.9887919983536164
    WOLFE (weak): th(2.154434690031884)=0.9887919983536164; dx=-2.43218543820675E-8 evalInputDelta=4.1899223091057536E-8
    New Minimum: 0.9887919983536164 > 0.9887919564547506
    WOLFE (weak): th(4.308869380063768)=0.9887919564547506; dx=-2.4321810911451722E-8 evalInputDelta=8.379808891234575E-8
    New Minimum: 0.9887919564547506 > 0.9887917888440845
    WOLFE (weak): th(12.926608140191302)=0.9887917888440845; dx=-2.4324739635763935E-8 evalInputDelta=2.514087550364863E-7
    New Minimum: 0.9887917888440845 > 0.9887910344930738
    WOLFE (weak): th(51.70643256076521)=0.9887910344930738; dx=-2.4325123830529176E-8 evalInputDelta=1.0057597656931705E-6
    New Minimum: 0.9887910344930738 > 0.988787011774785
    WOLFE (weak): th(258.53216280382605)=0.988787011774785; dx=-2.4322072355730234E-8 evalInputDelta=5.028478054502905E-6
    New Minimum: 0.988787011774785 > 0.988761874393245
    WOLFE (weak): th(1551.1929768229563)=0.988761874393245; dx=-2.4303696408399552E-8 evalInputDelta=3.0165859594477595E-5
    New Minimum: 0.988761874393245 > 0.9885825542150308
    WOLFE (weak): th(10858.350837760694)=0.9885825542150308; dx=-2.3828768581908382E-8 evalInputDelta=2.0948603780868158E-4
    New Minimum: 0.9885825542150308 > 0.9872552354904218
    END: th(86866.80670208555)=0.9872552354904218; dx=-1.9959301651813314E-8 evalInputDelta=0.0015368047624176873
    Fitness changed from 0.9887920402528395 to 0.9872552354904218
    Iteration 1 complete. Error: 0.9872552354904218 Total: 30.4599; Orientation: 0.0713; Line Search: 23.2915
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/6da50a32-8499-4e15-80c7-00c274d7e308.jpg)
    
    Adding measurement 24b43bd8 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=0.9872552354904218;dx=-1.95559559506153E-8
    New Minimum: 0.987255

...skipping 42684 bytes...

     dot -0.601; [a27ead45-2a43-4b67-ae3a-09f34775df8f = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.6280769462364357, 0.6246747462872231, 0.6212317679109833, 0.619339218937271
    LBFGS Accumulation History: 3 points
    Removed measurement 11e67537 to history. Total: 4
    th(0)=0.619339218937271;dx=-1.0145227686908058E-7
    Armijo: th(1014863.5887008039)=0.6345051179307941; dx=1.7998208993363312E-8 evalInputDelta=-0.015165898993523164
    New Minimum: 0.619339218937271 > 0.6164116563442621
    END: th(507431.79435040196)=0.6164116563442621; dx=-8.705247762914316E-10 evalInputDelta=0.002927562593008859
    Fitness changed from 0.619339218937271 to 0.6164116563442621
    Iteration 49 complete. Error: 0.6164116563442621 Total: 11.5016; Orientation: 1.6419; Line Search: 7.4876
    Adding measurement 3d6568f2 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.364e+02, gradient 3.218e-04, dot -0.614; [a27ead45-2a43-4b67-ae3a-09f34775df8f = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.6246747462872231, 0.6212317679109833, 0.619339218937271, 0.6164116563442621
    LBFGS Accumulation History: 3 points
    Removed measurement 243cd1b3 to history. Total: 4
    th(0)=0.6164116563442621;dx=-1.0353718852910158E-7
    Armijo: th(1093228.6605736308)=0.6351510939334464; dx=2.361265731827198E-8 evalInputDelta=-0.018739437589184282
    New Minimum: 0.6164116563442621 > 0.614355774698408
    WOLF (strong): th(546614.3302868154)=0.614355774698408; dx=2.235792245292418E-9 evalInputDelta=0.0020558816458541296
    New Minimum: 0.614355774698408 > 0.6093891695374498
    END: th(182204.7767622718)=0.6093891695374498; dx=-5.098401961937833E-8 evalInputDelta=0.007022486806812278
    Fitness changed from 0.6164116563442621 to 0.6093891695374498
    Iteration 50 complete. Error: 0.6093891695374498 Total: 14.0146; Orientation: 1.6358; Line Search: 10.0169
    <a id="p-29"></a>Iteration 50
    <a id="p-28"></a>![Iteration 50](etc/38e9342e-72b5-4e48-be79-6b279ca71d56.jpg)
    
    Final threshold in iteration 51: 0.6093891695374498 (> -Infinity) after 588.709s (< 3600.000s)
    

Returns:

    0.6093891695374498