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

Code from BasicOptimizer.scala:75 executed in 39.96 seconds (1.202 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: 918488558000100
    Reset training subject: 918489222156700
    Adding measurement 6bd78ce5 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=2.7847576439380646;dx=-2.0887773671114344E-5
    New Minimum: 2.7847576439380646 > 2.7847252786159515
    WOLFE (weak): th(2.154434690031884)=2.7847252786159515; dx=-2.0887358631139822E-5 evalInputDelta=3.236532211303711E-5
    New Minimum: 2.7847252786159515 > 2.7846929132938385
    WOLFE (weak): th(4.308869380063768)=2.7846929132938385; dx=-2.0883562850628575E-5 evalInputDelta=6.473064422607422E-5
    New Minimum: 2.7846929132938385 > 2.78456349670887
    WOLFE (weak): th(12.926608140191302)=2.78456349670887; dx=-2.0886267947609514E-5 evalInputDelta=1.941472291946411E-4
    New Minimum: 2.78456349670887 > 2.783981740474701
    WOLFE (weak): th(51.70643256076521)=2.783981740474701; dx=-2.0870895675661086E-5 evalInputDelta=7.759034633636475E-4
    New Minimum: 2.783981740474701 > 2.7808860689401627
    WOLFE (weak): th(258.53216280382605)=2.7808860689401627; dx=-2.079746320135947E-5 evalInputDelta=0.0038715749979019165
    New Minimum: 2.7808860689401627 > 2.7617757618427277
    WOLFE (weak): th(1551.1929768229563)=2.7617757618427277; dx=-2.0359660256594254E-5 evalInputDelta=0.022981882095336914
    New Minimum: 2.7617757618427277 > 2.6372751146554947
    END: th(10858.350837760694)=2.6372751146554947; dx=-1.655496604233339E-5 evalInputDelta=0.14748252928256989
    Fitness changed from 2.7847576439380646 to 2.6372751146554947
    Iteration 1 complete. Error: 2.6372751146554947 Total: 7.0141; Orientation: 0.0035; Line Search: 4.8889
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/f2ed00dd-2f19-4b98-8501-c95e6c0f2c4f.jpg)
    
    Adding measurement 63599b59 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=2.6372751146554947;dx=-1.7978598728277456E-5
    New Minimum: 2.6372751146554947 > 2.389172062277794
    END: th(23393.607721408407)=2.389172062277794; dx=-1.106213685559496E-5 evalInputDelta=0.2481030523777008
    Fitness c

...skipping 9976 bytes...

    y. Total: 3
    Rejected: LBFGS Orientation magnitude: 6.599e+02, gradient 3.822e-04, dot -0.568; [066450ff-068a-4056-9aeb-b890252ffe96 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.5020098090171814, 0.3915894031524658, 0.3429393768310547, 0.3068220615386963
    LBFGS Accumulation History: 3 points
    Removed measurement 369decb4 to history. Total: 4
    th(0)=0.3068220615386963;dx=-1.4604443828044587E-7
    Armijo: th(2436834.13764671)=0.3847997784614563; dx=1.259018830520781E-7 evalInputDelta=-0.07797771692276001
    New Minimum: 0.3068220615386963 > 0.27595144510269165
    WOLF (strong): th(1218417.068823355)=0.27595144510269165; dx=5.7087410356674846E-8 evalInputDelta=0.03087061643600464
    New Minimum: 0.27595144510269165 > 0.2728835940361023
    END: th(406139.02294111834)=0.2728835940361023; dx=-6.869579644926123E-8 evalInputDelta=0.033938467502593994
    Fitness changed from 0.3068220615386963 to 0.2728835940361023
    Iteration 14 complete. Error: 0.2728835940361023 Total: 3.1552; Orientation: 0.1067; Line Search: 2.4504
    Adding measurement da6f9ed to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 6.789e+02, gradient 2.177e-04, dot -0.797; [066450ff-068a-4056-9aeb-b890252ffe96 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.3915894031524658, 0.3429393768310547, 0.3068220615386963, 0.2728835940361023
    LBFGS Accumulation History: 3 points
    Removed measurement 12fbf08c to history. Total: 4
    th(0)=0.2728835940361023;dx=-4.7379683811578676E-8
    New Minimum: 0.2728835940361023 > 0.25053584575653076
    END: th(875000.0000000005)=0.25053584575653076; dx=-2.3668566485021596E-8 evalInputDelta=0.022347748279571533
    Fitness changed from 0.2728835940361023 to 0.25053584575653076
    Iteration 15 complete. Error: 0.25053584575653076 Total: 1.9442; Orientation: 0.1057; Line Search: 1.2250
    <a id="p-15"></a>Iteration 15
    <a id="p-14"></a>![Iteration 15](etc/747a2bcd-90ae-454d-b6b6-4c81fe2e7faf.jpg)
    
    Final threshold in iteration 16: 0.25053584575653076 (> -Infinity) after 39.957s (< 1800.000s)
    

Returns:

    0.25053584575653076