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 123.18 seconds (3.211 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: 1459977371866
    Reset training subject: 1460683279392
    Adding measurement 6a00a33b to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.0901037123917017;dx=-2.239109173029996E-8
    New Minimum: 1.0901037123917017 > 1.0901036157148336
    WOLFE (weak): th(2.154434690031884)=1.0901036157148336; dx=-2.2391140123660468E-8 evalInputDelta=9.667686806658082E-8
    WOLFE (weak): th(4.308869380063768)=1.0901036157148336; dx=-2.2391060796539584E-8 evalInputDelta=9.667686806658082E-8
    New Minimum: 1.0901036157148336 > 1.0901033256842292
    WOLFE (weak): th(12.926608140191302)=1.0901033256842292; dx=-2.2391173383006495E-8 evalInputDelta=3.867074724883679E-7
    New Minimum: 1.0901033256842292 > 1.0901025522692842
    WOLFE (weak): th(51.70643256076521)=1.0901025522692842; dx=-2.2391217019310225E-8 evalInputDelta=1.1601224174651037E-6
    New Minimum: 1.0901025522692842 > 1.0900984918408227
    WOLFE (weak): th(258.53216280382605)=1.0900984918408227; dx=-2.2390927727858652E-8 evalInputDelta=5.2205508789260335E-6
    New Minimum: 1.0900984918408227 > 1.0900729691476374
    WOLFE (weak): th(1551.1929768229563)=1.0900729691476374; dx=-2.2383949285436522E-8 evalInputDelta=3.074324406426854E-5
    New Minimum: 1.0900729691476374 > 1.0898885096832522
    WOLFE (weak): th(10858.350837760694)=1.0898885096832522; dx=-2.23675304071216E-8 evalInputDelta=2.1520270844943568E-4
    New Minimum: 1.0898885096832522 > 1.0883882780436671
    WOLFE (weak): th(86866.80670208555)=1.0883882780436671; dx=-2.2224458450611385E-8 evalInputDelta=0.0017154343480345613
    New Minimum: 1.0883882780436671 > 1.0750986890435423
    WOLFE (weak): th(781801.26031877)=1.0750986890435423; dx=-2.0853831633296152E-8 evalInputDelta=0.015005023348159341
    New Minimum: 1.0750986890435423 > 0.9875550780027966
    END: th(7818012.6031877)=0.9875550780027966; dx=-8.67356342624188E-9 evalInputDelta=0.10254863438890505
    Fitness changed from 1.0901037123917017 to 0.9875550780027966
    Iteration 1 complete. Error: 0.9875550780027966 Total: 10.7068; Orientation: 0.06

...skipping 20228 bytes...

    5.5431; Orientation: 1.6454; Line Search: 3.2528
    Adding measurement 17a6158b to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.986e+03, gradient 3.627e-05, dot -0.746; [cc5f33e9-f213-42c8-b5f2-f66680adf9af = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.3951593751938224, 0.3889540253978284, 0.38187476505240603, 0.3749192510981854
    LBFGS Accumulation History: 3 points
    Removed measurement 3f32e6b1 to history. Total: 4
    th(0)=0.3749192510981854;dx=-1.3156207887499052E-9
    New Minimum: 0.3749192510981854 > 0.369768452579714
    END: th(2.025462962962965E7)=0.369768452579714; dx=-3.514137635472935E-10 evalInputDelta=0.005150798518471389
    Fitness changed from 0.3749192510981854 to 0.369768452579714
    Iteration 24 complete. Error: 0.369768452579714 Total: 3.9025; Orientation: 1.6417; Line Search: 1.6175
    Adding measurement 5f8ec7e3 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.782e+03, gradient 4.765e-05, dot -0.564; [cc5f33e9-f213-42c8-b5f2-f66680adf9af = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.3889540253978284, 0.38187476505240603, 0.3749192510981854, 0.369768452579714
    LBFGS Accumulation History: 3 points
    Removed measurement 253ec65d to history. Total: 4
    th(0)=0.369768452579714;dx=-2.2707667326303613E-9
    Armijo: th(4.3637276707821764E7)=0.406731475462465; dx=1.2754023558260714E-9 evalInputDelta=-0.036963022882750995
    Armijo: th(2.1818638353910882E7)=0.3726407948393999; dx=6.50065363452735E-10 evalInputDelta=-0.002872342259685856
    New Minimum: 0.369768452579714 > 0.3641363482732754
    END: th(7272879.451303627)=0.3641363482732754; dx=-6.573758025773516E-10 evalInputDelta=0.005632104306438623
    Fitness changed from 0.369768452579714 to 0.3641363482732754
    Iteration 25 complete. Error: 0.3641363482732754 Total: 5.5312; Orientation: 1.6367; Line Search: 3.2525
    <a id="p-19"></a>Iteration 25
    <a id="p-18"></a>![Iteration 25](etc/6a129e70-eff0-4337-8b29-c0ce0c4cff59.jpg)
    
    Final threshold in iteration 26: 0.3641363482732754 (> -Infinity) after 123.179s (< 3600.000s)
    

Returns:

    0.3641363482732754