BasicOptimizer.scala:89 executed in 59.31 seconds (0.800 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
Reset training subject: 167484493243500
Reset training subject: 167485373163500
Adding measurement 6860d3e5 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-10.556161637780525;dx=-0.01116838919909841
New Minimum: -10.556161637780525 > -10.583658729016406
WOLFE (weak): th(2.154434690031884)=-10.583658729016406; dx=-0.01124840891708508 evalInputDelta=0.0274970912358814
New Minimum: -10.583658729016406 > -10.611198886510516
WOLFE (weak): th(4.308869380063768)=-10.611198886510516; dx=-0.011247447506623742 evalInputDelta=0.05503724872999172
New Minimum: -10.611198886510516 > -10.721682133575753
WOLFE (weak): th(12.926608140191302)=-10.721682133575753; dx=-0.0113694698923549 evalInputDelta=0.16552049579522787
New Minimum: -10.721682133575753 > -11.22920271396454
WOLFE (weak): th(51.70643256076521)=-11.22920271396454; dx=-0.011658534860513842 evalInputDelta=0.6730410761840151
New Minimum: -11.22920271396454 > -14.097139953139376
WOLFE (weak): th(258.53216280382605)=-14.097139953139376; dx=-0.01260009610952904 evalInputDelta=3.540978315358851
New Minimum: -14.097139953139376 > -27.700778506800354
END: th(1551.1929768229563)=-27.700778506800354; dx=-0.006587183295933954 evalInputDelta=17.144616869019828
Fitness changed from -10.556161637780525 to -27.700778506800354
Iteration 1 complete. Error: -27.700778506800354 Total: 8.4857; Orientation: 0.0147; Line Search: 5.9610
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/ae192ac8-4aa9-4ad0-9947-77bf091d64ad.jpg)
Adding measurement 142e61e2 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-27.700778506800354;dx=-0.029743072919028727
New Minimum: -27.700778506800354 > -38.18584252489314
WOLF (strong): th(3341.943960201201)=-38.18584252489314; dx=7.451023124784608E-4 evalInputDelta=10.485064018092785
New Minimum: -38.18584252489314 > -46.19923311728237
END: th(1670.9719801006006)=-46.19923311728237; dx=-5.918527408963568E-4 evalInputDelta=18.498454610482014
Fitness changed from -27.700778506800354 to -46.19923311728237
Iteration 2 complete. Error: -46.19923311728237 Total: 3.4036; Orientation: 0.0145; Line Search: 2.4789
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/ead393a3-dc56-4c20-9e79-63814dbedda6.jpg)
Adding measurement 4f7ce34a to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-46.19923311728237;dx=-0.04429356706599551
New Minimum: -46.19923311728237 > -47.68230588931155
WOLF (strong): th(3600.0000000000005)=-47.68230588931155; dx=8.096074201210466E-4 evalInputDelta=1.4830727720291819
New Minimum: -47.68230588931155 > -60.29394751898299
WOLF (strong): th(1800.0000000000002)=-60.29394751898299; dx=0.003980140599084978 evalInputDelta=14.094714401700621
New Minimum: -60.29394751898299 > -67.72582306162842
END: th(600.0000000000001)=-67.72582306162842; dx=-0.013064608232983551 evalInputDelta=21.52658994434605
Fitness changed from -46.19923311728237 to -67.72582306162842
Iteration 3 complete. Error: -67.72582306162842 Total: 4.4334; Orientation: 0.0146; Line Search: 3.5276
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/75fda32d-899c-4b9a-ac49-cd8f2307f6b7.jpg)
Adding measurement 7f72d143 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.330e+03, gradient 1.782e-01, dot -0.312; [5b8c1230-e44c-4901-bac5-2f9e6ddac18c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -67.72582306162842, -46.19923311728237, -27.700778506800354, -10.556161637780525
LBFGS Accumulation History: 3 points
Removed measurement 7f72d143 to history. Total: 3
th(0)=-67.72582306162842;dx=-0.03167859155597511
New Minimum: -67.72582306162842 > -84.42951074805687
END: th(1292.6608140191306)=-84.42951074805687; dx=-0.0028686767259459684 evalInputDelta=16.703687686428452
Fitness changed from -67.72582306162842 to -84.42951074805687
Iteration 4 complete. Error: -84.42951074805687 Total: 2.8276; Orientation: 0.2702; Line Search: 1.6416
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/6c91b17d-588d-46ae-aeaa-e7980eacd9f6.jpg)
Adding measurement 5c5ce6c3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.032e+03, gradient 2.059e-01, dot -0.204; [5b8c1230-e44c-4901-bac5-2f9e6ddac18c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -84.42951074805687, -46.19923311728237, -27.700778506800354, -10.556161637780525
LBFGS Accumulation History: 3 points
Removed measurement 5c5ce6c3 to history. Total: 3
th(0)=-84.42951074805687;dx=-0.04234553201710839
Armijo: th(2784.953300167668)=-82.8762932355734; dx=0.0015797803871819974 evalInputDelta=-1.5532175124834708
New Minimum: -84.42951074805687 > -99.18035674498505
WOLF (strong): th(1392.476650083834)=-99.18035674498505; dx=0.003622243250905744 evalInputDelta=14.750845996928177
New Minimum: -99.18035674498505 > -103.59038927429513
END: th(464.158883361278)=-103.59038927429513; dx=-0.02153098775000191 evalInputDelta=19.160878526238264
Fitness changed from -84.42951074805687 to -103.59038927429513
Iteration 5 complete. Error: -103.59038927429513 Total: 4.5462; Orientation: 0.2740; Line Search: 3.3658
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/f8b10695-fe33-4e74-92f4-1af0ebbdd6db.jpg)
Adding measurement 4eda09b5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.863e+03, gradient 1.757e-01, dot -0.242; [5b8c1230-e44c-4901-bac5-2f9e6ddac18c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -103.59038927429513, -46.19923311728237, -27.700778506800354, -10.556161637780525
LBFGS Accumulation History: 3 points
Removed measurement 4eda09b5 to history. Total: 3
th(0)=-103.59038927429513;dx=-0.030804069635978534
New Minimum: -103.59038927429513 > -118.94192139049419
END: th(1000.0000000000003)=-118.94192139049419; dx=-0.0024956257860022503 evalInputDelta=15.351532116199053
Fitness changed from -103.59038927429513 to -118.94192139049419
Iteration 6 complete. Error: -118.94192139049419 Total: 2.8574; Orientation: 0.2741; Line Search: 1.6458
Adding measurement 2a07e322 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.032e+03, gradient 2.101e-01, dot -0.283; [5b8c1230-e44c-4901-bac5-2f9e6ddac18c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -118.94192139049419, -46.19923311728237, -27.700778506800354, -10.556161637780525
LBFGS Accumulation History: 3 points
Removed measurement 2a07e322 to history. Total: 3
th(0)=-118.94192139049419;dx=-0.04394855636698498
Armijo: th(2154.4346900318847)=-108.64521712033623; dx=0.002615845419652847 evalInputDelta=-10.29670427015796
New Minimum: -118.94192139049419 > -126.39527919017586
WOLF (strong): th(1077.2173450159423)=-126.39527919017586; dx=0.008171266583269013 evalInputDelta=7.453357799681669
New Minimum: -126.39527919017586 > -133.73144585091046
END: th(359.07244833864746)=-133.73144585091046; dx=-0.016814112696043347 evalInputDelta=14.789524460416274
Fitness changed from -118.94192139049419 to -133.73144585091046
Iteration 7 complete. Error: -133.73144585091046 Total: 4.3893; Orientation: 0.2740; Line Search: 3.3098
Adding measurement 45b97963 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.252e+03, gradient 1.533e-01, dot -0.330; [5b8c1230-e44c-4901-bac5-2f9e6ddac18c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -133.73144585091046, -46.19923311728237, -27.700778506800354, -10.556161637780525
LBFGS Accumulation History: 3 points
Removed measurement 45b97963 to history. Total: 3
th(0)=-133.73144585091046;dx=-0.023295922494486247
New Minimum: -133.73144585091046 > -147.06581355170547
END: th(773.5981389354636)=-147.06581355170547; dx=-0.01083313373614576 evalInputDelta=13.334367700795013
Fitness changed from -133.73144585091046 to -147.06581355170547
Iteration 8 complete. Error: -147.06581355170547 Total: 2.9149; Orientation: 0.2699; Line Search: 1.8552
Adding measurement 752f1ab7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.148e+03, gradient 1.718e-01, dot -0.321; [5b8c1230-e44c-4901-bac5-2f9e6ddac18c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -147.06581355170547, -46.19923311728237, -27.700778506800354, -10.556161637780525
LBFGS Accumulation History: 3 points
Removed measurement 752f1ab7 to history. Total: 3
th(0)=-147.06581355170547;dx=-0.029422538557191368
New Minimum: -147.06581355170547 > -147.65054552472876
WOLF (strong): th(1666.6666666666677)=-147.65054552472876; dx=2.5849330663113687E-4 evalInputDelta=0.5847319730232812
New Minimum: -147.65054552472876 > -155.02046235900602
END: th(833.3333333333338)=-155.02046235900602; dx=-0.003304916497241752 evalInputDelta=7.9546488073005435
Fitness changed from -147.06581355170547 to -155.02046235900602
Iteration 9 complete. Error: -155.02046235900602 Total: 3.5354; Orientation: 0.2706; Line Search: 2.4590
Adding measurement 2148672a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.334e+03, gradient 1.927e-01, dot -0.231; [5b8c1230-e44c-4901-bac5-2f9e6ddac18c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -155.02046235900602, -46.19923311728237, -27.700778506800354, -10.556161637780525
LBFGS Accumulation History: 3 points
Removed measurement 2148672a to history. Total: 3
th(0)=-155.02046235900602;dx=-0.03708890169640906
Armijo: th(1795.3622416932376)=-146.00921685376576; dx=0.005262720253625672 evalInputDelta=-9.011245505240254
New Minimum: -155.02046235900602 > -166.36686447051287
WOLF (strong): th(897.6811208466188)=-166.36686447051287; dx=0.00621763231145833 evalInputDelta=11.346402111506848
New Minimum: -166.36686447051287 > -167.30072684577613
END: th(299.22704028220625)=-167.30072684577613; dx=-0.021519903726111896 evalInputDelta=12.280264486770108
Fitness changed from -155.02046235900602 to -167.30072684577613
Iteration 10 complete. Error: -167.30072684577613 Total: 4.4720; Orientation: 0.2688; Line Search: 3.3909
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/1a9daae1-05d1-49a0-86a9-462b1418dfdf.jpg)
Adding measurement 6a3b281c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.063e+04, gradient 1.516e-01, dot -0.339; [5b8c1230-e44c-4901-bac5-2f9e6ddac18c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -167.30072684577613, -46.19923311728237, -27.700778506800354, -10.556161637780525
LBFGS Accumulation History: 3 points
Removed measurement 6a3b281c to history. Total: 3
th(0)=-167.30072684577613;dx=-0.022596735337452954
New Minimum: -167.30072684577613 > -178.91637798843348
END: th(644.665115779553)=-178.91637798843348; dx=-0.010763231518668676 evalInputDelta=11.615651142657356
Fitness changed from -167.30072684577613 to -178.91637798843348
Iteration 11 complete. Error: -178.91637798843348 Total: 2.9398; Orientation: 0.2558; Line Search: 1.6666
Adding measurement 698728b5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.487e+04, gradient 1.603e-01, dot -0.317; [5b8c1230-e44c-4901-bac5-2f9e6ddac18c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -178.91637798843348, -46.19923311728237, -27.700778506800354, -10.556161637780525
LBFGS Accumulation History: 3 points
Removed measurement 698728b5 to history. Total: 3
th(0)=-178.91637798843348;dx=-0.025689339728662598
New Minimum: -178.91637798843348 > -182.59995122534946
END: th(1388.8888888888898)=-182.59995122534946; dx=-0.0015472386325408943 evalInputDelta=3.6835732369159757
Fitness changed from -178.91637798843348 to -182.59995122534946
Iteration 12 complete. Error: -182.59995122534946 Total: 2.8428; Orientation: 0.2763; Line Search: 1.7332
Adding measurement 6f9a2156 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.378e+03, gradient 2.054e-01, dot -0.231; [5b8c1230-e44c-4901-bac5-2f9e6ddac18c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -182.59995122534946, -46.19923311728237, -27.700778506800354, -10.556161637780525
LBFGS Accumulation History: 3 points
Removed measurement 6f9a2156 to history. Total: 3
th(0)=-182.59995122534946;dx=-0.04196257842040389
Armijo: th(2992.270402822063)=-164.35115083640272; dx=0.004879972300056168 evalInputDelta=-18.248800388946734
New Minimum: -182.59995122534946 > -195.76827820155134
WOLF (strong): th(1496.1352014110314)=-195.76827820155134; dx=0.009327878184257878 evalInputDelta=13.168326976201882
New Minimum: -195.76827820155134 > -204.3649653499836
END: th(498.71173380367713)=-204.3649653499836; dx=-0.018706861302154053 evalInputDelta=21.76501412463415
Fitness changed from -182.59995122534946 to -204.3649653499836
Iteration 13 complete. Error: -204.3649653499836 Total: 4.3326; Orientation: 0.2695; Line Search: 3.2621
Adding measurement 2fe84bc4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.029e+04, gradient 1.756e-01, dot -0.314; [5b8c1230-e44c-4901-bac5-2f9e6ddac18c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -204.3649653499836, -46.19923311728237, -27.700778506800354, -10.556161637780525
LBFGS Accumulation History: 3 points
Removed measurement 2fe84bc4 to history. Total: 3
th(0)=-204.3649653499836;dx=-0.030804788558178177
New Minimum: -204.3649653499836 > -217.923205367166
END: th(1074.4418596325886)=-217.923205367166; dx=-0.0014372104158520992 evalInputDelta=13.558240017182385
Fitness changed from -204.3649653499836 to -217.923205367166
Iteration 14 complete. Error: -217.923205367166 Total: 2.8455; Orientation: 0.2550; Line Search: 1.6472
Adding measurement 7ce9df30 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.914e+04, gradient 2.172e-01, dot -0.202; [5b8c1230-e44c-4901-bac5-2f9e6ddac18c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -217.923205367166, -46.19923311728237, -27.700778506800354, -10.556161637780525
LBFGS Accumulation History: 3 points
Removed measurement 7ce9df30 to history. Total: 3
th(0)=-217.923205367166;dx=-0.047126277827194044
Armijo: th(2314.814814814817)=-193.91916002551167; dx=0.00739019409739099 evalInputDelta=-24.00404534165432
New Minimum: -217.923205367166 > -224.16605870425613
WOLF (strong): th(1157.4074074074085)=-224.16605870425613; dx=0.009582274164499591 evalInputDelta=6.242853337090139
New Minimum: -224.16605870425613 > -233.68636332967742
END: th(385.8024691358028)=-233.68636332967742; dx=-0.015009844917756301 evalInputDelta=15.763157962511428
Fitness changed from -217.923205367166 to -233.68636332967742
Iteration 15 complete. Error: -233.68636332967742 Total: 4.3833; Orientation: 0.2851; Line Search: 3.3136
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/5a67fbc1-e4cd-44aa-9050-0a06cc7e5bbc.jpg)
Final threshold in iteration 16: -233.68636332967742 (> -Infinity) after 59.313s (< 5400.000s)
Returns
-233.68636332967742