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 699.58 seconds (6.574 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: 20458529236967
    Reset training subject: 20473022991829
    Adding measurement 278bc261 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.5781612992286682;dx=-7.848671690178581E-8
    New Minimum: 1.5781612992286682 > 1.5781610012054443
    WOLFE (weak): th(2.154434690031884)=1.5781610012054443; dx=-7.848672230224375E-8 evalInputDelta=2.980232238769531E-7
    New Minimum: 1.5781610012054443 > 1.578160785138607
    WOLFE (weak): th(4.308869380063768)=1.578160785138607; dx=-7.848657412847375E-8 evalInputDelta=5.140900611877441E-7
    New Minimum: 1.578160785138607 > 1.5781600698828697
    WOLFE (weak): th(12.926608140191302)=1.5781600698828697; dx=-7.848656829604123E-8 evalInputDelta=1.2293457984924316E-6
    New Minimum: 1.5781600698828697 > 1.578156515955925
    WOLFE (weak): th(51.70643256076521)=1.578156515955925; dx=-7.848605106896246E-8 evalInputDelta=4.783272743225098E-6
    New Minimum: 1.578156515955925 > 1.5781369432806969
    WOLFE (weak): th(258.53216280382605)=1.5781369432806969; dx=-7.84843045884194E-8 evalInputDelta=2.4355947971343994E-5
    New Minimum: 1.5781369432806969 > 1.5780155956745148
    WOLFE (weak): th(1551.1929768229563)=1.5780155956745148; dx=-7.847384645935375E-8 evalInputDelta=1.4570355415344238E-4
    New Minimum: 1.5780155956745148 > 1.5771416425704956
    WOLFE (weak): th(10858.350837760694)=1.5771416425704956; dx=-7.839760752628342E-8 evalInputDelta=0.0010196566581726074
    New Minimum: 1.5771416425704956 > 1.5700377151370049
    WOLFE (weak): th(86866.80670208555)=1.5700377151370049; dx=-7.777443056619314E-8 evalInputDelta=0.00812358409166336
    New Minimum: 1.5700377151370049 > 1.5078164115548134
    WOLFE (weak): th(781801.26031877)=1.5078164115548134; dx=-7.200678799426494E-8 evalInputDelta=0.07034488767385483
    New Minimum: 1.5078164115548134 > 1.1486674696207047
    END: th(7818012.6031877)=1.1486674696207047; dx=-2.1942701919988835E-8 evalInputDelta=0.42949382960796356
    Fitness changed from 1.5781612992286682 to 1.1486674696207047
    Iteration 1 complete. Error: 1.148667469

...skipping 6138 bytes...

    : 27.9783
    Adding measurement 5ccf57b6 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.613e+04, gradient 1.561e-04, dot -0.494; [d2f16ae4-8a1c-4135-850a-2fa7d2bff19b = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.060507386922836304, 0.7931492179632187, 1.1486674696207047, 1.5781612992286682
    LBFGS Accumulation History: 3 points
    Removed measurement 5ccf57b6 to history. Total: 3
    th(0)=-0.060507386922836304;dx=-2.4360490161507413E-8
    Armijo: th(5.0400000000000015E7)=1.1007630228996277; dx=3.115426244081761E-8 evalInputDelta=-1.161270409822464
    Armijo: th(2.5200000000000007E7)=0.13819430768489838; dx=2.3683050777209736E-8 evalInputDelta=-0.19870169460773468
    New Minimum: -0.060507386922836304 > -0.18275386095046997
    END: th(8400000.000000002)=-0.18275386095046997; dx=-1.5785030412585284E-9 evalInputDelta=0.12224647402763367
    Fitness changed from -0.060507386922836304 to -0.18275386095046997
    Iteration 9 complete. Error: -0.18275386095046997 Total: 73.5533; Orientation: 1.5592; Line Search: 57.4552
    Adding measurement 6fe12800 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.115e+04, gradient 1.064e-04, dot -0.590; [d2f16ae4-8a1c-4135-850a-2fa7d2bff19b = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.18275386095046997, 0.7931492179632187, 1.1486674696207047, 1.5781612992286682
    LBFGS Accumulation History: 3 points
    Removed measurement 6fe12800 to history. Total: 3
    th(0)=-0.18275386095046997;dx=-1.1317357797301004E-8
    New Minimum: -0.18275386095046997 > -0.2533081918954849
    END: th(1.8097251396267828E7)=-0.2533081918954849; dx=-3.0507850317043134E-9 evalInputDelta=0.07055433094501495
    Fitness changed from -0.18275386095046997 to -0.2533081918954849
    Iteration 10 complete. Error: -0.2533081918954849 Total: 44.0652; Orientation: 1.5625; Line Search: 27.6939
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/60924e25-4bfe-4600-b698-ee376cee0ca6.jpg)
    
    Final threshold in iteration 11: -0.2533081918954849 (> -Infinity) after 699.574s (< 3600.000s)
    

Returns:

    -0.2533081918954849