BasicOptimizer.scala:89 executed in 45.41 seconds (0.989 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: 213276034283400
Reset training subject: 213276870876900
Adding measurement 39f38c92 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-141.84778097929484;dx=-0.11270475635130073
New Minimum: -141.84778097929484 > -142.0069378089954
WOLFE (weak): th(2.154434690031884)=-142.0069378089954; dx=-0.11270915592907066 evalInputDelta=0.15915682970054945
New Minimum: -142.0069378089954 > -142.1661477762386
WOLFE (weak): th(4.308869380063768)=-142.1661477762386; dx=-0.11241664366184445 evalInputDelta=0.3183667969437636
New Minimum: -142.1661477762386 > -142.80341279158716
WOLFE (weak): th(12.926608140191302)=-142.80341279158716; dx=-0.11266591431704381 evalInputDelta=0.9556318122923244
New Minimum: -142.80341279158716 > -145.6859962826031
WOLFE (weak): th(51.70643256076521)=-145.6859962826031; dx=-0.1125236914704277 evalInputDelta=3.83821530330826
New Minimum: -145.6859962826031 > -161.01198668015596
WOLFE (weak): th(258.53216280382605)=-161.01198668015596; dx=-0.1103245606095794 evalInputDelta=19.164205700861118
New Minimum: -161.01198668015596 > -234.72301362544624
END: th(1551.1929768229563)=-234.72301362544624; dx=-0.06723314082257695 evalInputDelta=92.8752326461514
Fitness changed from -141.84778097929484 to -234.72301362544624
Iteration 1 complete. Error: -234.72301362544624 Total: 6.3720; Orientation: 0.0197; Line Search: 4.3899
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/6b22c647-d406-478d-94fc-27aebf9c80df.jpg)
Adding measurement 2b254e2e to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-234.72301362544624;dx=-0.13176626174453593
New Minimum: -234.72301362544624 > -334.7908578574667
END: th(3341.943960201201)=-334.7908578574667; dx=-0.02851956364952231 evalInputDelta=100.06784423202043
Fitness changed from -234.72301362544624 to -334.7908578574667
Iteration 2 complete. Error: -334.7908578574667 Total: 1.8985; Orientation: 0.0169; Line Search: 1.2591
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/1509ed74-dc46-4ed1-afca-3345c2a7d1fc.jpg)
Adding measurement 3ff85b4d to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-334.7908578574667;dx=-0.15663941968910278
Armijo: th(7200.000000000001)=-317.0369726455004; dx=-0.00837674308622408 evalInputDelta=-17.753885211966292
New Minimum: -334.7908578574667 > -412.9826506532646
END: th(3600.0000000000005)=-412.9826506532646; dx=-0.027998541217595284 evalInputDelta=78.19179279579794
Fitness changed from -334.7908578574667 to -412.9826506532646
Iteration 3 complete. Error: -412.9826506532646 Total: 2.6025; Orientation: 0.0184; Line Search: 1.9223
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d6082f10-5d6f-4a35-acac-71f3eed06362.jpg)
Adding measurement 46f358a9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.346e+03, gradient 3.737e-01, dot -0.243; [ca1bd915-7941-42b3-b5de-a9886c42a70e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -412.9826506532646, -334.7908578574667, -234.72301362544624, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 46f358a9 to history. Total: 3
th(0)=-412.9826506532646;dx=-0.1396625581971789
Armijo: th(7755.964884114783)=-396.60386755917557; dx=-0.00883456407718977 evalInputDelta=-16.378783094089044
New Minimum: -412.9826506532646 > -504.0176551351291
END: th(3877.9824420573914)=-504.0176551351291; dx=-0.03555209054997038 evalInputDelta=91.03500448186446
Fitness changed from -412.9826506532646 to -504.0176551351291
Iteration 4 complete. Error: -504.0176551351291 Total: 3.3636; Orientation: 0.3325; Line Search: 2.3666
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/4d34dee8-8ea6-470b-bcbb-42812b88921f.jpg)
Adding measurement 6982cb46 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.359e+03, gradient 3.584e-01, dot -0.244; [ca1bd915-7941-42b3-b5de-a9886c42a70e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -504.0176551351291, -334.7908578574667, -234.72301362544624, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 6982cb46 to history. Total: 3
th(0)=-504.0176551351291;dx=-0.12826155543164244
Armijo: th(8354.859900503005)=-479.5736572770876; dx=-0.010783388237615512 evalInputDelta=-24.443997858041485
New Minimum: -504.0176551351291 > -589.828116724893
END: th(4177.429950251502)=-589.828116724893; dx=-0.04089171052992123 evalInputDelta=85.81046158976392
Fitness changed from -504.0176551351291 to -589.828116724893
Iteration 5 complete. Error: -589.828116724893 Total: 2.8219; Orientation: 0.3088; Line Search: 1.8979
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/f13755c7-fd9f-418e-9caf-e0212dc5fffb.jpg)
Adding measurement 4c59f5e8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.503e+03, gradient 3.529e-01, dot -0.242; [ca1bd915-7941-42b3-b5de-a9886c42a70e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -589.828116724893, -334.7908578574667, -234.72301362544624, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 4c59f5e8 to history. Total: 3
th(0)=-589.828116724893;dx=-0.12434648002711723
Armijo: th(9000.000000000004)=-556.3702329192806; dx=-0.01306929994143902 evalInputDelta=-33.45788380561237
New Minimum: -589.828116724893 > -672.6820356683281
END: th(4500.000000000002)=-672.6820356683281; dx=-0.04087157629829162 evalInputDelta=82.85391894343513
Fitness changed from -589.828116724893 to -672.6820356683281
Iteration 6 complete. Error: -672.6820356683281 Total: 2.7164; Orientation: 0.3045; Line Search: 1.8318
Adding measurement 67bec6a9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.259e+03, gradient 3.448e-01, dot -0.239; [ca1bd915-7941-42b3-b5de-a9886c42a70e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -672.6820356683281, -334.7908578574667, -234.72301362544624, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 67bec6a9 to history. Total: 3
th(0)=-672.6820356683281;dx=-0.11877554037610828
Armijo: th(9694.956105143481)=-623.2620496049582; dx=-0.011385355189619934 evalInputDelta=-49.41998606336995
New Minimum: -672.6820356683281 > -762.4439932684788
END: th(4847.478052571741)=-762.4439932684788; dx=-0.03767405116967046 evalInputDelta=89.76195760015071
Fitness changed from -672.6820356683281 to -762.4439932684788
Iteration 7 complete. Error: -762.4439932684788 Total: 2.7630; Orientation: 0.3202; Line Search: 1.8635
Adding measurement 3756acb1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.951e+03, gradient 3.418e-01, dot -0.232; [ca1bd915-7941-42b3-b5de-a9886c42a70e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -762.4439932684788, -334.7908578574667, -234.72301362544624, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 3756acb1 to history. Total: 3
th(0)=-762.4439932684788;dx=-0.11674114994261947
Armijo: th(10443.574875628758)=-691.7094556704096; dx=-0.009488868881379571 evalInputDelta=-70.73453759806921
New Minimum: -762.4439932684788 > -845.4600465696277
END: th(5221.787437814379)=-845.4600465696277; dx=-0.03550096062216296 evalInputDelta=83.01605330114887
Fitness changed from -762.4439932684788 to -845.4600465696277
Iteration 8 complete. Error: -845.4600465696277 Total: 3.2776; Orientation: 0.3036; Line Search: 2.4014
Adding measurement 4b051db4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.372e+04, gradient 3.442e-01, dot -0.231; [ca1bd915-7941-42b3-b5de-a9886c42a70e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -845.4600465696277, -334.7908578574667, -234.72301362544624, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 4b051db4 to history. Total: 3
th(0)=-845.4600465696277;dx=-0.11839634818249442
Armijo: th(11250.000000000005)=-747.9271375663285; dx=-0.009388182495648486 evalInputDelta=-97.53290900329921
New Minimum: -845.4600465696277 > -913.8089537530469
END: th(5625.000000000003)=-913.8089537530469; dx=-0.03314728462344837 evalInputDelta=68.34890718341921
Fitness changed from -845.4600465696277 to -913.8089537530469
Iteration 9 complete. Error: -913.8089537530469 Total: 2.8380; Orientation: 0.3040; Line Search: 1.8559
Adding measurement 6edd0e0a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.700e+04, gradient 3.383e-01, dot -0.221; [ca1bd915-7941-42b3-b5de-a9886c42a70e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -913.8089537530469, -334.7908578574667, -234.72301362544624, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 6edd0e0a to history. Total: 3
th(0)=-913.8089537530469;dx=-0.11420310224162555
Armijo: th(12118.695131429353)=-808.0588712095008; dx=-0.005476966331607823 evalInputDelta=-105.75008254354611
New Minimum: -913.8089537530469 > -994.6717546582461
END: th(6059.347565714676)=-994.6717546582461; dx=-0.03004598153615707 evalInputDelta=80.86280090519915
Fitness changed from -913.8089537530469 to -994.6717546582461
Iteration 10 complete. Error: -994.6717546582461 Total: 2.7393; Orientation: 0.3023; Line Search: 1.8499
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/1c2dbe82-67bc-4034-a1a6-66717222686f.jpg)
Adding measurement 11da67b4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.474e+04, gradient 3.391e-01, dot -0.225; [ca1bd915-7941-42b3-b5de-a9886c42a70e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -994.6717546582461, -334.7908578574667, -234.72301362544624, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 11da67b4 to history. Total: 3
th(0)=-994.6717546582461;dx=-0.11473256398061117
Armijo: th(13054.468594535949)=-845.9684502481697; dx=-0.0027601699365387153 evalInputDelta=-148.70330441007638
New Minimum: -994.6717546582461 > -1068.8539589458676
END: th(6527.234297267974)=-1068.8539589458676; dx=-0.02612743197712262 evalInputDelta=74.18220428762152
Fitness changed from -994.6717546582461 to -1068.8539589458676
Iteration 11 complete. Error: -1068.8539589458676 Total: 2.7281; Orientation: 0.3004; Line Search: 1.8204
Adding measurement 116eaf4f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.311e+04, gradient 3.394e-01, dot -0.217; [ca1bd915-7941-42b3-b5de-a9886c42a70e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1068.8539589458676, -334.7908578574667, -234.72301362544624, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 116eaf4f to history. Total: 3
th(0)=-1068.8539589458676;dx=-0.1148084133108564
Armijo: th(14062.50000000001)=-872.8291667599692; dx=-4.1376792814292775E-4 evalInputDelta=-196.02479218589838
New Minimum: -1068.8539589458676 > -1137.4942615591694
END: th(7031.250000000005)=-1137.4942615591694; dx=-0.023452554572924496 evalInputDelta=68.64030261330186
Fitness changed from -1068.8539589458676 to -1137.4942615591694
Iteration 12 complete. Error: -1137.4942615591694 Total: 3.0174; Orientation: 0.2990; Line Search: 2.1796
Adding measurement 70782825 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.189e+04, gradient 3.439e-01, dot -0.211; [ca1bd915-7941-42b3-b5de-a9886c42a70e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1137.4942615591694, -334.7908578574667, -234.72301362544624, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 70782825 to history. Total: 3
th(0)=-1137.4942615591694;dx=-0.11809117486707203
Armijo: th(15148.368914286693)=-911.5619956491611; dx=7.252655316243111E-4 evalInputDelta=-225.93226591000837
New Minimum: -1137.4942615591694 > -1204.9869223350497
END: th(7574.184457143347)=-1204.9869223350497; dx=-0.02079921618840115 evalInputDelta=67.49266077588027
Fitness changed from -1137.4942615591694 to -1204.9869223350497
Iteration 13 complete. Error: -1204.9869223350497 Total: 2.7453; Orientation: 0.3031; Line Search: 1.8688
Adding measurement 2b2a94a4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.935e+04, gradient 3.373e-01, dot -0.210; [ca1bd915-7941-42b3-b5de-a9886c42a70e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1204.9869223350497, -334.7908578574667, -234.72301362544624, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 2b2a94a4 to history. Total: 3
th(0)=-1204.9869223350497;dx=-0.11341494007771147
Armijo: th(16318.085743169939)=-967.4478069957399; dx=0.003195559614523138 evalInputDelta=-237.53911533930977
New Minimum: -1204.9869223350497 > -1286.1076658526556
END: th(8159.042871584969)=-1286.1076658526556; dx=-0.021515135809344804 evalInputDelta=81.12074351760589
Fitness changed from -1204.9869223350497 to -1286.1076658526556
Iteration 14 complete. Error: -1286.1076658526556 Total: 2.7305; Orientation: 0.3036; Line Search: 1.8712
Adding measurement 6232334d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.522e+05, gradient 3.378e-01, dot -0.204; [ca1bd915-7941-42b3-b5de-a9886c42a70e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1286.1076658526556, -334.7908578574667, -234.72301362544624, -141.84778097929484
LBFGS Accumulation History: 3 points
Removed measurement 6232334d to history. Total: 3
th(0)=-1286.1076658526556;dx=-0.11394588808093743
Armijo: th(17578.125000000015)=-982.4547674351804; dx=0.0015453763334183773 evalInputDelta=-303.65289841747517
New Minimum: -1286.1076658526556 > -1331.2922699555297
END: th(8789.062500000007)=-1331.2922699555297; dx=-0.019662947421103603 evalInputDelta=45.18460410287412
Fitness changed from -1286.1076658526556 to -1331.2922699555297
Iteration 15 complete. Error: -1331.2922699555297 Total: 2.7724; Orientation: 0.2998; Line Search: 1.8898
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/45d50761-760d-4f7e-9ac5-5cf85c7bb1ad.jpg)
Final threshold in iteration 16: -1331.2922699555297 (> -Infinity) after 45.408s (< 5400.000s)
Returns
-1331.2922699555297