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

Code from BasicOptimizer.scala:75 executed in 585.11 seconds (6.786 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: 1494487747021600
    Reset training subject: 1494494310049300
    Adding measurement 2e4eda17 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=-34.93214336782694;dx=-1.4311527101123934E-5
    New Minimum: -34.93214336782694 > -34.932151548564434
    WOLFE (weak): th(2.154434690031884)=-34.932151548564434; dx=-1.4311542139439282E-5 evalInputDelta=8.180737495422363E-6
    New Minimum: -34.932151548564434 > -34.932162798941135
    WOLFE (weak): th(4.308869380063768)=-34.932162798941135; dx=-1.43115422331903E-5 evalInputDelta=1.9431114196777344E-5
    New Minimum: -34.932162798941135 > -34.93219697475433
    WOLFE (weak): th(12.926608140191302)=-34.93219697475433; dx=-1.4311441771103827E-5 evalInputDelta=5.360692739486694E-5
    New Minimum: -34.93219697475433 > -34.932357773184776
    WOLFE (weak): th(51.70643256076521)=-34.932357773184776; dx=-1.4310990520177412E-5 evalInputDelta=2.14405357837677E-4
    New Minimum: -34.932357773184776 > -34.93321204185486
    WOLFE (weak): th(258.53216280382605)=-34.93321204185486; dx=-1.4310769909955805E-5 evalInputDelta=0.0010686740279197693
    New Minimum: -34.93321204185486 > -34.93854811042547
    WOLFE (weak): th(1551.1929768229563)=-34.93854811042547; dx=-1.430151101013731E-5 evalInputDelta=0.00640474259853363
    New Minimum: -34.93854811042547 > -34.976721584796906
    WOLFE (weak): th(10858.350837760694)=-34.976721584796906; dx=-1.4211714896926605E-5 evalInputDelta=0.04457821696996689
    New Minimum: -34.976721584796906 > -35.27168100327253
    WOLFE (weak): th(86866.80670208555)=-35.27168100327253; dx=-1.3472015473098306E-5 evalInputDelta=0.3395376354455948
    New Minimum: -35.27168100327253 > -36.600719805806875
    END: th(781801.26031877)=-36.600719805806875; dx=-7.426143622589994E-6 evalInputDelta=1.6685764379799366
    Fitness changed from -34.93214336782694 to -36.600719805806875
    Iteration 1 complete. Error: -36.600719805806875 Total: 83.2387; Orientation: 0.0126; Line Search: 63.9992
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iter

...skipping 15723 bytes...

    rch: 31.6287
    Adding measurement d28c214 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.677e+04, gradient 1.840e-03, dot -0.962; [8c2e3301-4060-4f4c-b72a-1477bdba412e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -38.794895105063915, -38.83194273523986, -38.85339672025293, -38.940645629540086
    LBFGS Accumulation History: 3 points
    Removed measurement 46b6701e to history. Total: 4
    th(0)=-38.940645629540086;dx=-3.3872012900810875E-6
    Armijo: th(1178206.4711111872)=-38.731001685373485; dx=-2.4207915785314318E-6 evalInputDelta=-0.2096439441666007
    New Minimum: -38.940645629540086 > -39.01097304560244
    END: th(589103.2355555936)=-39.01097304560244; dx=-2.8422140143391138E-6 evalInputDelta=0.07032741606235504
    Fitness changed from -38.940645629540086 to -39.01097304560244
    Iteration 19 complete. Error: -39.01097304560244 Total: 25.7611; Orientation: 0.3371; Line Search: 18.8971
    Adding measurement 76af34b5 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.371e+04, gradient 1.797e-03, dot -0.929; [8c2e3301-4060-4f4c-b72a-1477bdba412e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -38.83194273523986, -38.85339672025293, -38.940645629540086, -39.01097304560244
    LBFGS Accumulation History: 3 points
    Removed measurement 15c16f19 to history. Total: 4
    th(0)=-39.01097304560244;dx=-3.2303617027735327E-6
    Armijo: th(1269184.4466909952)=-38.772266715765; dx=-2.2690845643245063E-6 evalInputDelta=-0.23870632983744144
    New Minimum: -39.01097304560244 > -39.078089786693454
    END: th(634592.2233454976)=-39.078089786693454; dx=-2.684602248680177E-6 evalInputDelta=0.06711674109101295
    Fitness changed from -39.01097304560244 to -39.078089786693454
    Iteration 20 complete. Error: -39.078089786693454 Total: 25.6215; Orientation: 0.3378; Line Search: 19.1399
    <a id="p-17"></a>Iteration 20
    <a id="p-16"></a>![Iteration 20](etc/3f6245fe-955a-45cc-8e4c-a6cfb2baeb46.jpg)
    
    Final threshold in iteration 21: -39.078089786693454 (> -Infinity) after 585.096s (< 3600.000s)
    

Returns:

    -39.078089786693454