BasicOptimizer.scala:89 executed in 7.55 seconds (0.000 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: 145505571047000
Reset training subject: 145505699507700
Adding measurement 64fc2003 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-8.564303688476784;dx=-0.40678534664630406
New Minimum: -8.564303688476784 > -9.481744995473127
WOLFE (weak): th(2.154434690031884)=-9.481744995473127; dx=-0.5359867979909896 evalInputDelta=0.9174413069963432
New Minimum: -9.481744995473127 > -10.395195849079643
WOLFE (weak): th(4.308869380063768)=-10.395195849079643; dx=-0.5349009867914798 evalInputDelta=1.8308921606028594
New Minimum: -10.395195849079643 > -14.47346857959796
WOLFE (weak): th(12.926608140191302)=-14.47346857959796; dx=-0.5801940295813224 evalInputDelta=5.909164891121176
New Minimum: -14.47346857959796 > -33.06127050525849
WOLFE (weak): th(51.70643256076521)=-33.06127050525849; dx=-0.41463978084872777 evalInputDelta=24.496966816781708
New Minimum: -33.06127050525849 > -109.702754459209
END: th(258.53216280382605)=-109.702754459209; dx=-0.08171536640532347 evalInputDelta=101.13845077073222
Fitness changed from -8.564303688476784 to -109.702754459209
Iteration 1 complete. Error: -109.702754459209 Total: 1.0361; Orientation: 0.0019; Line Search: 0.6870
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/8bb01582-c20f-45a9-84fa-74b1b348c391.jpg)
Adding measurement 500402d to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-109.702754459209;dx=-0.2034856767730048
New Minimum: -109.702754459209 > -180.72714456121415
END: th(556.9906600335335)=-180.72714456121415; dx=-0.012068916658518725 evalInputDelta=71.02439010200514
Fitness changed from -109.702754459209 to -180.72714456121415
Iteration 2 complete. Error: -180.72714456121415 Total: 0.3639; Orientation: 0.0015; Line Search: 0.2398
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/7195b1b4-8ae2-4cde-bbc3-f88509b0a27e.jpg)
Adding measurement 2db0410f to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-180.72714456121415;dx=-0.17003734393943482
New Minimum: -180.72714456121415 > -255.1214784176354
WOLF (strong): th(1200.0)=-255.1214784176354; dx=0.0048434644062373255 evalInputDelta=74.39433385642124
New Minimum: -255.1214784176354 > -282.49029297482065
END: th(600.0)=-282.49029297482065; dx=-0.010462275548586059 evalInputDelta=101.7631484136065
Fitness changed from -180.72714456121415 to -282.49029297482065
Iteration 3 complete. Error: -282.49029297482065 Total: 0.4905; Orientation: 0.0020; Line Search: 0.3595
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/92490bb9-08a4-4a0b-89f6-c23ea6b014d6.jpg)
Adding measurement 464ba5d3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.715e+02, gradient 3.926e-01, dot -0.503; [b7c0eb3f-ba1e-4d05-b88a-7524d126fe7b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -282.49029297482065, -180.72714456121415, -109.702754459209, -8.564303688476784
LBFGS Accumulation History: 3 points
Removed measurement 464ba5d3 to history. Total: 3
th(0)=-282.49029297482065;dx=-0.1495885092770491
New Minimum: -282.49029297482065 > -293.646936707162
WOLF (strong): th(1292.6608140191304)=-293.646936707162; dx=7.840450583784062E-4 evalInputDelta=11.156643732341365
New Minimum: -293.646936707162 > -337.77186966575533
WOLF (strong): th(646.3304070095652)=-337.77186966575533; dx=0.006451026191376502 evalInputDelta=55.281576690934685
END: th(215.4434690031884)=-329.78576142323067; dx=-0.07533121906202603 evalInputDelta=47.29546844841002
Fitness changed from -282.49029297482065 to -337.77186966575533
Iteration 4 complete. Error: -337.77186966575533 Total: 0.6156; Orientation: 0.0283; Line Search: 0.4623
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/46c495f6-4632-4409-888c-8b5ddc469c6f.jpg)
Adding measurement 26555935 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.172e+02, gradient 3.587e-01, dot -0.421; [b7c0eb3f-ba1e-4d05-b88a-7524d126fe7b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -337.77186966575533, -180.72714456121415, -109.702754459209, -8.564303688476784
LBFGS Accumulation History: 3 points
Removed measurement 26555935 to history. Total: 3
th(0)=-337.77186966575533;dx=-0.12398375192430203
New Minimum: -337.77186966575533 > -403.0253365174453
END: th(464.15888336127796)=-403.0253365174453; dx=-0.028705142533540916 evalInputDelta=65.25346685168995
Fitness changed from -337.77186966575533 to -403.0253365174453
Iteration 5 complete. Error: -403.0253365174453 Total: 0.3700; Orientation: 0.0281; Line Search: 0.2250
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/fa842d4f-b80e-43e0-bcb6-37a717da00d1.jpg)
Adding measurement 11a72847 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.125e+02, gradient 2.821e-01, dot -0.555; [b7c0eb3f-ba1e-4d05-b88a-7524d126fe7b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -403.0253365174453, -180.72714456121415, -109.702754459209, -8.564303688476784
LBFGS Accumulation History: 3 points
Removed measurement 11a72847 to history. Total: 3
th(0)=-403.0253365174453;dx=-0.07697079987435865
New Minimum: -403.0253365174453 > -453.5695233368309
END: th(1000.0000000000002)=-453.5695233368309; dx=-0.011230781699381458 evalInputDelta=50.54418681938563
Fitness changed from -403.0253365174453 to -453.5695233368309
Iteration 6 complete. Error: -453.5695233368309 Total: 0.3693; Orientation: 0.0281; Line Search: 0.2233
Adding measurement 12806d95 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.260e+03, gradient 3.617e-01, dot -0.414; [b7c0eb3f-ba1e-4d05-b88a-7524d126fe7b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -453.5695233368309, -180.72714456121415, -109.702754459209, -8.564303688476784
LBFGS Accumulation History: 3 points
Removed measurement 12806d95 to history. Total: 3
th(0)=-453.5695233368309;dx=-0.12223819888531556
New Minimum: -453.5695233368309 > -480.25069950495646
END: th(2154.434690031884)=-480.25069950495646; dx=-0.001649020973711316 evalInputDelta=26.681176168125546
Fitness changed from -453.5695233368309 to -480.25069950495646
Iteration 7 complete. Error: -480.25069950495646 Total: 0.3665; Orientation: 0.0275; Line Search: 0.2295
Adding measurement 68177d25 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.866e+03, gradient 4.252e-01, dot -0.310; [b7c0eb3f-ba1e-4d05-b88a-7524d126fe7b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -480.25069950495646, -180.72714456121415, -109.702754459209, -8.564303688476784
LBFGS Accumulation History: 3 points
Removed measurement 68177d25 to history. Total: 3
th(0)=-480.25069950495646;dx=-0.17591021353275804
Armijo: th(4641.58883361278)=-450.1774302983214; dx=0.0038306079803872724 evalInputDelta=-30.073269206635075
New Minimum: -480.25069950495646 > -563.9682227306783
WOLF (strong): th(2320.79441680639)=-563.9682227306783; dx=0.007009728562589288 evalInputDelta=83.71752322572189
New Minimum: -563.9682227306783 > -614.3105128922995
END: th(773.5981389354633)=-614.3105128922995; dx=-0.04114967122757956 evalInputDelta=134.059813387343
Fitness changed from -480.25069950495646 to -614.3105128922995
Iteration 8 complete. Error: -614.3105128922995 Total: 0.5964; Orientation: 0.0318; Line Search: 0.4528
Adding measurement ca2b7c6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.159e+03, gradient 2.830e-01, dot -0.420; [b7c0eb3f-ba1e-4d05-b88a-7524d126fe7b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -614.3105128922995, -180.72714456121415, -109.702754459209, -8.564303688476784
LBFGS Accumulation History: 3 points
Removed measurement ca2b7c6 to history. Total: 3
th(0)=-614.3105128922995;dx=-0.07592263355124698
New Minimum: -614.3105128922995 > -725.4004928313738
END: th(1666.6666666666672)=-725.4004928313738; dx=-0.01718060409015023 evalInputDelta=111.08997993907428
Fitness changed from -614.3105128922995 to -725.4004928313738
Iteration 9 complete. Error: -725.4004928313738 Total: 0.3769; Orientation: 0.0279; Line Search: 0.2386
Adding measurement 76169a8e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.530e+03, gradient 3.077e-01, dot -0.435; [b7c0eb3f-ba1e-4d05-b88a-7524d126fe7b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -725.4004928313738, -180.72714456121415, -109.702754459209, -8.564303688476784
LBFGS Accumulation History: 3 points
Removed measurement 76169a8e to history. Total: 3
th(0)=-725.4004928313738;dx=-0.09045815454625683
New Minimum: -725.4004928313738 > -756.9131802921653
WOLF (strong): th(3590.7244833864743)=-756.9131802921653; dx=0.004583430762650347 evalInputDelta=31.51268746079154
New Minimum: -756.9131802921653 > -800.877136332409
END: th(1795.3622416932371)=-800.877136332409; dx=-0.003956498137497579 evalInputDelta=75.47664350103526
Fitness changed from -725.4004928313738 to -800.877136332409
Iteration 10 complete. Error: -800.877136332409 Total: 0.4904; Orientation: 0.0280; Line Search: 0.3482
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/6481805a-bfaf-4db6-8314-e02dba58a6b4.jpg)
Adding measurement 6e76ce81 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.656e+03, gradient 3.175e-01, dot -0.408; [b7c0eb3f-ba1e-4d05-b88a-7524d126fe7b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -800.877136332409, -180.72714456121415, -109.702754459209, -8.564303688476784
LBFGS Accumulation History: 3 points
Removed measurement 6e76ce81 to history. Total: 3
th(0)=-800.877136332409;dx=-0.0954738668738053
Armijo: th(3867.9906946773176)=-799.5481536467956; dx=0.012729932720412777 evalInputDelta=-1.3289826856133686
New Minimum: -800.877136332409 > -930.2521499572038
WOLF (strong): th(1933.9953473386588)=-930.2521499572038; dx=0.0021717914957302175 evalInputDelta=129.37501362479475
END: th(644.6651157795529)=-892.9483117739794; dx=-0.05782592205160937 evalInputDelta=92.0711754415704
Fitness changed from -800.877136332409 to -930.2521499572038
Iteration 11 complete. Error: -930.2521499572038 Total: 0.6286; Orientation: 0.0274; Line Search: 0.4765
Adding measurement 21859c14 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.054e+04, gradient 3.420e-01, dot -0.424; [b7c0eb3f-ba1e-4d05-b88a-7524d126fe7b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -930.2521499572038, -180.72714456121415, -109.702754459209, -8.564303688476784
LBFGS Accumulation History: 3 points
Removed measurement 21859c14 to history. Total: 3
th(0)=-930.2521499572038;dx=-0.11316236064403923
New Minimum: -930.2521499572038 > -1054.2821017166136
END: th(1388.8888888888896)=-1054.2821017166136; dx=-0.01518689999007143 evalInputDelta=124.02995175940987
Fitness changed from -930.2521499572038 to -1054.2821017166136
Iteration 12 complete. Error: -1054.2821017166136 Total: 0.3861; Orientation: 0.0284; Line Search: 0.2485
Adding measurement 6bcab5ed to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.548e+04, gradient 3.116e-01, dot -0.454; [b7c0eb3f-ba1e-4d05-b88a-7524d126fe7b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1054.2821017166136, -180.72714456121415, -109.702754459209, -8.564303688476784
LBFGS Accumulation History: 3 points
Removed measurement 6bcab5ed to history. Total: 3
th(0)=-1054.2821017166136;dx=-0.09465694795308316
Armijo: th(2992.2704028220624)=-1040.601628866686; dx=0.010547477274048044 evalInputDelta=-13.680472849927583
New Minimum: -1054.2821017166136 > -1136.031139537997
END: th(1496.1352014110312)=-1136.031139537997; dx=-0.013604941613790798 evalInputDelta=81.74903782138335
Fitness changed from -1054.2821017166136 to -1136.031139537997
Iteration 13 complete. Error: -1136.031139537997 Total: 0.4899; Orientation: 0.0298; Line Search: 0.3439
Adding measurement f2f1ae8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.273e+04, gradient 3.731e-01, dot -0.408; [b7c0eb3f-ba1e-4d05-b88a-7524d126fe7b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1136.031139537997, -180.72714456121415, -109.702754459209, -8.564303688476784
LBFGS Accumulation History: 3 points
Removed measurement f2f1ae8 to history. Total: 3
th(0)=-1136.031139537997;dx=-0.13606449429276438
New Minimum: -1136.031139537997 > -1143.7225953001016
WOLF (strong): th(3223.325578897765)=-1143.7225953001016; dx=0.007443751570366218 evalInputDelta=7.691455762104624
New Minimum: -1143.7225953001016 > -1231.0067526216094
WOLF (strong): th(1611.6627894488824)=-1231.0067526216094; dx=0.005798887556217936 evalInputDelta=94.97561308361242
END: th(537.2209298162942)=-1225.9508554587333; dx=-0.06536867996911673 evalInputDelta=89.91971592073628
Fitness changed from -1136.031139537997 to -1231.0067526216094
Iteration 14 complete. Error: -1231.0067526216094 Total: 0.5919; Orientation: 0.0279; Line Search: 0.4554
Adding measurement 429dedad to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.124e+04, gradient 3.950e-01, dot -0.345; [b7c0eb3f-ba1e-4d05-b88a-7524d126fe7b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1231.0067526216094, -180.72714456121415, -109.702754459209, -8.564303688476784
LBFGS Accumulation History: 3 points
Removed measurement 429dedad to history. Total: 3
th(0)=-1231.0067526216094;dx=-0.15244301233967178
New Minimum: -1231.0067526216094 > -1397.0753379828877
END: th(1157.407407407408)=-1397.0753379828877; dx=-0.016594477025427323 evalInputDelta=166.06858536127834
Fitness changed from -1231.0067526216094 to -1397.0753379828877
Iteration 15 complete. Error: -1397.0753379828877 Total: 0.3665; Orientation: 0.0267; Line Search: 0.2277
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/1a26ff23-412f-48a0-a715-e74409e05673.jpg)
Final threshold in iteration 16: -1397.0753379828877 (> -Infinity) after 7.550s (< 5400.000s)
Returns
-1397.0753379828877