Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Code from BasicOptimizer.scala:75 executed in 3806.00 seconds (41.529 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: 1340862752440100
    Reset training subject: 1340942637470700
    Adding measurement 2f98fe6f to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=8.4208960570395;dx=-4.548982339845777E-6
    New Minimum: 8.4208960570395 > 8.420892169699073
    WOLFE (weak): th(2.154434690031884)=8.420892169699073; dx=-4.534811520829323E-6 evalInputDelta=3.887340426445007E-6
    New Minimum: 8.420892169699073 > 8.420888928696513
    WOLFE (weak): th(4.308869380063768)=8.420888928696513; dx=-4.534806330236158E-6 evalInputDelta=7.1283429861068726E-6
    New Minimum: 8.420888928696513 > 8.420874634757638
    WOLFE (weak): th(12.926608140191302)=8.420874634757638; dx=-4.534963230382454E-6 evalInputDelta=2.1422281861305237E-5
    New Minimum: 8.420874634757638 > 8.420812118798494
    WOLFE (weak): th(51.70643256076521)=8.420812118798494; dx=-4.534987809783437E-6 evalInputDelta=8.393824100494385E-5
    New Minimum: 8.420812118798494 > 8.420475129038095
    WOLFE (weak): th(258.53216280382605)=8.420475129038095; dx=-4.532109456958784E-6 evalInputDelta=4.209280014038086E-4
    New Minimum: 8.420475129038095 > 8.418372012674809
    WOLFE (weak): th(1551.1929768229563)=8.418372012674809; dx=-4.5301256569038646E-6 evalInputDelta=0.0025240443646907806
    New Minimum: 8.418372012674809 > 8.4034044444561
    WOLFE (weak): th(10858.350837760694)=8.4034044444561; dx=-4.397147565701234E-6 evalInputDelta=0.01749161258339882
    New Minimum: 8.4034044444561 > 8.293024143204093
    END: th(86866.80670208555)=8.293024143204093; dx=-3.682283739989738E-6 evalInputDelta=0.1278719138354063
    Fitness changed from 8.4208960570395 to 8.293024143204093
    Iteration 1 complete. Error: 8.293024143204093 Total: 942.2766; Orientation: 0.1331; Line Search: 705.4610
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/73a89f20-0ad0-40de-9f78-3e1d9f5a4321.jpg)
    
    Adding measurement 28c00acd to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=8.293024143204093;dx=-3.4305729683512574E-6
    New Minimum: 8.2930241432040

...skipping 6439 bytes...

    ent 4babe06f to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.197e+03, gradient 1.020e-03, dot -0.718; [4bd4f578-c5b2-4663-bc92-ac4fddb28fff = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 6.898889869451523, 6.510819181799889, 6.27167878113687, 5.9016042202711105
    LBFGS Accumulation History: 3 points
    Removed measurement 70680f88 to history. Total: 4
    th(0)=5.9016042202711105;dx=-1.0406897893520845E-6
    New Minimum: 5.9016042202711105 > 5.644164964556694
    END: th(2412966.852835711)=5.644164964556694; dx=-2.216299690694712E-7 evalInputDelta=0.2574392557144165
    Fitness changed from 5.9016042202711105 to 5.644164964556694
    Iteration 10 complete. Error: 5.644164964556694 Total: 240.2429; Orientation: 3.8336; Line Search: 158.3879
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/1f0024bb-bb4f-4475-9b56-37d451778203.jpg)
    
    Adding measurement 45cddfd3 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.416e+03, gradient 1.213e-03, dot -0.604; [4bd4f578-c5b2-4663-bc92-ac4fddb28fff = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 6.510819181799889, 6.27167878113687, 5.9016042202711105, 5.644164964556694
    LBFGS Accumulation History: 3 points
    Removed measurement 4d3bde85 to history. Total: 4
    th(0)=5.644164964556694;dx=-1.4718614631198625E-6
    Armijo: th(5198579.493646315)=6.133441351354122; dx=2.483729101245728E-7 evalInputDelta=-0.48927638679742813
    New Minimum: 5.644164964556694 > 5.5596475675702095
    WOLF (strong): th(2599289.7468231576)=5.5596475675702095; dx=1.4572411658885658E-7 evalInputDelta=0.08451739698648453
    New Minimum: 5.5596475675702095 > 5.427944499999285
    END: th(866429.9156077192)=5.427944499999285; dx=-3.924572315818945E-7 evalInputDelta=0.2162204645574093
    Fitness changed from 5.644164964556694 to 5.427944499999285
    Iteration 11 complete. Error: 5.427944499999285 Total: 395.6713; Orientation: 3.7749; Line Search: 313.8052
    Final threshold in iteration 11: 5.427944499999285 (> -Infinity) after 3805.984s (< 3600.000s)
    

Returns:

    5.427944499999285