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 60.25 seconds (1.294 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: 158333185364600
Reset training subject: 158334086426400
Adding measurement 59cce823 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-2.3463037089310212;dx=-5.891813960016807E-5
New Minimum: -2.3463037089310212 > -2.3464450032383275
WOLFE (weak): th(2.154434690031884)=-2.3464450032383275; dx=-5.901168740871661E-5 evalInputDelta=1.4129430730625003E-4
New Minimum: -2.3464450032383275 > -2.346586366707819
WOLFE (weak): th(4.308869380063768)=-2.346586366707819; dx=-5.901301570470362E-5 evalInputDelta=2.8265777679781223E-4
New Minimum: -2.346586366707819 > -2.347152744911092
WOLFE (weak): th(12.926608140191302)=-2.347152744911092; dx=-5.8831269562455256E-5 evalInputDelta=8.490359800705782E-4
New Minimum: -2.347152744911092 > -2.3497019680322286
WOLFE (weak): th(51.70643256076521)=-2.3497019680322286; dx=-5.895280280056416E-5 evalInputDelta=0.0033982591012073904
New Minimum: -2.3497019680322286 > -2.363311538110524
WOLFE (weak): th(258.53216280382605)=-2.363311538110524; dx=-5.9247559829024566E-5 evalInputDelta=0.01700782917950283
New Minimum: -2.363311538110524 > -2.4491101882403976
WOLFE (weak): th(1551.1929768229563)=-2.4491101882403976; dx=-5.96215907696822E-5 evalInputDelta=0.10280647930937636
New Minimum: -2.4491101882403976 > -3.091242830429854
WOLFE (weak): th(10858.350837760694)=-3.091242830429854; dx=-6.069953174881015E-5 evalInputDelta=0.7449391214988328
New Minimum: -3.091242830429854 > -6.204498388659268
END: th(86866.80670208555)=-6.204498388659268; dx=-2.004080101790108E-5 evalInputDelta=3.858194679728247
Fitness changed from -2.3463037089310212 to -6.204498388659268
Iteration 1 complete. Error: -6.204498388659268 Total: 10.8073; Orientation: 0.0145; Line Search: 8.2504
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/81faad52-8876-4060-a24d-9814d8d5c2c0.jpg)
Adding measurement 416e1f8b to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-6.204498388659268;dx=-8.929781330529236E-5
New Minimum: -6.204498388659268 > -10.689256654482062
END: th(187148.86177126726)=-10.689256654482062; dx=-6.078214917330489E-6 evalInputDelta=4.484758265822793
Fitness changed from -6.204498388659268 to -10.689256654482062
Iteration 2 complete. Error: -10.689256654482062 Total: 2.6178; Orientation: 0.0144; Line Search: 1.6889
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/a20b15fd-bd7f-4644-92e9-e0e655cb7860.jpg)
Adding measurement 42e7aee6 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-10.689256654482062;dx=-1.048500639601149E-4
New Minimum: -10.689256654482062 > -15.85378725161742
END: th(403200.00000000006)=-15.85378725161742; dx=-1.1037488157427592E-7 evalInputDelta=5.164530597135359
Fitness changed from -10.689256654482062 to -15.85378725161742
Iteration 3 complete. Error: -15.85378725161742 Total: 2.8577; Orientation: 0.0154; Line Search: 1.7005
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/c39f6d8b-b06e-47ae-9f2d-efd73a960e9c.jpg)
Adding measurement 6d72f7c7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.777e+03, gradient 8.894e-03, dot -0.245; [0b7cb1a8-f854-4a22-87e8-7ca64085746d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -15.85378725161742, -10.689256654482062, -6.204498388659268, -2.3463037089310212
LBFGS Accumulation History: 3 points
Removed measurement 6d72f7c7 to history. Total: 3
th(0)=-15.85378725161742;dx=-7.894675875443633E-5
New Minimum: -15.85378725161742 > -23.823853858080252
WOLF (strong): th(868668.0670208557)=-23.823853858080252; dx=2.711717295601137E-6 evalInputDelta=7.970066606462831
New Minimum: -23.823853858080252 > -28.390376785872586
END: th(434334.03351042786)=-28.390376785872586; dx=-3.746327916043898E-6 evalInputDelta=12.536589534255166
Fitness changed from -15.85378725161742 to -28.390376785872586
Iteration 4 complete. Error: -28.390376785872586 Total: 3.7544; Orientation: 0.2769; Line Search: 2.5513
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/b492c355-0169-4304-a862-ba803fb25763.jpg)
Adding measurement cff2309 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.740e+03, gradient 8.401e-03, dot -0.265; [0b7cb1a8-f854-4a22-87e8-7ca64085746d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -28.390376785872586, -10.689256654482062, -6.204498388659268, -2.3463037089310212
LBFGS Accumulation History: 3 points
Removed measurement cff2309 to history. Total: 3
th(0)=-28.390376785872586;dx=-7.003107906904877E-5
New Minimum: -28.390376785872586 > -32.35089079492277
WOLF (strong): th(935744.3088563365)=-32.35089079492277; dx=6.35973285101857E-6 evalInputDelta=3.9605140090501827
New Minimum: -32.35089079492277 > -40.41753076571577
END: th(467872.15442816826)=-40.41753076571577; dx=-4.74318109787418E-6 evalInputDelta=12.027153979843181
Fitness changed from -28.390376785872586 to -40.41753076571577
Iteration 5 complete. Error: -40.41753076571577 Total: 3.7767; Orientation: 0.2775; Line Search: 2.6192
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/623efc5b-e1ab-4029-b14a-d8fc4f2450c0.jpg)
Adding measurement f4e9b6a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.175e+04, gradient 8.480e-03, dot -0.284; [0b7cb1a8-f854-4a22-87e8-7ca64085746d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -40.41753076571577, -10.689256654482062, -6.204498388659268, -2.3463037089310212
LBFGS Accumulation History: 3 points
Removed measurement f4e9b6a to history. Total: 3
th(0)=-40.41753076571577;dx=-7.147246425992701E-5
Armijo: th(1008000.0000000003)=-37.204567939113524; dx=6.671815649312749E-6 evalInputDelta=-3.2129628266022436
New Minimum: -40.41753076571577 > -48.271467691836435
WOLF (strong): th(504000.0000000002)=-48.271467691836435; dx=7.263274524758726E-7 evalInputDelta=7.853936926120667
New Minimum: -48.271467691836435 > -48.65243699918432
END: th(168000.00000000006)=-48.65243699918432; dx=-2.9500926093560297E-5 evalInputDelta=8.23490623346855
Fitness changed from -40.41753076571577 to -48.65243699918432
Iteration 6 complete. Error: -48.65243699918432 Total: 4.6370; Orientation: 0.2822; Line Search: 3.4560
Adding measurement 3495fa7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.682e+04, gradient 7.287e-03, dot -0.368; [0b7cb1a8-f854-4a22-87e8-7ca64085746d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -48.65243699918432, -10.689256654482062, -6.204498388659268, -2.3463037089310212
LBFGS Accumulation History: 3 points
Removed measurement 3495fa7 to history. Total: 3
th(0)=-48.65243699918432;dx=-5.284065678506781E-5
New Minimum: -48.65243699918432 > -55.610244634852904
END: th(361945.0279253566)=-55.610244634852904; dx=-1.4157490154655493E-5 evalInputDelta=6.957807635668587
Fitness changed from -48.65243699918432 to -55.610244634852904
Iteration 7 complete. Error: -55.610244634852904 Total: 2.7823; Orientation: 0.2742; Line Search: 1.6850
Adding measurement 3527d217 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.628e+04, gradient 7.824e-03, dot -0.393; [0b7cb1a8-f854-4a22-87e8-7ca64085746d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -55.610244634852904, -10.689256654482062, -6.204498388659268, -2.3463037089310212
LBFGS Accumulation History: 3 points
Removed measurement 3527d217 to history. Total: 3
th(0)=-55.610244634852904;dx=-6.101313281285894E-5
Armijo: th(779786.9240469472)=-53.99646397035089; dx=1.169043298871537E-6 evalInputDelta=-1.6137806645020163
New Minimum: -55.610244634852904 > -59.627326872837486
END: th(389893.4620234736)=-59.627326872837486; dx=-4.721951764701857E-6 evalInputDelta=4.017082237984582
Fitness changed from -55.610244634852904 to -59.627326872837486
Iteration 8 complete. Error: -59.627326872837486 Total: 3.8614; Orientation: 0.2818; Line Search: 2.7616
Adding measurement 26032309 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.498e+04, gradient 8.210e-03, dot -0.377; [0b7cb1a8-f854-4a22-87e8-7ca64085746d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.627326872837486, -10.689256654482062, -6.204498388659268, -2.3463037089310212
LBFGS Accumulation History: 3 points
Removed measurement 26032309 to history. Total: 3
th(0)=-59.627326872837486;dx=-6.711556593580505E-5
Armijo: th(840000.0000000003)=-53.86207611144764; dx=7.50282431134478E-6 evalInputDelta=-5.765250761389844
New Minimum: -59.627326872837486 > -64.75931941213122
WOLF (strong): th(420000.0000000002)=-64.75931941213122; dx=1.0321724597603425E-6 evalInputDelta=5.131992539293734
New Minimum: -64.75931941213122 > -65.46101710318463
END: th(140000.00000000006)=-65.46101710318463; dx=-2.8003250992903618E-5 evalInputDelta=5.833690230347145
Fitness changed from -59.627326872837486 to -65.46101710318463
Iteration 9 complete. Error: -65.46101710318463 Total: 4.5133; Orientation: 0.2951; Line Search: 3.3773
Adding measurement 692a5a6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.783e+04, gradient 6.991e-03, dot -0.461; [0b7cb1a8-f854-4a22-87e8-7ca64085746d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -65.46101710318463, -10.689256654482062, -6.204498388659268, -2.3463037089310212
LBFGS Accumulation History: 3 points
Removed measurement 692a5a6 to history. Total: 3
th(0)=-65.46101710318463;dx=-4.878575512839048E-5
New Minimum: -65.46101710318463 > -70.51794887291847
END: th(301620.8566044639)=-70.51794887291847; dx=-1.6293877583372055E-5 evalInputDelta=5.056931769733836
Fitness changed from -65.46101710318463 to -70.51794887291847
Iteration 10 complete. Error: -70.51794887291847 Total: 2.8098; Orientation: 0.2774; Line Search: 1.7076
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/84d54552-a2c8-4a7e-a744-7e0726ec5b42.jpg)
Adding measurement 7b9f6555 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.729e+04, gradient 7.135e-03, dot -0.485; [0b7cb1a8-f854-4a22-87e8-7ca64085746d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -70.51794887291847, -10.689256654482062, -6.204498388659268, -2.3463037089310212
LBFGS Accumulation History: 3 points
Removed measurement 7b9f6555 to history. Total: 3
th(0)=-70.51794887291847;dx=-5.0827402656870635E-5
New Minimum: -70.51794887291847 > -72.5159965729954
END: th(649822.4367057894)=-72.5159965729954; dx=-4.470149915357229E-6 evalInputDelta=1.9980477000769383
Fitness changed from -70.51794887291847 to -72.5159965729954
Iteration 11 complete. Error: -72.5159965729954 Total: 3.1557; Orientation: 0.2669; Line Search: 1.7188
Adding measurement c314b1d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.043e+05, gradient 8.492e-03, dot -0.388; [0b7cb1a8-f854-4a22-87e8-7ca64085746d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -72.5159965729954, -10.689256654482062, -6.204498388659268, -2.3463037089310212
LBFGS Accumulation History: 3 points
Removed measurement c314b1d to history. Total: 3
th(0)=-72.5159965729954;dx=-7.198246774965154E-5
Armijo: th(1400000.000000001)=-53.016427354837006; dx=8.181004843933994E-6 evalInputDelta=-19.4995692181584
Armijo: th(700000.0000000005)=-71.56135884867543; dx=9.376399204869556E-6 evalInputDelta=-0.95463772431998
New Minimum: -72.5159965729954 > -80.25379575817702
END: th(233333.3333333335)=-80.25379575817702; dx=-1.4895488254959191E-5 evalInputDelta=7.737799185181615
Fitness changed from -72.5159965729954 to -80.25379575817702
Iteration 12 complete. Error: -80.25379575817702 Total: 4.3692; Orientation: 0.2724; Line Search: 3.2883
Adding measurement 657e670e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.226e+05, gradient 7.133e-03, dot -0.476; [0b7cb1a8-f854-4a22-87e8-7ca64085746d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -80.25379575817702, -10.689256654482062, -6.204498388659268, -2.3463037089310212
LBFGS Accumulation History: 3 points
Removed measurement 657e670e to history. Total: 3
th(0)=-80.25379575817702;dx=-5.0673775340629774E-5
New Minimum: -80.25379575817702 > -83.72402019839778
END: th(502701.42767410656)=-83.72402019839778; dx=-4.673962455745317E-6 evalInputDelta=3.470224440220761
Fitness changed from -80.25379575817702 to -83.72402019839778
Iteration 13 complete. Error: -83.72402019839778 Total: 2.7920; Orientation: 0.2751; Line Search: 1.6906
Adding measurement 1f358f7f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.138e+05, gradient 8.250e-03, dot -0.424; [0b7cb1a8-f854-4a22-87e8-7ca64085746d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -83.72402019839778, -10.689256654482062, -6.204498388659268, -2.3463037089310212
LBFGS Accumulation History: 3 points
Removed measurement 1f358f7f to history. Total: 3
th(0)=-83.72402019839778;dx=-6.791032278336153E-5
Armijo: th(1083037.3945096491)=-71.4803392301427; dx=6.966113198943158E-6 evalInputDelta=-12.243680968255077
New Minimum: -83.72402019839778 > -84.35292203358325
WOLF (strong): th(541518.6972548246)=-84.35292203358325; dx=4.862063324928751E-6 evalInputDelta=0.6289018351854736
New Minimum: -84.35292203358325 > -89.13661754321056
END: th(180506.23241827486)=-89.13661754321056; dx=-1.5897970970449423E-5 evalInputDelta=5.412597344812781
Fitness changed from -83.72402019839778 to -89.13661754321056
Iteration 14 complete. Error: -89.13661754321056 Total: 4.6254; Orientation: 0.2642; Line Search: 3.4244
Adding measurement 1719823a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.605e+06, gradient 6.766e-03, dot -0.516; [0b7cb1a8-f854-4a22-87e8-7ca64085746d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -89.13661754321056, -10.689256654482062, -6.204498388659268, -2.3463037089310212
LBFGS Accumulation History: 3 points
Removed measurement 1719823a to history. Total: 3
th(0)=-89.13661754321056;dx=-4.569508589835105E-5
New Minimum: -89.13661754321056 > -92.56837851551788
END: th(388888.88888888917)=-92.56837851551788; dx=-1.1559312400984725E-5 evalInputDelta=3.431760972307316
Fitness changed from -89.13661754321056 to -92.56837851551788
Iteration 15 complete. Error: -92.56837851551788 Total: 2.7890; Orientation: 0.2713; Line Search: 1.7337
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/67b31a78-8ef4-4add-866b-7dd55c0791e1.jpg)
Final threshold in iteration 16: -92.56837851551788 (> -Infinity) after 60.253s (< 5400.000s)

Returns

    -92.56837851551788