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

Iteration 35 Iteration 35

Iteration 40 Iteration 40

Iteration 45 Iteration 45

Iteration 50 Iteration 50

Code from BasicOptimizer.scala:75 executed in 579.62 seconds (8.848 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: 4829478308668
    Reset training subject: 4831713717288
    Adding measurement 6a1bdf4d to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.0199725720491268;dx=-2.405943922591153E-8
    New Minimum: 1.0199725720491268 > 1.019972529104689
    WOLFE (weak): th(2.154434690031884)=1.019972529104689; dx=-2.405938234045604E-8 evalInputDelta=4.2944437783631884E-8
    New Minimum: 1.019972529104689 > 1.0199724861603638
    WOLFE (weak): th(4.308869380063768)=1.0199724861603638; dx=-2.405931735211135E-8 evalInputDelta=8.588876299064907E-8
    New Minimum: 1.0199724861603638 > 1.019972314383724
    WOLFE (weak): th(12.926608140191302)=1.019972314383724; dx=-2.4058989951761064E-8 evalInputDelta=2.5766540279192895E-7
    New Minimum: 1.019972314383724 > 1.0199715413969377
    WOLFE (weak): th(51.70643256076521)=1.0199715413969377; dx=-2.405829105434668E-8 evalInputDelta=1.030652189148995E-6
    New Minimum: 1.0199715413969377 > 1.0199674184476
    WOLFE (weak): th(258.53216280382605)=1.0199674184476; dx=-2.4056533295329613E-8 evalInputDelta=5.153601526863838E-6
    New Minimum: 1.0199674184476 > 1.0199416616479748
    WOLFE (weak): th(1551.1929768229563)=1.0199416616479748; dx=-2.4034262597953346E-8 evalInputDelta=3.0910401151995615E-5
    New Minimum: 1.0199416616479748 > 1.0197562397237456
    WOLFE (weak): th(10858.350837760694)=1.0197562397237456; dx=-2.4005816078143558E-8 evalInputDelta=2.1633232538120772E-4
    New Minimum: 1.0197562397237456 > 1.0182551826488488
    WOLFE (weak): th(86866.80670208555)=1.0182551826488488; dx=-2.334574898781431E-8 evalInputDelta=0.001717389400277991
    New Minimum: 1.0182551826488488 > 1.0091952516977107
    END: th(781801.26031877)=1.0091952516977107; dx=-7.879471374542392E-9 evalInputDelta=0.010777320351416098
    Fitness changed from 1.0199725720491268 to 1.0091952516977107
    Iteration 1 complete. Error: 1.0091952516977107 Total: 32.0903; Orientation: 0.0767; Line Search: 24.4214
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/f66eb390-cab6-4dd7-b6a5-2086e9630bda.jpg)
    

...skipping 43054 bytes...

    6e4135c to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.346e+02, gradient 1.398e-04, dot -0.643; [cf60c6ac-988e-4d36-af22-324c46120ad7 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.4675690728268287, 0.4644987431827772, 0.46171802145469315, 0.4588677105547423
    LBFGS Accumulation History: 3 points
    Removed measurement 212f0abb to history. Total: 4
    th(0)=0.4588677105547423;dx=-1.9542305271936297E-8
    Armijo: th(2029727.1774016076)=0.465081311040753; dx=7.075240358970302E-9 evalInputDelta=-0.0062136004860107175
    New Minimum: 0.4588677105547423 > 0.4562755132723806
    WOLF (strong): th(1014863.5887008038)=0.4562755132723806; dx=1.8108157761557139E-9 evalInputDelta=0.002592197282361708
    New Minimum: 0.4562755132723806 > 0.4556697030504607
    END: th(338287.86290026794)=0.4556697030504607; dx=-1.0836188162463641E-8 evalInputDelta=0.003198007504281619
    Fitness changed from 0.4588677105547423 to 0.4556697030504607
    Iteration 49 complete. Error: 0.4556697030504607 Total: 16.0246; Orientation: 1.6242; Line Search: 12.1096
    Adding measurement 17c977aa to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.654e+02, gradient 1.001e-04, dot -0.915; [cf60c6ac-988e-4d36-af22-324c46120ad7 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.4644987431827772, 0.46171802145469315, 0.4588677105547423, 0.4556697030504607
    LBFGS Accumulation History: 3 points
    Removed measurement 5624db84 to history. Total: 4
    th(0)=0.4556697030504607;dx=-1.0019336873032572E-8
    New Minimum: 0.4556697030504607 > 0.45291745633638586
    END: th(728819.1070490872)=0.45291745633638586; dx=-7.543408440051757E-9 evalInputDelta=0.002752246714074813
    Fitness changed from 0.4556697030504607 to 0.45291745633638586
    Iteration 50 complete. Error: 0.45291745633638586 Total: 8.8242; Orientation: 1.6232; Line Search: 4.9017
    <a id="p-29"></a>Iteration 50
    <a id="p-28"></a>![Iteration 50](etc/2ab4a907-73be-4052-9c24-d976f8e81fac.jpg)
    
    Final threshold in iteration 51: 0.45291745633638586 (> -Infinity) after 579.617s (< 3600.000s)
    

Returns:

    0.45291745633638586