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:75 executed in 414.59 seconds (4.816 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: 920314691533900
    Reset training subject: 920318457175400
    Adding measurement 2e3adec1 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=2.8763773292303085;dx=-0.06630554398348061
    New Minimum: 2.8763773292303085 > 2.875911455601454
    END: th(2.154434690031884)=2.875911455601454; dx=-4.8448651669617555E-5 evalInputDelta=4.658736288547516E-4
    Fitness changed from 2.8763773292303085 to 2.875911455601454
    Iteration 1 complete. Error: 2.875911455601454 Total: 16.8524; Orientation: 0.0630; Line Search: 6.9770
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/4dea6cc2-42c8-480c-9758-b019ef50ae74.jpg)
    
    Adding measurement 4e94f1b1 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=2.875911455601454;dx=-3.503693044728502E-5
    New Minimum: 2.875911455601454 > 2.875806972384453
    WOLFE (weak): th(4.641588833612779)=2.875806972384453; dx=-3.496712254704471E-5 evalInputDelta=1.044832170009613E-4
    New Minimum: 2.875806972384453 > 2.875703445635736
    WOLFE (weak): th(9.283177667225559)=2.875703445635736; dx=-3.474884203033663E-5 evalInputDelta=2.080099657177925E-4
    New Minimum: 2.875703445635736 > 2.8752902960404754
    WOLFE (weak): th(27.849533001676676)=2.8752902960404754; dx=-3.4621557013999276E-5 evalInputDelta=6.211595609784126E-4
    New Minimum: 2.8752902960404754 > 2.8727077525109053
    WOLFE (weak): th(111.3981320067067)=2.8727077525109053; dx=-3.422559893783894E-5 evalInputDelta=0.0032037030905485153
    New Minimum: 2.8727077525109053 > 2.863412046805024
    END: th(556.9906600335335)=2.863412046805024; dx=-2.8762992356272785E-5 evalInputDelta=0.012499408796429634
    Fitness changed from 2.875911455601454 to 2.863412046805024
    Iteration 2 complete. Error: 2.863412046805024 Total: 21.8882; Orientation: 0.0653; Line Search: 18.7979
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/c6b4c2d3-ae67-4a19-8182-9c20d1e58c4c.jpg)
    
    Adding measurement 28e7a4df to history. Total: 2
    LBFGS Accumulation History: 3 points

...skipping 22768 bytes...

    
    Adding measurement 64a23430 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.154e+03, gradient 1.552e-04, dot -0.570; [97b36580-0e46-44f6-8ef1-870b29328853 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.3328380584716797, 0.2744339108467102, 0.24304094910621643, 0.21405646204948425
    LBFGS Accumulation History: 3 points
    Removed measurement 2ba32cc3 to history. Total: 4
    th(0)=0.21405646204948425;dx=-2.4093811159493733E-8
    Armijo: th(1.3430523245407363E7)=0.3231338858604431; dx=1.4220571627429874E-8 evalInputDelta=-0.10907742381095886
    Armijo: th(6715261.622703682)=0.2194046825170517; dx=1.1451325038345377E-8 evalInputDelta=-0.005348220467567444
    New Minimum: 0.21405646204948425 > 0.18788987398147583
    END: th(2238420.5409012274)=0.18788987398147583; dx=-4.581370033347002E-9 evalInputDelta=0.026166588068008423
    Fitness changed from 0.21405646204948425 to 0.18788987398147583
    Iteration 29 complete. Error: 0.18788987398147583 Total: 18.8134; Orientation: 1.8250; Line Search: 13.6026
    Adding measurement 2c1ef3d0 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.222e+03, gradient 9.453e-05, dot -0.793; [97b36580-0e46-44f6-8ef1-870b29328853 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.2744339108467102, 0.24304094910621643, 0.21405646204948425, 0.18788987398147583
    LBFGS Accumulation History: 3 points
    Removed measurement 1e9b9785 to history. Total: 4
    th(0)=0.18788987398147583;dx=-8.936308156978395E-9
    New Minimum: 0.18788987398147583 > 0.16510304808616638
    END: th(4822530.864197537)=0.16510304808616638; dx=-4.224995945609317E-9 evalInputDelta=0.022786825895309448
    Fitness changed from 0.18788987398147583 to 0.16510304808616638
    Iteration 30 complete. Error: 0.16510304808616638 Total: 11.9522; Orientation: 1.7562; Line Search: 6.8310
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/6e5621e8-0b5b-45ee-853d-e33d05aef7d7.jpg)
    
    Final threshold in iteration 31: 0.16510304808616638 (> -Infinity) after 414.592s (< 3600.000s)
    

Returns:

    0.16510304808616638