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 156.29 seconds (3.959 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: 1475790485227
    Reset training subject: 1476997199808
    Adding measurement 1b0b3ca1 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=15.559049922972918;dx=-2.434318121133918E-6
    New Minimum: 15.559049922972918 > 15.55904357880354
    WOLFE (weak): th(2.154434690031884)=15.55904357880354; dx=-2.4346199086951626E-6 evalInputDelta=6.34416937828064E-6
    New Minimum: 15.55904357880354 > 15.559037111699581
    WOLFE (weak): th(4.308869380063768)=15.559037111699581; dx=-2.4329873184242587E-6 evalInputDelta=1.2811273336410522E-5
    New Minimum: 15.559037111699581 > 15.559011134319007
    WOLFE (weak): th(12.926608140191302)=15.559011134319007; dx=-2.4352451924925874E-6 evalInputDelta=3.8788653910160065E-5
    New Minimum: 15.559011134319007 > 15.55889430269599
    WOLFE (weak): th(51.70643256076521)=15.55889430269599; dx=-2.434668489249644E-6 evalInputDelta=1.55620276927948E-4
    New Minimum: 15.55889430269599 > 15.55827171728015
    WOLFE (weak): th(258.53216280382605)=15.55827171728015; dx=-2.4357229970540476E-6 evalInputDelta=7.782056927680969E-4
    New Minimum: 15.55827171728015 > 15.55437401868403
    WOLFE (weak): th(1551.1929768229563)=15.55437401868403; dx=-2.4401750360440394E-6 evalInputDelta=0.004675904288887978
    New Minimum: 15.55437401868403 > 15.52609874587506
    WOLFE (weak): th(10858.350837760694)=15.52609874587506; dx=-2.4702073507209198E-6 evalInputDelta=0.032951177097857
    New Minimum: 15.52609874587506 > 15.286494474858046
    WOLFE (weak): th(86866.80670208555)=15.286494474858046; dx=-2.5796676155029106E-6 evalInputDelta=0.272555448114872
    New Minimum: 15.286494474858046 > 13.378310289233923
    END: th(781801.26031877)=13.378310289233923; dx=-1.8679957946411927E-6 evalInputDelta=2.1807396337389946
    Fitness changed from 15.559049922972918 to 13.378310289233923
    Iteration 1 complete. Error: 13.378310289233923 Total: 15.6538; Orientation: 0.0061; Line Search: 11.6148
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/d60c2551-075c-4903-966b-1dd0916b1e8e.jpg)
    
    Adding m

...skipping 24970 bytes...

    79e+02, gradient 7.407e-05, dot -0.338; [bcc4668b-a77c-4846-8074-586ced3039a5 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.1837160512804985, 9.236157387495041, 13.378310289233923, 15.559049922972918
    LBFGS Accumulation History: 3 points
    Removed measurement 74745a79 to history. Total: 3
    th(0)=-1.1837160512804985;dx=-5.478085973594475E-9
    New Minimum: -1.1837160512804985 > -1.1944037303328514
    WOLF (strong): th(5875853.919865721)=-1.1944037303328514; dx=8.740594230775881E-10 evalInputDelta=0.010687679052352905
    New Minimum: -1.1944037303328514 > -1.1955033093690872
    END: th(2937926.9599328605)=-1.1955033093690872; dx=-1.2136820362137057E-9 evalInputDelta=0.011787258088588715
    Fitness changed from -1.1837160512804985 to -1.1955033093690872
    Iteration 29 complete. Error: -1.1955033093690872 Total: 4.9142; Orientation: 0.1856; Line Search: 3.6124
    Adding measurement 64df0935 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 6.913e+02, gradient 7.410e-05, dot -0.330; [bcc4668b-a77c-4846-8074-586ced3039a5 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.1955033093690872, 9.236157387495041, 13.378310289233923, 15.559049922972918
    LBFGS Accumulation History: 3 points
    Removed measurement 64df0935 to history. Total: 3
    th(0)=-1.1955033093690872;dx=-5.4326445071830674E-9
    New Minimum: -1.1955033093690872 > -1.2043716758489609
    WOLF (strong): th(6329571.759259267)=-1.2043716758489609; dx=7.538299243004664E-10 evalInputDelta=0.008868366479873657
    New Minimum: -1.2043716758489609 > -1.2059034928679466
    END: th(3164785.8796296334)=-1.2059034928679466; dx=-5.260549952036938E-10 evalInputDelta=0.010400183498859406
    Fitness changed from -1.1955033093690872 to -1.2059034928679466
    Iteration 30 complete. Error: -1.2059034928679466 Total: 5.4881; Orientation: 0.1959; Line Search: 4.2151
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/53379572-4e04-45cc-8592-83c1917b224b.jpg)
    
    Final threshold in iteration 31: -1.2059034928679466 (> -Infinity) after 156.288s (< 3600.000s)
    

Returns:

    -1.2059034928679466