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 374.11 seconds (3.858 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: 2870783059235
    Reset training subject: 2873918601164
    Adding measurement 490c9371 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.7668383717536926;dx=-1.460559930226594E-7
    New Minimum: 1.7668383717536926 > 1.7668379545211792
    WOLFE (weak): th(2.154434690031884)=1.7668379545211792; dx=-1.4440555846839777E-7 evalInputDelta=4.172325134277344E-7
    New Minimum: 1.7668379545211792 > 1.7668372690677643
    WOLFE (weak): th(4.308869380063768)=1.7668372690677643; dx=-1.4441452341964432E-7 evalInputDelta=1.1026859283447266E-6
    New Minimum: 1.7668372690677643 > 1.7668351382017136
    WOLFE (weak): th(12.926608140191302)=1.7668351382017136; dx=-1.444410154624969E-7 evalInputDelta=3.2335519790649414E-6
    New Minimum: 1.7668351382017136 > 1.7668253481388092
    WOLFE (weak): th(51.70643256076521)=1.7668253481388092; dx=-1.444298093419258E-7 evalInputDelta=1.3023614883422852E-5
    New Minimum: 1.7668253481388092 > 1.7667735666036606
    WOLFE (weak): th(258.53216280382605)=1.7667735666036606; dx=-1.444533428516038E-7 evalInputDelta=6.480515003204346E-5
    New Minimum: 1.7667735666036606 > 1.7664490193128586
    WOLFE (weak): th(1551.1929768229563)=1.7664490193128586; dx=-1.4443411957755586E-7 evalInputDelta=3.893524408340454E-4
    New Minimum: 1.7664490193128586 > 1.7641137838363647
    WOLFE (weak): th(10858.350837760694)=1.7641137838363647; dx=-1.4436423194297473E-7 evalInputDelta=0.002724587917327881
    New Minimum: 1.7641137838363647 > 1.7450989335775375
    WOLFE (weak): th(86866.80670208555)=1.7450989335775375; dx=-1.4342917564581305E-7 evalInputDelta=0.02173943817615509
    New Minimum: 1.7450989335775375 > 1.577773243188858
    WOLFE (weak): th(781801.26031877)=1.577773243188858; dx=-1.338748767612079E-7 evalInputDelta=0.1890651285648346
    New Minimum: 1.577773243188858 > 0.5469806641340256
    END: th(7818012.6031877)=0.5469806641340256; dx=-5.703976055312783E-8 evalInputDelta=1.219857707619667
    Fitness changed from 1.7668383717536926 to 0.5469806641340256
    Iteration 1 complete. Error: 0.5469806

...skipping 25343 bytes...

    l: 3
    Rejected: LBFGS Orientation magnitude: 2.789e+03, gradient 2.555e-05, dot -0.595; [68c0a120-5a39-49b2-a46e-8ab43efcdb5d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.696677379310131, -0.24960675835609436, 0.5469806641340256, 1.7668383717536926
    LBFGS Accumulation History: 3 points
    Removed measurement 40ebfc0b to history. Total: 3
    th(0)=-1.696677379310131;dx=-6.475876081067227E-10
    New Minimum: -1.696677379310131 > -1.7010803744196892
    END: th(1.3057453155257158E7)=-1.7010803744196892; dx=-1.4437470318647404E-10 evalInputDelta=0.0044029951095581055
    Fitness changed from -1.696677379310131 to -1.7010803744196892
    Iteration 29 complete. Error: -1.7010803744196892 Total: 9.4453; Orientation: 0.3244; Line Search: 5.7561
    Adding measurement 3f18631b to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.863e+03, gradient 3.463e-05, dot -0.473; [68c0a120-5a39-49b2-a46e-8ab43efcdb5d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.7010803744196892, -0.24960675835609436, 0.5469806641340256, 1.7668383717536926
    LBFGS Accumulation History: 3 points
    Removed measurement 3f18631b to history. Total: 3
    th(0)=-1.7010803744196892;dx=-1.1967256969482504E-9
    Armijo: th(2.81314300411523E7)=-1.6907235532999039; dx=2.9541699768119186E-10 evalInputDelta=-0.010356821119785309
    New Minimum: -1.7010803744196892 > -1.7017844542860985
    WOLF (strong): th(1.406571502057615E7)=-1.7017844542860985; dx=2.978775136109892E-10 evalInputDelta=7.040798664093018E-4
    New Minimum: -1.7017844542860985 > -1.7068764120340347
    END: th(4688571.673525383)=-1.7068764120340347; dx=-4.0201419204018007E-10 evalInputDelta=0.0057960376143455505
    Fitness changed from -1.7010803744196892 to -1.7068764120340347
    Iteration 30 complete. Error: -1.7068764120340347 Total: 14.2338; Orientation: 0.3673; Line Search: 10.9691
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/b0d057d7-7ef0-431b-9e8b-4d30d46a4ad9.jpg)
    
    Final threshold in iteration 31: -1.7068764120340347 (> -Infinity) after 374.113s (< 3600.000s)
    

Returns:

    -1.7068764120340347