Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Code from BasicOptimizer.scala:88 executed in 128.76 seconds (2.237 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: 2963855375772
    Reset training subject: 2966127631067
    Adding measurement 52e08527 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.4278956353664398;dx=-1.587674872482945E-7
    New Minimum: 1.4278956353664398 > 1.427895188331604
    WOLFE (weak): th(2.154434690031884)=1.427895188331604; dx=-1.5864804824102288E-7 evalInputDelta=4.470348358154297E-7
    New Minimum: 1.427895188331604 > 1.4278948307037354
    WOLFE (weak): th(4.308869380063768)=1.4278948307037354; dx=-1.5869068283192435E-7 evalInputDelta=8.046627044677734E-7
    New Minimum: 1.4278948307037354 > 1.4278929978609085
    WOLFE (weak): th(12.926608140191302)=1.4278929978609085; dx=-1.5762631702362922E-7 evalInputDelta=2.637505531311035E-6
    New Minimum: 1.4278929978609085 > 1.4278854131698608
    WOLFE (weak): th(51.70643256076521)=1.4278854131698608; dx=-1.5864912195447915E-7 evalInputDelta=1.0222196578979492E-5
    New Minimum: 1.4278854131698608 > 1.427844598889351
    WOLFE (weak): th(258.53216280382605)=1.427844598889351; dx=-1.586795627126392E-7 evalInputDelta=5.103647708892822E-5
    New Minimum: 1.427844598889351 > 1.4275882691144943
    WOLFE (weak): th(1551.1929768229563)=1.4275882691144943; dx=-1.5820686956506273E-7 evalInputDelta=3.073662519454956E-4
    New Minimum: 1.4275882691144943 > 1.4257460236549377
    WOLFE (weak): th(10858.350837760694)=1.4257460236549377; dx=-1.5831269912822664E-7 evalInputDelta=0.002149611711502075
    New Minimum: 1.4257460236549377 > 1.4107871800661087
    WOLFE (weak): th(86866.80670208555)=1.4107871800661087; dx=-1.5687818292917543E-7 evalInputDelta=0.017108455300331116
    New Minimum: 1.4107871800661087 > 1.2809609919786453
    WOLFE (weak): th(781801.26031877)=1.2809609919786453; dx=-1.4324579039964533E-7 evalInputDelta=0.1469346433877945
    New Minimum: 1.2809609919786453 > 0.5975500643253326
    END: th(7818012.6031877)=0.5975500643253326; dx=-3.732960165297841E-8 evalInputDelta=0.8303455710411072
    Fitness changed from 1.4278956353664398 to 0.5975500643253326
    Iteration 1 complete. Error: 0.5975500

...skipping 6615 bytes...

    jected. Popping history element from -1.2029701322317123, 0.1487625688314438, 0.5975500643253326, 1.4278956353664398
    LBFGS Accumulation History: 3 points
    Removed measurement 1373a2d6 to history. Total: 3
    th(0)=-1.2029701322317123;dx=-2.0352080383767476E-8
    New Minimum: -1.2029701322317123 > -1.2430170178413391
    WOLF (strong): th(2.5200000000000007E7)=-1.2430170178413391; dx=2.4898182121695153E-9 evalInputDelta=0.04004688560962677
    New Minimum: -1.2430170178413391 > -1.3084924519062042
    END: th(1.2600000000000004E7)=-1.3084924519062042; dx=-4.767297403809722E-10 evalInputDelta=0.10552231967449188
    Fitness changed from -1.2029701322317123 to -1.3084924519062042
    Iteration 9 complete. Error: -1.3084924519062042 Total: 10.4917; Orientation: 0.3109; Line Search: 7.7184
    Adding measurement 5dec8a3f to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.041e+04, gradient 1.607e-04, dot -0.560; [425480ee-52e9-4dab-b19f-1c1eaa211fe9 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.3084924519062042, 0.1487625688314438, 0.5975500643253326, 1.4278956353664398
    LBFGS Accumulation History: 3 points
    Removed measurement 5dec8a3f to history. Total: 3
    th(0)=-1.3084924519062042;dx=-2.57726039042338E-8
    Armijo: th(2.7145877094401743E7)=-1.179293915629387; dx=8.79976605120312E-9 evalInputDelta=-0.12919853627681732
    New Minimum: -1.3084924519062042 > -1.3903816193342209
    WOLF (strong): th(1.3572938547200872E7)=-1.3903816193342209; dx=5.716906482279701E-9 evalInputDelta=0.08188916742801666
    New Minimum: -1.3903816193342209 > -1.408465065062046
    END: th(4524312.849066957)=-1.408465065062046; dx=-1.1973391230764041E-8 evalInputDelta=0.09997261315584183
    Fitness changed from -1.3084924519062042 to -1.408465065062046
    Iteration 10 complete. Error: -1.408465065062046 Total: 12.2007; Orientation: 0.2181; Line Search: 9.5416
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/28ccc9f2-f265-4b87-8062-cb5189302f58.jpg)
    
    Final threshold in iteration 11: -1.408465065062046 (> -Infinity) after 128.761s (< 3600.000s)
    

Returns:

    -1.408465065062046