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 419.31 seconds (5.398 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: 752457712081900
    Reset training subject: 752462100979900
    Adding measurement 4b515eab to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=13.756024051457644;dx=-7.114414746581286E-6
    New Minimum: 13.756024051457644 > 13.756017450243235
    WOLFE (weak): th(2.154434690031884)=13.756017450243235; dx=-7.1190332097568074E-6 evalInputDelta=6.601214408874512E-6
    New Minimum: 13.756017450243235 > 13.7560113966465
    WOLFE (weak): th(4.308869380063768)=13.7560113966465; dx=-7.114013269727909E-6 evalInputDelta=1.2654811143875122E-5
    New Minimum: 13.7560113966465 > 13.755987394601107
    WOLFE (weak): th(12.926608140191302)=13.755987394601107; dx=-7.122277456124823E-6 evalInputDelta=3.6656856536865234E-5
    New Minimum: 13.755987394601107 > 13.75587560236454
    WOLFE (weak): th(51.70643256076521)=13.75587560236454; dx=-7.111001594901858E-6 evalInputDelta=1.484490931034088E-4
    New Minimum: 13.75587560236454 > 13.755278445780277
    WOLFE (weak): th(258.53216280382605)=13.755278445780277; dx=-7.123966287979163E-6 evalInputDelta=7.456056773662567E-4
    New Minimum: 13.755278445780277 > 13.751483142375946
    WOLFE (weak): th(1551.1929768229563)=13.751483142375946; dx=-7.0889427578844625E-6 evalInputDelta=0.004540909081697464
    New Minimum: 13.751483142375946 > 13.71970335021615
    WOLFE (weak): th(10858.350837760694)=13.71970335021615; dx=-6.592638005463915E-6 evalInputDelta=0.036320701241493225
    New Minimum: 13.71970335021615 > 13.2520792465657
    END: th(86866.80670208555)=13.2520792465657; dx=-3.926036318185219E-6 evalInputDelta=0.5039448048919439
    Fitness changed from 13.756024051457644 to 13.2520792465657
    Iteration 1 complete. Error: 13.2520792465657 Total: 42.0115; Orientation: 0.0198; Line Search: 30.7637
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/4048b77b-de03-4fac-8068-5dbd1d4795c8.jpg)
    
    Adding measurement 1e957e2f to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=13.2520792465657;dx=-6.995690342093385E-6
    New Minimum: 

...skipping 23993 bytes...

    56161606311798 to 1.021627016365528
    Iteration 28 complete. Error: 1.021627016365528 Total: 17.7579; Orientation: 0.1194; Line Search: 14.0589
    Adding measurement 681061d6 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.391e+03, gradient 2.285e-04, dot -0.873; [3ae4b167-e670-45b2-8a3b-19e0e976945d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.0967085883021355, 1.0761277303099632, 1.0656161606311798, 1.021627016365528
    LBFGS Accumulation History: 3 points
    Removed measurement 447fa959 to history. Total: 4
    th(0)=1.021627016365528;dx=-5.1998992860288754E-8
    New Minimum: 1.021627016365528 > 1.0009687319397926
    END: th(4406890.439899291)=1.0009687319397926; dx=-2.7962845259959934E-8 evalInputDelta=0.020658284425735474
    Fitness changed from 1.021627016365528 to 1.0009687319397926
    Iteration 29 complete. Error: 1.0009687319397926 Total: 9.9496; Orientation: 0.1017; Line Search: 6.5192
    Adding measurement 581c9bb7 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.563e+03, gradient 2.312e-04, dot -0.757; [3ae4b167-e670-45b2-8a3b-19e0e976945d = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.0761277303099632, 1.0656161606311798, 1.021627016365528, 1.0009687319397926
    LBFGS Accumulation History: 3 points
    Removed measurement 35025a0a to history. Total: 4
    th(0)=1.0009687319397926;dx=-5.312276035902692E-8
    Armijo: th(9494357.638888901)=1.161061368882656; dx=-1.0738046446083473E-8 evalInputDelta=-0.16009263694286346
    New Minimum: 1.0009687319397926 > 0.9979260116815567
    END: th(4747178.819444451)=0.9979260116815567; dx=-2.445528126346898E-8 evalInputDelta=0.0030427202582359314
    Fitness changed from 1.0009687319397926 to 0.9979260116815567
    Iteration 30 complete. Error: 0.9979260116815567 Total: 13.0588; Orientation: 0.1059; Line Search: 9.7212
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/0ef7b9b7-36e5-4449-b4d8-ecfae237ee56.jpg)
    
    Final threshold in iteration 31: 0.9979260116815567 (> -Infinity) after 419.298s (< 3600.000s)
    

Returns:

    0.9979260116815567