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 198.19 seconds (3.896 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: 718470846826
    Reset training subject: 725006591721
    Adding measurement 6b99a43e to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=34.37196245416999;dx=-1.6239626221051435E-4
    New Minimum: 34.37196245416999 > 34.37117318762466
    WOLFE (weak): th(2.154434690031884)=34.37117318762466; dx=-1.623437275207383E-4 evalInputDelta=7.892665453255177E-4
    New Minimum: 34.37117318762466 > 34.37038644263521
    WOLFE (weak): th(4.308869380063768)=34.37038644263521; dx=-1.6134765842036418E-4 evalInputDelta=0.001576011534780264
    New Minimum: 34.37038644263521 > 34.36724109016359
    WOLFE (weak): th(12.926608140191302)=34.36724109016359; dx=-1.6205709259574394E-4 evalInputDelta=0.004721364006400108
    New Minimum: 34.36724109016359 > 34.353764962404966
    WOLFE (weak): th(51.70643256076521)=34.353764962404966; dx=-1.5766172582411356E-4 evalInputDelta=0.018197491765022278
    New Minimum: 34.353764962404966 > 34.26939115021378
    WOLFE (weak): th(258.53216280382605)=34.26939115021378; dx=-1.565561919053273E-4 evalInputDelta=0.10257130395621061
    New Minimum: 34.26939115021378 > 33.80277984868735
    WOLFE (weak): th(1551.1929768229563)=33.80277984868735; dx=-1.5378940353333385E-4 evalInputDelta=0.5691826054826379
    New Minimum: 33.80277984868735 > 30.94236666429788
    END: th(10858.350837760694)=30.94236666429788; dx=-9.750233432110589E-5 evalInputDelta=3.42959578987211
    Fitness changed from 34.37196245416999 to 30.94236666429788
    Iteration 1 complete. Error: 30.94236666429788 Total: 55.9991; Orientation: 0.0504; Line Search: 39.4202
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/a691d3ba-1379-4b54-aceb-c5d467e7965f.jpg)
    
    Adding measurement 635a61ce to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=30.94236666429788;dx=-1.1479044153910384E-4
    New Minimum: 30.94236666429788 > 26.86911141872406
    END: th(23393.607721408407)=26.86911141872406; dx=-3.7478125671112686E-5 evalInputDelta=4.073255245573819
    Fitness changed from 30.94236666429788 to 26.86911141872406
    Iter

...skipping 4813 bytes...

    ine Search: 9.4783
    Adding measurement 19dd0aeb to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 6.162e+02, gradient 1.091e-03, dot -0.201; [09d9f0a3-aeb8-4480-a682-9851dd664208 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 11.178110241889954, 26.86911141872406, 30.94236666429788, 34.37196245416999
    LBFGS Accumulation History: 3 points
    Removed measurement 19dd0aeb to history. Total: 3
    th(0)=11.178110241889954;dx=-1.1074290527247761E-6
    New Minimum: 11.178110241889954 > 8.73335836827755
    WOLF (strong): th(5040000.000000002)=8.73335836827755; dx=7.184169618682138E-9 evalInputDelta=2.444751873612404
    New Minimum: 8.73335836827755 > 8.622006639838219
    END: th(2520000.000000001)=8.622006639838219; dx=-1.0057810227050173E-7 evalInputDelta=2.556103602051735
    Fitness changed from 11.178110241889954 to 8.622006639838219
    Iteration 9 complete. Error: 8.622006639838219 Total: 19.2955; Orientation: 0.0929; Line Search: 14.3236
    Adding measurement 35a68e73 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.995e+02, gradient 8.244e-04, dot -0.199; [09d9f0a3-aeb8-4480-a682-9851dd664208 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 8.622006639838219, 26.86911141872406, 30.94236666429788, 34.37196245416999
    LBFGS Accumulation History: 3 points
    Removed measurement 35a68e73 to history. Total: 3
    th(0)=8.622006639838219;dx=-6.357209430165313E-7
    Armijo: th(5429175.418880349)=8.632223308086395; dx=4.064036094921779E-8 evalInputDelta=-0.010216668248176575
    New Minimum: 8.622006639838219 > 7.9345037043094635
    END: th(2714587.7094401745)=7.9345037043094635; dx=-7.002377956248067E-8 evalInputDelta=0.6875029355287552
    Fitness changed from 8.622006639838219 to 7.9345037043094635
    Iteration 10 complete. Error: 7.9345037043094635 Total: 19.7189; Orientation: 0.0855; Line Search: 14.9318
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/5bdab2e2-406c-4ea2-b82a-cf155dac4092.jpg)
    
    Final threshold in iteration 11: 7.9345037043094635 (> -Infinity) after 198.179s (< 1800.000s)
    

Returns:

    7.9345037043094635