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

Code from BasicOptimizer.scala:75 executed in 119.49 seconds (2.356 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: 900428513900400
    Reset training subject: 900429638033700
    Adding measurement 5b58f639 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.7589027285575867;dx=-2.7579308589754218E-6
    New Minimum: 1.7589027285575867 > 1.7588978558778763
    WOLFE (weak): th(2.154434690031884)=1.7588978558778763; dx=-2.7578962076065885E-6 evalInputDelta=4.872679710388184E-6
    New Minimum: 1.7588978558778763 > 1.7588929906487465
    WOLFE (weak): th(4.308869380063768)=1.7588929906487465; dx=-2.757901451370751E-6 evalInputDelta=9.737908840179443E-6
    New Minimum: 1.7588929906487465 > 1.7588732615113258
    WOLFE (weak): th(12.926608140191302)=1.7588732615113258; dx=-2.757839752156476E-6 evalInputDelta=2.946704626083374E-5
    New Minimum: 1.7588732615113258 > 1.7587841749191284
    WOLFE (weak): th(51.70643256076521)=1.7587841749191284; dx=-2.757976936566391E-6 evalInputDelta=1.1855363845825195E-4
    New Minimum: 1.7587841749191284 > 1.7583097070455551
    WOLFE (weak): th(258.53216280382605)=1.7583097070455551; dx=-2.7561395280753686E-6 evalInputDelta=5.930215120315552E-4
    New Minimum: 1.7583097070455551 > 1.7553495019674301
    WOLFE (weak): th(1551.1929768229563)=1.7553495019674301; dx=-2.7474654389436592E-6 evalInputDelta=0.003553226590156555
    New Minimum: 1.7553495019674301 > 1.7343928515911102
    WOLFE (weak): th(10858.350837760694)=1.7343928515911102; dx=-2.6706869812425866E-6 evalInputDelta=0.02450987696647644
    New Minimum: 1.7343928515911102 > 1.5846095904707909
    END: th(86866.80670208555)=1.5846095904707909; dx=-2.1305186517481895E-6 evalInputDelta=0.1742931380867958
    Fitness changed from 1.7589027285575867 to 1.5846095904707909
    Iteration 1 complete. Error: 1.5846095904707909 Total: 13.3095; Orientation: 0.0143; Line Search: 9.5364
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/2896fa91-ad9b-4564-a5bd-6302c108928b.jpg)
    
    Adding measurement 238c63df to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=1.5846095904707909;dx=-1.7887288363

...skipping 19699 bytes...

    . Popping history element from -0.38744398951530457, -0.39190539717674255, -0.3970644921064377, -0.4041144400835037
    LBFGS Accumulation History: 3 points
    Removed measurement 764d54a0 to history. Total: 4
    th(0)=-0.4041144400835037;dx=-1.0261473377496927E-9
    Armijo: th(6.481481481481486E7)=-0.3502039164304733; dx=1.2040067648904927E-9 evalInputDelta=-0.053910523653030396
    Armijo: th(3.240740740740743E7)=-0.3953441083431244; dx=7.598499013510934E-10 evalInputDelta=-0.008770331740379333
    New Minimum: -0.4041144400835037 > -0.40819989144802094
    END: th(1.0802469135802476E7)=-0.40819989144802094; dx=-2.377398430759573E-10 evalInputDelta=0.004085451364517212
    Fitness changed from -0.4041144400835037 to -0.40819989144802094
    Iteration 24 complete. Error: -0.40819989144802094 Total: 6.1331; Orientation: 0.4365; Line Search: 4.6450
    Adding measurement 62682ece to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.320e+03, gradient 2.784e-05, dot -0.668; [7e2c25ce-25ce-4617-8e99-9b851f70006a = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.39190539717674255, -0.3970644921064377, -0.4041144400835037, -0.40819989144802094
    LBFGS Accumulation History: 3 points
    Removed measurement 64641998 to history. Total: 4
    th(0)=-0.40819989144802094;dx=-7.75226505463066E-10
    New Minimum: -0.40819989144802094 > -0.40952472388744354
    WOLF (strong): th(2.3273214244171597E7)=-0.40952472388744354; dx=1.6016003440054887E-10 evalInputDelta=0.0013248324394226074
    New Minimum: -0.40952472388744354 > -0.41157110035419464
    END: th(1.1636607122085799E7)=-0.41157110035419464; dx=-2.2721747896740866E-10 evalInputDelta=0.003371208906173706
    Fitness changed from -0.40819989144802094 to -0.41157110035419464
    Iteration 25 complete. Error: -0.41157110035419464 Total: 5.2838; Orientation: 0.4184; Line Search: 3.7648
    <a id="p-19"></a>Iteration 25
    <a id="p-18"></a>![Iteration 25](etc/aa60038e-bed2-4727-bf13-9d58def4536a.jpg)
    
    Final threshold in iteration 26: -0.41157110035419464 (> -Infinity) after 119.485s (< 3600.000s)
    

Returns:

    -0.41157110035419464