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

Iteration 30 Iteration 30

Code from BasicOptimizer.scala:75 executed in 534.14 seconds (4.695 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: 906910572338000
    Reset training subject: 906914620189700
    Adding measurement 6701fbf3 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=4.448808342218399;dx=-3.9798081056708315E-7
    New Minimum: 4.448808342218399 > 4.448807865381241
    WOLFE (weak): th(2.154434690031884)=4.448807865381241; dx=-3.979812566194146E-7 evalInputDelta=4.76837158203125E-7
    New Minimum: 4.448807865381241 > 4.448806911706924
    WOLFE (weak): th(4.308869380063768)=4.448806911706924; dx=-3.979762948286248E-7 evalInputDelta=1.430511474609375E-6
    New Minimum: 4.448806911706924 > 4.448803588747978
    WOLFE (weak): th(12.926608140191302)=4.448803588747978; dx=-3.979724325729207E-7 evalInputDelta=4.753470420837402E-6
    New Minimum: 4.448803588747978 > 4.4487878531217575
    WOLFE (weak): th(51.70643256076521)=4.4487878531217575; dx=-3.9796179381698794E-7 evalInputDelta=2.0489096641540527E-5
    New Minimum: 4.4487878531217575 > 4.44870588183403
    WOLFE (weak): th(258.53216280382605)=4.44870588183403; dx=-3.979258917730913E-7 evalInputDelta=1.0246038436889648E-4
    New Minimum: 4.44870588183403 > 4.448191151022911
    WOLFE (weak): th(1551.1929768229563)=4.448191151022911; dx=-3.979867815361919E-7 evalInputDelta=6.171911954879761E-4
    New Minimum: 4.448191151022911 > 4.444494992494583
    WOLFE (weak): th(10858.350837760694)=4.444494992494583; dx=-3.9610594005945775E-7 evalInputDelta=0.004313349723815918
    New Minimum: 4.444494992494583 > 4.415908128023148
    END: th(86866.80670208555)=4.415908128023148; dx=-3.4999177170152443E-7 evalInputDelta=0.032900214195251465
    Fitness changed from 4.448808342218399 to 4.415908128023148
    Iteration 1 complete. Error: 4.415908128023148 Total: 53.5327; Orientation: 0.0604; Line Search: 39.9084
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/3a5ad071-dad9-4fb8-90ff-64c8b40f4b55.jpg)
    
    Adding measurement 44d5a0a8 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=4.415908128023148;dx=-4.209566014270343E-7
    New Minimum: 4.41

...skipping 23502 bytes...

    8a48-4c18-993a-4e7c9bb5ce99 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.490107923746109, -0.4915630668401718, -0.4927404820919037, -0.4944158345460892
    LBFGS Accumulation History: 3 points
    Removed measurement 4d542218 to history. Total: 4
    th(0)=-0.4944158345460892;dx=-1.1912376201829062E-11
    New Minimum: -0.4944158345460892 > -0.49696259945631027
    END: th(3.7403380035275763E8)=-0.49696259945631027; dx=-3.684598144765989E-12 evalInputDelta=0.0025467649102211
    Fitness changed from -0.4944158345460892 to -0.49696259945631027
    Iteration 29 complete. Error: -0.49696259945631027 Total: 13.6357; Orientation: 1.6819; Line Search: 8.0837
    Adding measurement ddb59b6 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 6.219e+03, gradient 5.250e-06, dot -0.540; [dfbcecf9-8a48-4c18-993a-4e7c9bb5ce99 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.4915630668401718, -0.4927404820919037, -0.4944158345460892, -0.49696259945631027
    LBFGS Accumulation History: 3 points
    Removed measurement 1bab3926 to history. Total: 4
    th(0)=-0.49696259945631027;dx=-2.7559329239568553E-11
    Armijo: th(8.058313947244409E8)=-0.452554315328598; dx=1.1109123166362337E-10 evalInputDelta=-0.04440828412771225
    Armijo: th(4.0291569736222047E8)=-0.4886244460940361; dx=6.368392313931648E-11 evalInputDelta=-0.00833815336227417
    New Minimum: -0.49696259945631027 > -0.4983670562505722
    WOLF (strong): th(1.343052324540735E8)=-0.4983670562505722; dx=6.739832891200469E-12 evalInputDelta=0.0014044567942619324
    END: th(3.357630811351837E7)=-0.49773169681429863; dx=-1.8941104052535128E-11 evalInputDelta=7.690973579883575E-4
    Fitness changed from -0.49696259945631027 to -0.4983670562505722
    Iteration 30 complete. Error: -0.4983670562505722 Total: 26.4608; Orientation: 1.6872; Line Search: 20.6789
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/67a868a4-ae2d-494b-877f-18c3e1ab9784.jpg)
    
    Final threshold in iteration 31: -0.4983670562505722 (> -Infinity) after 534.144s (< 3600.000s)
    

Returns:

    -0.4983670562505722