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 620.96 seconds (10.785 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: 2194757931371
    Reset training subject: 2196967165002
    Adding measurement 78621bae to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=3.4790104925632477;dx=-2.41319673111678E-7
    New Minimum: 3.4790104925632477 > 3.479009911417961
    WOLFE (weak): th(2.154434690031884)=3.479009911417961; dx=-2.4154808146864773E-7 evalInputDelta=5.811452865600586E-7
    New Minimum: 3.479009911417961 > 3.4790089577436447
    WOLFE (weak): th(4.308869380063768)=3.4790089577436447; dx=-2.4158937682686154E-7 evalInputDelta=1.5348196029663086E-6
    New Minimum: 3.4790089577436447 > 3.479006513953209
    WOLFE (weak): th(12.926608140191302)=3.479006513953209; dx=-2.416131755713251E-7 evalInputDelta=3.978610038757324E-6
    New Minimum: 3.479006513953209 > 3.478994771838188
    WOLFE (weak): th(51.70643256076521)=3.478994771838188; dx=-2.41421631583243E-7 evalInputDelta=1.5720725059509277E-5
    New Minimum: 3.478994771838188 > 3.4789308607578278
    WOLFE (weak): th(258.53216280382605)=3.4789308607578278; dx=-2.4152564615030907E-7 evalInputDelta=7.963180541992188E-5
    New Minimum: 3.4789308607578278 > 3.4785320311784744
    WOLFE (weak): th(1551.1929768229563)=3.4785320311784744; dx=-2.415992027839389E-7 evalInputDelta=4.784613847732544E-4
    New Minimum: 3.4785320311784744 > 3.475661963224411
    WOLFE (weak): th(10858.350837760694)=3.475661963224411; dx=-2.415360645057048E-7 evalInputDelta=0.00334852933883667
    New Minimum: 3.475661963224411 > 3.4522183388471603
    WOLFE (weak): th(86866.80670208555)=3.4522183388471603; dx=-2.4126108364180797E-7 evalInputDelta=0.02679215371608734
    New Minimum: 3.4522183388471603 > 3.2393296509981155
    WOLFE (weak): th(781801.26031877)=3.2393296509981155; dx=-2.3355566155534028E-7 evalInputDelta=0.23968084156513214
    New Minimum: 3.2393296509981155 > 1.7766670137643814
    END: th(7818012.6031877)=1.7766670137643814; dx=-1.2216017501023915E-7 evalInputDelta=1.7023434787988663
    Fitness changed from 3.4790104925632477 to 1.7766670137643814
    Iteration 1 complete. Error: 1.7766670137643814 

...skipping 39884 bytes...

    250507)=-1.8633724600076675; dx=-3.0994306578768705E-9 evalInputDelta=-5.811452865600586E-7
    WOLFE (weak): th(3173051.159887549)=-1.8633788526058197; dx=-3.100606188476084E-9 evalInputDelta=5.811452865600586E-6
    WOLFE (weak): th(3227758.9385062996)=-1.8633757084608078; dx=-3.0877856725405604E-9 evalInputDelta=2.6673078536987305E-6
    WOLFE (weak): th(3255112.827815675)=-1.86337411403656; dx=-3.100491911458807E-9 evalInputDelta=1.0728836059570312E-6
    WOLFE (weak): th(3268789.772470363)=-1.8633732944726944; dx=-3.100655159113634E-9 evalInputDelta=2.5331974029541016E-7
    Armijo: th(3275628.2447977066)=-1.8633726686239243; dx=-3.1024615043710723E-9 evalInputDelta=-3.725290298461914E-7
    WOLFE (weak): th(3272209.0086340345)=-1.863373063504696; dx=-3.0980966460011836E-9 evalInputDelta=2.2351741790771484E-8
    Armijo: th(3273918.6267158706)=-1.8633728474378586; dx=-3.0998235779821586E-9 evalInputDelta=-1.9371509552001953E-7
    Armijo: th(3273063.8176749526)=-1.863372951745987; dx=-3.1003485944932125E-9 evalInputDelta=-8.940696716308594E-8
    Armijo: th(3272636.4131544936)=-1.86337298899889; dx=-3.099156475213885E-9 evalInputDelta=-5.21540641784668E-8
    Armijo: th(3272422.7108942643)=-1.8633730113506317; dx=-3.100692565345778E-9 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(3272315.8597641494)=-1.8633729964494705; dx=-3.0979337780314824E-9 evalInputDelta=-4.470348358154297E-8
    Armijo: th(3272262.434199092)=-1.8633730337023735; dx=-3.099070752032452E-9 evalInputDelta=-7.450580596923828E-9
    Armijo: th(3272235.7214165633)=-1.86337298899889; dx=-3.097471066072601E-9 evalInputDelta=-5.21540641784668E-8
    mu ~= nu (3272209.0086340345): th(1750648.9158000269)=-1.8634218946099281
    Fitness changed from -1.863373041152954 to -1.8634218946099281
    Iteration 30 complete. Error: -1.8634218946099281 Total: 53.3447; Orientation: 0.3045; Line Search: 50.9008
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/53c690e3-8d3f-4cc9-9994-a586ea5fd058.jpg)
    
    Final threshold in iteration 31: -1.8634218946099281 (> -Infinity) after 620.960s (< 3600.000s)
    

Returns:

    -1.8634218946099281