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 1603.14 seconds (4.339 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: 1504974644995
    Reset training subject: 1540606115198
    Adding measurement 1ba18474 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=2.386604107916355;dx=-2.976294361201893E-7
    New Minimum: 2.386604107916355 > 2.386602997779846
    WOLFE (weak): th(2.154434690031884)=2.386602997779846; dx=-3.1047638756046294E-7 evalInputDelta=1.1101365089416504E-6
    New Minimum: 2.386602997779846 > 2.3866015821695328
    WOLFE (weak): th(4.308869380063768)=2.3866015821695328; dx=-2.9805133727914805E-7 evalInputDelta=2.5257468223571777E-6
    New Minimum: 2.3866015821695328 > 2.3865958005189896
    WOLFE (weak): th(12.926608140191302)=2.3865958005189896; dx=-3.105892349329231E-7 evalInputDelta=8.307397365570068E-6
    New Minimum: 2.3865958005189896 > 2.386572301387787
    WOLFE (weak): th(51.70643256076521)=2.386572301387787; dx=-3.036553485399575E-7 evalInputDelta=3.180652856826782E-5
    New Minimum: 2.386572301387787 > 2.3864466845989227
    WOLFE (weak): th(258.53216280382605)=2.3864466845989227; dx=-3.1134410033894476E-7 evalInputDelta=1.5742331743240356E-4
    New Minimum: 2.3864466845989227 > 2.385662078857422
    WOLFE (weak): th(1551.1929768229563)=2.385662078857422; dx=-2.960746089205529E-7 evalInputDelta=9.420290589332581E-4
    New Minimum: 2.385662078857422 > 2.3800356686115265
    WOLFE (weak): th(10858.350837760694)=2.3800356686115265; dx=-3.04648146673666E-7 evalInputDelta=0.006568439304828644
    New Minimum: 2.3800356686115265 > 2.334714211523533
    WOLFE (weak): th(86866.80670208555)=2.334714211523533; dx=-2.828691419936156E-7 evalInputDelta=0.051889896392822266
    New Minimum: 2.334714211523533 > 1.9765301421284676
    END: th(781801.26031877)=1.9765301421284676; dx=-1.9360692850144337E-7 evalInputDelta=0.4100739657878876
    Fitness changed from 2.386604107916355 to 1.9765301421284676
    Iteration 1 complete. Error: 1.9765301421284676 Total: 453.4403; Orientation: 0.0256; Line Search: 349.6682
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/04463f6d-5cb5-4f87-9b80-d2818445a953.jpg)
    
    Ad

...skipping 5744 bytes...

     0.6586; Line Search: 69.7256
    Adding measurement 64438e31 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.708e+03, gradient 2.240e-04, dot -0.339; [e0f0f3f9-081a-4c18-a9ae-16f7e655261d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.9481681734323502, 1.397275149822235, 1.9765301421284676, 2.386604107916355
    LBFGS Accumulation History: 3 points
    Removed measurement 64438e31 to history. Total: 3
    th(0)=-0.9481681734323502;dx=-4.913954677197456E-8
    Armijo: th(1.5120000000000002E7)=-0.5497835874557495; dx=3.7336914978419195E-10 evalInputDelta=-0.39838458597660065
    New Minimum: -0.9481681734323502 > -1.0418228805065155
    END: th(7560000.000000001)=-1.0418228805065155; dx=-1.1917336861417285E-8 evalInputDelta=0.09365470707416534
    Fitness changed from -0.9481681734323502 to -1.0418228805065155
    Iteration 9 complete. Error: -1.0418228805065155 Total: 139.6436; Orientation: 0.6607; Line Search: 103.9284
    Adding measurement 2db76a1b to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.075e+03, gradient 2.126e-04, dot -0.301; [e0f0f3f9-081a-4c18-a9ae-16f7e655261d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.0418228805065155, 1.397275149822235, 1.9765301421284676, 2.386604107916355
    LBFGS Accumulation History: 3 points
    Removed measurement 2db76a1b to history. Total: 3
    th(0)=-1.0418228805065155;dx=-4.4648363197521867E-8
    Armijo: th(1.6287526256641043E7)=-0.555904358625412; dx=1.8553987392381104E-9 evalInputDelta=-0.4859185218811035
    New Minimum: -1.0418228805065155 > -1.1306416392326355
    END: th(8143763.128320522)=-1.1306416392326355; dx=-8.436761423415609E-9 evalInputDelta=0.08881875872612
    Fitness changed from -1.0418228805065155 to -1.1306416392326355
    Iteration 10 complete. Error: -1.1306416392326355 Total: 138.4560; Orientation: 0.6448; Line Search: 104.0711
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/c735fd71-6ffd-4ef7-8d01-3273c1c22333.jpg)
    
    Final threshold in iteration 11: -1.1306416392326355 (> -Infinity) after 1603.135s (< 1800.000s)
    

Returns:

    -1.1306416392326355