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:88 executed in 157.29 seconds (3.900 gc):

    val lineSearchInstance: LineSearchStrategy = lineSearchFactory
    val trainer = new IterativeTrainer(trainable)
    trainer.setOrientation(orientation())
    trainer.setMonitor(new TrainingMonitor() {
      override def clear(): Unit = trainingMonitor.clear()
  
      override def log(msg: String): Unit = {
        trainingMonitor.log(msg)
        BasicOptimizer.this.log(msg)
      }
  
      override def onStepFail(currentPoint: Step): Boolean = {
        BasicOptimizer.this.onStepFail(trainable.addRef().asInstanceOf[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.addRef().asInstanceOf[Trainable], currentPoint)
        trainingMonitor.onStepComplete(currentPoint)
        super.onStepComplete(currentPoint)
      }
    })
    trainer.setTimeout(trainingMinutes, TimeUnit.MINUTES)
    trainer.setMaxIterations(trainingIterations)
    trainer.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
    trainer.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
    val result = trainer.run.asInstanceOf[lang.Double]
    trainer.freeRef()
    result

Logging:

    Reset training subject: 1665468149463
    Reset training subject: 1666632811240
    Adding measurement 4cb69c8f to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.7480009347200394;dx=-5.289808238221667E-7
    New Minimum: 1.7480009347200394 > 1.7479994893074036
    WOLFE (weak): th(2.154434690031884)=1.7479994893074036; dx=-5.287548773816758E-7 evalInputDelta=1.4454126358032227E-6
    New Minimum: 1.7479994893074036 > 1.747998133301735
    WOLFE (weak): th(4.308869380063768)=1.747998133301735; dx=-5.290318725903664E-7 evalInputDelta=2.8014183044433594E-6
    New Minimum: 1.747998133301735 > 1.7479922324419022
    WOLFE (weak): th(12.926608140191302)=1.7479922324419022; dx=-5.290922777239184E-7 evalInputDelta=8.702278137207031E-6
    New Minimum: 1.7479922324419022 > 1.7479663342237473
    WOLFE (weak): th(51.70643256076521)=1.7479663342237473; dx=-5.29204114791685E-7 evalInputDelta=3.460049629211426E-5
    New Minimum: 1.7479663342237473 > 1.7478277385234833
    WOLFE (weak): th(258.53216280382605)=1.7478277385234833; dx=-5.288912842398953E-7 evalInputDelta=1.731961965560913E-4
    New Minimum: 1.7478277385234833 > 1.7469611763954163
    WOLFE (weak): th(1551.1929768229563)=1.7469611763954163; dx=-5.288977536550454E-7 evalInputDelta=0.001039758324623108
    New Minimum: 1.7469611763954163 > 1.7407285273075104
    WOLFE (weak): th(10858.350837760694)=1.7407285273075104; dx=-5.277571077520005E-7 evalInputDelta=0.007272407412528992
    New Minimum: 1.7407285273075104 > 1.6902421414852142
    WOLFE (weak): th(86866.80670208555)=1.6902421414852142; dx=-5.2037935058603E-7 evalInputDelta=0.057758793234825134
    New Minimum: 1.6902421414852142 > 1.2649416327476501
    END: th(781801.26031877)=1.2649416327476501; dx=-4.4361663790513176E-7 evalInputDelta=0.4830593019723892
    Fitness changed from 1.7480009347200394 to 1.2649416327476501
    Iteration 1 complete. Error: 1.2649416327476501 Total: 16.0973; Orientation: 0.0063; Line Search: 12.6800
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/77ce2482-84df-454d-b588-d2b8740b0850.jpg)

...skipping 24799 bytes...

    .1348; Line Search: 3.6390
    Adding measurement 4dbb4d9a to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.953e+03, gradient 7.012e-05, dot -0.517; [98d7a967-f2dc-4729-9f3f-110504b6faab = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.43898057192564, 0.5531059205532074, 1.2649416327476501, 1.7480009347200394
    LBFGS Accumulation History: 3 points
    Removed measurement 4dbb4d9a to history. Total: 3
    th(0)=-1.43898057192564;dx=-4.910453132110608E-9
    New Minimum: -1.43898057192564 > -1.4474352672696114
    WOLF (strong): th(2937926.9599328605)=-1.4474352672696114; dx=4.160340834429149E-12 evalInputDelta=0.008454695343971252
    END: th(1468963.4799664302)=-1.445575013756752; dx=-2.5987125572794884E-9 evalInputDelta=0.006594441831111908
    Fitness changed from -1.43898057192564 to -1.4474352672696114
    Iteration 29 complete. Error: -1.4474352672696114 Total: 4.5737; Orientation: 0.1375; Line Search: 3.4116
    Adding measurement 48207751 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.001e+03, gradient 7.093e-05, dot -0.512; [98d7a967-f2dc-4729-9f3f-110504b6faab = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.4474352672696114, 0.5531059205532074, 1.2649416327476501, 1.7480009347200394
    LBFGS Accumulation History: 3 points
    Removed measurement 48207751 to history. Total: 3
    th(0)=-1.4474352672696114;dx=-5.020408838660676E-9
    New Minimum: -1.4474352672696114 > -1.4544762298464775
    WOLF (strong): th(3164785.8796296334)=-1.4544762298464775; dx=7.852671995314978E-10 evalInputDelta=0.00704096257686615
    END: th(1582392.9398148167)=-1.4540032967925072; dx=-1.734986057511831E-9 evalInputDelta=0.006568029522895813
    Fitness changed from -1.4474352672696114 to -1.4544762298464775
    Iteration 30 complete. Error: -1.4544762298464775 Total: 5.3122; Orientation: 0.1343; Line Search: 4.0502
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/479f9071-0d5e-4bbd-ab1c-721ca6ed233b.jpg)
    
    Final threshold in iteration 31: -1.4544762298464775 (> -Infinity) after 157.286s (< 3600.000s)
    

Returns:

    -1.4544762298464775