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 929.68 seconds (7.300 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: 982459697242100
    Reset training subject: 982467780838400
    Adding measurement 1e6cb932 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=12.540920491954973;dx=-3.0002002437876756E-5
    New Minimum: 12.540920491954973 > 12.540847580337545
    WOLFE (weak): th(2.154434690031884)=12.540847580337545; dx=-2.9999371550699938E-5 evalInputDelta=7.291161742806196E-5
    New Minimum: 12.540847580337545 > 12.540774800944353
    WOLFE (weak): th(4.308869380063768)=12.540774800944353; dx=-3.000257944476706E-5 evalInputDelta=1.4569101061923106E-4
    New Minimum: 12.540774800944353 > 12.540482882481312
    WOLFE (weak): th(12.926608140191302)=12.540482882481312; dx=-3.000454160199336E-5 evalInputDelta=4.376094736606717E-4
    New Minimum: 12.540482882481312 > 12.539168586343092
    WOLFE (weak): th(51.70643256076521)=12.539168586343092; dx=-3.0003786847425023E-5 evalInputDelta=0.0017519056118810994
    New Minimum: 12.539168586343092 > 12.53216776990666
    WOLFE (weak): th(258.53216280382605)=12.53216776990666; dx=-2.9943336463622396E-5 evalInputDelta=0.008752722048312123
    New Minimum: 12.53216776990666 > 12.488598742989534
    WOLFE (weak): th(1551.1929768229563)=12.488598742989534; dx=-2.973576152518739E-5 evalInputDelta=0.052321748965438175
    New Minimum: 12.488598742989534 > 12.182248934399494
    WOLFE (weak): th(10858.350837760694)=12.182248934399494; dx=-2.8014557546160997E-5 evalInputDelta=0.3586715575554784
    New Minimum: 12.182248934399494 > 10.310766345990286
    END: th(86866.80670208555)=10.310766345990286; dx=-1.5713928968744208E-5 evalInputDelta=2.2301541459646863
    Fitness changed from 12.540920491954973 to 10.310766345990286
    Iteration 1 complete. Error: 10.310766345990286 Total: 91.4123; Orientation: 0.0122; Line Search: 68.4221
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/a176a92d-a1c9-4c94-ba30-bb9b62cd54ae.jpg)
    
    Adding measurement 33a71d23 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=10.310766345990286;dx=-1.181576088920

...skipping 24222 bytes...

    y. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.856e+03, gradient 1.736e-04, dot -0.647; [89612b25-1dd8-4dbb-8739-bc6b28a0b01a = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.5844959838604633, 0.5486313551790185, 0.5183889710632319, 0.4964544052909652
    LBFGS Accumulation History: 3 points
    Removed measurement 1e3566e to history. Total: 4
    th(0)=0.4964544052909652;dx=-3.008666754375686E-8
    Armijo: th(7834471.893154296)=0.6193353944449078; dx=2.6230526715432376E-8 evalInputDelta=-0.12288098915394263
    New Minimum: 0.4964544052909652 > 0.4744932711808052
    WOLF (strong): th(3917235.946577148)=0.4744932711808052; dx=7.835396647978455E-9 evalInputDelta=0.021961134110159986
    New Minimum: 0.4744932711808052 > 0.4662272651503008
    END: th(1305745.315525716)=0.4662272651503008; dx=-1.7321118710416847E-8 evalInputDelta=0.03022714014066441
    Fitness changed from 0.4964544052909652 to 0.4662272651503008
    Iteration 29 complete. Error: 0.4662272651503008 Total: 38.0702; Orientation: 0.2421; Line Search: 30.3185
    Adding measurement 2ed7978c to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.843e+03, gradient 1.251e-04, dot -0.916; [89612b25-1dd8-4dbb-8739-bc6b28a0b01a = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.5486313551790185, 0.5183889710632319, 0.4964544052909652, 0.4662272651503008
    LBFGS Accumulation History: 3 points
    Removed measurement 13d10057 to history. Total: 4
    th(0)=0.4662272651503008;dx=-1.5604306092947745E-8
    New Minimum: 0.4662272651503008 > 0.44022970406478557
    END: th(2813143.00411523)=0.44022970406478557; dx=-1.1155265206698229E-8 evalInputDelta=0.02599756108551521
    Fitness changed from 0.4662272651503008 to 0.44022970406478557
    Iteration 30 complete. Error: 0.44022970406478557 Total: 22.6744; Orientation: 0.2774; Line Search: 14.8259
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/18c270a4-f9a8-4468-bde2-7d41ac4176ab.jpg)
    
    Final threshold in iteration 31: 0.44022970406478557 (> -Infinity) after 929.669s (< 3600.000s)
    

Returns:

    0.44022970406478557