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 967.03 seconds (7.029 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: 10761776696655
    Reset training subject: 10780546258676
    Adding measurement 70239d2f to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=9.281953744590282;dx=-1.8091743334307493E-7
    New Minimum: 9.281953744590282 > 9.281953610479832
    WOLFE (weak): th(2.154434690031884)=9.281953610479832; dx=-1.8223327448813336E-7 evalInputDelta=1.341104507446289E-7
    New Minimum: 9.281953610479832 > 9.28195308893919
    WOLFE (weak): th(4.308869380063768)=9.28195308893919; dx=-1.8222916622934916E-7 evalInputDelta=6.556510925292969E-7
    New Minimum: 9.28195308893919 > 9.281950235366821
    WOLFE (weak): th(12.926608140191302)=9.281950235366821; dx=-1.8223011374253131E-7 evalInputDelta=3.509223461151123E-6
    New Minimum: 9.281950235366821 > 9.28194022923708
    WOLFE (weak): th(51.70643256076521)=9.28194022923708; dx=-1.822541679433584E-7 evalInputDelta=1.3515353202819824E-5
    New Minimum: 9.28194022923708 > 9.2818848118186
    WOLFE (weak): th(258.53216280382605)=9.2818848118186; dx=-1.8223585087153187E-7 evalInputDelta=6.893277168273926E-5
    New Minimum: 9.2818848118186 > 9.281539216637611
    WOLFE (weak): th(1551.1929768229563)=9.281539216637611; dx=-1.8224625377008085E-7 evalInputDelta=4.14527952671051E-4
    New Minimum: 9.281539216637611 > 9.279050409793854
    WOLFE (weak): th(10858.350837760694)=9.279050409793854; dx=-1.821428623722173E-7 evalInputDelta=0.0029033347964286804
    New Minimum: 9.279050409793854 > 9.258743524551392
    WOLFE (weak): th(86866.80670208555)=9.258743524551392; dx=-1.817215594860969E-7 evalInputDelta=0.02321022003889084
    New Minimum: 9.258743524551392 > 9.076131723821163
    WOLFE (weak): th(781801.26031877)=9.076131723821163; dx=-1.7540204224810844E-7 evalInputDelta=0.20582202076911926
    New Minimum: 9.076131723821163 > 7.74920529127121
    END: th(7818012.6031877)=7.74920529127121; dx=-8.553210949595951E-8 evalInputDelta=1.5327484533190727
    Fitness changed from 9.281953744590282 to 7.74920529127121
    Iteration 1 complete. Error: 7.74920529127121 Total: 269.8171; Orientation: 0.0

...skipping 6204 bytes...

     -0.29049350321292877 Total: 102.2623; Orientation: 1.8437; Line Search: 81.1242
    Adding measurement 70d437bd to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 8.132e+03, gradient 1.132e-04, dot -0.356; [ad41b2ad-e1db-4403-a038-54d3be275a6e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.29049350321292877, 6.072947442531586, 7.74920529127121, 9.281953744590282
    LBFGS Accumulation History: 3 points
    Removed measurement 70d437bd to history. Total: 3
    th(0)=-0.29049350321292877;dx=-1.2806887736185061E-8
    New Minimum: -0.29049350321292877 > -0.5689684152603149
    END: th(3.7800000000000015E7)=-0.5689684152603149; dx=-3.625737284731288E-10 evalInputDelta=0.27847491204738617
    Fitness changed from -0.29049350321292877 to -0.5689684152603149
    Iteration 9 complete. Error: -0.5689684152603149 Total: 62.4560; Orientation: 1.9389; Line Search: 40.1621
    Adding measurement 175f0967 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 8.103e+03, gradient 8.055e-05, dot -0.429; [ad41b2ad-e1db-4403-a038-54d3be275a6e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.5689684152603149, 6.072947442531586, 7.74920529127121, 9.281953744590282
    LBFGS Accumulation History: 3 points
    Removed measurement 175f0967 to history. Total: 3
    th(0)=-0.5689684152603149;dx=-6.486947672683826E-9
    New Minimum: -0.5689684152603149 > -0.6960964500904083
    WOLF (strong): th(8.143763128320524E7)=-0.6960964500904083; dx=1.8118258492471245E-9 evalInputDelta=0.12712803483009338
    New Minimum: -0.6960964500904083 > -0.7653669267892838
    END: th(4.071881564160262E7)=-0.7653669267892838; dx=-1.6333373338293474E-9 evalInputDelta=0.1963985115289688
    Fitness changed from -0.5689684152603149 to -0.7653669267892838
    Iteration 10 complete. Error: -0.7653669267892838 Total: 81.0570; Orientation: 1.8863; Line Search: 59.4485
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/cec39fc8-5b8d-49f9-a59d-ea1ddd0c4bdd.jpg)
    
    Final threshold in iteration 11: -0.7653669267892838 (> -Infinity) after 967.025s (< 3600.000s)
    

Returns:

    -0.7653669267892838