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 1001.25 seconds (12.228 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: 1163337177741600
    Reset training subject: 1163346822322600
    Adding measurement 6e090aaa to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=5.184507229029828;dx=-2.696148243047561E-5
    New Minimum: 5.184507229029828 > 5.1844817408938875
    WOLFE (weak): th(2.154434690031884)=5.1844817408938875; dx=-2.6960204735139282E-5 evalInputDelta=2.5488135940499035E-5
    New Minimum: 5.1844817408938875 > 5.184456354958616
    WOLFE (weak): th(4.308869380063768)=5.184456354958616; dx=-2.6960172553551416E-5 evalInputDelta=5.087407121173726E-5
    New Minimum: 5.184456354958616 > 5.184354153501273
    WOLFE (weak): th(12.926608140191302)=5.184354153501273; dx=-2.6958312653423938E-5 evalInputDelta=1.530755285550356E-4
    New Minimum: 5.184354153501273 > 5.1838956016640685
    WOLFE (weak): th(51.70643256076521)=5.1838956016640685; dx=-2.6955529839051267E-5 evalInputDelta=6.116273657594817E-4
    New Minimum: 5.1838956016640685 > 5.181451779393926
    WOLFE (weak): th(258.53216280382605)=5.181451779393926; dx=-2.6913191475174517E-5 evalInputDelta=0.0030554496359016525
    New Minimum: 5.181451779393926 > 5.166248940727687
    WOLFE (weak): th(1551.1929768229563)=5.166248940727687; dx=-2.6709432467026106E-5 evalInputDelta=0.018258288302140713
    New Minimum: 5.166248940727687 > 5.060302300249924
    WOLFE (weak): th(10858.350837760694)=5.060302300249924; dx=-2.517411198045634E-5 evalInputDelta=0.1242049287799043
    New Minimum: 5.060302300249924 > 4.397204647880176
    END: th(86866.80670208555)=4.397204647880176; dx=-1.5722151377741698E-5 evalInputDelta=0.7873025811496523
    Fitness changed from 5.184507229029828 to 4.397204647880176
    Iteration 1 complete. Error: 4.397204647880176 Total: 98.9172; Orientation: 0.0073; Line Search: 73.0492
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/0c709ab2-528a-461a-a8a8-d20e65359692.jpg)
    
    Adding measurement 11f3400c to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=4.397204647880176;dx=-1.1575375608119306E-5
    New Mini

...skipping 24012 bytes...

    e Search: 32.4823
    Adding measurement 495e8a3 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.823e+03, gradient 2.200e-04, dot -0.635; [43a15ad2-9e63-4418-98da-0c57c1025946 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.27690961764106037, 0.2554556072543851, 0.24314536880418336, 0.22181392502572783
    LBFGS Accumulation History: 3 points
    Removed measurement 517bdce0 to history. Total: 4
    th(0)=0.22181392502572783;dx=-4.838147519155051E-8
    Armijo: th(5222981.262102864)=0.23059343156127565; dx=4.06922594630546E-9 evalInputDelta=-0.00877950653554782
    New Minimum: 0.22181392502572783 > 0.2067602564013784
    END: th(2611490.631051432)=0.2067602564013784; dx=-1.5346445142301056E-8 evalInputDelta=0.015053668624349426
    Fitness changed from 0.22181392502572783 to 0.2067602564013784
    Iteration 29 complete. Error: 0.2067602564013784 Total: 32.7791; Orientation: 0.2035; Line Search: 24.5260
    Adding measurement 62cf86d6 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.092e+03, gradient 2.003e-04, dot -0.674; [43a15ad2-9e63-4418-98da-0c57c1025946 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.2554556072543851, 0.24314536880418336, 0.22181392502572783, 0.2067602564013784
    LBFGS Accumulation History: 3 points
    Removed measurement 2e4b5da1 to history. Total: 4
    th(0)=0.2067602564013784;dx=-4.013169675172664E-8
    Armijo: th(5626286.00823046)=0.2068479200697897; dx=-5.812947629453382E-9 evalInputDelta=-8.766366841128637E-5
    New Minimum: 0.2067602564013784 > 0.1917649015761309
    END: th(2813143.00411523)=0.1917649015761309; dx=-1.4473198175360659E-8 evalInputDelta=0.014995354825247498
    Fitness changed from 0.2067602564013784 to 0.1917649015761309
    Iteration 30 complete. Error: 0.1917649015761309 Total: 33.1341; Orientation: 0.2063; Line Search: 24.8729
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/b1f9f925-f5a8-498f-ba05-57a55bc4506c.jpg)
    
    Final threshold in iteration 31: 0.1917649015761309 (> -Infinity) after 1001.238s (< 3600.000s)
    

Returns:

    0.1917649015761309