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 154.77 seconds (3.436 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: 1288516551853
    Reset training subject: 1289741898436
    Adding measurement 3b6253d7 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=15.542608737945557;dx=-2.458599459846278E-6
    New Minimum: 15.542608737945557 > 15.54260214138776
    WOLFE (weak): th(2.154434690031884)=15.54260214138776; dx=-2.452056281714518E-6 evalInputDelta=6.596557796001434E-6
    New Minimum: 15.54260214138776 > 15.542595671489835
    WOLFE (weak): th(4.308869380063768)=15.542595671489835; dx=-2.4591039191027504E-6 evalInputDelta=1.3066455721855164E-5
    New Minimum: 15.542595671489835 > 15.54256884381175
    WOLFE (weak): th(12.926608140191302)=15.54256884381175; dx=-2.458414672024857E-6 evalInputDelta=3.989413380622864E-5
    New Minimum: 15.54256884381175 > 15.54245075210929
    WOLFE (weak): th(51.70643256076521)=15.54245075210929; dx=-2.459157046518054E-6 evalInputDelta=1.579858362674713E-4
    New Minimum: 15.54245075210929 > 15.541820629499853
    WOLFE (weak): th(258.53216280382605)=15.541820629499853; dx=-2.4593697048883935E-6 evalInputDelta=7.881084457039833E-4
    New Minimum: 15.541820629499853 > 15.537877440452576
    WOLFE (weak): th(1551.1929768229563)=15.537877440452576; dx=-2.4639634526543283E-6 evalInputDelta=0.004731297492980957
    New Minimum: 15.537877440452576 > 15.509251522831619
    WOLFE (weak): th(10858.350837760694)=15.509251522831619; dx=-2.497055238275576E-6 evalInputDelta=0.033357215113937855
    New Minimum: 15.509251522831619 > 15.267149452120066
    WOLFE (weak): th(86866.80670208555)=15.267149452120066; dx=-2.596537452787286E-6 evalInputDelta=0.27545928582549095
    New Minimum: 15.267149452120066 > 13.356785416603088
    END: th(781801.26031877)=13.356785416603088; dx=-1.8875276262601477E-6 evalInputDelta=2.1858233213424683
    Fitness changed from 15.542608737945557 to 13.356785416603088
    Iteration 1 complete. Error: 13.356785416603088 Total: 15.1935; Orientation: 0.0060; Line Search: 11.6210
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/97f453d6-e181-465c-ace9-668d88297dee.jpg)
    

...skipping 24727 bytes...

    129534)=-1.1476812064647675; dx=-9.162000448567238E-9 evalInputDelta=0.011887401342391968
    Fitness changed from -1.1357938051223755 to -1.1548501998186111
    Iteration 28 complete. Error: -1.1548501998186111 Total: 6.5591; Orientation: 0.2171; Line Search: 5.2274
    Adding measurement 790e9f01 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 7.231e+02, gradient 8.767e-05, dot -0.322; [e4fce311-cf21-4c8d-b734-3f7f80d796b7 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.1548501998186111, 9.128120340406895, 13.356785416603088, 15.542608737945557
    LBFGS Accumulation History: 3 points
    Removed measurement 790e9f01 to history. Total: 3
    th(0)=-1.1548501998186111;dx=-7.662025610133592E-9
    New Minimum: -1.1548501998186111 > -1.1665618792176247
    END: th(1958617.9732885736)=-1.1665618792176247; dx=-2.2414417648705962E-9 evalInputDelta=0.01171167939901352
    Fitness changed from -1.1548501998186111 to -1.1665618792176247
    Iteration 29 complete. Error: -1.1665618792176247 Total: 3.7040; Orientation: 0.1918; Line Search: 2.2694
    Adding measurement 5eb425b1 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 6.950e+02, gradient 6.791e-05, dot -0.398; [e4fce311-cf21-4c8d-b734-3f7f80d796b7 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.1665618792176247, 9.128120340406895, 13.356785416603088, 15.542608737945557
    LBFGS Accumulation History: 3 points
    Removed measurement 5eb425b1 to history. Total: 3
    th(0)=-1.1665618792176247;dx=-4.598996907830048E-9
    New Minimum: -1.1665618792176247 > -1.1815077364444733
    END: th(4219714.506172844)=-1.1815077364444733; dx=-1.7955725997114066E-9 evalInputDelta=0.014945857226848602
    Fitness changed from -1.1665618792176247 to -1.1815077364444733
    Iteration 30 complete. Error: -1.1815077364444733 Total: 3.6826; Orientation: 0.2303; Line Search: 2.3924
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/cd93b12c-31c4-4ae0-bb4c-a8b543e28a57.jpg)
    
    Final threshold in iteration 31: -1.1815077364444733 (> -Infinity) after 154.771s (< 3600.000s)
    

Returns:

    -1.1815077364444733