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:88 executed in 121.67 seconds (6.061 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: 714415601686
    Reset training subject: 716454139738
    Adding measurement 13a8ea43 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=18.208842277526855;dx=-1.8488466647003757E-5
    New Minimum: 18.208842277526855 > 18.208778511732817
    WOLFE (weak): th(2.154434690031884)=18.208778511732817; dx=-1.830292610411092E-5 evalInputDelta=6.376579403877258E-5
    New Minimum: 18.208778511732817 > 18.208714585751295
    WOLFE (weak): th(4.308869380063768)=18.208714585751295; dx=-1.829642172649098E-5 evalInputDelta=1.2769177556037903E-4
    New Minimum: 18.208714585751295 > 18.208460733294487
    WOLFE (weak): th(12.926608140191302)=18.208460733294487; dx=-1.8297910631129762E-5 evalInputDelta=3.8154423236846924E-4
    New Minimum: 18.208460733294487 > 18.20731469243765
    WOLFE (weak): th(51.70643256076521)=18.20731469243765; dx=-1.829136717320027E-5 evalInputDelta=0.0015275850892066956
    New Minimum: 18.20731469243765 > 18.20120855048299
    WOLFE (weak): th(258.53216280382605)=18.20120855048299; dx=-1.8412294055859184E-5 evalInputDelta=0.007633727043867111
    New Minimum: 18.20120855048299 > 18.162865571677685
    WOLFE (weak): th(1551.1929768229563)=18.162865571677685; dx=-1.8345477582589362E-5 evalInputDelta=0.045976705849170685
    New Minimum: 18.162865571677685 > 17.891728907823563
    WOLFE (weak): th(10858.350837760694)=17.891728907823563; dx=-1.7653831462264784E-5 evalInputDelta=0.31711336970329285
    New Minimum: 17.891728907823563 > 16.061302356421947
    END: th(86866.80670208555)=16.061302356421947; dx=-1.2121350240329563E-5 evalInputDelta=2.147539921104908
    Fitness changed from 18.208842277526855 to 16.061302356421947
    Iteration 1 complete. Error: 16.061302356421947 Total: 20.0159; Orientation: 0.0249; Line Search: 14.9614
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/2a692f86-2c8b-4478-9f1d-30aa28de2eb0.jpg)
    
    Adding measurement 61957b7e to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=16.061302356421947;dx=-1.093132329919605E-5
    New Minimum: 16.061302356421

...skipping 14746 bytes...

    ted: LBFGS Orientation magnitude: 1.333e+03, gradient 5.476e-04, dot -0.364; [a801b9ee-3fc3-4cee-a8f5-cf70c5b178d1 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.8828126639127731, 13.434310033917427, 16.061302356421947, 18.208842277526855
    LBFGS Accumulation History: 3 points
    Removed measurement 244eb1fd to history. Total: 3
    th(0)=0.8828126639127731;dx=-2.9178104456581627E-7
    Armijo: th(4189178.563950889)=2.083586797118187; dx=2.4252249711621396E-7 evalInputDelta=-1.2007741332054138
    Armijo: th(2094589.2819754444)=1.141405150294304; dx=1.47376587912054E-7 evalInputDelta=-0.25859248638153076
    New Minimum: 0.8828126639127731 > 0.8170005232095718
    END: th(698196.4273251481)=0.8170005232095718; dx=-1.2122273780288907E-8 evalInputDelta=0.0658121407032013
    Fitness changed from 0.8828126639127731 to 0.8170005232095718
    Iteration 19 complete. Error: 0.8170005232095718 Total: 7.1251; Orientation: 0.0888; Line Search: 5.7468
    Adding measurement 1537bfa3 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.057e+03, gradient 4.607e-04, dot -0.352; [a801b9ee-3fc3-4cee-a8f5-cf70c5b178d1 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.8170005232095718, 13.434310033917427, 16.061302356421947, 18.208842277526855
    LBFGS Accumulation History: 3 points
    Removed measurement 1537bfa3 to history. Total: 3
    th(0)=0.8170005232095718;dx=-2.0702999905326336E-7
    Armijo: th(1504218.6034856243)=0.8416973501443863; dx=9.830985009983996E-8 evalInputDelta=-0.024696826934814453
    New Minimum: 0.8170005232095718 > 0.7376638948917389
    END: th(752109.3017428122)=0.7376638948917389; dx=-2.542767591401256E-10 evalInputDelta=0.07933662831783295
    Fitness changed from 0.8170005232095718 to 0.7376638948917389
    Iteration 20 complete. Error: 0.7376638948917389 Total: 5.2361; Orientation: 0.1126; Line Search: 3.8300
    <a id="p-17"></a>Iteration 20
    <a id="p-16"></a>![Iteration 20](etc/3587f61b-ee09-4547-8e64-ddca209328d1.jpg)
    
    Final threshold in iteration 21: 0.7376638948917389 (> -Infinity) after 121.652s (< 3600.000s)
    

Returns:

    0.7376638948917389