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 236.47 seconds (3.370 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: 7431845942096
Reset training subject: 7437240512345
Adding measurement 4443e854 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-14.107094585895538;dx=-1.907633152197695E-6
New Minimum: -14.107094585895538 > -14.107098504900932
END: th(2.154434690031884)=-14.107098504900932; dx=-1.6907527092581933E-6 evalInputDelta=3.919005393981934E-6
Fitness changed from -14.107094585895538 to -14.107098504900932
Iteration 1 complete. Error: -14.107098504900932 Total: 25.3631; Orientation: 0.0308; Line Search: 10.2651
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/2d853aad-88de-4e2f-9e42-ae70c08f9c4a.jpg)

    Adding measurement 795a6fb3 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-14.107098504900932;dx=-1.6829772443524638E-6
    New Minimum: -14.107098504900932 > -14.107108324766159
    WOLFE (weak): th(4.641588833612779)=-14.107108324766159; dx=-1.6826949804148204E-6 evalInputDelta=9.819865226745605E-6
    New Minimum: -14.107108324766159 > -14.107117801904678
    WOLFE (weak): th(9.283177667225559)=-14.107117801904678; dx=-1.6825392554215469E-6 evalInputDelta=1.9297003746032715E-5
    New Minimum: -14.107117801904678 > -14.107155129313469
    WOLFE (weak): th(27.849533001676676)=-14.107155129313469; dx=-1.6823635424528152E-6 evalInputDelta=5.6624412536621094E-5
    New Minimum: -14.107155129313469 > -14.10732488334179
    WOLFE (weak): th(111.3981320067067)=-14.10732488334179; dx=-1.6818760679253334E-6 evalInputDelta=2.263784408569336E-4
    New Minimum: -14.10732488334179 > -14.108227178454399
    WOLFE (weak): th(556.9906600335335)=-14.108227178454399; dx=-1.6815954128259524E-6 evalInputDelta=0.0011286735534667969
    New Minimum: -14.108227178454399 > -14.113861590623856
    WOLFE (weak): th(3341.9439602012008)=-14.113861590623856; dx=-1.677376120781154E-6 evalInputDelta=0.006763085722923279
    New Minimum: -14.113861590623856 > -14.154050916433334
    WOLFE (weak): th(23393.607721408407)=-14.154050916433334; dx=-1.6495147292984762E-6 evalInputDelta=0.04695241153240204
    New Minimum: -14.154050916433334 > -14.448839098215103
    END: th(187148.86177126726)=-14.448839098215103; dx=-1.32380354150238E-6 evalInputDelta=0.34174059331417084
    Fitness changed from -14.107098504900932 to -14.448839098215103
    Iteration 2 complete. Error: -14.448839098215103 Total: 51.5909; Orientation: 0.0295; Line Search: 46.1882
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/f2aca000-3549-4b38-959c-5fa553b8e2a8.jpg)

    Adding measurement 7ec30a39 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-14.448839098215103;dx=-1.278216294476862E-6
    New Minimum: -14.448839098215103 > -14.95796549320221
    END: th(403200.00000000006)=-14.95796549320221; dx=-8.75739640252727E-7 evalInputDelta=0.5091263949871063
    Fitness changed from -14.448839098215103 to -14.95796549320221
    Iteration 3 complete. Error: -14.95796549320221 Total: 15.3184; Orientation: 0.0299; Line Search: 9.8816
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/7128a9c8-4fd1-4a36-bb7f-1160b8cfb14a.jpg)

    Adding measurement 71a24f2d to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 9.734e+02, gradient 9.608e-04, dot -0.816; [907bfc08-512f-4c19-8e74-b65bca519afc = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -14.95796549320221, -14.448839098215103, -14.107098504900932, -14.107094585895538
    LBFGS Accumulation History: 3 points
    Removed measurement 71a24f2d to history. Total: 3
    th(0)=-14.95796549320221;dx=-9.219003310509576E-7
    New Minimum: -14.95796549320221 > -15.649634629487991
    END: th(868668.0670208557)=-15.649634629487991; dx=-5.207030099734975E-7 evalInputDelta=0.6916691362857819
    Fitness changed from -14.95796549320221 to -15.649634629487991
    Iteration 4 complete. Error: -15.649634629487991 Total: 16.3672; Orientation: 0.6004; Line Search: 10.0202
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/faaf72e5-4314-4247-b394-c79ba56c0005.jpg)

    Adding measurement 409bb2e6 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.007e+03, gradient 8.331e-04, dot -0.698; [907bfc08-512f-4c19-8e74-b65bca519afc = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -15.649634629487991, -14.448839098215103, -14.107098504900932, -14.107094585895538
    LBFGS Accumulation History: 3 points
    Removed measurement 409bb2e6 to history. Total: 3
    th(0)=-15.649634629487991;dx=-6.919324578981239E-7
    New Minimum: -15.649634629487991 > -16.470446288585663
    END: th(1871488.617712673)=-16.470446288585663; dx=-1.98279251035982E-7 evalInputDelta=0.8208116590976715
    Fitness changed from -15.649634629487991 to -16.470446288585663
    Iteration 5 complete. Error: -16.470446288585663 Total: 16.4907; Orientation: 0.6014; Line Search: 10.5686
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/eb0f65e3-2ee5-475d-b5c1-9914b6f40946.jpg)

    Adding measurement 2948fae6 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.440e+03, gradient 8.599e-04, dot -0.417; [907bfc08-512f-4c19-8e74-b65bca519afc = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -16.470446288585663, -14.448839098215103, -14.107098504900932, -14.107094585895538
    LBFGS Accumulation History: 3 points
    Removed measurement 2948fae6 to history. Total: 3
    th(0)=-16.470446288585663;dx=-7.37919897455729E-7
    New Minimum: -16.470446288585663 > -16.735448360443115
    WOLF (strong): th(4032000.0000000014)=-16.735448360443115; dx=8.079602248518565E-8 evalInputDelta=0.2650020718574524
    New Minimum: -16.735448360443115 > -16.973570436239243
    WOLF (strong): th(2016000.0000000007)=-16.973570436239243; dx=5.019823803174351E-8 evalInputDelta=0.5031241476535797
    END: th(672000.0000000002)=-16.88698062300682; dx=-2.9726754701202565E-7 evalInputDelta=0.41653433442115784
    Fitness changed from -16.470446288585663 to -16.973570436239243
    Iteration 6 complete. Error: -16.973570436239243 Total: 26.2130; Orientation: 0.6500; Line Search: 20.3784
    Adding measurement 477a2995 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.361e+03, gradient 9.123e-04, dot -0.291; [907bfc08-512f-4c19-8e74-b65bca519afc = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -16.973570436239243, -14.448839098215103, -14.107098504900932, -14.107094585895538
    LBFGS Accumulation History: 3 points
    Removed measurement 477a2995 to history. Total: 3
    th(0)=-16.973570436239243;dx=-8.312648550348616E-7
    New Minimum: -16.973570436239243 > -17.559822916984558
    WOLF (strong): th(1447780.1117014263)=-17.559822916984558; dx=2.5956107313615565E-8 evalInputDelta=0.5862524807453156
    END: th(723890.0558507132)=-17.458194971084595; dx=-2.871831861411343E-7 evalInputDelta=0.4846245348453522
    Fitness changed from -16.973570436239243 to -17.559822916984558
    Iteration 7 complete. Error: -17.559822916984558 Total: 21.1273; Orientation: 0.7420; Line Search: 15.2604
    Adding measurement 4fc31275 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.791e+03, gradient 6.791e-04, dot -0.413; [907bfc08-512f-4c19-8e74-b65bca519afc = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -17.559822916984558, -14.448839098215103, -14.107098504900932, -14.107094585895538
    LBFGS Accumulation History: 3 points
    Removed measurement 4fc31275 to history. Total: 3
    th(0)=-17.559822916984558;dx=-4.6082447820282094E-7
    New Minimum: -17.559822916984558 > -17.98424768447876
    END: th(1559573.8480938943)=-17.98424768447876; dx=-2.4513033646392425E-8 evalInputDelta=0.42442476749420166
    Fitness changed from -17.559822916984558 to -17.98424768447876
    Iteration 8 complete. Error: -17.98424768447876 Total: 16.2818; Orientation: 0.6738; Line Search: 10.6374
    Adding measurement 6d127edd to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.129e+03, gradient 5.633e-04, dot -0.508; [907bfc08-512f-4c19-8e74-b65bca519afc = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -17.98424768447876, -14.448839098215103, -14.107098504900932, -14.107094585895538
    LBFGS Accumulation History: 3 points
    Removed measurement 6d127edd to history. Total: 3
    th(0)=-17.98424768447876;dx=-3.1689024724591174E-7
    New Minimum: -17.98424768447876 > -18.088385373353958
    WOLF (strong): th(3360000.0000000014)=-18.088385373353958; dx=1.2865920173044252E-7 evalInputDelta=0.10413768887519836
    New Minimum: -18.088385373353958 > -18.274727880954742
    WOLF (strong): th(1680000.0000000007)=-18.274727880954742; dx=3.852944190205896E-9 evalInputDelta=0.29048019647598267
    END: th(560000.0000000002)=-18.15772917866707; dx=-2.0256931506778227E-7 evalInputDelta=0.17348149418830872
    Fitness changed from -17.98424768447876 to -18.274727880954742
    Iteration 9 complete. Error: -18.274727880954742 Total: 29.1458; Orientation: 0.6438; Line Search: 23.1895
    Adding measurement 28b655e2 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.209e+03, gradient 5.575e-04, dot -0.458; [907bfc08-512f-4c19-8e74-b65bca519afc = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -18.274727880954742, -14.448839098215103, -14.107098504900932, -14.107094585895538
    LBFGS Accumulation History: 3 points
    Removed measurement 28b655e2 to history. Total: 3
    th(0)=-18.274727880954742;dx=-3.100814739491128E-7
    New Minimum: -18.274727880954742 > -18.514617830514908
    END: th(1206483.4264178555)=-18.514617830514908; dx=-2.7733800999833106E-8 evalInputDelta=0.2398899495601654
    Fitness changed from -18.274727880954742 to -18.514617830514908
    Iteration 10 complete. Error: -18.514617830514908 Total: 18.2956; Orientation: 0.8543; Line Search: 9.9984
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/141e842c-8774-4cb0-977f-d719d0627211.jpg)

    Final threshold in iteration 11: -18.514617830514908 (> -Infinity) after 236.471s (< 5400.000s)

Returns

    -18.514617830514908