Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Code from BasicOptimizer.scala:75 executed in 388.64 seconds (2.054 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: 847071513827200
    Reset training subject: 847077562910800
    Adding measurement 13e5d243 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=-2.4372254014015198;dx=-5.880691095951803E-8
    New Minimum: -2.4372254014015198 > -2.437225490808487
    WOLFE (weak): th(2.154434690031884)=-2.437225490808487; dx=-5.880687778036569E-8 evalInputDelta=8.940696716308594E-8
    New Minimum: -2.437225490808487 > -2.4372256100177765
    WOLFE (weak): th(4.308869380063768)=-2.4372256100177765; dx=-5.880692276905535E-8 evalInputDelta=2.086162567138672E-7
    New Minimum: -2.4372256100177765 > -2.437226101756096
    WOLFE (weak): th(12.926608140191302)=-2.437226101756096; dx=-5.880690292710425E-8 evalInputDelta=7.003545761108398E-7
    New Minimum: -2.437226101756096 > -2.4372282326221466
    WOLFE (weak): th(51.70643256076521)=-2.4372282326221466; dx=-5.8806935966018876E-8 evalInputDelta=2.8312206268310547E-6
    New Minimum: -2.4372282326221466 > -2.4372396171092987
    WOLFE (weak): th(258.53216280382605)=-2.4372396171092987; dx=-5.880725766730332E-8 evalInputDelta=1.4215707778930664E-5
    New Minimum: -2.4372396171092987 > -2.437310516834259
    WOLFE (weak): th(1551.1929768229563)=-2.437310516834259; dx=-5.8808096868386413E-8 evalInputDelta=8.511543273925781E-5
    New Minimum: -2.437310516834259 > -2.4378209859132767
    WOLFE (weak): th(10858.350837760694)=-2.4378209859132767; dx=-5.8818709929378984E-8 evalInputDelta=5.95584511756897E-4
    New Minimum: -2.4378209859132767 > -2.4419947266578674
    WOLFE (weak): th(86866.80670208555)=-2.4419947266578674; dx=-5.8912878746783885E-8 evalInputDelta=0.004769325256347656
    New Minimum: -2.4419947266578674 > -2.480528086423874
    WOLFE (weak): th(781801.26031877)=-2.480528086423874; dx=-5.974299078009429E-8 evalInputDelta=0.043302685022354126
    New Minimum: -2.480528086423874 > -2.904115676879883
    WOLFE (weak): th(7818012.6031877)=-2.904115676879883; dx=-6.651337892005386E-8 evalInputDelta=0.46689027547836304
    New Minimum: -2.904115676879883 > -10.0

...skipping 5208 bytes...

    511474609375E-6
    Armijo: th(8.66756882585558E-9)=-90.85227298736572; dx=65.53683450832935 evalInputDelta=0.0
    New Minimum: -90.85227298736572 > -90.85227394104004
    WOLF (strong): th(7.222974021546317E-10)=-90.85227394104004; dx=65.53675753002742 evalInputDelta=9.5367431640625E-7
    MIN ALPHA (5.556133862727936E-11): th(7.222974021546317E-10)=-90.85227394104004
    Fitness changed from -90.85227298736572 to -90.85227394104004
    Iteration 5 complete. Error: -90.85227394104004 Total: 97.4364; Orientation: 2.1527; Line Search: 89.1191
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/077f4dd2-ddce-4c27-92b2-2db63378f90f.jpg)
    
    Adding measurement 3cc30dee to history. Total: 5
    Accepted: LBFGS Orientation magnitude: 1.700e+06, gradient 1.113e-03, dot 0.386; [6e72f7c2-cce2-4c53-9d02-f1dd9e412eb0 = 1.000/1.000e+00]
    th(0)=-90.85227394104004;dx=-730.8821189352386
    Armijo: th(2.1544346900318838E-10)=-90.85227298736572; dx=-25.17325739789634 evalInputDelta=-9.5367431640625E-7
    Armijo: th(1.0772173450159419E-10)=-90.85227298736572; dx=-26.313165846356487 evalInputDelta=-9.5367431640625E-7
    MIN ALPHA (3.590724483386473E-11): th(0.0)=-90.85227394104004
    Fitness changed from -90.85227394104004 to -90.85227394104004
    Static Iteration Total: 33.8442; Orientation: 2.5431; Line Search: 25.1300
    Iteration 6 failed. Error: -90.85227394104004
    Previous Error: 0.0 -> -90.85227394104004
    Retrying iteration 6
    Reset training subject: 847434683231800
    Adding measurement 6975fb1c to history. Total: 0
    LBFGS Accumulation History: 1 points
    th(0)=-90.85227394104004;dx=-1.2394295873190155E-6
    END: th(2.1544346900318838E-10)=-90.85227394104004; dx=-6.675834519684234E-7 evalInputDelta=0.0
    Fitness changed from -90.85227394104004 to -90.85227394104004
    Static Iteration Total: 25.4648; Orientation: 0.0676; Line Search: 12.5730
    Iteration 7 failed. Error: -90.85227394104004
    Previous Error: 0.0 -> -90.85227394104004
    Optimization terminated 7
    Final threshold in iteration 7: -90.85227394104004 (> -Infinity) after 388.634s (< 3600.000s)
    

Returns:

    -90.85227394104004