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 210.86 seconds (2.968 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: 19191777251706
Reset training subject: 19196202588477
Adding measurement 43fad5ce to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.6681762784719467;dx=-5.021293724212305E-7
New Minimum: -0.6681762784719467 > -0.6681766510009766
END: th(2.154434690031884)=-0.6681766510009766; dx=-4.49721931626016E-7 evalInputDelta=3.725290298461914E-7
Fitness changed from -0.6681762784719467 to -0.6681766510009766
Iteration 1 complete. Error: -0.6681766510009766 Total: 22.5942; Orientation: 0.0462; Line Search: 9.1645
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/77db5e27-2e2a-412d-ad5f-da62225c1f85.jpg)

    Adding measurement 48a549ae to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-0.6681766510009766;dx=-4.4972408678573416E-7
    New Minimum: -0.6681766510009766 > -0.6681779474020004
    WOLFE (weak): th(4.641588833612779)=-0.6681779474020004; dx=-4.49721176997625E-7 evalInputDelta=1.296401023864746E-6
    New Minimum: -0.6681779474020004 > -0.6681789606809616
    WOLFE (weak): th(9.283177667225559)=-0.6681789606809616; dx=-4.4972255627093576E-7 evalInputDelta=2.3096799850463867E-6
    New Minimum: -0.6681789606809616 > -0.6681831479072571
    WOLFE (weak): th(27.849533001676676)=-0.6681831479072571; dx=-4.4972129770341795E-7 evalInputDelta=6.496906280517578E-6
    New Minimum: -0.6681831479072571 > -0.6682019531726837
    WOLFE (weak): th(111.3981320067067)=-0.6682019531726837; dx=-4.497193004073187E-7 evalInputDelta=2.530217170715332E-5
    New Minimum: -0.6682019531726837 > -0.6683021038770676
    WOLFE (weak): th(556.9906600335335)=-0.6683021038770676; dx=-4.496827622102566E-7 evalInputDelta=1.2545287609100342E-4
    New Minimum: -0.6683021038770676 > -0.6689280569553375
    WOLFE (weak): th(3341.9439602012008)=-0.6689280569553375; dx=-4.4937539135023815E-7 evalInputDelta=7.514059543609619E-4
    New Minimum: -0.6689280569553375 > -0.6734212785959244
    WOLFE (weak): th(23393.607721408407)=-0.6734212785959244; dx=-4.467666242124912E-7 evalInputDelta=0.005244627594947815
    New Minimum: -0.6734212785959244 > -0.7090621143579483
    WOLFE (weak): th(187148.86177126726)=-0.7090621143579483; dx=-4.230401718846552E-7 evalInputDelta=0.04088546335697174
    New Minimum: -0.7090621143579483 > -0.9494094252586365
    END: th(1684339.7559414054)=-0.9494094252586365; dx=-2.3225924028315738E-7 evalInputDelta=0.2812327742576599
    Fitness changed from -0.6681766510009766 to -0.9494094252586365
    Iteration 2 complete. Error: -0.9494094252586365 Total: 46.5636; Orientation: 0.0437; Line Search: 42.0841
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/047dfc8c-5b93-487b-b0b9-314117256692.jpg)

    Adding measurement 58bf20f7 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-0.9494094252586365;dx=-2.143134377990555E-7
    New Minimum: -0.9494094252586365 > -1.2266650199890137
    END: th(3628800.0000000005)=-1.2266650199890137; dx=-1.0464494032340764E-7 evalInputDelta=0.2772555947303772
    Fitness changed from -0.9494094252586365 to -1.2266650199890137
    Iteration 3 complete. Error: -1.2266650199890137 Total: 12.3627; Orientation: 0.0449; Line Search: 8.3204
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/fb160444-593d-4fda-abe0-0d2537b56cc4.jpg)

    Adding measurement 280292e3 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.834e+03, gradient 3.358e-04, dot -0.678; [59582e4d-3629-44f4-becb-f20ca8217865 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.2266650199890137, -0.9494094252586365, -0.6681766510009766, -0.6681762784719467
    LBFGS Accumulation History: 3 points
    Removed measurement 280292e3 to history. Total: 3
    th(0)=-1.2266650199890137;dx=-1.1273526936947534E-7
    New Minimum: -1.2266650199890137 > -1.4945338815450668
    END: th(7818012.603187701)=-1.4945338815450668; dx=-3.7565530181676175E-8 evalInputDelta=0.26786886155605316
    Fitness changed from -1.2266650199890137 to -1.4945338815450668
    Iteration 4 complete. Error: -1.4945338815450668 Total: 14.2607; Orientation: 1.0078; Line Search: 8.8146
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/0d76e419-5c61-47c1-a55b-2686e2408598.jpg)

    Adding measurement 7071469e to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.698e+03, gradient 2.790e-04, dot -0.477; [59582e4d-3629-44f4-becb-f20ca8217865 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.4945338815450668, -0.9494094252586365, -0.6681766510009766, -0.6681762784719467
    LBFGS Accumulation History: 3 points
    Removed measurement 7071469e to history. Total: 3
    th(0)=-1.4945338815450668;dx=-7.783016662541988E-8
    New Minimum: -1.4945338815450668 > -1.674630120396614
    WOLF (strong): th(1.6843397559414055E7)=-1.674630120396614; dx=2.1769371457658486E-9 evalInputDelta=0.18009623885154724
    END: th(8421698.779707028)=-1.653631404042244; dx=-1.4456898910346482E-8 evalInputDelta=0.15909752249717712
    Fitness changed from -1.4945338815450668 to -1.674630120396614
    Iteration 5 complete. Error: -1.674630120396614 Total: 18.4054; Orientation: 1.0092; Line Search: 12.8848
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/0ffacc95-6a9b-4bbe-bf7d-9455024b8697.jpg)

    Adding measurement 378cea43 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.060e+03, gradient 2.979e-04, dot -0.150; [59582e4d-3629-44f4-becb-f20ca8217865 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.674630120396614, -0.9494094252586365, -0.6681766510009766, -0.6681762784719467
    LBFGS Accumulation History: 3 points
    Removed measurement 378cea43 to history. Total: 3
    th(0)=-1.674630120396614;dx=-8.87468111796113E-8
    New Minimum: -1.674630120396614 > -1.7598675638437271
    WOLF (strong): th(1.8144000000000004E7)=-1.7598675638437271; dx=2.807822987480702E-8 evalInputDelta=0.08523744344711304
    New Minimum: -1.7598675638437271 > -1.8337106704711914
    END: th(9072000.000000002)=-1.8337106704711914; dx=-6.561215437075524E-10 evalInputDelta=0.15908055007457733
    Fitness changed from -1.674630120396614 to -1.8337106704711914
    Iteration 6 complete. Error: -1.8337106704711914 Total: 17.6423; Orientation: 1.0064; Line Search: 12.4740
    Adding measurement 14e1be22 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.597e+03, gradient 2.208e-04, dot -0.258; [59582e4d-3629-44f4-becb-f20ca8217865 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.8337106704711914, -0.9494094252586365, -0.6681766510009766, -0.6681762784719467
    LBFGS Accumulation History: 3 points
    Removed measurement 14e1be22 to history. Total: 3
    th(0)=-1.8337106704711914;dx=-4.87477270610361E-8
    New Minimum: -1.8337106704711914 > -1.8755972683429718
    WOLF (strong): th(1.9545031507969253E7)=-1.8755972683429718; dx=2.3176046666543987E-8 evalInputDelta=0.041886597871780396
    New Minimum: -1.8755972683429718 > -1.939044713973999
    END: th(9772515.753984626)=-1.939044713973999; dx=-7.588812226192228E-10 evalInputDelta=0.10533404350280762
    Fitness changed from -1.8337106704711914 to -1.939044713973999
    Iteration 7 complete. Error: -1.939044713973999 Total: 18.3188; Orientation: 1.0018; Line Search: 13.2228
    Adding measurement 3c7c886d to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.115e+03, gradient 2.010e-04, dot -0.310; [59582e4d-3629-44f4-becb-f20ca8217865 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.939044713973999, -0.9494094252586365, -0.6681766510009766, -0.6681762784719467
    LBFGS Accumulation History: 3 points
    Removed measurement 3c7c886d to history. Total: 3
    th(0)=-1.939044713973999;dx=-4.038843130458205E-8
    New Minimum: -1.939044713973999 > -1.9619471579790115
    WOLF (strong): th(2.105424694926757E7)=-1.9619471579790115; dx=1.2711153670177014E-8 evalInputDelta=0.022902444005012512
    New Minimum: -1.9619471579790115 > -2.0085413604974747
    WOLF (strong): th(1.0527123474633785E7)=-2.0085413604974747; dx=3.1073468218406724E-9 evalInputDelta=0.06949664652347565
    END: th(3509041.1582112615)=-1.989334300160408; dx=-1.8019406092239186E-8 evalInputDelta=0.050289586186409
    Fitness changed from -1.939044713973999 to -2.0085413604974747
    Iteration 8 complete. Error: -2.0085413604974747 Total: 22.3996; Orientation: 1.0677; Line Search: 16.6358
    Adding measurement 4eec6709 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.073e+03, gradient 1.992e-04, dot -0.279; [59582e4d-3629-44f4-becb-f20ca8217865 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.0085413604974747, -0.9494094252586365, -0.6681766510009766, -0.6681762784719467
    LBFGS Accumulation History: 3 points
    Removed measurement 4eec6709 to history. Total: 3
    th(0)=-2.0085413604974747;dx=-3.967298206329947E-8
    New Minimum: -2.0085413604974747 > -2.0733978524804115
    WOLF (strong): th(7560000.000000002)=-2.0733978524804115; dx=2.3364078847927166E-9 evalInputDelta=0.06485649198293686
    END: th(3780000.000000001)=-2.0611874237656593; dx=-1.6351390938965308E-8 evalInputDelta=0.05264606326818466
    Fitness changed from -2.0085413604974747 to -2.0733978524804115
    Iteration 9 complete. Error: -2.0733978524804115 Total: 19.8142; Orientation: 1.0059; Line Search: 14.6271
    Adding measurement 7541616f to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.508e+03, gradient 1.691e-04, dot -0.348; [59582e4d-3629-44f4-becb-f20ca8217865 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.0733978524804115, -0.9494094252586365, -0.6681766510009766, -0.6681762784719467
    LBFGS Accumulation History: 3 points
    Removed measurement 7541616f to history. Total: 3
    th(0)=-2.0733978524804115;dx=-2.8600504060093086E-8
    New Minimum: -2.0733978524804115 > -2.1185101866722107
    WOLF (strong): th(8143763.128320523)=-2.1185101866722107; dx=7.875752404007671E-10 evalInputDelta=0.045112334191799164
    END: th(4071881.5641602613)=-2.11099810898304; dx=-9.394741855991961E-9 evalInputDelta=0.037600256502628326
    Fitness changed from -2.0733978524804115 to -2.1185101866722107
    Iteration 10 complete. Error: -2.1185101866722107 Total: 18.4287; Orientation: 1.0050; Line Search: 13.0588
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/f8052624-3305-4026-a11a-408f9d464137.jpg)

    Final threshold in iteration 11: -2.1185101866722107 (> -Infinity) after 210.860s (< 5400.000s)

Returns

    -2.1185101866722107