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 1434.30 seconds (13.401 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: 8112622928911
    Reset training subject: 8124369096372
    Adding measurement 657788c0 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=3.7625663578510284;dx=-1.284654408078685E-7
    New Minimum: 3.7625663578510284 > 3.7625662088394165
    WOLFE (weak): th(2.154434690031884)=3.7625662088394165; dx=-1.2816959734452923E-7 evalInputDelta=1.4901161193847656E-7
    New Minimum: 3.7625662088394165 > 3.762565851211548
    WOLFE (weak): th(4.308869380063768)=3.762565851211548; dx=-1.2816757897539678E-7 evalInputDelta=5.066394805908203E-7
    New Minimum: 3.762565851211548 > 3.762564033269882
    WOLFE (weak): th(12.926608140191302)=3.762564033269882; dx=-1.2816101352184233E-7 evalInputDelta=2.3245811462402344E-6
    New Minimum: 3.762564033269882 > 3.7625566124916077
    WOLFE (weak): th(51.70643256076521)=3.7625566124916077; dx=-1.2816883531854717E-7 evalInputDelta=9.745359420776367E-6
    New Minimum: 3.7625566124916077 > 3.762518122792244
    WOLFE (weak): th(258.53216280382605)=3.762518122792244; dx=-1.2817777260065136E-7 evalInputDelta=4.823505878448486E-5
    New Minimum: 3.762518122792244 > 3.7622749656438828
    WOLFE (weak): th(1551.1929768229563)=3.7622749656438828; dx=-1.277864431939494E-7 evalInputDelta=2.913922071456909E-4
    New Minimum: 3.7622749656438828 > 3.7605272084474564
    WOLFE (weak): th(10858.350837760694)=3.7605272084474564; dx=-1.2815646779679984E-7 evalInputDelta=0.0020391494035720825
    New Minimum: 3.7605272084474564 > 3.7462551593780518
    WOLFE (weak): th(86866.80670208555)=3.7462551593780518; dx=-1.2806864407543274E-7 evalInputDelta=0.016311198472976685
    New Minimum: 3.7462551593780518 > 3.616338461637497
    WOLFE (weak): th(781801.26031877)=3.616338461637497; dx=-1.2668506842664714E-7 evalInputDelta=0.1462278962135315
    New Minimum: 3.616338461637497 > 2.4589421153068542
    END: th(7818012.6031877)=2.4589421153068542; dx=-9.465745454967183E-8 evalInputDelta=1.3036242425441742
    Fitness changed from 3.7625663578510284 to 2.4589421153068542
    Iteration 1 complete. Error: 2.45894211530

...skipping 24636 bytes...

    ne Search: 44.2896
    Adding measurement 4950b7e1 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.225e+03, gradient 9.675e-06, dot -0.449; [a5c24b3f-9c30-4c3c-bd22-549258a40d69 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.5628145821392536, 0.8355023264884949, 2.4589421153068542, 3.7625663578510284
    LBFGS Accumulation History: 3 points
    Removed measurement 4950b7e1 to history. Total: 3
    th(0)=-2.5628145821392536;dx=-9.349026822407108E-11
    New Minimum: -2.5628145821392536 > -2.5663301050662994
    END: th(7.834471893154296E7)=-2.5663301050662994; dx=-3.081574656172083E-11 evalInputDelta=0.003515522927045822
    Fitness changed from -2.5628145821392536 to -2.5663301050662994
    Iteration 29 complete. Error: -2.5663301050662994 Total: 32.6641; Orientation: 1.5900; Line Search: 20.4049
    Adding measurement 67a32fe9 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 8.576e+02, gradient 1.249e-05, dot -0.351; [a5c24b3f-9c30-4c3c-bd22-549258a40d69 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.5663301050662994, 0.8355023264884949, 2.4589421153068542, 3.7625663578510284
    LBFGS Accumulation History: 3 points
    Removed measurement 67a32fe9 to history. Total: 3
    th(0)=-2.5663301050662994;dx=-1.5577696110279611E-10
    Armijo: th(1.6878858024691382E8)=-2.524957211688161; dx=3.137324664434761E-10 evalInputDelta=-0.04137289337813854
    Armijo: th(8.439429012345691E7)=-2.561075620353222; dx=1.4951060178826046E-10 evalInputDelta=-0.005254484713077545
    New Minimum: -2.5663301050662994 > -2.569023083895445
    END: th(2.8131430041152302E7)=-2.569023083895445; dx=-3.9791327772188465E-11 evalInputDelta=0.0026929788291454315
    Fitness changed from -2.5663301050662994 to -2.569023083895445
    Iteration 30 complete. Error: -2.569023083895445 Total: 57.4374; Orientation: 1.5162; Line Search: 43.8053
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/9c47f438-9032-49e9-a6d6-db1a2eea026f.jpg)
    
    Final threshold in iteration 31: -2.569023083895445 (> -Infinity) after 1434.300s (< 3600.000s)
    

Returns:

    -2.569023083895445