Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Code from BasicOptimizer.scala:75 executed in 115.54 seconds (1.388 gc):

    val lineSearchInstance: LineSearchStrategy = lineSearchFactory
    IterativeTrainer.wrap(trainable)
      .setOrientation(orientation())
      .setMonitor(new TrainingMonitor() {
        override def clear(): Unit = trainingMonitor.clear()
  
        override def log(msg: String): Unit = trainingMonitor.log(msg)
  
        override def onStepFail(currentPoint: Step): Boolean = {
          BasicOptimizer.this.onStepFail(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, currentPoint)
          trainingMonitor.onStepComplete(currentPoint)
          super.onStepComplete(currentPoint)
        }
      })
      .setTimeout(trainingMinutes, TimeUnit.MINUTES)
      .setMaxIterations(trainingIterations)
      .setLineSearchFactory((_: CharSequence) => lineSearchInstance)
      .setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
      .runAndFree
      .asInstanceOf[lang.Double]

Logging:

    Reset training subject: 925482026115400
    Reset training subject: 925485858091300
    Adding measurement 3a852e68 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.6608703285455704;dx=-1.1359405211627287E-6
    New Minimum: 1.6608703285455704 > 1.6608688235282898
    WOLFE (weak): th(2.154434690031884)=1.6608688235282898; dx=-1.1359476307792095E-6 evalInputDelta=1.5050172805786133E-6
    New Minimum: 1.6608688235282898 > 1.6608664020895958
    WOLFE (weak): th(4.308869380063768)=1.6608664020895958; dx=-1.1359807552827754E-6 evalInputDelta=3.926455974578857E-6
    New Minimum: 1.6608664020895958 > 1.6608568876981735
    WOLFE (weak): th(12.926608140191302)=1.6608568876981735; dx=-1.136096726395099E-6 evalInputDelta=1.3440847396850586E-5
    New Minimum: 1.6608568876981735 > 1.6608165204524994
    WOLFE (weak): th(51.70643256076521)=1.6608165204524994; dx=-1.1357843409552513E-6 evalInputDelta=5.380809307098389E-5
    New Minimum: 1.6608165204524994 > 1.6606015264987946
    WOLFE (weak): th(258.53216280382605)=1.6606015264987946; dx=-1.1345892299440903E-6 evalInputDelta=2.6880204677581787E-4
    New Minimum: 1.6606015264987946 > 1.65925931930542
    WOLFE (weak): th(1551.1929768229563)=1.65925931930542; dx=-1.1347236776798559E-6 evalInputDelta=0.0016110092401504517
    New Minimum: 1.65925931930542 > 1.6496504098176956
    WOLFE (weak): th(10858.350837760694)=1.6496504098176956; dx=-1.1130354835939196E-6 evalInputDelta=0.011219918727874756
    New Minimum: 1.6496504098176956 > 1.5784084647893906
    END: th(86866.80670208555)=1.5784084647893906; dx=-9.491798385343829E-7 evalInputDelta=0.08246186375617981
    Fitness changed from 1.6608703285455704 to 1.5784084647893906
    Iteration 1 complete. Error: 1.5784084647893906 Total: 47.3135; Orientation: 0.0664; Line Search: 36.0843
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/adbde8dc-a3b6-481c-9115-c52a4d6ffbdc.jpg)
    
    Adding measurement 4d017f68 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=1.5784084647893906;dx=-9.386445404

...skipping 1826 bytes...

    >Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/1b2ec366-7534-4659-81d9-b61c13a6180b.jpg)
    
    Adding measurement 46e3fa83 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 9.945e+02, gradient 5.769e-04, dot -0.809; [b9718163-ccdb-43d0-a180-dd0f8fcb0ebd = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.5784084647893906, 1.444474570453167, 1.2646901905536652, 1.0596437007188797
    LBFGS Accumulation History: 3 points
    Removed measurement 4d017f68 to history. Total: 4
    th(0)=1.0596437007188797;dx=-3.3278999262229364E-7
    New Minimum: 1.0596437007188797 > 0.8550777733325958
    END: th(1871488.617712673)=0.8550777733325958; dx=-4.836988376707908E-8 evalInputDelta=0.20456592738628387
    Fitness changed from 1.0596437007188797 to 0.8550777733325958
    Iteration 5 complete. Error: 0.8550777733325958 Total: 13.3773; Orientation: 1.9081; Line Search: 7.6198
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/0b876b3a-61ec-41bc-856c-96b64dcc6b10.jpg)
    
    Adding measurement 65a9b8 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.126e+03, gradient 5.726e-04, dot -0.684; [b9718163-ccdb-43d0-a180-dd0f8fcb0ebd = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.444474570453167, 1.2646901905536652, 1.0596437007188797, 0.8550777733325958
    LBFGS Accumulation History: 3 points
    Removed measurement 7ed780c6 to history. Total: 4
    th(0)=0.8550777733325958;dx=-3.279038830267932E-7
    New Minimum: 0.8550777733325958 > 0.7608519345521927
    WOLF (strong): th(4032000.0000000014)=0.7608519345521927; dx=7.1360622434525E-9 evalInputDelta=0.09422583878040314
    New Minimum: 0.7608519345521927 > 0.7252243757247925
    END: th(2016000.0000000007)=0.7252243757247925; dx=-6.054770183004162E-9 evalInputDelta=0.12985339760780334
    Fitness changed from 0.8550777733325958 to 0.7252243757247925
    Iteration 6 complete. Error: 0.7252243757247925 Total: 17.2304; Orientation: 1.9221; Line Search: 11.4696
    Final threshold in iteration 7: 0.7252243757247925 (> -Infinity) after 115.537s (< 720.000s)
    

Returns:

    0.7252243757247925