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 266.99 seconds (4.260 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: 2435206736239
    Reset training subject: 2439178250640
    Adding measurement 3c463de6 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=10.321519903838634;dx=-1.51448716033768E-6
    New Minimum: 10.321519903838634 > 10.321517921984196
    WOLFE (weak): th(2.154434690031884)=10.321517921984196; dx=-1.5144923756846896E-6 evalInputDelta=1.9818544387817383E-6
    New Minimum: 10.321517921984196 > 10.32151547819376
    WOLFE (weak): th(4.308869380063768)=10.32151547819376; dx=-1.5145031415362044E-6 evalInputDelta=4.425644874572754E-6
    New Minimum: 10.32151547819376 > 10.321506597101688
    WOLFE (weak): th(12.926608140191302)=10.321506597101688; dx=-1.514500010610646E-6 evalInputDelta=1.3306736946105957E-5
    New Minimum: 10.321506597101688 > 10.321466460824013
    WOLFE (weak): th(51.70643256076521)=10.321466460824013; dx=-1.514424204580189E-6 evalInputDelta=5.344301462173462E-5
    New Minimum: 10.321466460824013 > 10.321253478527069
    WOLFE (weak): th(258.53216280382605)=10.321253478527069; dx=-1.5141768821440617E-6 evalInputDelta=2.6642531156539917E-4
    New Minimum: 10.321253478527069 > 10.319922231137753
    WOLFE (weak): th(1551.1929768229563)=10.319922231137753; dx=-1.5142305518114747E-6 evalInputDelta=0.001597672700881958
    New Minimum: 10.319922231137753 > 10.310359679162502
    WOLFE (weak): th(10858.350837760694)=10.310359679162502; dx=-1.5065982999219318E-6 evalInputDelta=0.011160224676132202
    New Minimum: 10.310359679162502 > 10.234262585639954
    WOLFE (weak): th(86866.80670208555)=10.234262585639954; dx=-1.4419898139331941E-6 evalInputDelta=0.08725731819868088
    New Minimum: 10.234262585639954 > 9.67361232638359
    END: th(781801.26031877)=9.67361232638359; dx=-9.636060395086816E-7 evalInputDelta=0.6479075774550438
    Fitness changed from 10.321519903838634 to 9.67361232638359
    Iteration 1 complete. Error: 9.67361232638359 Total: 45.3545; Orientation: 0.0127; Line Search: 34.5146
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/444b09f6-e272-44a8-a0e7-a4f069905175.jpg)

...skipping 8958 bytes...

     th(0.12804282085939575)=4.103851318359375; dx=-1.0126303512524505E-7 evalInputDelta=-1.4901161193847656E-7
    Armijo: th(0.12512068179413982)=4.103851169347763; dx=-1.0126303638916853E-7 evalInputDelta=0.0
    Armijo: th(0.12365961226151187)=4.103851228952408; dx=-1.0126303491023091E-7 evalInputDelta=-5.9604644775390625E-8
    Armijo: th(0.12292907749519788)=4.103851288557053; dx=-1.012630359806375E-7 evalInputDelta=-1.1920928955078125E-7
    Armijo: th(0.1225638101120409)=4.103851228952408; dx=-1.0126303536333978E-7 evalInputDelta=-5.9604644775390625E-8
    WOLFE (weak): th(0.1223811764204624)=4.103851154446602; dx=-1.0126303500673064E-7 evalInputDelta=1.4901161193847656E-8
    Armijo: th(0.12247249326625165)=4.103851228952408; dx=-1.0126303520741299E-7 evalInputDelta=-5.9604644775390625E-8
    WOLFE (weak): th(0.12242683484335702)=4.103851094841957; dx=-1.0126303508710354E-7 evalInputDelta=7.450580596923828E-8
    WOLFE (weak): th(0.12244966405480434)=4.103851154446602; dx=-1.0126303519471982E-7 evalInputDelta=1.4901161193847656E-8
    Armijo: th(0.122461078660528)=4.103851228952408; dx=-1.0126303533527284E-7 evalInputDelta=-5.9604644775390625E-8
    Armijo: th(0.12245537135766617)=4.103851228952408; dx=-1.0126303496909982E-7 evalInputDelta=-5.9604644775390625E-8
    Armijo: th(0.12245251770623525)=4.103851228952408; dx=-1.0126303520746544E-7 evalInputDelta=-5.9604644775390625E-8
    WOLFE (weak): th(0.1224510908805198)=4.103851154446602; dx=-1.0126303514146682E-7 evalInputDelta=1.4901161193847656E-8
    WOLFE (weak): th(0.12245180429337751)=4.103851154446602; dx=-1.0126303535493826E-7 evalInputDelta=1.4901161193847656E-8
    mu ~= nu (0.12245180429337751): th(0.11050998646786023)=4.103851094841957
    Fitness changed from 4.103851169347763 to 4.103851094841957
    Iteration 10 complete. Error: 4.103851094841957 Total: 115.4341; Orientation: 0.3831; Line Search: 111.6376
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/85ef79af-2d2e-4c5b-b035-3ffdec3be176.jpg)
    
    Final threshold in iteration 11: 4.103851094841957 (> -Infinity) after 266.991s (< 3600.000s)
    

Returns:

    4.103851094841957