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 12.69 seconds (0.139 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: 911332282058700
    Reset training subject: 911332905242000
    Adding measurement 70c38e0 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.943504959344864;dx=-2.5545055567742136E-6
    New Minimum: 1.943504959344864 > 1.9435010701417923
    WOLFE (weak): th(2.154434690031884)=1.9435010701417923; dx=-2.5544734450403247E-6 evalInputDelta=3.889203071594238E-6
    New Minimum: 1.9435010701417923 > 1.943497434258461
    WOLFE (weak): th(4.308869380063768)=1.943497434258461; dx=-2.5544023960550964E-6 evalInputDelta=7.525086402893066E-6
    New Minimum: 1.943497434258461 > 1.943481907248497
    WOLFE (weak): th(12.926608140191302)=1.943481907248497; dx=-2.5544301665992576E-6 evalInputDelta=2.3052096366882324E-5
    New Minimum: 1.943481907248497 > 1.9434120804071426
    WOLFE (weak): th(51.70643256076521)=1.9434120804071426; dx=-2.5544432383265303E-6 evalInputDelta=9.287893772125244E-5
    New Minimum: 1.9434120804071426 > 1.943040370941162
    WOLFE (weak): th(258.53216280382605)=1.943040370941162; dx=-2.5552647122682386E-6 evalInputDelta=4.645884037017822E-4
    New Minimum: 1.943040370941162 > 1.9407161176204681
    WOLFE (weak): th(1551.1929768229563)=1.9407161176204681; dx=-2.5502561321488737E-6 evalInputDelta=0.002788841724395752
    New Minimum: 1.9407161176204681 > 1.9238895773887634
    WOLFE (weak): th(10858.350837760694)=1.9238895773887634; dx=-2.5058143919764105E-6 evalInputDelta=0.019615381956100464
    New Minimum: 1.9238895773887634 > 1.7956175804138184
    END: th(86866.80670208555)=1.7956175804138184; dx=-1.8538913411611505E-6 evalInputDelta=0.14788737893104553
    Fitness changed from 1.943504959344864 to 1.7956175804138184
    Iteration 1 complete. Error: 1.7956175804138184 Total: 5.5862; Orientation: 0.0034; Line Search: 4.0833
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/defe1a5e-a03a-4215-8f94-e0ce561d0d24.jpg)
    
    Adding measurement 19ee0e93 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=1.7956175804138184;dx=-2.7442409774809764E-6

...skipping 1646 bytes...

    anged from 1.1596159934997559 to 0.8524725437164307
    Iteration 4 complete. Error: 0.8524725437164307 Total: 1.4612; Orientation: 0.1092; Line Search: 0.9066
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/47a043dc-ffe7-4735-be4b-a280b45666dd.jpg)
    
    Adding measurement 6812e86e to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.287e+03, gradient 6.273e-04, dot -0.892; [e927426c-402d-4abb-a9e3-eaa6f003cb4f = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.7956175804138184, 1.4988176375627518, 1.1596159934997559, 0.8524725437164307
    LBFGS Accumulation History: 3 points
    Removed measurement 19ee0e93 to history. Total: 4
    th(0)=0.8524725437164307;dx=-3.934830915300119E-7
    New Minimum: 0.8524725437164307 > 0.5602742433547974
    END: th(1871488.617712673)=0.5602742433547974; dx=-1.4788671815527E-7 evalInputDelta=0.2921983003616333
    Fitness changed from 0.8524725437164307 to 0.5602742433547974
    Iteration 5 complete. Error: 0.5602742433547974 Total: 1.4707; Orientation: 0.1057; Line Search: 0.9094
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/47ce9153-ca1b-4cc0-8689-457412810070.jpg)
    
    Adding measurement 7890fa09 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.913e+03, gradient 4.650e-04, dot -0.864; [e927426c-402d-4abb-a9e3-eaa6f003cb4f = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.4988176375627518, 1.1596159934997559, 0.8524725437164307, 0.5602742433547974
    LBFGS Accumulation History: 3 points
    Removed measurement 73e15f73 to history. Total: 4
    th(0)=0.5602742433547974;dx=-2.1623044379961476E-7
    New Minimum: 0.5602742433547974 > 0.2974802851676941
    END: th(4032000.0000000014)=0.2974802851676941; dx=-5.978990013588143E-8 evalInputDelta=0.26279395818710327
    Fitness changed from 0.5602742433547974 to 0.2974802851676941
    Iteration 6 complete. Error: 0.2974802851676941 Total: 1.4535; Orientation: 0.1087; Line Search: 0.8973
    Final threshold in iteration 7: 0.2974802851676941 (> -Infinity) after 12.692s (< 720.000s)
    

Returns:

    0.2974802851676941