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 674.65 seconds (5.978 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: 13608168226370
    Reset training subject: 13621927905862
    Adding measurement 4eeea5cc to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=8.29870731383562;dx=-4.039929579824296E-7
    New Minimum: 8.29870731383562 > 8.29870718717575
    WOLFE (weak): th(2.154434690031884)=8.29870718717575; dx=-4.038198468508567E-7 evalInputDelta=1.2665987014770508E-7
    New Minimum: 8.29870718717575 > 8.298706203699112
    WOLFE (weak): th(4.308869380063768)=8.298706203699112; dx=-4.038218919837622E-7 evalInputDelta=1.1101365089416504E-6
    New Minimum: 8.298706203699112 > 8.298700980842113
    WOLFE (weak): th(12.926608140191302)=8.298700980842113; dx=-4.038255790409123E-7 evalInputDelta=6.332993507385254E-6
    New Minimum: 8.298700980842113 > 8.29868147522211
    WOLFE (weak): th(51.70643256076521)=8.29868147522211; dx=-4.0383059510298356E-7 evalInputDelta=2.5838613510131836E-5
    New Minimum: 8.29868147522211 > 8.298579454421997
    WOLFE (weak): th(258.53216280382605)=8.298579454421997; dx=-4.038200017908805E-7 evalInputDelta=1.2785941362380981E-4
    New Minimum: 8.298579454421997 > 8.297941774129868
    WOLFE (weak): th(1551.1929768229563)=8.297941774129868; dx=-4.0375754015095893E-7 evalInputDelta=7.655397057533264E-4
    New Minimum: 8.297941774129868 > 8.293352469801903
    WOLFE (weak): th(10858.350837760694)=8.293352469801903; dx=-4.0328750715343167E-7 evalInputDelta=0.005354844033718109
    New Minimum: 8.293352469801903 > 8.256040126085281
    WOLFE (weak): th(86866.80670208555)=8.256040126085281; dx=-3.998424046597879E-7 evalInputDelta=0.04266718775033951
    New Minimum: 8.256040126085281 > 7.931370370090008
    END: th(781801.26031877)=7.931370370090008; dx=-3.6092510019808925E-7 evalInputDelta=0.3673369437456131
    Fitness changed from 8.29870731383562 to 7.931370370090008
    Iteration 1 complete. Error: 7.931370370090008 Total: 183.3047; Orientation: 0.0699; Line Search: 142.2845
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/b728fa2b-4933-476f-9d31-d4a20bf90758.jpg)
    
    Adding measurement 50ea6

...skipping 5738 bytes...

    3; [97dd708a-7909-4703-817a-db7ef1dea90d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.0138508826494217, 7.28813561052084, 7.931370370090008, 8.29870731383562
    LBFGS Accumulation History: 3 points
    Removed measurement 79a8c41f to history. Total: 3
    th(0)=1.0138508826494217;dx=-2.9591161195481663E-8
    New Minimum: 1.0138508826494217 > 0.7058198750019073
    WOLF (strong): th(4.536000000000001E7)=0.7058198750019073; dx=2.6067821147754217E-9 evalInputDelta=0.30803100764751434
    New Minimum: 0.7058198750019073 > 0.6875220388174057
    END: th(2.2680000000000004E7)=0.6875220388174057; dx=-6.032387479539018E-9 evalInputDelta=0.326328843832016
    Fitness changed from 1.0138508826494217 to 0.6875220388174057
    Iteration 9 complete. Error: 0.6875220388174057 Total: 60.3655; Orientation: 1.6369; Line Search: 44.2047
    Adding measurement 702b6b62 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 5.062e+03, gradient 1.571e-04, dot -0.365; [97dd708a-7909-4703-817a-db7ef1dea90d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.6875220388174057, 7.28813561052084, 7.931370370090008, 8.29870731383562
    LBFGS Accumulation History: 3 points
    Removed measurement 702b6b62 to history. Total: 3
    th(0)=0.6875220388174057;dx=-2.4671678284044678E-8
    Armijo: th(4.8862578769923136E7)=0.9318880587816238; dx=1.6963777364010193E-8 evalInputDelta=-0.24436601996421814
    New Minimum: 0.6875220388174057 > 0.48643625527620316
    WOLF (strong): th(2.4431289384961568E7)=0.48643625527620316; dx=3.6996293602617626E-9 evalInputDelta=0.20108578354120255
    END: th(8143763.128320523)=0.5212816298007965; dx=-1.3718878753310834E-8 evalInputDelta=0.1662404090166092
    Fitness changed from 0.6875220388174057 to 0.48643625527620316
    Iteration 10 complete. Error: 0.48643625527620316 Total: 74.8397; Orientation: 1.5916; Line Search: 59.0720
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/47510697-50ed-421f-9477-d7671e8732a3.jpg)
    
    Final threshold in iteration 11: 0.48643625527620316 (> -Infinity) after 674.652s (< 3600.000s)
    

Returns:

    0.48643625527620316