Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Code from BasicOptimizer.scala:75 executed in 72.46 seconds (0.996 gc):

    val lineSearchInstance: LineSearchStrategy = lineSearchFactory
    IterativeTrainer.wrap(trainable)
      .setOrientation(orientation())
      .setMonitor(new TrainingMonitor() {
        override def clear(): Unit = trainingMonitor.clear()
  
        override def log(msg: String): Unit = trainingMonitor.log(msg)
  
        override def onStepFail(currentPoint: Step): Boolean = {
          BasicOptimizer.this.onStepFail(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, currentPoint)
          trainingMonitor.onStepComplete(currentPoint)
          super.onStepComplete(currentPoint)
        }
      })
      .setTimeout(trainingMinutes, TimeUnit.MINUTES)
      .setMaxIterations(trainingIterations)
      .setLineSearchFactory((_: CharSequence) => lineSearchInstance)
      .setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
      .runAndFree
      .asInstanceOf[lang.Double]

Logging:

    Reset training subject: 925141123233800
    Reset training subject: 925143707004100
    Adding measurement 60efe4e5 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.875183567404747;dx=-9.159043084818274E-7
    New Minimum: 1.875183567404747 > 1.8751829266548157
    WOLFE (weak): th(2.154434690031884)=1.8751829266548157; dx=-9.158944940685382E-7 evalInputDelta=6.407499313354492E-7
    New Minimum: 1.8751829266548157 > 1.8751816749572754
    WOLFE (weak): th(4.308869380063768)=1.8751816749572754; dx=-9.15894410179131E-7 evalInputDelta=1.8924474716186523E-6
    New Minimum: 1.8751816749572754 > 1.875177264213562
    WOLFE (weak): th(12.926608140191302)=1.875177264213562; dx=-9.159328041865135E-7 evalInputDelta=6.303191184997559E-6
    New Minimum: 1.875177264213562 > 1.8751581311225891
    WOLFE (weak): th(51.70643256076521)=1.8751581311225891; dx=-9.159351460642496E-7 evalInputDelta=2.543628215789795E-5
    New Minimum: 1.8751581311225891 > 1.8750555664300919
    WOLFE (weak): th(258.53216280382605)=1.8750555664300919; dx=-9.159065095218998E-7 evalInputDelta=1.2800097465515137E-4
    New Minimum: 1.8750555664300919 > 1.8744142204523087
    WOLFE (weak): th(1551.1929768229563)=1.8744142204523087; dx=-9.16403412264977E-7 evalInputDelta=7.693469524383545E-4
    New Minimum: 1.8744142204523087 > 1.8698036968708038
    WOLFE (weak): th(10858.350837760694)=1.8698036968708038; dx=-9.013544208309687E-7 evalInputDelta=0.005379870533943176
    New Minimum: 1.8698036968708038 > 1.8352615609765053
    END: th(86866.80670208555)=1.8352615609765053; dx=-7.973806024644034E-7 evalInputDelta=0.03992200642824173
    Fitness changed from 1.875183567404747 to 1.8352615609765053
    Iteration 1 complete. Error: 1.8352615609765053 Total: 31.1984; Orientation: 0.0349; Line Search: 23.6638
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/a0cf71b1-06ab-460f-9690-2d61e016a7c4.jpg)
    
    Adding measurement 45a07ca to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=1.8352615609765053;dx=-8.136593754817454E-7
    N

...skipping 1640 bytes...

     changed from 1.6911634281277657 to 1.613344483077526
    Iteration 4 complete. Error: 1.613344483077526 Total: 8.5657; Orientation: 0.9265; Line Search: 5.1188
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/d1bc01d7-2333-4f37-aae4-e73c61883935.jpg)
    
    Adding measurement 39362c1c to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.280e+03, gradient 6.669e-04, dot -0.758; [14f98dd9-8253-4a07-b2ef-81afb553ee71 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.8352615609765053, 1.7687509953975677, 1.6911634281277657, 1.613344483077526
    LBFGS Accumulation History: 3 points
    Removed measurement 45a07ca to history. Total: 4
    th(0)=1.613344483077526;dx=-4.4479785872855863E-7
    New Minimum: 1.613344483077526 > 1.5558727458119392
    END: th(1871488.617712673)=1.5558727458119392; dx=-9.588852318530889E-8 evalInputDelta=0.05747173726558685
    Fitness changed from 1.613344483077526 to 1.5558727458119392
    Iteration 5 complete. Error: 1.5558727458119392 Total: 8.5606; Orientation: 0.9358; Line Search: 5.1099
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/114f16f7-a6fc-429e-8b23-480cdc0ac0ee.jpg)
    
    Adding measurement 73a4a806 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.531e+03, gradient 6.758e-04, dot -0.678; [14f98dd9-8253-4a07-b2ef-81afb553ee71 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 1.7687509953975677, 1.6911634281277657, 1.613344483077526, 1.5558727458119392
    LBFGS Accumulation History: 3 points
    Removed measurement 41d1c6b1 to history. Total: 4
    th(0)=1.5558727458119392;dx=-4.5668038593516255E-7
    New Minimum: 1.5558727458119392 > 1.5382855981588364
    END: th(4032000.0000000014)=1.5382855981588364; dx=-3.351464612647178E-8 evalInputDelta=0.017587147653102875
    Fitness changed from 1.5558727458119392 to 1.5382855981588364
    Iteration 6 complete. Error: 1.5382855981588364 Total: 8.7942; Orientation: 0.9630; Line Search: 5.3344
    Final threshold in iteration 7: 1.5382855981588364 (> -Infinity) after 72.458s (< 720.000s)
    

Returns:

    1.5382855981588364