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

Code from BasicOptimizer.scala:88 executed in 1429.44 seconds (7.780 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: 1202499606735
    Reset training subject: 1218395763640
    Adding measurement 35a8aea3 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=12.430632516741753;dx=-2.6079239465672756E-7
    New Minimum: 12.430632516741753 > 12.430632382631302
    WOLFE (weak): th(2.154434690031884)=12.430632382631302; dx=-2.558169009044812E-7 evalInputDelta=1.341104507446289E-7
    New Minimum: 12.430632382631302 > 12.430631630122662
    WOLFE (weak): th(4.308869380063768)=12.430631630122662; dx=-2.5581096218645366E-7 evalInputDelta=8.866190910339355E-7
    New Minimum: 12.430631630122662 > 12.43062761425972
    WOLFE (weak): th(12.926608140191302)=12.43062761425972; dx=-2.55815897707228E-7 evalInputDelta=4.902482032775879E-6
    New Minimum: 12.43062761425972 > 12.43061263859272
    WOLFE (weak): th(51.70643256076521)=12.43061263859272; dx=-2.558131352451893E-7 evalInputDelta=1.9878149032592773E-5
    New Minimum: 12.43061263859272 > 12.430532723665237
    WOLFE (weak): th(258.53216280382605)=12.430532723665237; dx=-2.558108701455802E-7 evalInputDelta=9.979307651519775E-5
    New Minimum: 12.430532723665237 > 12.430032014846802
    WOLFE (weak): th(1551.1929768229563)=12.430032014846802; dx=-2.557772295775154E-7 evalInputDelta=6.005018949508667E-4
    New Minimum: 12.430032014846802 > 12.426431141793728
    WOLFE (weak): th(10858.350837760694)=12.426431141793728; dx=-2.5568870574134785E-7 evalInputDelta=0.00420137494802475
    New Minimum: 12.426431141793728 > 12.397090286016464
    WOLFE (weak): th(86866.80670208555)=12.397090286016464; dx=-2.548804269818263E-7 evalInputDelta=0.03354223072528839
    New Minimum: 12.397090286016464 > 12.135377630591393
    WOLFE (weak): th(781801.26031877)=12.135377630591393; dx=-2.4681939733554275E-7 evalInputDelta=0.2952548861503601
    New Minimum: 12.135377630591393 > 10.252515241503716
    END: th(7818012.6031877)=10.252515241503716; dx=-1.5531485008513231E-7 evalInputDelta=2.178117275238037
    Fitness changed from 12.430632516741753 to 10.252515241503716
    Iteration 1 complete. Error: 10.2525152415037

...skipping 15259 bytes...

    ntation: 0.8964; Line Search: 32.9461
    Adding measurement 345d7cc5 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 9.591e+03, gradient 9.818e-05, dot -0.289; [a9baf531-3a4a-4823-b110-89884085ecfb = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.4626077711582184, 8.244848191738129, 10.252515241503716, 12.430632516741753
    LBFGS Accumulation History: 3 points
    Removed measurement 345d7cc5 to history. Total: 3
    th(0)=0.4626077711582184;dx=-9.636625600005076E-9
    Armijo: th(7.069238826667124E7)=0.732819989323616; dx=1.1334827099622094E-9 evalInputDelta=-0.27021221816539764
    New Minimum: 0.4626077711582184 > 0.4041827768087387
    END: th(3.534619413333562E7)=0.4041827768087387; dx=-1.7312666112709801E-9 evalInputDelta=0.058424994349479675
    Fitness changed from 0.4626077711582184 to 0.4041827768087387
    Iteration 19 complete. Error: 0.4041827768087387 Total: 65.3736; Orientation: 0.8776; Line Search: 48.0061
    Adding measurement 75132479 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 9.609e+03, gradient 1.044e-04, dot -0.274; [a9baf531-3a4a-4823-b110-89884085ecfb = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.4041827768087387, 8.244848191738129, 10.252515241503716, 12.430632516741753
    LBFGS Accumulation History: 3 points
    Removed measurement 75132479 to history. Total: 3
    th(0)=0.4041827768087387;dx=-1.0897603705539698E-8
    Armijo: th(7.615106680145971E7)=0.8480404615402222; dx=2.400781541451598E-9 evalInputDelta=-0.44385768473148346
    New Minimum: 0.4041827768087387 > 0.38035306334495544
    END: th(3.807553340072986E7)=0.38035306334495544; dx=-2.866540056596815E-10 evalInputDelta=0.023829713463783264
    Fitness changed from 0.4041827768087387 to 0.38035306334495544
    Iteration 20 complete. Error: 0.38035306334495544 Total: 66.4094; Orientation: 0.8848; Line Search: 49.4968
    <a id="p-17"></a>Iteration 20
    <a id="p-16"></a>![Iteration 20](etc/2698ac89-1da8-462e-a911-34d3877a0eb7.jpg)
    
    Final threshold in iteration 21: 0.38035306334495544 (> -Infinity) after 1429.437s (< 3600.000s)
    

Returns:

    0.38035306334495544