Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Code from BasicOptimizer.scala:88 executed in 237.47 seconds (6.382 gc):

    val lineSearchInstance: LineSearchStrategy = lineSearchFactory
    val trainer = new IterativeTrainer(trainable)
    trainer.setOrientation(orientation())
    trainer.setMonitor(new TrainingMonitor() {
      override def clear(): Unit = trainingMonitor.clear()
  
      override def log(msg: String): Unit = {
        trainingMonitor.log(msg)
        BasicOptimizer.this.log(msg)
      }
  
      override def onStepFail(currentPoint: Step): Boolean = {
        BasicOptimizer.this.onStepFail(trainable.addRef().asInstanceOf[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.addRef().asInstanceOf[Trainable], currentPoint)
        trainingMonitor.onStepComplete(currentPoint)
        super.onStepComplete(currentPoint)
      }
    })
    trainer.setTimeout(trainingMinutes, TimeUnit.MINUTES)
    trainer.setMaxIterations(trainingIterations)
    trainer.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
    trainer.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
    val result = trainer.run.asInstanceOf[lang.Double]
    trainer.freeRef()
    result

Logging:

    Reset training subject: 2513918485657
    Reset training subject: 2518347423883
    Adding measurement 3a5cdb4 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=3.7381990998983383;dx=-3.447384328253899E-7
    New Minimum: 3.7381990998983383 > 3.7381981015205383
    WOLFE (weak): th(2.154434690031884)=3.7381981015205383; dx=-3.446725596086921E-7 evalInputDelta=9.98377799987793E-7
    New Minimum: 3.7381981015205383 > 3.738196924328804
    WOLFE (weak): th(4.308869380063768)=3.738196924328804; dx=-3.4468427219361466E-7 evalInputDelta=2.175569534301758E-6
    New Minimum: 3.738196924328804 > 3.7381923347711563
    WOLFE (weak): th(12.926608140191302)=3.7381923347711563; dx=-3.446712576229435E-7 evalInputDelta=6.765127182006836E-6
    New Minimum: 3.7381923347711563 > 3.738171949982643
    WOLFE (weak): th(51.70643256076521)=3.738171949982643; dx=-3.4452094169984974E-7 evalInputDelta=2.714991569519043E-5
    New Minimum: 3.738171949982643 > 3.7380628883838654
    WOLFE (weak): th(258.53216280382605)=3.7380628883838654; dx=-3.4462547419805137E-7 evalInputDelta=1.3621151447296143E-4
    New Minimum: 3.7380628883838654 > 3.737380877137184
    WOLFE (weak): th(1551.1929768229563)=3.737380877137184; dx=-3.445475248312784E-7 evalInputDelta=8.182227611541748E-4
    New Minimum: 3.737380877137184 > 3.7324716597795486
    WOLFE (weak): th(10858.350837760694)=3.7324716597795486; dx=-3.4467915664794394E-7 evalInputDelta=0.005727440118789673
    New Minimum: 3.7324716597795486 > 3.6924572736024857
    WOLFE (weak): th(86866.80670208555)=3.6924572736024857; dx=-3.436839943346619E-7 evalInputDelta=0.04574182629585266
    New Minimum: 3.6924572736024857 > 3.3339788019657135
    WOLFE (weak): th(781801.26031877)=3.3339788019657135; dx=-3.317217030248693E-7 evalInputDelta=0.4042202979326248
    New Minimum: 3.3339788019657135 > 1.1790434122085571
    END: th(7818012.6031877)=1.1790434122085571; dx=-8.889160119632581E-8 evalInputDelta=2.559155687689781
    Fitness changed from 3.7381990998983383 to 1.1790434122085571
    Iteration 1 complete. Error: 1.1790434122085571 T

...skipping 6389 bytes...

    radient 8.698e-05, dot -0.713; [83c239df-f16c-498d-a82e-2e4486206c8a = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.3970040529966354, -0.0029252618551254272, 1.1790434122085571, 3.7381990998983383
    LBFGS Accumulation History: 3 points
    Removed measurement 639f1b75 to history. Total: 3
    th(0)=-1.3970040529966354;dx=-7.531854951109069E-9
    New Minimum: -1.3970040529966354 > -1.4859470203518867
    END: th(1.2600000000000004E7)=-1.4859470203518867; dx=-4.53848342993446E-9 evalInputDelta=0.08894296735525131
    Fitness changed from -1.3970040529966354 to -1.4859470203518867
    Iteration 9 complete. Error: -1.4859470203518867 Total: 13.8125; Orientation: 0.4848; Line Search: 9.0139
    Adding measurement 2ee95d1e to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.595e+03, gradient 1.039e-04, dot -0.592; [83c239df-f16c-498d-a82e-2e4486206c8a = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.4859470203518867, -0.0029252618551254272, 1.1790434122085571, 3.7381990998983383
    LBFGS Accumulation History: 3 points
    Removed measurement 2ee95d1e to history. Total: 3
    th(0)=-1.4859470203518867;dx=-1.078073827779858E-8
    Armijo: th(2.7145877094401743E7)=-0.4477449953556061; dx=5.3819250563630355E-8 evalInputDelta=-1.0382020249962807
    Armijo: th(1.3572938547200872E7)=-1.3179682791233063; dx=2.0475656430678207E-8 evalInputDelta=-0.16797874122858047
    New Minimum: -1.4859470203518867 > -1.5065048336982727
    WOLF (strong): th(4524312.849066957)=-1.5065048336982727; dx=2.562884349711614E-10 evalInputDelta=0.020557813346385956
    END: th(1131078.2122667392)=-1.4989678412675858; dx=-7.890016358152456E-9 evalInputDelta=0.013020820915699005
    Fitness changed from -1.4859470203518867 to -1.5065048336982727
    Iteration 10 complete. Error: -1.5065048336982727 Total: 29.7471; Orientation: 0.4878; Line Search: 24.7885
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/42463447-eefe-4109-8d3f-5203f1d33d88.jpg)
    
    Final threshold in iteration 11: -1.5065048336982727 (> -Infinity) after 237.465s (< 3600.000s)
    

Returns:

    -1.5065048336982727