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.37 seconds (3.474 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: 1100040580193
    Reset training subject: 1101173528686
    Adding measurement 6b82bb7b to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=15.532321831211448;dx=-2.4626177839758033E-6
    New Minimum: 15.532321831211448 > 15.532315827906132
    WOLFE (weak): th(2.154434690031884)=15.532315827906132; dx=-2.4630763513325727E-6 evalInputDelta=6.0033053159713745E-6
    New Minimum: 15.532315827906132 > 15.53230900503695
    WOLFE (weak): th(4.308869380063768)=15.53230900503695; dx=-2.4625565376009827E-6 evalInputDelta=1.282617449760437E-5
    New Minimum: 15.53230900503695 > 15.532282867468894
    WOLFE (weak): th(12.926608140191302)=15.532282867468894; dx=-2.4626095302706207E-6 evalInputDelta=3.8963742554187775E-5
    New Minimum: 15.532282867468894 > 15.532164421863854
    WOLFE (weak): th(51.70643256076521)=15.532164421863854; dx=-2.46191649432306E-6 evalInputDelta=1.5740934759378433E-4
    New Minimum: 15.532164421863854 > 15.531534781679511
    WOLFE (weak): th(258.53216280382605)=15.531534781679511; dx=-2.462943110839466E-6 evalInputDelta=7.870495319366455E-4
    New Minimum: 15.531534781679511 > 15.527593160048127
    WOLFE (weak): th(1551.1929768229563)=15.527593160048127; dx=-2.4651906857195186E-6 evalInputDelta=0.004728671163320541
    New Minimum: 15.527593160048127 > 15.49902494624257
    WOLFE (weak): th(10858.350837760694)=15.49902494624257; dx=-2.4940646085461905E-6 evalInputDelta=0.03329688496887684
    New Minimum: 15.49902494624257 > 15.257379489019513
    WOLFE (weak): th(86866.80670208555)=15.257379489019513; dx=-2.6030654577272706E-6 evalInputDelta=0.2749423421919346
    New Minimum: 15.257379489019513 > 13.3182766251266
    END: th(781801.26031877)=13.3182766251266; dx=-1.8916112158172019E-6 evalInputDelta=2.2140452060848475
    Fitness changed from 15.532321831211448 to 13.3182766251266
    Iteration 1 complete. Error: 13.3182766251266 Total: 15.1587; Orientation: 0.0060; Line Search: 11.6185
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/3ae97098-7ab8-402a-aa62-ef5cf7b835e5.jpg)
    
    Ad

...skipping 24850 bytes...

    1913a to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 8.006e+02, gradient 9.289e-05, dot -0.344; [e2a7343c-bbba-4aa0-bc5f-61a3a46cb28d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.1532469689846039, 9.147233784198761, 13.3182766251266, 15.532321831211448
    LBFGS Accumulation History: 3 points
    Removed measurement 4801913a to history. Total: 3
    th(0)=-1.1532469689846039;dx=-8.616124711668025E-9
    New Minimum: -1.1532469689846039 > -1.1604622155427933
    WOLF (strong): th(7834471.893154292)=-1.1604622155427933; dx=1.393778666962993E-9 evalInputDelta=0.007215246558189392
    New Minimum: -1.1604622155427933 > -1.1662602573633194
    WOLF (strong): th(3917235.946577146)=-1.1662602573633194; dx=4.796945925189648E-10 evalInputDelta=0.013013288378715515
    END: th(1305745.3155257155)=-1.163498878479004; dx=-4.098957835639118E-9 evalInputDelta=0.010251909494400024
    Fitness changed from -1.1532469689846039 to -1.1662602573633194
    Iteration 29 complete. Error: -1.1662602573633194 Total: 6.2251; Orientation: 0.1361; Line Search: 4.9072
    Adding measurement 267215da to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 8.408e+02, gradient 1.070e-04, dot -0.299; [e2a7343c-bbba-4aa0-bc5f-61a3a46cb28d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.1662602573633194, 9.147233784198761, 13.3182766251266, 15.532321831211448
    LBFGS Accumulation History: 3 points
    Removed measurement 267215da to history. Total: 3
    th(0)=-1.1662602573633194;dx=-1.141561716052545E-8
    New Minimum: -1.1662602573633194 > -1.187673605978489
    END: th(2813143.004115229)=-1.187673605978489; dx=-6.385196231407172E-11 evalInputDelta=0.021413348615169525
    Fitness changed from -1.1662602573633194 to -1.187673605978489
    Iteration 30 complete. Error: -1.187673605978489 Total: 3.4586; Orientation: 0.1719; Line Search: 2.0967
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/a96ab463-4e57-4d4d-b316-3f94507e9fd4.jpg)
    
    Final threshold in iteration 31: -1.187673605978489 (> -Infinity) after 156.368s (< 3600.000s)
    

Returns:

    -1.187673605978489