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 44.19 seconds (0.697 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: 924872203117600
    Reset training subject: 924873834906700
    Adding measurement 40b87064 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=2.5344795994460583;dx=-8.752970090860613E-6
    New Minimum: 2.5344795994460583 > 2.534465044736862
    WOLFE (weak): th(2.154434690031884)=2.534465044736862; dx=-8.752287955704056E-6 evalInputDelta=1.4554709196090698E-5
    New Minimum: 2.534465044736862 > 2.534450486302376
    WOLFE (weak): th(4.308869380063768)=2.534450486302376; dx=-8.753168835381537E-6 evalInputDelta=2.911314368247986E-5
    New Minimum: 2.534450486302376 > 2.5343929678201675
    WOLFE (weak): th(12.926608140191302)=2.5343929678201675; dx=-8.75067697668977E-6 evalInputDelta=8.663162589073181E-5
    New Minimum: 2.5343929678201675 > 2.5341340228915215
    WOLFE (weak): th(51.70643256076521)=2.5341340228915215; dx=-8.743191502780622E-6 evalInputDelta=3.4557655453681946E-4
    New Minimum: 2.5341340228915215 > 2.5327535420656204
    WOLFE (weak): th(258.53216280382605)=2.5327535420656204; dx=-8.701919384878614E-6 evalInputDelta=0.001726057380437851
    New Minimum: 2.5327535420656204 > 2.5242231488227844
    WOLFE (weak): th(1551.1929768229563)=2.5242231488227844; dx=-8.606487242894943E-6 evalInputDelta=0.01025645062327385
    New Minimum: 2.5242231488227844 > 2.4714634269475937
    END: th(10858.350837760694)=2.4714634269475937; dx=-6.655752995368107E-6 evalInputDelta=0.06301617249846458
    Fitness changed from 2.5344795994460583 to 2.4714634269475937
    Iteration 1 complete. Error: 2.4714634269475937 Total: 18.4453; Orientation: 0.0194; Line Search: 14.0366
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/86bb74cb-11e7-4d31-a585-7cc665dd7fb8.jpg)
    
    Adding measurement 61e3a876 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=2.4714634269475937;dx=-6.884212286272381E-6
    New Minimum: 2.4714634269475937 > 2.36700252443552
    END: th(23393.607721408407)=2.36700252443552; dx=-4.911274655191642E-6 evalInputDelta=0.10446090251207352
    Fitness chang

...skipping 1449 bytes...

    Fitness changed from 2.2309346199035645 to 2.081278070807457
    Iteration 4 complete. Error: 2.081278070807457 Total: 5.1303; Orientation: 0.5011; Line Search: 2.9879
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/c88e6410-5d30-46db-80cb-f1e5b79f4823.jpg)
    
    Adding measurement 15806841 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.112e+02, gradient 2.194e-03, dot -0.684; [9a657e40-744c-4b43-822e-79e61a23ddd7 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.4714634269475937, 2.36700252443552, 2.2309346199035645, 2.081278070807457
    LBFGS Accumulation History: 3 points
    Removed measurement 61e3a876 to history. Total: 4
    th(0)=2.081278070807457;dx=-4.812709675868648E-6
    New Minimum: 2.081278070807457 > 1.9677067026495934
    END: th(233936.07721408413)=1.9677067026495934; dx=-3.169890066117551E-7 evalInputDelta=0.11357136815786362
    Fitness changed from 2.081278070807457 to 1.9677067026495934
    Iteration 5 complete. Error: 1.9677067026495934 Total: 5.2707; Orientation: 0.4772; Line Search: 3.3180
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/9de179c3-2e93-4023-be07-50bc54ffc0a6.jpg)
    
    Adding measurement b431d36 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.534e+02, gradient 2.299e-03, dot -0.668; [9a657e40-744c-4b43-822e-79e61a23ddd7 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.36700252443552, 2.2309346199035645, 2.081278070807457, 1.9677067026495934
    LBFGS Accumulation History: 3 points
    Removed measurement 5caa2f1e to history. Total: 4
    th(0)=1.9677067026495934;dx=-5.283933933937072E-6
    New Minimum: 1.9677067026495934 > 1.8512895554304123
    END: th(504000.0000000002)=1.8512895554304123; dx=-8.418207501609835E-8 evalInputDelta=0.11641714721918106
    Fitness changed from 1.9677067026495934 to 1.8512895554304123
    Iteration 6 complete. Error: 1.8512895554304123 Total: 5.4215; Orientation: 0.4655; Line Search: 3.3214
    Final threshold in iteration 7: 1.8512895554304123 (> -Infinity) after 44.192s (< 720.000s)
    

Returns:

    1.8512895554304123