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

Code from BasicOptimizer.scala:75 executed in 3802.00 seconds (48.231 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: 1414567957636700
    Reset training subject: 1414613280380000
    Adding measurement 3fb4beb1 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=3.4543600790202618;dx=-4.9111356875153E-6
    New Minimum: 3.4543600790202618 > 3.4543582486609616
    WOLFE (weak): th(2.154434690031884)=3.4543582486609616; dx=-4.8793926718499285E-6 evalInputDelta=1.8303593001256502E-6
    New Minimum: 3.4543582486609616 > 3.454356372356415
    WOLFE (weak): th(4.308869380063768)=3.454356372356415; dx=-4.8794316351835375E-6 evalInputDelta=3.7066638469696045E-6
    New Minimum: 3.454356372356415 > 3.454348792011539
    WOLFE (weak): th(12.926608140191302)=3.454348792011539; dx=-4.879184072535453E-6 evalInputDelta=1.1287008722771219E-5
    New Minimum: 3.454348792011539 > 3.4543148844192424
    WOLFE (weak): th(51.70643256076521)=3.4543148844192424; dx=-4.877501670230357E-6 evalInputDelta=4.519460101937156E-5
    New Minimum: 3.4543148844192424 > 3.4541335850954056
    WOLFE (weak): th(258.53216280382605)=3.4541335850954056; dx=-4.870900323605292E-6 evalInputDelta=2.264939248561859E-4
    New Minimum: 3.4541335850954056 > 3.4530036312838397
    WOLFE (weak): th(1551.1929768229563)=3.4530036312838397; dx=-4.8428249878433625E-6 evalInputDelta=0.0013564477364220728
    New Minimum: 3.4530036312838397 > 3.445064748947819
    WOLFE (weak): th(10858.350837760694)=3.445064748947819; dx=-4.653605940954155E-6 evalInputDelta=0.009295330072442543
    New Minimum: 3.445064748947819 > 3.390778017540773
    END: th(86866.80670208555)=3.390778017540773; dx=-3.322216644400865E-6 evalInputDelta=0.06358206147948886
    Fitness changed from 3.4543600790202618 to 3.390778017540773
    Iteration 1 complete. Error: 3.390778017540773 Total: 556.3858; Orientation: 0.0847; Line Search: 420.5608
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/7ecee86b-2a26-467d-84ae-05fbe6af9b62.jpg)
    
    Adding measurement 279ebd94 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=3.390778017540773;dx=-3.5316027589060926E-6

...skipping 15221 bytes...

    ntation rejected. Popping history element from 2.2568871825933456, 2.215582404906551, 2.1856352587540946, 2.146851701041063
    LBFGS Accumulation History: 3 points
    Removed measurement 45f70f68 to history. Total: 4
    th(0)=2.146851701041063;dx=-2.905055238224251E-7
    New Minimum: 2.146851701041063 > 2.126041458298763
    WOLF (strong): th(4189178.563950889)=2.126041458298763; dx=3.281133015025038E-8 evalInputDelta=0.020810242742300034
    New Minimum: 2.126041458298763 > 2.1178152126570544
    END: th(2094589.2819754444)=2.1178152126570544; dx=-4.608527258440162E-9 evalInputDelta=0.029036488384008408
    Fitness changed from 2.146851701041063 to 2.1178152126570544
    Iteration 19 complete. Error: 2.1178152126570544 Total: 179.5402; Orientation: 2.3555; Line Search: 132.9400
    Adding measurement 6fc1a1d5 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.218e+03, gradient 5.782e-04, dot -0.634; [0b8a6e62-b4f3-445c-a8a5-c3ea8b793cdc = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.215582404906551, 2.1856352587540946, 2.146851701041063, 2.1178152126570544
    LBFGS Accumulation History: 3 points
    Removed measurement 2a7b4bb6 to history. Total: 4
    th(0)=2.1178152126570544;dx=-3.3430604839229213E-7
    Armijo: th(4512655.810456873)=2.150188801189264; dx=1.628328348538441E-7 evalInputDelta=-0.032373588532209396
    New Minimum: 2.1178152126570544 > 2.089818788692355
    WOLF (strong): th(2256327.9052284365)=2.089818788692355; dx=8.380909410540568E-8 evalInputDelta=0.027996423964699257
    New Minimum: 2.089818788692355 > 2.089658772572875
    END: th(752109.3017428122)=2.089658772572875; dx=-1.1700401144944925E-7 evalInputDelta=0.02815644008417939
    Fitness changed from 2.1178152126570544 to 2.089658772572875
    Iteration 20 complete. Error: 2.089658772572875 Total: 225.3032; Orientation: 2.3661; Line Search: 179.1052
    <a id="p-17"></a>Iteration 20
    <a id="p-16"></a>![Iteration 20](etc/0c8bdf8d-eefb-4795-8558-c35b201544ab.jpg)
    
    Final threshold in iteration 21: 2.089658772572875 (> -Infinity) after 3801.999s (< 5400.000s)
    

Returns:

    2.089658772572875