Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Iteration 15 Iteration 15

BasicOptimizer.scala:89 executed in 63.02 seconds (1.439 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: 143478607352500
Reset training subject: 143480247405700
Adding measurement 7e2f6a99 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-86.89338871703337;dx=-8.069144005242734E-4
New Minimum: -86.89338871703337 > -86.8952850536534
WOLFE (weak): th(2.154434690031884)=-86.8952850536534; dx=-7.805895273040838E-4 evalInputDelta=0.0018963366200210885
New Minimum: -86.8952850536534 > -86.89718539211934
WOLFE (weak): th(4.308869380063768)=-86.89718539211934; dx=-7.790705567157755E-4 evalInputDelta=0.003796675085965262
New Minimum: -86.89718539211934 > -86.90477420181062
WOLFE (weak): th(12.926608140191302)=-86.90477420181062; dx=-7.808565108571785E-4 evalInputDelta=0.011385484777250099
New Minimum: -86.90477420181062 > -86.93894595763818
WOLFE (weak): th(51.70643256076521)=-86.93894595763818; dx=-7.79909346637324E-4 evalInputDelta=0.0455572406048077
New Minimum: -86.93894595763818 > -87.1212915823014
WOLFE (weak): th(258.53216280382605)=-87.1212915823014; dx=-7.789386924058127E-4 evalInputDelta=0.22790286526802106
New Minimum: -87.1212915823014 > -88.2647727879287
WOLFE (weak): th(1551.1929768229563)=-88.2647727879287; dx=-7.83704371107375E-4 evalInputDelta=1.3713840708953313
New Minimum: -88.2647727879287 > -96.38399748083525
WOLFE (weak): th(10858.350837760694)=-96.38399748083525; dx=-7.530731778508344E-4 evalInputDelta=9.490608763801873
New Minimum: -96.38399748083525 > -144.83366365417154
END: th(86866.80670208555)=-144.83366365417154; dx=-3.8693178066365056E-4 evalInputDelta=57.94027493713817
Fitness changed from -86.89338871703337 to -144.83366365417154
Iteration 1 complete. Error: -144.83366365417154 Total: 11.1633; Orientation: 0.0163; Line Search: 7.7671
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/bb04de21-dcaa-4ccc-9a46-021aa2a319a9.jpg)
Adding measurement 5c629653 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-144.83366365417154;dx=-8.505135206230773E-4
New Minimum: -144.83366365417154 > -231.01593531437115
END: th(187148.86177126726)=-231.01593531437115; dx=-1.916687317079859E-4 evalInputDelta=86.1822716601996
Fitness changed from -144.83366365417154 to -231.01593531437115
Iteration 2 complete. Error: -231.01593531437115 Total: 2.8584; Orientation: 0.0141; Line Search: 1.7073
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/c945fa64-6184-4fc1-a637-f239d38a81a9.jpg)
Adding measurement 46b13295 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-231.01593531437115;dx=-0.001064470099712383
New Minimum: -231.01593531437115 > -280.4063640938544
WOLF (strong): th(403200.00000000006)=-280.4063640938544; dx=6.342652964384733E-5 evalInputDelta=49.390428779483244
New Minimum: -280.4063640938544 > -301.08022388757024
END: th(201600.00000000003)=-301.08022388757024; dx=-8.037337094162714E-5 evalInputDelta=70.0642885731991
Fitness changed from -231.01593531437115 to -301.08022388757024
Iteration 3 complete. Error: -301.08022388757024 Total: 3.5251; Orientation: 0.0156; Line Search: 2.5679
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/107f2586-8a66-4bfc-84cf-f5ff06345816.jpg)
Adding measurement 354d83 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.784e+04, gradient 3.406e-02, dot -0.322; [47381fbe-8e79-4a43-aa09-c0a59a21f715 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -301.08022388757024, -231.01593531437115, -144.83366365417154, -86.89338871703337
LBFGS Accumulation History: 3 points
Removed measurement 354d83 to history. Total: 3
th(0)=-301.08022388757024;dx=-0.0011536772027730012
New Minimum: -301.08022388757024 > -313.55410529539506
WOLF (strong): th(434334.03351042786)=-313.55410529539506; dx=1.233411695000248E-4 evalInputDelta=12.47388140782482
New Minimum: -313.55410529539506 > -366.33710037478073
WOLF (strong): th(217167.01675521393)=-366.33710037478073; dx=3.1885162345296356E-6 evalInputDelta=65.25687648721049
END: th(72389.00558507131)=-354.3607465112916; dx=-4.629762205352304E-4 evalInputDelta=53.28052262372137
Fitness changed from -301.08022388757024 to -366.33710037478073
Iteration 4 complete. Error: -366.33710037478073 Total: 4.7725; Orientation: 0.2802; Line Search: 3.5518
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/b851a175-3e50-4116-85bd-ef9af652b2e5.jpg)
Adding measurement 6514c3c1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.207e+04, gradient 3.477e-02, dot -0.277; [47381fbe-8e79-4a43-aa09-c0a59a21f715 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -366.33710037478073, -231.01593531437115, -144.83366365417154, -86.89338871703337
LBFGS Accumulation History: 3 points
Removed measurement 6514c3c1 to history. Total: 3
th(0)=-366.33710037478073;dx=-0.0012072960878302629
New Minimum: -366.33710037478073 > -439.9563192538571
END: th(155957.38480938942)=-439.9563192538571; dx=-1.2928510109563868E-4 evalInputDelta=73.61921887907636
Fitness changed from -366.33710037478073 to -439.9563192538571
Iteration 5 complete. Error: -439.9563192538571 Total: 2.9600; Orientation: 0.2824; Line Search: 1.7255
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/ae264417-f8c0-418a-ba14-7f9cd05b81db.jpg)
Adding measurement 1a9c0c28 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.742e+04, gradient 3.191e-02, dot -0.300; [47381fbe-8e79-4a43-aa09-c0a59a21f715 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -439.9563192538571, -231.01593531437115, -144.83366365417154, -86.89338871703337
LBFGS Accumulation History: 3 points
Removed measurement 1a9c0c28 to history. Total: 3
th(0)=-439.9563192538571;dx=-0.0010143744793920037
New Minimum: -439.9563192538571 > -442.06661751000274
WOLF (strong): th(336000.0000000001)=-442.06661751000274; dx=1.3764147572575E-4 evalInputDelta=2.1102982561456542
New Minimum: -442.06661751000274 > -482.8666537682274
END: th(168000.00000000006)=-482.8666537682274; dx=-3.4371927474043E-5 evalInputDelta=42.910334514370334
Fitness changed from -439.9563192538571 to -482.8666537682274
Iteration 6 complete. Error: -482.8666537682274 Total: 3.7883; Orientation: 0.3076; Line Search: 2.5735
Adding measurement 50de1d0b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.429e+04, gradient 3.408e-02, dot -0.311; [47381fbe-8e79-4a43-aa09-c0a59a21f715 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -482.8666537682274, -231.01593531437115, -144.83366365417154, -86.89338871703337
LBFGS Accumulation History: 3 points
Removed measurement 50de1d0b to history. Total: 3
th(0)=-482.8666537682274;dx=-0.0011591273162597708
Armijo: th(361945.0279253566)=-469.42994218123994; dx=2.0531584395845225E-4 evalInputDelta=-13.436711586987485
New Minimum: -482.8666537682274 > -523.56107419755
WOLF (strong): th(180972.5139626783)=-523.56107419755; dx=6.960515230202433E-5 evalInputDelta=40.69442042932263
END: th(60324.17132089276)=-522.8706319008534; dx=-3.9626964968307105E-4 evalInputDelta=40.003978132625946
Fitness changed from -482.8666537682274 to -523.56107419755
Iteration 7 complete. Error: -523.56107419755 Total: 4.7521; Orientation: 0.2877; Line Search: 3.6589
Adding measurement 2e29b18e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.417e+04, gradient 3.461e-02, dot -0.279; [47381fbe-8e79-4a43-aa09-c0a59a21f715 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -523.56107419755, -231.01593531437115, -144.83366365417154, -86.89338871703337
LBFGS Accumulation History: 3 points
Removed measurement 2e29b18e to history. Total: 3
th(0)=-523.56107419755;dx=-0.0011963845360924764
New Minimum: -523.56107419755 > -575.4997486586137
END: th(129964.48734115784)=-575.4997486586137; dx=-3.107125707019263E-5 evalInputDelta=51.93867446106367
Fitness changed from -523.56107419755 to -575.4997486586137
Iteration 8 complete. Error: -575.4997486586137 Total: 2.8056; Orientation: 0.2760; Line Search: 1.7050
Adding measurement 37cadb67 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.422e+05, gradient 3.053e-02, dot -0.339; [47381fbe-8e79-4a43-aa09-c0a59a21f715 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -575.4997486586137, -231.01593531437115, -144.83366365417154, -86.89338871703337
LBFGS Accumulation History: 3 points
Removed measurement 37cadb67 to history. Total: 3
th(0)=-575.4997486586137;dx=-9.285526826478182E-4
New Minimum: -575.4997486586137 > -585.3484545193721
WOLF (strong): th(280000.0000000001)=-585.3484545193721; dx=1.3845610601607197E-4 evalInputDelta=9.8487058607584
New Minimum: -585.3484545193721 > -612.3451850871261
END: th(140000.00000000006)=-612.3451850871261; dx=-4.7599127850561914E-5 evalInputDelta=36.84543642851236
Fitness changed from -575.4997486586137 to -612.3451850871261
Iteration 9 complete. Error: -612.3451850871261 Total: 3.6125; Orientation: 0.2758; Line Search: 2.5330
Adding measurement 2df30788 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.771e+05, gradient 3.051e-02, dot -0.333; [47381fbe-8e79-4a43-aa09-c0a59a21f715 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -612.3451850871261, -231.01593531437115, -144.83366365417154, -86.89338871703337
LBFGS Accumulation History: 3 points
Removed measurement 2df30788 to history. Total: 3
th(0)=-612.3451850871261;dx=-9.279227167847235E-4
Armijo: th(301620.8566044639)=-588.6428832422538; dx=2.3481680784144142E-4 evalInputDelta=-23.702301844872295
New Minimum: -612.3451850871261 > -640.1876268881405
WOLF (strong): th(150810.42830223194)=-640.1876268881405; dx=4.932209377766275E-5 evalInputDelta=27.842441801014388
END: th(50270.142767410645)=-636.5470814627499; dx=-3.71907956241725E-4 evalInputDelta=24.201896375623846
Fitness changed from -612.3451850871261 to -640.1876268881405
Iteration 10 complete. Error: -640.1876268881405 Total: 4.7726; Orientation: 0.2826; Line Search: 3.6545
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/bde461f3-3fe1-4bef-b58b-682d270babd1.jpg)
Adding measurement e3ee00e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.946e+05, gradient 3.285e-02, dot -0.328; [47381fbe-8e79-4a43-aa09-c0a59a21f715 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -640.1876268881405, -231.01593531437115, -144.83366365417154, -86.89338871703337
LBFGS Accumulation History: 3 points
Removed measurement e3ee00e to history. Total: 3
th(0)=-640.1876268881405;dx=-0.0010773949522377188
New Minimum: -640.1876268881405 > -672.5575811252429
WOLF (strong): th(108303.7394509649)=-672.5575811252429; dx=9.592213903521037E-6 evalInputDelta=32.369954237102434
END: th(54151.86972548245)=-670.0099216310422; dx=-3.0108839644097865E-4 evalInputDelta=29.822294742901704
Fitness changed from -640.1876268881405 to -672.5575811252429
Iteration 11 complete. Error: -672.5575811252429 Total: 3.7872; Orientation: 0.2782; Line Search: 2.5876
Adding measurement 76e247b9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.667e+05, gradient 2.879e-02, dot -0.362; [47381fbe-8e79-4a43-aa09-c0a59a21f715 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -672.5575811252429, -231.01593531437115, -144.83366365417154, -86.89338871703337
LBFGS Accumulation History: 3 points
Removed measurement 76e247b9 to history. Total: 3
th(0)=-672.5575811252429;dx=-8.261704462763521E-4
New Minimum: -672.5575811252429 > -698.2131424891229
END: th(116666.66666666674)=-698.2131424891229; dx=-6.665819420972768E-5 evalInputDelta=25.655561363879997
Fitness changed from -672.5575811252429 to -698.2131424891229
Iteration 12 complete. Error: -698.2131424891229 Total: 2.7749; Orientation: 0.2745; Line Search: 1.6848
Adding measurement 715c0e40 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.288e+05, gradient 2.811e-02, dot -0.382; [47381fbe-8e79-4a43-aa09-c0a59a21f715 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -698.2131424891229, -231.01593531437115, -144.83366365417154, -86.89338871703337
LBFGS Accumulation History: 3 points
Removed measurement 715c0e40 to history. Total: 3
th(0)=-698.2131424891229;dx=-7.891222692614007E-4
New Minimum: -698.2131424891229 > -700.2988566004083
WOLF (strong): th(251350.71383705328)=-700.2988566004083; dx=9.924832732221741E-5 evalInputDelta=2.0857141112853697
New Minimum: -700.2988566004083 > -719.2838086746624
END: th(125675.35691852664)=-719.2838086746624; dx=-4.7814331189491386E-5 evalInputDelta=21.070666185539494
Fitness changed from -698.2131424891229 to -719.2838086746624
Iteration 13 complete. Error: -719.2838086746624 Total: 3.8367; Orientation: 0.3965; Line Search: 2.5987
Adding measurement 3a038d61 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.612e+06, gradient 2.838e-02, dot -0.371; [47381fbe-8e79-4a43-aa09-c0a59a21f715 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -719.2838086746624, -231.01593531437115, -144.83366365417154, -86.89338871703337
LBFGS Accumulation History: 3 points
Removed measurement 3a038d61 to history. Total: 3
th(0)=-719.2838086746624;dx=-8.031850737314985E-4
Armijo: th(270759.3486274123)=-703.4644522454785; dx=1.8651423588036603E-4 evalInputDelta=-15.819356429183927
New Minimum: -719.2838086746624 > -738.8171050035202
WOLF (strong): th(135379.67431370614)=-738.8171050035202; dx=2.1978214236045129E-7 evalInputDelta=19.533296328857773
END: th(45126.558104568714)=-735.0724778285163; dx=-2.997507363204859E-4 evalInputDelta=15.788669153853903
Fitness changed from -719.2838086746624 to -738.8171050035202
Iteration 14 complete. Error: -738.8171050035202 Total: 4.4657; Orientation: 0.2812; Line Search: 3.4042
Adding measurement 3a62e170 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.968e+06, gradient 2.946e-02, dot -0.363; [47381fbe-8e79-4a43-aa09-c0a59a21f715 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -738.8171050035202, -231.01593531437115, -144.83366365417154, -86.89338871703337
LBFGS Accumulation History: 3 points
Removed measurement 3a62e170 to history. Total: 3
th(0)=-738.8171050035202;dx=-8.663884772741695E-4
New Minimum: -738.8171050035202 > -761.4935921015638
END: th(97222.22222222229)=-761.4935921015638; dx=-5.655990054483738E-5 evalInputDelta=22.676487098043594
Fitness changed from -738.8171050035202 to -761.4935921015638
Iteration 15 complete. Error: -761.4935921015638 Total: 2.9086; Orientation: 0.2746; Line Search: 1.8098
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/8f1df625-f577-44a1-a674-d68f2d9d00fc.jpg)
Final threshold in iteration 16: -761.4935921015638 (> -Infinity) after 63.019s (< 5400.000s)

Returns

    -761.4935921015638