Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

BasicOptimizer.scala:89 executed in 304.22 seconds (3.588 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: 574190980477700
Reset training subject: 574197289393400
Adding measurement 710fcbd7 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-38.78902319240224;dx=-2.0933509347499437E-6
New Minimum: -38.78902319240224 > -38.78902708666098
END: th(2.154434690031884)=-38.78902708666098; dx=-1.8339904898652436E-6 evalInputDelta=3.894258739478573E-6
Fitness changed from -38.78902319240224 to -38.78902708666098
Iteration 1 complete. Error: -38.78902708666098 Total: 31.1822; Orientation: 0.1512; Line Search: 12.8396
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/cd5ef066-bbdc-4bea-b468-f8f3a2b7f697.jpg)
Adding measurement 4c8610cd to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-38.78902708666098;dx=-1.8340692710016705E-6
New Minimum: -38.78902708666098 > -38.78903876943487
WOLFE (weak): th(4.641588833612779)=-38.78903876943487; dx=-1.8330657609785197E-6 evalInputDelta=1.1682773887855546E-5
New Minimum: -38.78903876943487 > -38.789046557948836
WOLFE (weak): th(9.283177667225559)=-38.789046557948836; dx=-1.8324179688626336E-6 evalInputDelta=1.947128785673158E-5
New Minimum: -38.789046557948836 > -38.78908550049523
WOLFE (weak): th(27.849533001676676)=-38.78908550049523; dx=-1.830222409081544E-6 evalInputDelta=5.841383425320146E-5
New Minimum: -38.78908550049523 > -38.78925295299922
WOLFE (weak): th(111.3981320067067)=-38.78925295299922; dx=-1.8304781693334273E-6 evalInputDelta=2.258663382406212E-4
New Minimum: -38.78925295299922 > -38.79015056398228
WOLFE (weak): th(556.9906600335335)=-38.79015056398228; dx=-1.8296924715274478E-6 evalInputDelta=0.00112347732130047
New Minimum: -38.79015056398228 > -38.79576356898896
WOLFE (weak): th(3341.9439602012008)=-38.79576356898896; dx=-1.8291382308995733E-6 evalInputDelta=0.006736482327980298
New Minimum: -38.79576356898896 > -38.83614431102063
WOLFE (weak): th(23393.607721408407)=-38.83614431102063; dx=-1.8262491529939436E-6 evalInputDelta=0.04711722435965271
New Minimum: -38.83614431102063 > -39.16375676201428
WOLFE (weak): th(187148.86177126726)=-39.16375676201428; dx=-1.8047584056494789E-6 evalInputDelta=0.3747296753533007
New Minimum: -39.16375676201428 > -41.942291150484756
END: th(1684339.7559414054)=-41.942291150484756; dx=-1.553807535402551E-6 evalInputDelta=3.1532640638237766
Fitness changed from -38.78902708666098 to -41.942291150484756
Iteration 2 complete. Error: -41.942291150484756 Total: 69.5066; Orientation: 0.1479; Line Search: 61.9675
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/7631bdf2-bb01-4245-9fb7-efec08ee45d7.jpg)
Adding measurement 587c0d8a to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-41.942291150484756;dx=-1.48607572498792E-6
New Minimum: -41.942291150484756 > -46.792032962342795
END: th(3628800.0000000005)=-46.792032962342795; dx=-9.81928150300995E-7 evalInputDelta=4.849741811858038
Fitness changed from -41.942291150484756 to -46.792032962342795
Iteration 3 complete. Error: -46.792032962342795 Total: 20.3943; Orientation: 0.1334; Line Search: 12.4407
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/8fe97d73-c176-43a8-be19-95a3e9de1473.jpg)
Adding measurement 2dd56a3c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.031e+04, gradient 9.744e-04, dot -0.802; [208ec000-7c35-457a-aac7-0b3015208d89 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -46.792032962342795, -41.942291150484756, -38.78902708666098, -38.78902319240224
LBFGS Accumulation History: 3 points
Removed measurement 2dd56a3c to history. Total: 3
th(0)=-46.792032962342795;dx=-9.478556494313092E-7
New Minimum: -46.792032962342795 > -52.88716589268888
END: th(7818012.603187701)=-52.88716589268888; dx=-5.049796017096961E-7 evalInputDelta=6.095132930346082
Fitness changed from -46.792032962342795 to -52.88716589268888
Iteration 4 complete. Error: -52.88716589268888 Total: 22.6088; Orientation: 2.6035; Line Search: 12.4812
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/f91922a0-b4c8-47b1-90c3-2191686c7ae0.jpg)
Adding measurement 570e2ee7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.486e+03, gradient 8.519e-04, dot -0.589; [208ec000-7c35-457a-aac7-0b3015208d89 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -52.88716589268888, -41.942291150484756, -38.78902708666098, -38.78902319240224
LBFGS Accumulation History: 3 points
Removed measurement 570e2ee7 to history. Total: 3
th(0)=-52.88716589268888;dx=-7.233567664164353E-7
New Minimum: -52.88716589268888 > -59.0315406634432
END: th(1.6843397559414055E7)=-59.0315406634432; dx=-1.3413015414957503E-7 evalInputDelta=6.144374770754325
Fitness changed from -52.88716589268888 to -59.0315406634432
Iteration 5 complete. Error: -59.0315406634432 Total: 22.1227; Orientation: 2.4959; Line Search: 12.3726
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/ca5b8801-b60e-475f-9754-6baf27f62073.jpg)
Adding measurement 1b0ce9c9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.128e+04, gradient 1.021e-03, dot -0.323; [208ec000-7c35-457a-aac7-0b3015208d89 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.0315406634432, -41.942291150484756, -38.78902708666098, -38.78902319240224
LBFGS Accumulation History: 3 points
Removed measurement 1b0ce9c9 to history. Total: 3
th(0)=-59.0315406634432;dx=-1.0415914344727316E-6
Armijo: th(3.628800000000001E7)=-55.78891246778252; dx=2.603697977071019E-7 evalInputDelta=-3.2426281956606857
New Minimum: -59.0315406634432 > -62.26471243245334
WOLF (strong): th(1.8144000000000004E7)=-62.26471243245334; dx=2.932557976893323E-7 evalInputDelta=3.2331717690101343
New Minimum: -62.26471243245334 > -63.721265295296675
END: th(6048000.000000001)=-63.721265295296675; dx=-3.447373023472302E-7 evalInputDelta=4.689724631853473
Fitness changed from -59.0315406634432 to -63.721265295296675
Iteration 6 complete. Error: -63.721265295296675 Total: 33.9998; Orientation: 2.4302; Line Search: 24.2075
Adding measurement 323bdf7a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.948e+04, gradient 7.203e-04, dot -0.601; [208ec000-7c35-457a-aac7-0b3015208d89 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -63.721265295296675, -41.942291150484756, -38.78902708666098, -38.78902319240224
LBFGS Accumulation History: 3 points
Removed measurement 323bdf7a to history. Total: 3
th(0)=-63.721265295296675;dx=-5.188617737313781E-7
New Minimum: -63.721265295296675 > -67.98479513371868
END: th(1.3030021005312836E7)=-67.98479513371868; dx=-1.5016958141277413E-7 evalInputDelta=4.263529838422002
Fitness changed from -63.721265295296675 to -67.98479513371868
Iteration 7 complete. Error: -67.98479513371868 Total: 20.9938; Orientation: 2.4842; Line Search: 12.3284
Adding measurement 5439b6e5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.518e+04, gradient 8.306e-04, dot -0.482; [208ec000-7c35-457a-aac7-0b3015208d89 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -67.98479513371868, -41.942291150484756, -38.78902708666098, -38.78902319240224
LBFGS Accumulation History: 3 points
Removed measurement 5439b6e5 to history. Total: 3
th(0)=-67.98479513371868;dx=-6.898571193077473E-7
New Minimum: -67.98479513371868 > -68.1762366244951
WOLF (strong): th(2.8072329265690096E7)=-68.1762366244951; dx=1.8530055845237514E-7 evalInputDelta=0.1914414907764268
New Minimum: -68.1762366244951 > -71.01664914456096
WOLF (strong): th(1.4036164632845048E7)=-71.01664914456096; dx=9.990447176621338E-8 evalInputDelta=3.031854010842281
END: th(4678721.544281683)=-70.59196862128738; dx=-3.218441656901355E-7 evalInputDelta=2.6071734875687014
Fitness changed from -67.98479513371868 to -71.01664914456096
Iteration 8 complete. Error: -71.01664914456096 Total: 33.4360; Orientation: 2.4996; Line Search: 24.6591
Adding measurement 39d631c0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.606e+04, gradient 9.603e-04, dot -0.357; [208ec000-7c35-457a-aac7-0b3015208d89 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -71.01664914456096, -41.942291150484756, -38.78902708666098, -38.78902319240224
LBFGS Accumulation History: 3 points
Removed measurement 39d631c0 to history. Total: 3
th(0)=-71.01664914456096;dx=-9.202571104900619E-7
New Minimum: -71.01664914456096 > -75.90821627139044
WOLF (strong): th(1.0080000000000004E7)=-75.90821627139044; dx=5.933854978791921E-8 evalInputDelta=4.891567126829486
END: th(5040000.000000002)=-74.93744211762123; dx=-4.5887440094223517E-7 evalInputDelta=3.920792973060273
Fitness changed from -71.01664914456096 to -75.90821627139044
Iteration 9 complete. Error: -75.90821627139044 Total: 27.5449; Orientation: 2.4713; Line Search: 18.9893
Adding measurement 6f764481 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.761e+04, gradient 7.549e-04, dot -0.505; [208ec000-7c35-457a-aac7-0b3015208d89 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -75.90821627139044, -41.942291150484756, -38.78902708666098, -38.78902319240224
LBFGS Accumulation History: 3 points
Removed measurement 6f764481 to history. Total: 3
th(0)=-75.90821627139044;dx=-5.696270165498664E-7
New Minimum: -75.90821627139044 > -79.05148937122159
END: th(1.0858350837760698E7)=-79.05148937122159; dx=-1.1422924282826334E-8 evalInputDelta=3.1432730998311484
Fitness changed from -75.90821627139044 to -79.05148937122159
Iteration 10 complete. Error: -79.05148937122159 Total: 21.3614; Orientation: 2.4239; Line Search: 12.9601
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/d9bccb82-0c8a-40ad-9c0e-be094187fc6b.jpg)
Final threshold in iteration 11: -79.05148937122159 (> -Infinity) after 304.215s (< 5400.000s)

Returns

    -79.05148937122159