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 3759.39 seconds (37.569 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: 1410636940323400
    Reset training subject: 1410681009600900
    Adding measurement 3186f8f5 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=5.22193156555295;dx=-7.823637132424452E-6
    New Minimum: 5.22193156555295 > 5.221929153427482
    WOLFE (weak): th(2.154434690031884)=5.221929153427482; dx=-7.79201922742746E-6 evalInputDelta=2.4121254682540894E-6
    New Minimum: 5.221929153427482 > 5.2219270796825485
    WOLFE (weak): th(4.308869380063768)=5.2219270796825485; dx=-7.791920517998829E-6 evalInputDelta=4.485870401360614E-6
    New Minimum: 5.2219270796825485 > 5.2219190038740635
    WOLFE (weak): th(12.926608140191302)=5.2219190038740635; dx=-7.791051730361425E-6 evalInputDelta=1.2561678886413574E-5
    New Minimum: 5.2219190038740635 > 5.221881066138546
    WOLFE (weak): th(51.70643256076521)=5.221881066138546; dx=-7.789863963508863E-6 evalInputDelta=5.049941440393724E-5
    New Minimum: 5.221881066138546 > 5.221680807570617
    WOLFE (weak): th(258.53216280382605)=5.221680807570617; dx=-7.786602251757226E-6 evalInputDelta=2.507579823332051E-4
    New Minimum: 5.221680807570617 > 5.220431137830019
    WOLFE (weak): th(1551.1929768229563)=5.220431137830019; dx=-7.765739073173519E-6 evalInputDelta=0.0015004277229309082
    New Minimum: 5.220431137830019 > 5.211510473241408
    WOLFE (weak): th(10858.350837760694)=5.211510473241408; dx=-7.568626001207364E-6 evalInputDelta=0.010421092311541535
    New Minimum: 5.211510473241408 > 5.149258501827717
    END: th(86866.80670208555)=5.149258501827717; dx=-5.902222792423357E-6 evalInputDelta=0.07267306372523308
    Fitness changed from 5.22193156555295 to 5.149258501827717
    Iteration 1 complete. Error: 5.149258501827717 Total: 536.5569; Orientation: 0.0494; Line Search: 402.6775
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/4afd1d3c-df95-4ffc-95ec-6b0ef920d7e5.jpg)
    
    Adding measurement 2c557eee to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=5.149258501827717;dx=-5.507951081319403E-6
    New Minimum: 5

...skipping 15014 bytes...

    history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.017e+03, gradient 1.075e-03, dot -0.654; [8a984c8a-e08a-40e2-9174-097929b30ea2 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 3.602583587169647, 3.5669235065579414, 3.5016231536865234, 3.4606895868976912
    LBFGS Accumulation History: 3 points
    Removed measurement 7a364e1c to history. Total: 4
    th(0)=3.4606895868976912;dx=-1.1554217496743568E-6
    New Minimum: 3.4606895868976912 > 3.448820816973845
    WOLF (strong): th(1396392.8546502963)=3.448820816973845; dx=1.9906466284685857E-7 evalInputDelta=0.011868769923846223
    New Minimum: 3.448820816973845 > 3.422746824721495
    END: th(698196.4273251481)=3.422746824721495; dx=-2.3801750086308927E-7 evalInputDelta=0.037942762176196076
    Fitness changed from 3.4606895868976912 to 3.422746824721495
    Iteration 19 complete. Error: 3.422746824721495 Total: 178.9214; Orientation: 1.4772; Line Search: 133.3716
    Adding measurement 48126a17 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.548e+03, gradient 1.396e-03, dot -0.560; [8a984c8a-e08a-40e2-9174-097929b30ea2 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 3.5669235065579414, 3.5016231536865234, 3.4606895868976912, 3.422746824721495
    LBFGS Accumulation History: 3 points
    Removed measurement 4270705f to history. Total: 4
    th(0)=3.422746824721495;dx=-1.9497268152281404E-6
    Armijo: th(1504218.6034856243)=3.42636601626873; dx=1.3894355198369244E-7 evalInputDelta=-0.003619191547235001
    New Minimum: 3.422746824721495 > 3.3964931021134057
    END: th(752109.3017428122)=3.3964931021134057; dx=-9.539557553194034E-8 evalInputDelta=0.026253722608089447
    Fitness changed from 3.422746824721495 to 3.3964931021134057
    Iteration 20 complete. Error: 3.3964931021134057 Total: 178.2978; Orientation: 1.4681; Line Search: 133.6341
    <a id="p-17"></a>Iteration 20
    <a id="p-16"></a>![Iteration 20](etc/1733fb67-1e7b-46d5-9d1e-4cdc6ef84d3e.jpg)
    
    Final threshold in iteration 20: 3.3964931021134057 (> -Infinity) after 3759.387s (< 3600.000s)
    

Returns:

    3.3964931021134057