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

Iteration 30 Iteration 30

Code from BasicOptimizer.scala:88 executed in 382.45 seconds (4.441 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: 4959671727488
    Reset training subject: 4962522159321
    Adding measurement 21fd8a4f to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.5939412862062454;dx=-1.4171161004622852E-7
    New Minimum: 1.5939412862062454 > 1.593940943479538
    WOLFE (weak): th(2.154434690031884)=1.593940943479538; dx=-1.4101427110175274E-7 evalInputDelta=3.427267074584961E-7
    New Minimum: 1.593940943479538 > 1.593940332531929
    WOLFE (weak): th(4.308869380063768)=1.593940332531929; dx=-1.41010927065083E-7 evalInputDelta=9.5367431640625E-7
    New Minimum: 1.593940332531929 > 1.5939381420612335
    WOLFE (weak): th(12.926608140191302)=1.5939381420612335; dx=-1.4100739306313075E-7 evalInputDelta=3.1441450119018555E-6
    New Minimum: 1.5939381420612335 > 1.593928575515747
    WOLFE (weak): th(51.70643256076521)=1.593928575515747; dx=-1.4100961150563694E-7 evalInputDelta=1.271069049835205E-5
    New Minimum: 1.593928575515747 > 1.5938775092363358
    WOLFE (weak): th(258.53216280382605)=1.5938775092363358; dx=-1.410021974310928E-7 evalInputDelta=6.377696990966797E-5
    New Minimum: 1.5938775092363358 > 1.5935582369565964
    WOLFE (weak): th(1551.1929768229563)=1.5935582369565964; dx=-1.4099276801674743E-7 evalInputDelta=3.8304924964904785E-4
    New Minimum: 1.5935582369565964 > 1.5912608057260513
    WOLFE (weak): th(10858.350837760694)=1.5912608057260513; dx=-1.409060688961053E-7 evalInputDelta=0.002680480480194092
    New Minimum: 1.5912608057260513 > 1.5725505352020264
    WOLFE (weak): th(86866.80670208555)=1.5725505352020264; dx=-1.401414764440167E-7 evalInputDelta=0.021390751004219055
    New Minimum: 1.5725505352020264 > 1.4076730608940125
    WOLFE (weak): th(781801.26031877)=1.4076730608940125; dx=-1.3063304809600326E-7 evalInputDelta=0.18626822531223297
    New Minimum: 1.4076730608940125 > 0.38790273666381836
    END: th(7818012.6031877)=0.38790273666381836; dx=-5.8636529845744904E-8 evalInputDelta=1.206038549542427
    Fitness changed from 1.5939412862062454 to 0.38790273666381836
    Iteration 1 complete. Error: 0.3879027366

...skipping 25314 bytes...

    5; Line Search: 8.2782
    Adding measurement 7b06c066 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.644e+03, gradient 2.685e-05, dot -0.590; [84f45018-dac4-4622-abdd-9708113de85c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.7357178032398224, -0.4769158512353897, 0.38790273666381836, 1.5939412862062454
    LBFGS Accumulation History: 3 points
    Removed measurement 7b06c066 to history. Total: 3
    th(0)=-1.7357178032398224;dx=-7.190624530368369E-10
    New Minimum: -1.7357178032398224 > -1.7382187098264694
    END: th(1.3057453155257156E7)=-1.7382187098264694; dx=-3.872321303482107E-11 evalInputDelta=0.0025009065866470337
    Fitness changed from -1.7357178032398224 to -1.7382187098264694
    Iteration 29 complete. Error: -1.7382187098264694 Total: 8.5885; Orientation: 0.3288; Line Search: 5.5193
    Adding measurement 7c555b2c to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.608e+03, gradient 3.626e-05, dot -0.459; [84f45018-dac4-4622-abdd-9708113de85c = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.7382187098264694, -0.4769158512353897, 0.38790273666381836, 1.5939412862062454
    LBFGS Accumulation History: 3 points
    Removed measurement 7c555b2c to history. Total: 3
    th(0)=-1.7382187098264694;dx=-1.3124110066519449E-9
    Armijo: th(2.8131430041152295E7)=-1.7135361433029175; dx=6.10486997325296E-10 evalInputDelta=-0.02468256652355194
    Armijo: th(1.4065715020576147E7)=-1.7370882257819176; dx=6.955235173718154E-10 evalInputDelta=-0.0011304840445518494
    New Minimum: -1.7382187098264694 > -1.745042197406292
    END: th(4688571.673525383)=-1.745042197406292; dx=-4.9870884595142E-10 evalInputDelta=0.00682348757982254
    Fitness changed from -1.7382187098264694 to -1.745042197406292
    Iteration 30 complete. Error: -1.745042197406292 Total: 14.5262; Orientation: 0.3262; Line Search: 11.2999
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/37020f33-7d05-40db-8b93-d41991ab8bbb.jpg)
    
    Final threshold in iteration 31: -1.745042197406292 (> -Infinity) after 382.451s (< 3600.000s)
    

Returns:

    -1.745042197406292