Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Code from BasicOptimizer.scala:75 executed in 3603.62 seconds (38.546 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: 1191289797483400
    Reset training subject: 1191346012201600
    Adding measurement 2c080bf5 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.4163739412323362;dx=-3.043947723451124E-7
    New Minimum: 1.4163739412323362 > 1.4163737160284018
    WOLFE (weak): th(2.154434690031884)=1.4163737160284018; dx=-2.997683473290183E-7 evalInputDelta=2.252039343897394E-7
    New Minimum: 1.4163737160284018 > 1.4163734285624048
    WOLFE (weak): th(4.308869380063768)=1.4163734285624048; dx=-2.9976861374955765E-7 evalInputDelta=5.126699313962035E-7
    New Minimum: 1.4163734285624048 > 1.416372559951121
    WOLFE (weak): th(12.926608140191302)=1.416372559951121; dx=-2.9976803100480617E-7 evalInputDelta=1.3812812151847709E-6
    New Minimum: 1.416372559951121 > 1.416368479503614
    WOLFE (weak): th(51.70643256076521)=1.416368479503614; dx=-2.9976713037393165E-7 evalInputDelta=5.461728722178094E-6
    New Minimum: 1.416368479503614 > 1.416347170630387
    WOLFE (weak): th(258.53216280382605)=1.416347170630387; dx=-2.997631030007115E-7 evalInputDelta=2.6770601949221984E-5
    New Minimum: 1.416347170630387 > 1.4162142083646032
    WOLFE (weak): th(1551.1929768229563)=1.4162142083646032; dx=-2.997345981901681E-7 evalInputDelta=1.5973286773296458E-4
    New Minimum: 1.4162142083646032 > 1.4152565169380136
    WOLFE (weak): th(10858.350837760694)=1.4152565169380136; dx=-2.9949299745348334E-7 evalInputDelta=0.0011174242943225998
    New Minimum: 1.4152565169380136 > 1.4074828552282155
    WOLFE (weak): th(86866.80670208555)=1.4074828552282155; dx=-2.976552522485828E-7 evalInputDelta=0.008891086004120696
    New Minimum: 1.4074828552282155 > 1.3402552767729867
    WOLFE (weak): th(781801.26031877)=1.3402552767729867; dx=-2.808212075247051E-7 evalInputDelta=0.07611866445934945
    New Minimum: 1.3402552767729867 > 0.9712734715066944
    END: th(7818012.6031877)=0.9712734715066944; dx=-1.4995274547695644E-7 evalInputDelta=0.44510046972564177
    Fitness changed from 1.4163739412323362 to 0.9712734715066944
    Iterat

...skipping 10050 bytes...

    g measurement 1f24fb1 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 9.676e+03, gradient 1.562e-04, dot -0.747; [579d444f-0591-419b-8d3b-42e4aeb60712 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.2809511130503608, 0.2171415629007034, 0.16914923196150078, 0.13030029889683536
    LBFGS Accumulation History: 3 points
    Removed measurement 7767c18d to history. Total: 4
    th(0)=0.13030029889683536;dx=-2.4413362105637527E-8
    Armijo: th(5.089851955200329E7)=0.3448901101229335; dx=-3.786595266971565E-10 evalInputDelta=-0.21458981122609816
    New Minimum: 0.13030029889683536 > 0.12331372795781703
    END: th(2.5449259776001643E7)=0.12331372795781703; dx=-5.874332753441532E-9 evalInputDelta=0.006986570939018333
    Fitness changed from 0.13030029889683536 to 0.12331372795781703
    Iteration 13 complete. Error: 0.12331372795781703 Total: 218.5450; Orientation: 1.4845; Line Search: 162.4621
    Adding measurement 34cc0bac to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 9.299e+03, gradient 1.937e-04, dot -0.578; [579d444f-0591-419b-8d3b-42e4aeb60712 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.2171415629007034, 0.16914923196150078, 0.13030029889683536, 0.12331372795781703
    LBFGS Accumulation History: 3 points
    Removed measurement 1fc93e75 to history. Total: 4
    th(0)=0.12331372795781703;dx=-3.751776033908871E-8
    Armijo: th(5.482876809705099E7)=0.570436372571089; dx=1.906330416890803E-8 evalInputDelta=-0.447122644613272
    Armijo: th(2.7414384048525494E7)=0.16326516491552723; dx=8.45372863880593E-9 evalInputDelta=-0.039951436957710196
    New Minimum: 0.12331372795781703 > 0.05893717587472702
    END: th(9138128.016175164)=0.05893717587472702; dx=-1.372861229486474E-8 evalInputDelta=0.06437655208309001
    Fitness changed from 0.12331372795781703 to 0.05893717587472702
    Iteration 14 complete. Error: 0.05893717587472702 Total: 272.8153; Orientation: 1.4818; Line Search: 218.6908
    Final threshold in iteration 14: 0.05893717587472702 (> -Infinity) after 3603.615s (< 3600.000s)
    

Returns:

    0.05893717587472702