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 379.48 seconds (2.665 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: 2495410828336
    Reset training subject: 2505008460561
    Adding measurement 74d9cf24 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=21.784059623256326;dx=-5.696770470579276E-6
    New Minimum: 21.784059623256326 > 21.784035485237837
    END: th(2.154434690031884)=21.784035485237837; dx=-5.1102336417453265E-6 evalInputDelta=2.4138018488883972E-5
    Fitness changed from 21.784059623256326 to 21.784035485237837
    Iteration 1 complete. Error: 21.784035485237837 Total: 48.6031; Orientation: 0.0170; Line Search: 19.6149
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/58f87f3c-815c-4683-bfe4-72736075c4e1.jpg)
    
    Adding measurement 6ed5eb4e to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=21.784035485237837;dx=-5.57450507822522E-6
    New Minimum: 21.784035485237837 > 21.783982018008828
    WOLFE (weak): th(4.641588833612779)=21.783982018008828; dx=-5.71235561614208E-6 evalInputDelta=5.346722900867462E-5
    New Minimum: 21.783982018008828 > 21.783929720520973
    WOLFE (weak): th(9.283177667225559)=21.783929720520973; dx=-5.637657216180117E-6 evalInputDelta=1.057647168636322E-4
    New Minimum: 21.783929720520973 > 21.78371623158455
    WOLFE (weak): th(27.849533001676676)=21.78371623158455; dx=-5.66209119636408E-6 evalInputDelta=3.192536532878876E-4
    New Minimum: 21.78371623158455 > 21.7827553935349
    WOLFE (weak): th(111.3981320067067)=21.7827553935349; dx=-5.639995755082577E-6 evalInputDelta=0.0012800917029380798
    New Minimum: 21.7827553935349 > 21.7775995824486
    WOLFE (weak): th(556.9906600335335)=21.7775995824486; dx=-5.542396659609234E-6 evalInputDelta=0.006435902789235115
    New Minimum: 21.7775995824486 > 21.745181826874614
    WOLFE (weak): th(3341.9439602012008)=21.745181826874614; dx=-5.56619007671539E-6 evalInputDelta=0.038853658363223076
    New Minimum: 21.745181826874614 > 21.508584124967456
    END: th(23393.607721408407)=21.508584124967456; dx=-4.95019397458555E-6 evalInputDelta=0.275451360270381
    Fitness changed from 21.784035485237837 to 21.508584124

...skipping 4767 bytes...

    o 9.762647211551666
    Iteration 8 complete. Error: 9.762647211551666 Total: 29.3705; Orientation: 0.2291; Line Search: 19.6013
    Adding measurement 248be0ac to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.103e+03, gradient 6.341e-04, dot -0.450; [e88722a5-6a39-4207-acf3-4e0a2ff8bf85 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 9.762647211551666, 21.508584124967456, 21.784035485237837, 21.784059623256326
    LBFGS Accumulation History: 3 points
    Removed measurement 248be0ac to history. Total: 3
    th(0)=9.762647211551666;dx=-3.8997604235635416E-7
    New Minimum: 9.762647211551666 > 6.916300982236862
    END: th(5040000.000000002)=6.916300982236862; dx=-8.967835816854143E-8 evalInputDelta=2.846346229314804
    Fitness changed from 9.762647211551666 to 6.916300982236862
    Iteration 9 complete. Error: 6.916300982236862 Total: 28.4930; Orientation: 0.2104; Line Search: 18.8823
    Adding measurement 6b19dc40 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.636e+03, gradient 4.993e-04, dot -0.329; [e88722a5-6a39-4207-acf3-4e0a2ff8bf85 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 6.916300982236862, 21.508584124967456, 21.784035485237837, 21.784059623256326
    LBFGS Accumulation History: 3 points
    Removed measurement 6b19dc40 to history. Total: 3
    th(0)=6.916300982236862;dx=-2.2886683018931708E-7
    New Minimum: 6.916300982236862 > 6.651726961135864
    WOLF (strong): th(1.0858350837760698E7)=6.651726961135864; dx=1.1817555926489218E-8 evalInputDelta=0.2645740211009979
    New Minimum: 6.651726961135864 > 5.447423651814461
    END: th(5429175.418880349)=5.447423651814461; dx=-4.860979778643547E-8 evalInputDelta=1.4688773304224014
    Fitness changed from 6.916300982236862 to 5.447423651814461
    Iteration 10 complete. Error: 5.447423651814461 Total: 38.7768; Orientation: 0.1708; Line Search: 29.1564
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/506c6dd8-d08f-4e0e-880c-999f36c81c0e.jpg)
    
    Final threshold in iteration 11: 5.447423651814461 (> -Infinity) after 379.476s (< 1800.000s)
    

Returns:

    5.447423651814461