Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Iteration 15 Iteration 15

Iteration 20 Iteration 20

Iteration 25 Iteration 25

Iteration 30 Iteration 30

Code from BasicOptimizer.scala:88 executed in 583.32 seconds (9.778 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: 3470161599527
    Reset training subject: 3472604570552
    Adding measurement 61142abf to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=3.294992595911026;dx=-2.3833108593333685E-7
    New Minimum: 3.294992595911026 > 3.2949918061494827
    WOLFE (weak): th(2.154434690031884)=3.2949918061494827; dx=-2.3813499571042608E-7 evalInputDelta=7.897615432739258E-7
    New Minimum: 3.2949918061494827 > 3.2949909269809723
    WOLFE (weak): th(4.308869380063768)=3.2949909269809723; dx=-2.3803200118076443E-7 evalInputDelta=1.6689300537109375E-6
    New Minimum: 3.2949909269809723 > 3.2949884831905365
    WOLFE (weak): th(12.926608140191302)=3.2949884831905365; dx=-2.3798471220962264E-7 evalInputDelta=4.112720489501953E-6
    New Minimum: 3.2949884831905365 > 3.2949767112731934
    WOLFE (weak): th(51.70643256076521)=3.2949767112731934; dx=-2.3813107838913289E-7 evalInputDelta=1.58846378326416E-5
    New Minimum: 3.2949767112731934 > 3.294915109872818
    WOLFE (weak): th(258.53216280382605)=3.294915109872818; dx=-2.38122595675584E-7 evalInputDelta=7.748603820800781E-5
    New Minimum: 3.294915109872818 > 3.294529616832733
    WOLFE (weak): th(1551.1929768229563)=3.294529616832733; dx=-2.3808788230645906E-7 evalInputDelta=4.629790782928467E-4
    New Minimum: 3.294529616832733 > 3.2917536795139313
    WOLFE (weak): th(10858.350837760694)=3.2917536795139313; dx=-2.380224894715673E-7 evalInputDelta=0.0032389163970947266
    New Minimum: 3.2917536795139313 > 3.269079267978668
    WOLFE (weak): th(86866.80670208555)=3.269079267978668; dx=-2.3743428262730836E-7 evalInputDelta=0.025913327932357788
    New Minimum: 3.269079267978668 > 3.063321202993393
    WOLFE (weak): th(781801.26031877)=3.063321202993393; dx=-2.300163496288634E-7 evalInputDelta=0.23167139291763306
    New Minimum: 3.063321202993393 > 1.65080127120018
    END: th(7818012.6031877)=1.65080127120018; dx=-1.2185322539841647E-7 evalInputDelta=1.644191324710846
    Fitness changed from 3.294992595911026 to 1.65080127120018
    Iteration 1 complete. Error: 1.65080127120018 Total: 3

...skipping 37829 bytes...

    WOLFE (weak): th(4561341.185847653)=-1.8707291781902313; dx=-3.10788587980452E-9 evalInputDelta=2.492964267730713E-5
    WOLFE (weak): th(4713385.892042575)=-1.8707160577178001; dx=-3.1014933282183385E-9 evalInputDelta=1.1809170246124268E-5
    WOLFE (weak): th(4789408.245140037)=-1.870709240436554; dx=-3.0924514335915135E-9 evalInputDelta=4.991888999938965E-6
    WOLFE (weak): th(4827419.421688767)=-1.870705634355545; dx=-3.099810963662871E-9 evalInputDelta=1.385807991027832E-6
    Armijo: th(4846425.009963132)=-1.87070382386446; dx=-3.0992519025805845E-9 evalInputDelta=-4.246830940246582E-7
    WOLFE (weak): th(4836922.21582595)=-1.8707046657800674; dx=-3.1006847579068147E-9 evalInputDelta=4.172325134277344E-7
    Armijo: th(4841673.612894541)=-1.8707041963934898; dx=-3.1038198776277635E-9 evalInputDelta=-5.21540641784668E-8
    WOLFE (weak): th(4839297.914360246)=-1.8707044869661331; dx=-3.1016607656066388E-9 evalInputDelta=2.384185791015625E-7
    WOLFE (weak): th(4840485.763627393)=-1.8707043677568436; dx=-3.0989974204377335E-9 evalInputDelta=1.1920928955078125E-7
    Armijo: th(4841079.688260967)=-1.870704248547554; dx=-3.103882973789252E-9 evalInputDelta=0.0
    WOLFE (weak): th(4840782.72594418)=-1.8707043379545212; dx=-3.1009661702800697E-9 evalInputDelta=8.940696716308594E-8
    WOLFE (weak): th(4840931.2071025735)=-1.8707042783498764; dx=-3.102188906538665E-9 evalInputDelta=2.9802322387695312E-8
    Armijo: th(4841005.44768177)=-1.870704248547554; dx=-3.065426370901732E-9 evalInputDelta=0.0
    WOLFE (weak): th(4840968.327392172)=-1.8707043156027794; dx=-3.0990438860195323E-9 evalInputDelta=6.705522537231445E-8
    mu ~= nu (4840968.327392172): th(2432715.2991187484)=-1.8708175122737885
    Fitness changed from -1.870704248547554 to -1.8708175122737885
    Iteration 30 complete. Error: -1.8708175122737885 Total: 55.0759; Orientation: 0.3059; Line Search: 52.4716
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/7321c5dc-b006-4dfb-86c9-b50399e166a3.jpg)
    
    Final threshold in iteration 31: -1.8708175122737885 (> -Infinity) after 583.316s (< 3600.000s)
    

Returns:

    -1.8708175122737885