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 181.97 seconds (2.800 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: 713935330161
    Reset training subject: 717927502743
    Adding measurement 753a5ddd to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=7.356363773345947;dx=-1.0352250226792713E-6
    New Minimum: 7.356363773345947 > 7.356359779834747
    WOLFE (weak): th(2.154434690031884)=7.356359779834747; dx=-1.0309816244470418E-6 evalInputDelta=3.993511199951172E-6
    New Minimum: 7.356359779834747 > 7.356357350945473
    WOLFE (weak): th(4.308869380063768)=7.356357350945473; dx=-1.0287183263033854E-6 evalInputDelta=6.42240047454834E-6
    New Minimum: 7.356357350945473 > 7.356345221400261
    WOLFE (weak): th(12.926608140191302)=7.356345221400261; dx=-1.029563726258341E-6 evalInputDelta=1.8551945686340332E-5
    New Minimum: 7.356345221400261 > 7.356290221214294
    WOLFE (weak): th(51.70643256076521)=7.356290221214294; dx=-1.030000700439127E-6 evalInputDelta=7.355213165283203E-5
    New Minimum: 7.356290221214294 > 7.355997771024704
    WOLFE (weak): th(258.53216280382605)=7.355997771024704; dx=-1.0306357226058104E-6 evalInputDelta=3.6600232124328613E-4
    New Minimum: 7.355997771024704 > 7.354172855615616
    WOLFE (weak): th(1551.1929768229563)=7.354172855615616; dx=-1.0258344433074786E-6 evalInputDelta=0.002190917730331421
    New Minimum: 7.354172855615616 > 7.341037556529045
    WOLFE (weak): th(10858.350837760694)=7.341037556529045; dx=-1.0333300405995183E-6 evalInputDelta=0.01532621681690216
    New Minimum: 7.341037556529045 > 7.233737424015999
    WOLFE (weak): th(86866.80670208555)=7.233737424015999; dx=-1.0029515082105735E-6 evalInputDelta=0.12262634932994843
    New Minimum: 7.233737424015999 > 6.416280835866928
    END: th(781801.26031877)=6.416280835866928; dx=-5.97110563236328E-7 evalInputDelta=0.9400829374790192
    Fitness changed from 7.356363773345947 to 6.416280835866928
    Iteration 1 complete. Error: 6.416280835866928 Total: 50.8240; Orientation: 0.0092; Line Search: 39.3122
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/d569bcbb-c6c0-46e5-9c7e-a1529c8dcc38.jpg)
    
    Adding measurement d8a0

...skipping 5551 bytes...

    tation: 0.3242; Line Search: 12.1013
    Adding measurement 57f7f9e4 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.242e+03, gradient 3.381e-04, dot -0.170; [751d5b8e-92da-4fdc-83fc-e617e176a8be = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.7785337567329407, 5.10111990571022, 6.416280835866928, 7.356363773345947
    LBFGS Accumulation History: 3 points
    Removed measurement 57f7f9e4 to history. Total: 3
    th(0)=-0.7785337567329407;dx=-1.1360869434988469E-7
    Armijo: th(3.0240000000000007E7)=0.6164676398038864; dx=1.9037235157981673E-8 evalInputDelta=-1.395001396536827
    New Minimum: -0.7785337567329407 > -0.9423912018537521
    END: th(1.5120000000000004E7)=-0.9423912018537521; dx=-4.793917622230166E-9 evalInputDelta=0.16385744512081146
    Fitness changed from -0.7785337567329407 to -0.9423912018537521
    Iteration 9 complete. Error: -0.9423912018537521 Total: 16.1505; Orientation: 0.2015; Line Search: 11.5110
    Adding measurement 4efad302 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 8.214e+02, gradient 2.806e-04, dot -0.203; [751d5b8e-92da-4fdc-83fc-e617e176a8be = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.9423912018537521, 5.10111990571022, 6.416280835866928, 7.356363773345947
    LBFGS Accumulation History: 3 points
    Removed measurement 4efad302 to history. Total: 3
    th(0)=-0.9423912018537521;dx=-7.762998209631498E-8
    Armijo: th(3.257505251328209E7)=0.5497818142175674; dx=1.6448738816567687E-8 evalInputDelta=-1.4921730160713196
    New Minimum: -0.9423912018537521 > -1.1430578604340553
    END: th(1.6287526256641045E7)=-1.1430578604340553; dx=-6.078762562220318E-9 evalInputDelta=0.2006666585803032
    Fitness changed from -0.9423912018537521 to -1.1430578604340553
    Iteration 10 complete. Error: -1.1430578604340553 Total: 16.3533; Orientation: 0.2095; Line Search: 12.4947
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/2399eab1-0bab-4253-88dc-d9ae9fa5b1c4.jpg)
    
    Final threshold in iteration 11: -1.1430578604340553 (> -Infinity) after 181.962s (< 1800.000s)
    

Returns:

    -1.1430578604340553