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 196.43 seconds (1.865 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: 6104560449654
Reset training subject: 6108718032541
Adding measurement 7cdb3404 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=0.7861069738864899;dx=-9.899074621931612E-7
New Minimum: 0.7861069738864899 > 0.7861064225435257
WOLFE (weak): th(2.154434690031884)=0.7861064225435257; dx=-8.956967907762431E-7 evalInputDelta=5.513429641723633E-7
New Minimum: 0.7861064225435257 > 0.7861054986715317
WOLFE (weak): th(4.308869380063768)=0.7861054986715317; dx=-8.956623568712471E-7 evalInputDelta=1.475214958190918E-6
New Minimum: 0.7861054986715317 > 0.7861009985208511
WOLFE (weak): th(12.926608140191302)=0.7861009985208511; dx=-8.956546820328277E-7 evalInputDelta=5.97536563873291E-6
New Minimum: 0.7861009985208511 > 0.7860835492610931
WOLFE (weak): th(51.70643256076521)=0.7860835492610931; dx=-8.956825066221276E-7 evalInputDelta=2.3424625396728516E-5
New Minimum: 0.7860835492610931 > 0.7859910130500793
WOLFE (weak): th(258.53216280382605)=0.7859910130500793; dx=-8.956892526566557E-7 evalInputDelta=1.1596083641052246E-4
New Minimum: 0.7859910130500793 > 0.7854120433330536
WOLFE (weak): th(1551.1929768229563)=0.7854120433330536; dx=-8.95717201562771E-7 evalInputDelta=6.949305534362793E-4
New Minimum: 0.7854120433330536 > 0.7812476605176926
WOLFE (weak): th(10858.350837760694)=0.7812476605176926; dx=-8.939702200855659E-7 evalInputDelta=0.004859313368797302
New Minimum: 0.7812476605176926 > 0.7475782036781311
END: th(86866.80670208555)=0.7475782036781311; dx=-8.767460251700228E-7 evalInputDelta=0.038528770208358765
Fitness changed from 0.7861069738864899 to 0.7475782036781311
Iteration 1 complete. Error: 0.7475782036781311 Total: 51.5522; Orientation: 0.0445; Line Search: 38.6458
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/89eacee7-ca33-4dce-83c1-7c9f4d3d99c1.jpg)

    Adding measurement 5cb117a3 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=0.7475782036781311;dx=-8.706603479730114E-7
    New Minimum: 0.7475782036781311 > 0.6682814359664917
    WOLFE (weak): th(187148.86177126726)=0.6682814359664917; dx=-8.197121703058778E-7 evalInputDelta=0.0792967677116394
    New Minimum: 0.6682814359664917 > 0.5943174064159393
    END: th(374297.7235425345)=0.5943174064159393; dx=-7.586600051102611E-7 evalInputDelta=0.15326079726219177
    Fitness changed from 0.7475782036781311 to 0.5943174064159393
    Iteration 2 complete. Error: 0.5943174064159393 Total: 17.4791; Orientation: 0.0436; Line Search: 13.4418
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/ce3dddce-4910-407c-bc2c-1eb1c619ea56.jpg)

    Adding measurement 27f18e5b to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=0.5943174064159393;dx=-7.378697439594634E-7
    New Minimum: 0.5943174064159393 > 0.3372381776571274
    END: th(806400.0000000001)=0.3372381776571274; dx=-5.34014137700557E-7 evalInputDelta=0.25707922875881195
    Fitness changed from 0.5943174064159393 to 0.3372381776571274
    Iteration 3 complete. Error: 0.3372381776571274 Total: 13.0506; Orientation: 0.0457; Line Search: 8.6547
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/42c5040f-302d-4358-b9f9-37b491d70c8e.jpg)

    Adding measurement 27f78e15 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.951e+03, gradient 7.176e-04, dot -0.859; [57f1a42b-62c7-4015-921f-f74c970e275e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.3372381776571274, 0.5943174064159393, 0.7475782036781311, 0.7861069738864899
    LBFGS Accumulation History: 3 points
    Removed measurement 27f78e15 to history. Total: 3
    th(0)=0.3372381776571274;dx=-5.149748967419073E-7
    New Minimum: 0.3372381776571274 > -0.010901331901550293
    END: th(1737336.1340417115)=-0.010901331901550293; dx=-3.0447424210556895E-7 evalInputDelta=0.3481395095586777
    Fitness changed from 0.3372381776571274 to -0.010901331901550293
    Iteration 4 complete. Error: -0.010901331901550293 Total: 13.9450; Orientation: 1.0159; Line Search: 8.7919
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/26cb7e67-4515-478e-80bf-72165814b03a.jpg)

    Adding measurement 7dacebee to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.405e+03, gradient 5.704e-04, dot -0.725; [57f1a42b-62c7-4015-921f-f74c970e275e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.010901331901550293, 0.5943174064159393, 0.7475782036781311, 0.7861069738864899
    LBFGS Accumulation History: 3 points
    Removed measurement 7dacebee to history. Total: 3
    th(0)=-0.010901331901550293;dx=-3.253213171962891E-7
    New Minimum: -0.010901331901550293 > -0.4182594120502472
    END: th(3742977.235425346)=-0.4182594120502472; dx=-1.4461121084689008E-7 evalInputDelta=0.4073580801486969
    Fitness changed from -0.010901331901550293 to -0.4182594120502472
    Iteration 5 complete. Error: -0.4182594120502472 Total: 13.8181; Orientation: 1.0200; Line Search: 8.6385
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/79886893-fafd-4a2d-ab3e-0e8bc5372eea.jpg)

    Adding measurement 1972c852 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.220e+03, gradient 4.624e-04, dot -0.573; [57f1a42b-62c7-4015-921f-f74c970e275e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.4182594120502472, 0.5943174064159393, 0.7475782036781311, 0.7861069738864899
    LBFGS Accumulation History: 3 points
    Removed measurement 1972c852 to history. Total: 3
    th(0)=-0.4182594120502472;dx=-2.1383893548973115E-7
    New Minimum: -0.4182594120502472 > -0.826592817902565
    END: th(8064000.000000003)=-0.826592817902565; dx=-4.256179680215437E-8 evalInputDelta=0.4083334058523178
    Fitness changed from -0.4182594120502472 to -0.826592817902565
    Iteration 6 complete. Error: -0.826592817902565 Total: 14.3872; Orientation: 1.0121; Line Search: 9.0877
    Adding measurement 244d4973 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.656e+03, gradient 4.089e-04, dot -0.362; [57f1a42b-62c7-4015-921f-f74c970e275e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.826592817902565, 0.5943174064159393, 0.7475782036781311, 0.7861069738864899
    LBFGS Accumulation History: 3 points
    Removed measurement 244d4973 to history. Total: 3
    th(0)=-0.826592817902565;dx=-1.6720411946309232E-7
    New Minimum: -0.826592817902565 > -1.0542021542787552
    WOLF (strong): th(1.7373361340417117E7)=-1.0542021542787552; dx=2.9374497076838414E-8 evalInputDelta=0.22760933637619019
    New Minimum: -1.0542021542787552 > -1.120757058262825
    END: th(8686680.670208558)=-1.120757058262825; dx=-6.646996141668663E-9 evalInputDelta=0.29416424036026
    Fitness changed from -0.826592817902565 to -1.120757058262825
    Iteration 7 complete. Error: -1.120757058262825 Total: 17.7549; Orientation: 1.0442; Line Search: 12.5078
    Adding measurement 750cd926 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.553e+03, gradient 3.428e-04, dot -0.323; [57f1a42b-62c7-4015-921f-f74c970e275e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.120757058262825, 0.5943174064159393, 0.7475782036781311, 0.7861069738864899
    LBFGS Accumulation History: 3 points
    Removed measurement 750cd926 to history. Total: 3
    th(0)=-1.120757058262825;dx=-1.1753127918967012E-7
    New Minimum: -1.120757058262825 > -1.2218647450208664
    WOLF (strong): th(1.871488617712673E7)=-1.2218647450208664; dx=3.963394110571079E-8 evalInputDelta=0.10110768675804138
    New Minimum: -1.2218647450208664 > -1.3423437178134918
    WOLF (strong): th(9357443.088563366)=-1.3423437178134918; dx=8.677366122795699E-10 evalInputDelta=0.2215866595506668
    END: th(3119147.6961877886)=-1.2570392936468124; dx=-5.939822545319104E-8 evalInputDelta=0.13628223538398743
    Fitness changed from -1.120757058262825 to -1.3423437178134918
    Iteration 8 complete. Error: -1.3423437178134918 Total: 22.7808; Orientation: 1.0179; Line Search: 17.5229
    Adding measurement 114a9171 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.433e+03, gradient 2.820e-04, dot -0.318; [57f1a42b-62c7-4015-921f-f74c970e275e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.3423437178134918, 0.5943174064159393, 0.7475782036781311, 0.7861069738864899
    LBFGS Accumulation History: 3 points
    Removed measurement 114a9171 to history. Total: 3
    th(0)=-1.3423437178134918;dx=-7.954525226094657E-8
    New Minimum: -1.3423437178134918 > -1.492873176932335
    END: th(6720000.000000003)=-1.492873176932335; dx=-1.9554427362732828E-8 evalInputDelta=0.15052945911884308
    Fitness changed from -1.3423437178134918 to -1.492873176932335
    Iteration 9 complete. Error: -1.492873176932335 Total: 13.3503; Orientation: 1.0101; Line Search: 8.1082
    Adding measurement 20ea3bde to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.612e+03, gradient 2.076e-04, dot -0.417; [57f1a42b-62c7-4015-921f-f74c970e275e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.492873176932335, 0.5943174064159393, 0.7475782036781311, 0.7861069738864899
    LBFGS Accumulation History: 3 points
    Removed measurement 20ea3bde to history. Total: 3
    th(0)=-1.492873176932335;dx=-4.309182208847538E-8
    New Minimum: -1.492873176932335 > -1.6203789412975311
    WOLF (strong): th(1.4477801117014265E7)=-1.6203789412975311; dx=3.1885779658764215E-9 evalInputDelta=0.12750576436519623
    END: th(7238900.558507132)=-1.5990930497646332; dx=-1.6385186730775337E-8 evalInputDelta=0.10621987283229828
    Fitness changed from -1.492873176932335 to -1.6203789412975311
    Iteration 10 complete. Error: -1.6203789412975311 Total: 18.2347; Orientation: 1.0043; Line Search: 13.1410
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/52bf4fba-5839-4b2e-ad03-04bc254e689d.jpg)

    Final threshold in iteration 11: -1.6203789412975311 (> -Infinity) after 196.424s (< 5400.000s)

Returns

    -1.6203789412975311