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 696.62 seconds (6.417 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: 21423187381181
    Reset training subject: 21437566367489
    Adding measurement 615f9782 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.888605535030365;dx=-7.150229503285719E-8
    New Minimum: 1.888605535030365 > 1.8886053562164307
    WOLFE (weak): th(2.154434690031884)=1.8886053562164307; dx=-7.150226806745805E-8 evalInputDelta=1.7881393432617188E-7
    New Minimum: 1.8886053562164307 > 1.8886049836874008
    WOLFE (weak): th(4.308869380063768)=1.8886049836874008; dx=-7.150227831822799E-8 evalInputDelta=5.513429641723633E-7
    New Minimum: 1.8886049836874008 > 1.8886044472455978
    WOLFE (weak): th(12.926608140191302)=1.8886044472455978; dx=-7.150230757842696E-8 evalInputDelta=1.087784767150879E-6
    New Minimum: 1.8886044472455978 > 1.8886010870337486
    WOLFE (weak): th(51.70643256076521)=1.8886010870337486; dx=-7.150222252654179E-8 evalInputDelta=4.447996616363525E-6
    New Minimum: 1.8886010870337486 > 1.8885843455791473
    WOLFE (weak): th(258.53216280382605)=1.8885843455791473; dx=-7.150074496509954E-8 evalInputDelta=2.1189451217651367E-5
    New Minimum: 1.8885843455791473 > 1.8884789049625397
    WOLFE (weak): th(1551.1929768229563)=1.8884789049625397; dx=-7.149450237704003E-8 evalInputDelta=1.2663006782531738E-4
    New Minimum: 1.8884789049625397 > 1.8877186328172684
    WOLFE (weak): th(10858.350837760694)=1.8877186328172684; dx=-7.143503093062645E-8 evalInputDelta=8.869022130966187E-4
    New Minimum: 1.8877186328172684 > 1.8815338462591171
    WOLFE (weak): th(86866.80670208555)=1.8815338462591171; dx=-7.102445007821876E-8 evalInputDelta=0.007071688771247864
    New Minimum: 1.8815338462591171 > 1.8266601040959358
    WOLFE (weak): th(781801.26031877)=1.8266601040959358; dx=-6.732713170069921E-8 evalInputDelta=0.06194543093442917
    New Minimum: 1.8266601040959358 > 1.440149113535881
    END: th(7818012.6031877)=1.440149113535881; dx=-3.371201378944791E-8 evalInputDelta=0.44845642149448395
    Fitness changed from 1.888605535030365 to 1.440149113535881
    Iteration 1 complete. Error: 1.440149113

...skipping 6173 bytes...

    h: 29.9379
    Adding measurement 296ce6a5 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.448e+04, gradient 1.304e-04, dot -0.540; [dbd9bc98-c55e-4dda-8c87-7dddf84a5dc6 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.08300855755805969, 1.0475049316883087, 1.440149113535881, 1.888605535030365
    LBFGS Accumulation History: 3 points
    Removed measurement 296ce6a5 to history. Total: 3
    th(0)=0.08300855755805969;dx=-1.700942757775821E-8
    Armijo: th(5.0400000000000015E7)=0.7483170032501221; dx=2.0786526837601772E-8 evalInputDelta=-0.6653084456920624
    Armijo: th(2.5200000000000007E7)=0.13451318442821503; dx=1.2504162577251749E-8 evalInputDelta=-0.051504626870155334
    New Minimum: 0.08300855755805969 > -0.011170744895935059
    END: th(8400000.000000002)=-0.011170744895935059; dx=-4.29356540932859E-9 evalInputDelta=0.09417930245399475
    Fitness changed from 0.08300855755805969 to -0.011170744895935059
    Iteration 9 complete. Error: -0.011170744895935059 Total: 75.6757; Orientation: 1.7152; Line Search: 58.0925
    Adding measurement 41ebabb4 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.279e+04, gradient 9.370e-05, dot -0.661; [dbd9bc98-c55e-4dda-8c87-7dddf84a5dc6 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.011170744895935059, 1.0475049316883087, 1.440149113535881, 1.888605535030365
    LBFGS Accumulation History: 3 points
    Removed measurement 41ebabb4 to history. Total: 3
    th(0)=-0.011170744895935059;dx=-8.779993458710836E-9
    New Minimum: -0.011170744895935059 > -0.09087952971458435
    END: th(1.8097251396267828E7)=-0.09087952971458435; dx=-3.846536522916942E-9 evalInputDelta=0.07970878481864929
    Fitness changed from -0.011170744895935059 to -0.09087952971458435
    Iteration 10 complete. Error: -0.09087952971458435 Total: 42.9826; Orientation: 1.5870; Line Search: 27.2338
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/38bf76ac-deb4-4e6a-9825-a31d5b934e11.jpg)
    
    Final threshold in iteration 11: -0.09087952971458435 (> -Infinity) after 696.622s (< 3600.000s)
    

Returns:

    -0.09087952971458435