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 950.29 seconds (6.865 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: 2083411296771
    Reset training subject: 2102039046771
    Adding measurement 31af253f to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=9.001111477613449;dx=-7.426800673909567E-8
    New Minimum: 9.001111477613449 > 9.001111432909966
    WOLFE (weak): th(2.154434690031884)=9.001111432909966; dx=-7.408431530185102E-8 evalInputDelta=4.470348358154297E-8
    New Minimum: 9.001111432909966 > 9.001111194491386
    WOLFE (weak): th(4.308869380063768)=9.001111194491386; dx=-7.404836499603678E-8 evalInputDelta=2.8312206268310547E-7
    New Minimum: 9.001111194491386 > 9.001109600067139
    WOLFE (weak): th(12.926608140191302)=9.001109600067139; dx=-7.405064552968148E-8 evalInputDelta=1.8775463104248047E-6
    New Minimum: 9.001109600067139 > 9.001103736460209
    WOLFE (weak): th(51.70643256076521)=9.001103736460209; dx=-7.409129346951574E-8 evalInputDelta=7.741153240203857E-6
    New Minimum: 9.001103736460209 > 9.001072481274605
    WOLFE (weak): th(258.53216280382605)=9.001072481274605; dx=-7.407963168365728E-8 evalInputDelta=3.8996338844299316E-5
    New Minimum: 9.001072481274605 > 9.00087732821703
    WOLFE (weak): th(1551.1929768229563)=9.00087732821703; dx=-7.410030880166826E-8 evalInputDelta=2.3414939641952515E-4
    New Minimum: 9.00087732821703 > 8.999469861388206
    WOLFE (weak): th(10858.350837760694)=8.999469861388206; dx=-7.407691957375765E-8 evalInputDelta=0.0016416162252426147
    New Minimum: 8.999469861388206 > 8.987978003919125
    WOLFE (weak): th(86866.80670208555)=8.987978003919125; dx=-7.391847020443998E-8 evalInputDelta=0.013133473694324493
    New Minimum: 8.987978003919125 > 8.883132934570312
    WOLFE (weak): th(781801.26031877)=8.883132934570312; dx=-7.28997609280422E-8 evalInputDelta=0.1179785430431366
    New Minimum: 8.883132934570312 > 7.913208037614822
    END: th(7818012.6031877)=7.913208037614822; dx=-5.9437087093709574E-8 evalInputDelta=1.0879034399986267
    Fitness changed from 9.001111477613449 to 7.913208037614822
    Iteration 1 complete. Error: 7.913208037614822 Total: 276.6058; Orientat

...skipping 5993 bytes...

     history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.399e+04, gradient 6.897e-05, dot -0.386; [3d1e8498-eefa-4861-97e9-9d42a6f7f5e1 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.1643985509872437, 6.275933846831322, 7.913208037614822, 9.001111477613449
    LBFGS Accumulation History: 3 points
    Removed measurement 7756d512 to history. Total: 3
    th(0)=-1.1643985509872437;dx=-4.746807723527273E-9
    New Minimum: -1.1643985509872437 > -1.5589430630207062
    END: th(1.0080000000000003E8)=-1.5589430630207062; dx=-1.0962031604759242E-9 evalInputDelta=0.3945445120334625
    Fitness changed from -1.1643985509872437 to -1.5589430630207062
    Iteration 9 complete. Error: -1.5589430630207062 Total: 63.3912; Orientation: 1.4084; Line Search: 43.0941
    Adding measurement 961999c to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.403e+04, gradient 8.643e-05, dot -0.309; [3d1e8498-eefa-4861-97e9-9d42a6f7f5e1 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.5589430630207062, 6.275933846831322, 7.913208037614822, 9.001111477613449
    LBFGS Accumulation History: 3 points
    Removed measurement 961999c to history. Total: 3
    th(0)=-1.5589430630207062;dx=-7.464316230631912E-9
    Armijo: th(2.1716701675521395E8)=-1.1378270387649536; dx=1.7460955031170072E-9 evalInputDelta=-0.42111602425575256
    New Minimum: -1.5589430630207062 > -1.6305622458457947
    WOLF (strong): th(1.0858350837760697E8)=-1.6305622458457947; dx=1.4665695214750994E-9 evalInputDelta=0.0716191828250885
    New Minimum: -1.6305622458457947 > -1.7638395130634308
    END: th(3.6194502792535655E7)=-1.7638395130634308; dx=-1.6001046960867054E-9 evalInputDelta=0.2048964500427246
    Fitness changed from -1.5589430630207062 to -1.7638395130634308
    Iteration 10 complete. Error: -1.7638395130634308 Total: 103.7554; Orientation: 1.4038; Line Search: 81.9886
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/d857d7b2-6242-4463-9364-e3b8afa228f8.jpg)
    
    Final threshold in iteration 11: -1.7638395130634308 (> -Infinity) after 950.288s (< 1800.000s)
    

Returns:

    -1.7638395130634308