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

Code from BasicOptimizer.scala:75 executed in 114.81 seconds (2.176 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: 900179168390700
    Reset training subject: 900180230504700
    Adding measurement 6e7fa4b0 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.7575818300247192;dx=-2.6781578457613224E-6
    New Minimum: 1.7575818300247192 > 1.7575769126415253
    WOLFE (weak): th(2.154434690031884)=1.7575769126415253; dx=-2.6781538188792253E-6 evalInputDelta=4.9173831939697266E-6
    New Minimum: 1.7575769126415253 > 1.7575718760490417
    WOLFE (weak): th(4.308869380063768)=1.7575718760490417; dx=-2.678136499251338E-6 evalInputDelta=9.953975677490234E-6
    New Minimum: 1.7575718760490417 > 1.757552370429039
    WOLFE (weak): th(12.926608140191302)=1.757552370429039; dx=-2.678167702080272E-6 evalInputDelta=2.9459595680236816E-5
    New Minimum: 1.757552370429039 > 1.7574641406536102
    WOLFE (weak): th(51.70643256076521)=1.7574641406536102; dx=-2.6778590777938595E-6 evalInputDelta=1.1768937110900879E-4
    New Minimum: 1.7574641406536102 > 1.7569937855005264
    WOLFE (weak): th(258.53216280382605)=1.7569937855005264; dx=-2.6775961132096192E-6 evalInputDelta=5.880445241928101E-4
    New Minimum: 1.7569937855005264 > 1.7540583610534668
    WOLFE (weak): th(1551.1929768229563)=1.7540583610534668; dx=-2.672405307042418E-6 evalInputDelta=0.0035234689712524414
    New Minimum: 1.7540583610534668 > 1.7331746220588684
    WOLFE (weak): th(10858.350837760694)=1.7331746220588684; dx=-2.6152242013809E-6 evalInputDelta=0.02440720796585083
    New Minimum: 1.7331746220588684 > 1.5802618861198425
    END: th(86866.80670208555)=1.5802618861198425; dx=-2.203154149938542E-6 evalInputDelta=0.1773199439048767
    Fitness changed from 1.7575818300247192 to 1.5802618861198425
    Iteration 1 complete. Error: 1.5802618861198425 Total: 12.7741; Orientation: 0.0142; Line Search: 9.2126
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/1317ec21-75af-4f9b-a2f6-3b3852afe86a.jpg)
    
    Adding measurement 2d34866a to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=1.5802618861198425;dx=-1.92863813370702

...skipping 19607 bytes...

    ]
    Orientation rejected. Popping history element from -0.37568049132823944, -0.3787802755832672, -0.3898102194070816, -0.3968704491853714
    LBFGS Accumulation History: 3 points
    Removed measurement 5aa334c to history. Total: 4
    th(0)=-0.3968704491853714;dx=-1.5255530548957273E-9
    Armijo: th(3.240740740740744E7)=-0.3903873860836029; dx=7.149002150351372E-10 evalInputDelta=-0.006483063101768494
    New Minimum: -0.3968704491853714 > -0.4031069427728653
    END: th(1.620370370370372E7)=-0.4031069427728653; dx=-1.0445361965809054E-10 evalInputDelta=0.0062364935874938965
    Fitness changed from -0.3968704491853714 to -0.4031069427728653
    Iteration 24 complete. Error: -0.4031069427728653 Total: 4.5222; Orientation: 0.4282; Line Search: 3.0997
    Adding measurement 39a2e77d to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 9.222e+02, gradient 3.768e-05, dot -0.663; [9ecc8c57-f621-4cec-ac08-f9607e6c1411 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.3787802755832672, -0.3898102194070816, -0.3968704491853714, -0.4031069427728653
    LBFGS Accumulation History: 3 points
    Removed measurement 4407fea2 to history. Total: 4
    th(0)=-0.4031069427728653;dx=-1.4194703820266559E-9
    Armijo: th(3.4909821366257414E7)=-0.3904498517513275; dx=8.795380301755886E-10 evalInputDelta=-0.01265709102153778
    New Minimum: -0.4031069427728653 > -0.4072161763906479
    WOLF (strong): th(1.7454910683128707E7)=-0.4072161763906479; dx=1.0632946913849523E-10 evalInputDelta=0.004109233617782593
    New Minimum: -0.4072161763906479 > -0.4075652211904526
    END: th(5818303.561042902)=-0.4075652211904526; dx=-8.039301422437557E-10 evalInputDelta=0.00445827841758728
    Fitness changed from -0.4031069427728653 to -0.4075652211904526
    Iteration 25 complete. Error: -0.4075652211904526 Total: 5.8945; Orientation: 0.4232; Line Search: 4.5027
    <a id="p-19"></a>Iteration 25
    <a id="p-18"></a>![Iteration 25](etc/a8464672-1038-4d3f-a558-15902ba3b831.jpg)
    
    Final threshold in iteration 26: -0.4075652211904526 (> -Infinity) after 114.806s (< 3600.000s)
    

Returns:

    -0.4075652211904526