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 47.65 seconds (0.903 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: 214226428738500
Reset training subject: 214227042029000
Adding measurement 45bde54d to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-21.783153849695815;dx=-0.0026186671639999424
New Minimum: -21.783153849695815 > -21.787448011076755
WOLFE (weak): th(2.154434690031884)=-21.787448011076755; dx=-0.0026161251786878405 evalInputDelta=0.004294161380940409
New Minimum: -21.787448011076755 > -21.79173624588444
WOLFE (weak): th(4.308869380063768)=-21.79173624588444; dx=-0.0026172481590340455 evalInputDelta=0.008582396188625552
New Minimum: -21.79173624588444 > -21.808923643205876
WOLFE (weak): th(12.926608140191302)=-21.808923643205876; dx=-0.0026187991003409844 evalInputDelta=0.02576979351006159
New Minimum: -21.808923643205876 > -21.886598625028306
WOLFE (weak): th(51.70643256076521)=-21.886598625028306; dx=-0.00262548453487415 evalInputDelta=0.10344477533249119
New Minimum: -21.886598625028306 > -22.306775074755613
WOLFE (weak): th(258.53216280382605)=-22.306775074755613; dx=-0.0026752280640148923 evalInputDelta=0.5236212250597987
New Minimum: -22.306775074755613 > -25.113571641134182
WOLFE (weak): th(1551.1929768229563)=-25.113571641134182; dx=-0.002746720907499888 evalInputDelta=3.330417791438368
New Minimum: -25.113571641134182 > -39.67594247551526
END: th(10858.350837760694)=-39.67594247551526; dx=-0.0014374346475695713 evalInputDelta=17.892788625819442
Fitness changed from -21.783153849695815 to -39.67594247551526
Iteration 1 complete. Error: -39.67594247551526 Total: 6.8863; Orientation: 0.0163; Line Search: 5.1529
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/4921d669-b55e-4bbc-8225-bfb44a0ee017.jpg)
Adding measurement 652cb87d to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-39.67594247551526;dx=-0.004064477880220263
New Minimum: -39.67594247551526 > -61.796082772186956
END: th(23393.607721408407)=-61.796082772186956; dx=-7.935029677891003E-4 evalInputDelta=22.1201402966717
Fitness changed from -39.67594247551526 to -61.796082772186956
Iteration 2 complete. Error: -61.796082772186956 Total: 1.8064; Orientation: 0.0169; Line Search: 1.2032
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/73484042-5c97-4e02-a5af-c4828b0b464b.jpg)
Adding measurement 286f8e90 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-61.796082772186956;dx=-0.0037813731323792614
New Minimum: -61.796082772186956 > -79.98717497664599
END: th(50400.00000000001)=-79.98717497664599; dx=-3.479151525867948E-4 evalInputDelta=18.191092204459032
Fitness changed from -61.796082772186956 to -79.98717497664599
Iteration 3 complete. Error: -79.98717497664599 Total: 1.8026; Orientation: 0.0166; Line Search: 1.1962
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/16a380b2-df5e-4a3f-8304-ac9bcc9592dd.jpg)
Adding measurement ac3739d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.656e+03, gradient 6.188e-02, dot -0.159; [5efa094b-08d2-4fbf-bd52-548b65cf78bb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -79.98717497664599, -61.796082772186956, -39.67594247551526, -21.783153849695815
LBFGS Accumulation History: 3 points
Removed measurement ac3739d to history. Total: 3
th(0)=-79.98717497664599;dx=-0.0038108579667919316
Armijo: th(108583.50837760697)=-69.55932077614482; dx=-1.1730733051143687E-4 evalInputDelta=-10.427854200501173
New Minimum: -79.98717497664599 > -105.65747454168984
END: th(54291.75418880348)=-105.65747454168984; dx=-4.793591892171108E-4 evalInputDelta=25.670299565043848
Fitness changed from -79.98717497664599 to -105.65747454168984
Iteration 4 complete. Error: -105.65747454168984 Total: 2.7001; Orientation: 0.3112; Line Search: 1.7993
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/769409c9-cb4a-4125-8faf-8926b38c1d74.jpg)
Adding measurement 7ce09850 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.736e+03, gradient 6.066e-02, dot -0.161; [5efa094b-08d2-4fbf-bd52-548b65cf78bb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -105.65747454168984, -61.796082772186956, -39.67594247551526, -21.783153849695815
LBFGS Accumulation History: 3 points
Removed measurement 7ce09850 to history. Total: 3
th(0)=-105.65747454168984;dx=-0.0036722296912517056
Armijo: th(116968.03860704206)=-83.91277636935678; dx=-7.580596883767715E-5 evalInputDelta=-21.74469817233306
New Minimum: -105.65747454168984 > -134.59339907205106
END: th(58484.01930352103)=-134.59339907205106; dx=-5.672858298004244E-4 evalInputDelta=28.93592453036122
Fitness changed from -105.65747454168984 to -134.59339907205106
Iteration 5 complete. Error: -134.59339907205106 Total: 3.0398; Orientation: 0.3095; Line Search: 2.1225
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/d52cc778-9088-4f18-85fc-29a82257b828.jpg)
Adding measurement 41737438 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.781e+03, gradient 6.149e-02, dot -0.167; [5efa094b-08d2-4fbf-bd52-548b65cf78bb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -134.59339907205106, -61.796082772186956, -39.67594247551526, -21.783153849695815
LBFGS Accumulation History: 3 points
Removed measurement 41737438 to history. Total: 3
th(0)=-134.59339907205106;dx=-0.0037671444131630646
Armijo: th(126000.00000000004)=-97.72815963841782; dx=-7.972923253800736E-5 evalInputDelta=-36.865239433633235
New Minimum: -134.59339907205106 > -162.46546261833478
END: th(63000.00000000002)=-162.46546261833478; dx=-6.094793792895807E-4 evalInputDelta=27.872063546283727
Fitness changed from -134.59339907205106 to -162.46546261833478
Iteration 6 complete. Error: -162.46546261833478 Total: 2.7317; Orientation: 0.2967; Line Search: 1.8166
Adding measurement 49dce561 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.128e+04, gradient 6.392e-02, dot -0.167; [5efa094b-08d2-4fbf-bd52-548b65cf78bb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -162.46546261833478, -61.796082772186956, -39.67594247551526, -21.783153849695815
LBFGS Accumulation History: 3 points
Removed measurement 49dce561 to history. Total: 3
th(0)=-162.46546261833478;dx=-0.004077782740650282
Armijo: th(135729.38547200873)=-112.60470645435944; dx=-1.0962572948632879E-4 evalInputDelta=-49.86075616397534
New Minimum: -162.46546261833478 > -186.33181440821141
END: th(67864.69273600436)=-186.33181440821141; dx=-6.988734039627376E-4 evalInputDelta=23.86635178987663
Fitness changed from -162.46546261833478 to -186.33181440821141
Iteration 7 complete. Error: -186.33181440821141 Total: 2.6673; Orientation: 0.3116; Line Search: 1.8166
Adding measurement 3f30c9cf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.865e+04, gradient 6.459e-02, dot -0.172; [5efa094b-08d2-4fbf-bd52-548b65cf78bb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -186.33181440821141, -61.796082772186956, -39.67594247551526, -21.783153849695815
LBFGS Accumulation History: 3 points
Removed measurement 3f30c9cf to history. Total: 3
th(0)=-186.33181440821141;dx=-0.0041638985763041945
Armijo: th(146210.0482588026)=-133.61751626284376; dx=-4.4130291192855045E-5 evalInputDelta=-52.71429814536765
New Minimum: -186.33181440821141 > -215.14047739889406
END: th(73105.0241294013)=-215.14047739889406; dx=-7.946005167341517E-4 evalInputDelta=28.80866299068265
Fitness changed from -186.33181440821141 to -215.14047739889406
Iteration 8 complete. Error: -215.14047739889406 Total: 2.6438; Orientation: 0.3035; Line Search: 1.8045
Adding measurement 11f633f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.098e+04, gradient 6.492e-02, dot -0.178; [5efa094b-08d2-4fbf-bd52-548b65cf78bb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -215.14047739889406, -61.796082772186956, -39.67594247551526, -21.783153849695815
LBFGS Accumulation History: 3 points
Removed measurement 11f633f to history. Total: 3
th(0)=-215.14047739889406;dx=-0.00420669325551435
Armijo: th(157500.00000000006)=-143.97553823325467; dx=-2.5146908694765748E-5 evalInputDelta=-71.1649391656394
New Minimum: -215.14047739889406 > -238.46789274353085
END: th(78750.00000000003)=-238.46789274353085; dx=-7.248066088970425E-4 evalInputDelta=23.32741534463679
Fitness changed from -215.14047739889406 to -238.46789274353085
Iteration 9 complete. Error: -238.46789274353085 Total: 2.6905; Orientation: 0.3012; Line Search: 1.8544
Adding measurement 278e51f1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.433e+05, gradient 6.622e-02, dot -0.182; [5efa094b-08d2-4fbf-bd52-548b65cf78bb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -238.46789274353085, -61.796082772186956, -39.67594247551526, -21.783153849695815
LBFGS Accumulation History: 3 points
Removed measurement 278e51f1 to history. Total: 3
th(0)=-238.46789274353085;dx=-0.004379890656582273
Armijo: th(169661.7318400109)=-150.9273863546329; dx=5.825376385348662E-6 evalInputDelta=-87.54050638889797
New Minimum: -238.46789274353085 > -257.3380537981212
END: th(84830.86592000545)=-257.3380537981212; dx=-6.671055033394306E-4 evalInputDelta=18.87016105459037
Fitness changed from -238.46789274353085 to -257.3380537981212
Iteration 10 complete. Error: -257.3380537981212 Total: 2.9635; Orientation: 0.2851; Line Search: 1.8390
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/0319a750-dd5e-46c3-9040-913c5e1fdce8.jpg)
Adding measurement 30760c5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.387e+06, gradient 6.684e-02, dot -0.176; [5efa094b-08d2-4fbf-bd52-548b65cf78bb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -257.3380537981212, -61.796082772186956, -39.67594247551526, -21.783153849695815
LBFGS Accumulation History: 3 points
Removed measurement 30760c5 to history. Total: 3
th(0)=-257.3380537981212;dx=-0.004459712830032157
Armijo: th(182762.56032350325)=-171.5710726758523; dx=4.347704964205738E-5 evalInputDelta=-85.76698112226893
New Minimum: -257.3380537981212 > -285.9453254455269
END: th(91381.28016175162)=-285.9453254455269; dx=-6.700855854205025E-4 evalInputDelta=28.607271647405696
Fitness changed from -257.3380537981212 to -285.9453254455269
Iteration 11 complete. Error: -285.9453254455269 Total: 2.7013; Orientation: 0.3024; Line Search: 1.8180
Adding measurement 44c1ce5a to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.224e+04, gradient 6.682e-02, dot 0.306; [5efa094b-08d2-4fbf-bd52-548b65cf78bb = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-285.9453254455269;dx=-250.23039105323286
Armijo: th(196875.0000000001)=659.0143318015057; dx=0.0027101061104622295 evalInputDelta=-944.9596572470326
Armijo: th(98437.50000000004)=656.3041095340552; dx=0.005396300860168547 evalInputDelta=-942.2494349795821
Armijo: th(32812.500000000015)=649.8786714632835; dx=0.016054379727281295 evalInputDelta=-935.8239969088104
Armijo: th(8203.125000000004)=637.2514895907162; dx=0.06325160693485861 evalInputDelta=-923.1968150362432
Armijo: th(1640.6250000000007)=609.9882826531178; dx=0.3046769303723842 evalInputDelta=-895.9336080986448
Armijo: th(273.4375000000001)=547.5230200134803; dx=1.673727476261949 evalInputDelta=-833.4683454590072
Armijo: th(39.062500000000014)=398.55373961499083; dx=9.37922787354195 evalInputDelta=-684.4990650605178
Armijo: th(4.882812500000002)=3.9816110268010902; dx=21.407698265976165 evalInputDelta=-289.926936472328
Armijo: th(0.5425347222222224)=-275.2433577048006; dx=-63.881864087654634 evalInputDelta=-10.701967740726332
New Minimum: -285.9453254455269 > -287.39391841937606
END: th(0.054253472222222245)=-287.39391841937606; dx=-138.95799777125512 evalInputDelta=1.448592973849145
Fitness changed from -285.9453254455269 to -287.39391841937606
Iteration 12 complete. Error: -287.39391841937606 Total: 8.0150; Orientation: 0.3045; Line Search: 7.1754
Adding measurement 3b88d36d to history. Total: 4
Rejected: LBFGS Orientation magnitude: 1.987e+05, gradient 6.603e-02, dot -0.146; [5efa094b-08d2-4fbf-bd52-548b65cf78bb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -287.39391841937606, -285.9453254455269, -61.796082772186956, -39.67594247551526, -21.783153849695815
Rejected: LBFGS Orientation magnitude: 6.149e+05, gradient 6.603e-02, dot -0.182; [5efa094b-08d2-4fbf-bd52-548b65cf78bb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -287.39391841937606, -285.9453254455269, -61.796082772186956, -39.67594247551526
LBFGS Accumulation History: 3 points
Removed measurement 3b88d36d to history. Total: 4
Removed measurement 44c1ce5a to history. Total: 3
th(0)=-287.39391841937606;dx=-0.004357317873712716
New Minimum: -287.39391841937606 > -287.39416688901883
END: th(0.1168855626102368)=-287.39416688901883; dx=-0.00359975372925416 evalInputDelta=2.484696427700328E-4
Fitness changed from -287.39391841937606 to -287.39416688901883
Iteration 13 complete. Error: -287.39416688901883 Total: 2.4509; Orientation: 0.6839; Line Search: 1.2273
Adding measurement 26b01384 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 4.882e+03, gradient 6.609e-02, dot 0.468; [5efa094b-08d2-4fbf-bd52-548b65cf78bb = 1.000/1.000e+00]
th(0)=-287.39416688901883;dx=-150.9302472791899
New Minimum: -287.39416688901883 > -294.09271406027614
END: th(0.2518223108513879)=-294.09271406027614; dx=-89.58605829414381 evalInputDelta=6.698547171257303
Fitness changed from -287.39416688901883 to -294.09271406027614
Iteration 14 complete. Error: -294.09271406027614 Total: 2.0964; Orientation: 0.3023; Line Search: 1.2192
Adding measurement 5531484a to history. Total: 4
Rejected: LBFGS Orientation magnitude: 2.854e+06, gradient 6.481e-02, dot -0.163; [5efa094b-08d2-4fbf-bd52-548b65cf78bb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -294.09271406027614, -287.39416688901883, -61.796082772186956, -39.67594247551526, -21.783153849695815
Rejected: LBFGS Orientation magnitude: 4.425e+06, gradient 6.481e-02, dot -0.176; [5efa094b-08d2-4fbf-bd52-548b65cf78bb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -294.09271406027614, -287.39416688901883, -61.796082772186956, -39.67594247551526
LBFGS Accumulation History: 3 points
Removed measurement 5531484a to history. Total: 4
Removed measurement 26b01384 to history. Total: 3
th(0)=-294.09271406027614;dx=-0.004178451625690545
New Minimum: -294.09271406027614 > -294.0937556432825
END: th(0.5425347222222225)=-294.0937556432825; dx=-0.0033891648987784753 evalInputDelta=0.001041583006383462
Fitness changed from -294.09271406027614 to -294.0937556432825
Iteration 15 complete. Error: -294.0937556432825 Total: 2.4322; Orientation: 0.6633; Line Search: 1.2100
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/f74373a3-d4d2-4746-b854-707747fccd69.jpg)
Final threshold in iteration 16: -294.0937556432825 (> -Infinity) after 47.651s (< 5400.000s)

Returns

    -294.0937556432825