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 3107.56 seconds (18.465 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: 892517029999800
    Reset training subject: 892543802558300
    Adding measurement 7a572ea0 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=21.52599795907736;dx=-7.679181889319292E-6
    New Minimum: 21.52599795907736 > 21.52598538994789
    WOLFE (weak): th(2.154434690031884)=21.52598538994789; dx=-7.676531807108681E-6 evalInputDelta=1.2569129467010498E-5
    New Minimum: 21.52598538994789 > 21.525972798466682
    WOLFE (weak): th(4.308869380063768)=21.525972798466682; dx=-7.676393992883661E-6 evalInputDelta=2.5160610675811768E-5
    New Minimum: 21.525972798466682 > 21.525924131274223
    WOLFE (weak): th(12.926608140191302)=21.525924131274223; dx=-7.676789026998625E-6 evalInputDelta=7.382780313491821E-5
    New Minimum: 21.525924131274223 > 21.52570503205061
    WOLFE (weak): th(51.70643256076521)=21.52570503205061; dx=-7.677561905059076E-6 evalInputDelta=2.929270267486572E-4
    New Minimum: 21.52570503205061 > 21.524538949131966
    WOLFE (weak): th(258.53216280382605)=21.524538949131966; dx=-7.679159127703038E-6 evalInputDelta=0.0014590099453926086
    New Minimum: 21.524538949131966 > 21.517220355570316
    WOLFE (weak): th(1551.1929768229563)=21.517220355570316; dx=-7.684986750238564E-6 evalInputDelta=0.008777603507041931
    New Minimum: 21.517220355570316 > 21.463480830192566
    WOLFE (weak): th(10858.350837760694)=21.463480830192566; dx=-7.662618811685948E-6 evalInputDelta=0.06251712888479233
    New Minimum: 21.463480830192566 > 20.98381108045578
    WOLFE (weak): th(86866.80670208555)=20.98381108045578; dx=-7.038447830237698E-6 evalInputDelta=0.5421868786215782
    New Minimum: 20.98381108045578 > 17.16875220835209
    END: th(781801.26031877)=17.16875220835209; dx=-3.6533485619330137E-6 evalInputDelta=4.357245750725269
    Fitness changed from 21.52599795907736 to 17.16875220835209
    Iteration 1 complete. Error: 17.16875220835209 Total: 339.0680; Orientation: 0.0576; Line Search: 260.5998
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/edb52f90-9602-43ab-b2b

...skipping 23937 bytes...

    54979355E-9 evalInputDelta=0.018088147044181824
    Fitness changed from -2.8693054392933846 to -2.8873935863375664
    Iteration 28 complete. Error: -2.8873935863375664 Total: 78.1087; Orientation: 1.4125; Line Search: 51.9946
    Adding measurement e521067 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.520e+03, gradient 4.279e-05, dot -0.780; [2b916033-465b-46c7-a817-b958cc6a1a41 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.8347221463918686, -2.8437316864728928, -2.8693054392933846, -2.8873935863375664
    LBFGS Accumulation History: 3 points
    Removed measurement 467af68c to history. Total: 4
    th(0)=-2.8873935863375664;dx=-1.8313548774976843E-9
    New Minimum: -2.8873935863375664 > -2.9016609229147434
    END: th(2.3503415679462884E7)=-2.9016609229147434; dx=-7.570904725889748E-10 evalInputDelta=0.014267336577177048
    Fitness changed from -2.8873935863375664 to -2.9016609229147434
    Iteration 29 complete. Error: -2.9016609229147434 Total: 79.0466; Orientation: 1.3829; Line Search: 51.3458
    Adding measurement a1e912f to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.139e+03, gradient 4.027e-05, dot -0.742; [2b916033-465b-46c7-a817-b958cc6a1a41 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.8437316864728928, -2.8693054392933846, -2.8873935863375664, -2.9016609229147434
    LBFGS Accumulation History: 3 points
    Removed measurement 3193e21d to history. Total: 4
    th(0)=-2.9016609229147434;dx=-1.6213360153569219E-9
    New Minimum: -2.9016609229147434 > -2.912621822208166
    END: th(5.0636574074074134E7)=-2.912621822208166; dx=-3.7775890030152176E-10 evalInputDelta=0.010960899293422699
    Fitness changed from -2.9016609229147434 to -2.912621822208166
    Iteration 30 complete. Error: -2.912621822208166 Total: 78.4092; Orientation: 1.3809; Line Search: 51.5443
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/fb39cb98-2f50-4802-a623-6be56d0206c2.jpg)
    
    Final threshold in iteration 31: -2.912621822208166 (> -Infinity) after 3107.560s (< 3600.000s)
    

Returns:

    -2.912621822208166