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 244.61 seconds (4.779 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: 2758144153848
    Reset training subject: 2761365681948
    Adding measurement 7217c6ec to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=12.049857523292303;dx=-1.9164469320802983E-6
    New Minimum: 12.049857523292303 > 12.049854848533869
    WOLFE (weak): th(2.154434690031884)=12.049854848533869; dx=-1.9164467846037476E-6 evalInputDelta=2.6747584342956543E-6
    New Minimum: 12.049854848533869 > 12.049851346760988
    WOLFE (weak): th(4.308869380063768)=12.049851346760988; dx=-1.9164494455740652E-6 evalInputDelta=6.1765313148498535E-6
    New Minimum: 12.049851346760988 > 12.049838673323393
    WOLFE (weak): th(12.926608140191302)=12.049838673323393; dx=-1.9164437431492006E-6 evalInputDelta=1.8849968910217285E-5
    New Minimum: 12.049838673323393 > 12.049780800938606
    WOLFE (weak): th(51.70643256076521)=12.049780800938606; dx=-1.9163245203965327E-6 evalInputDelta=7.672235369682312E-5
    New Minimum: 12.049780800938606 > 12.049474492669106
    WOLFE (weak): th(258.53216280382605)=12.049474492669106; dx=-1.91622450676055E-6 evalInputDelta=3.8303062319755554E-4
    New Minimum: 12.049474492669106 > 12.04755786433816
    WOLFE (weak): th(1551.1929768229563)=12.04755786433816; dx=-1.9157215582180388E-6 evalInputDelta=0.002299658954143524
    New Minimum: 12.04755786433816 > 12.033773850649595
    WOLFE (weak): th(10858.350837760694)=12.033773850649595; dx=-1.9077209494409726E-6 evalInputDelta=0.016083672642707825
    New Minimum: 12.033773850649595 > 11.922534868121147
    WOLFE (weak): th(86866.80670208555)=11.922534868121147; dx=-1.8434586298711602E-6 evalInputDelta=0.12732265517115593
    New Minimum: 11.922534868121147 > 11.101086359471083
    END: th(781801.26031877)=11.101086359471083; dx=-1.1907706586756822E-6 evalInputDelta=0.9487711638212204
    Fitness changed from 12.049857523292303 to 11.101086359471083
    Iteration 1 complete. Error: 11.101086359471083 Total: 44.6775; Orientation: 0.0122; Line Search: 34.7249
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/9a38eddb-dd6d-4148-b644-9024ff

...skipping 8318 bytes...

    47656E-7
    Armijo: th(37820.42772266909)=4.535036504268646; dx=-1.0157546997159067E-7 evalInputDelta=-1.043081283569336E-7
    Armijo: th(36936.772869335706)=4.53503642976284; dx=-1.0158357741116686E-7 evalInputDelta=-2.9802322387695312E-8
    WOLFE (weak): th(36494.945442669006)=4.535036072134972; dx=-1.0158798665128534E-7 evalInputDelta=3.2782554626464844E-7
    Armijo: th(36715.859156002356)=4.535036414861679; dx=-1.0158469641930353E-7 evalInputDelta=-1.4901161193847656E-8
    WOLFE (weak): th(36605.40229933568)=4.535036072134972; dx=-1.0158571062967474E-7 evalInputDelta=3.2782554626464844E-7
    WOLFE (weak): th(36660.63072766902)=4.535036280751228; dx=-1.015844621237875E-7 evalInputDelta=1.1920928955078125E-7
    Armijo: th(36688.244941835685)=4.535036399960518; dx=-1.0158389488386231E-7 evalInputDelta=0.0
    Armijo: th(36674.43783475235)=4.5350364446640015; dx=-1.0158485874033986E-7 evalInputDelta=-4.470348358154297E-8
    Armijo: th(36667.53428121068)=4.53503642976284; dx=-1.015858368314885E-7 evalInputDelta=-2.9802322387695312E-8
    WOLFE (weak): th(36664.08250443985)=4.535036280751228; dx=-1.0158550151634325E-7 evalInputDelta=1.1920928955078125E-7
    WOLFE (weak): th(36665.80839282527)=4.5350362956523895; dx=-1.01585502232506E-7 evalInputDelta=1.043081283569336E-7
    WOLFE (weak): th(36666.67133701798)=4.5350363701581955; dx=-1.0158550247359106E-7 evalInputDelta=2.9802322387695312E-8
    WOLFE (weak): th(36667.10280911433)=4.535036146640778; dx=-1.0158583614331176E-7 evalInputDelta=2.5331974029541016E-7
    WOLFE (weak): th(36667.3185451625)=4.535036191344261; dx=-1.0158583566031646E-7 evalInputDelta=2.086162567138672E-7
    mu ~= nu (36667.3185451625): th(25449.259776001632)=4.535035341978073
    Fitness changed from 4.535036399960518 to 4.535035341978073
    Iteration 10 complete. Error: 4.535035341978073 Total: 93.3846; Orientation: 0.3062; Line Search: 89.4664
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/aa1ee90b-37cd-4e00-9f22-1ae152617339.jpg)
    
    Final threshold in iteration 11: 4.535035341978073 (> -Infinity) after 244.610s (< 3600.000s)
    

Returns:

    4.535035341978073