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 660.00 seconds (6.705 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: 8071349390000
    Reset training subject: 8086252029687
    Adding measurement 3e2da774 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=7.834185391664505;dx=-4.32248766112453E-7
    New Minimum: 7.834185391664505 > 7.83418482542038
    WOLFE (weak): th(2.154434690031884)=7.83418482542038; dx=-4.3193524664868404E-7 evalInputDelta=5.662441253662109E-7
    New Minimum: 7.83418482542038 > 7.834184169769287
    WOLFE (weak): th(4.308869380063768)=7.834184169769287; dx=-4.3193452705334416E-7 evalInputDelta=1.2218952178955078E-6
    New Minimum: 7.834184169769287 > 7.834178775548935
    WOLFE (weak): th(12.926608140191302)=7.834178775548935; dx=-4.3193799269007505E-7 evalInputDelta=6.616115570068359E-6
    New Minimum: 7.834178775548935 > 7.834157653152943
    WOLFE (weak): th(51.70643256076521)=7.834157653152943; dx=-4.3193512980708476E-7 evalInputDelta=2.7738511562347412E-5
    New Minimum: 7.834157653152943 > 7.834046609699726
    WOLFE (weak): th(258.53216280382605)=7.834046609699726; dx=-4.3191856581628486E-7 evalInputDelta=1.3878196477890015E-4
    New Minimum: 7.834046609699726 > 7.833354450762272
    WOLFE (weak): th(1551.1929768229563)=7.833354450762272; dx=-4.317989396524685E-7 evalInputDelta=8.309409022331238E-4
    New Minimum: 7.833354450762272 > 7.8283738270401955
    WOLFE (weak): th(10858.350837760694)=7.8283738270401955; dx=-4.3125210435517257E-7 evalInputDelta=0.00581156462430954
    New Minimum: 7.8283738270401955 > 7.7879201620817184
    WOLFE (weak): th(86866.80670208555)=7.7879201620817184; dx=-4.2654538865162977E-7 evalInputDelta=0.04626522958278656
    New Minimum: 7.7879201620817184 > 7.4387679398059845
    END: th(781801.26031877)=7.4387679398059845; dx=-3.7746328681431895E-7 evalInputDelta=0.3954174518585205
    Fitness changed from 7.834185391664505 to 7.4387679398059845
    Iteration 1 complete. Error: 7.4387679398059845 Total: 187.2002; Orientation: 0.0655; Line Search: 143.7878
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/1adaab8f-feab-4ddb-ba9d-7a5e81dd4c8e.jpg)
    
    Adding me

...skipping 5612 bytes...

    ion magnitude: 5.311e+03, gradient 1.706e-04, dot -0.406; [c4844144-5007-4a47-8189-480872385f4c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.9029615595936775, 6.787529781460762, 7.4387679398059845, 7.834185391664505
    LBFGS Accumulation History: 3 points
    Removed measurement 764435b7 to history. Total: 3
    th(0)=0.9029615595936775;dx=-2.9114280476513365E-8
    New Minimum: 0.9029615595936775 > 0.7065891325473785
    WOLF (strong): th(3.0240000000000004E7)=0.7065891325473785; dx=3.9567806335808344E-9 evalInputDelta=0.19637242704629898
    New Minimum: 0.7065891325473785 > 0.6601945832371712
    END: th(1.5120000000000002E7)=0.6601945832371712; dx=-6.082176120929233E-9 evalInputDelta=0.24276697635650635
    Fitness changed from 0.9029615595936775 to 0.6601945832371712
    Iteration 9 complete. Error: 0.6601945832371712 Total: 59.3037; Orientation: 1.5194; Line Search: 43.1342
    Adding measurement 45ac4391 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.677e+03, gradient 1.885e-04, dot -0.336; [c4844144-5007-4a47-8189-480872385f4c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.6601945832371712, 6.787529781460762, 7.4387679398059845, 7.834185391664505
    LBFGS Accumulation History: 3 points
    Removed measurement 45ac4391 to history. Total: 3
    th(0)=0.6601945832371712;dx=-3.5525823201324435E-8
    New Minimum: 0.6601945832371712 > 0.5259953886270523
    WOLF (strong): th(3.2575052513282087E7)=0.5259953886270523; dx=7.231014464850656E-9 evalInputDelta=0.13419919461011887
    New Minimum: 0.5259953886270523 > 0.5208402276039124
    END: th(1.6287526256641043E7)=0.5208402276039124; dx=-5.545138650486949E-9 evalInputDelta=0.13935435563325882
    Fitness changed from 0.6601945832371712 to 0.5208402276039124
    Iteration 10 complete. Error: 0.5208402276039124 Total: 58.8897; Orientation: 1.5251; Line Search: 42.2321
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/bb53dfe0-64de-4631-b6b2-3317bb281bd4.jpg)
    
    Final threshold in iteration 11: 0.5208402276039124 (> -Infinity) after 659.996s (< 3600.000s)
    

Returns:

    0.5208402276039124