BasicOptimizer.scala:89 executed in 53.67 seconds (1.397 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: 207992490328500
Reset training subject: 207993305527700
Adding measurement 6ba312a7 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-6.580499837893132;dx=-0.018380284836629138
New Minimum: -6.580499837893132 > -6.612242243168904
WOLFE (weak): th(2.154434690031884)=-6.612242243168904; dx=-0.019603455167915996 evalInputDelta=0.031742405275771546
New Minimum: -6.612242243168904 > -6.644037342162019
WOLFE (weak): th(4.308869380063768)=-6.644037342162019; dx=-0.018967092461082483 evalInputDelta=0.06353750426888638
New Minimum: -6.644037342162019 > -6.771447886328865
WOLFE (weak): th(12.926608140191302)=-6.771447886328865; dx=-0.018672571457721835 evalInputDelta=0.19094804843573243
New Minimum: -6.771447886328865 > -7.349220999179948
WOLFE (weak): th(51.70643256076521)=-7.349220999179948; dx=-0.019672404791931518 evalInputDelta=0.7687211612868161
New Minimum: -7.349220999179948 > -10.602050827317616
WOLFE (weak): th(258.53216280382605)=-10.602050827317616; dx=-0.019953815845164608 evalInputDelta=4.021550989424483
New Minimum: -10.602050827317616 > -30.184466715717697
END: th(1551.1929768229563)=-30.184466715717697; dx=-0.01632102676686984 evalInputDelta=23.603966877824565
Fitness changed from -6.580499837893132 to -30.184466715717697
Iteration 1 complete. Error: -30.184466715717697 Total: 7.6768; Orientation: 0.0161; Line Search: 5.4879
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/5c01963a-4569-447a-b6cd-604a84f59d55.jpg)
Adding measurement 78170aee to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-30.184466715717697;dx=-0.025107241930289667
New Minimum: -30.184466715717697 > -82.20064436668773
END: th(3341.943960201201)=-82.20064436668773; dx=-0.009039399310538185 evalInputDelta=52.01617765097003
Fitness changed from -30.184466715717697 to -82.20064436668773
Iteration 2 complete. Error: -82.20064436668773 Total: 2.2117; Orientation: 0.0162; Line Search: 1.4927
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/f3a5b18d-b26d-4d46-ae15-79eb183edd0f.jpg)
Adding measurement 27adff31 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-82.20064436668773;dx=-0.021251482011217702
New Minimum: -82.20064436668773 > -173.4970288592322
END: th(7200.000000000001)=-173.4970288592322; dx=-0.00699021914067202 evalInputDelta=91.29638449254446
Fitness changed from -82.20064436668773 to -173.4970288592322
Iteration 3 complete. Error: -173.4970288592322 Total: 2.7836; Orientation: 0.0196; Line Search: 2.0335
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/469cad70-399d-4bbe-bd19-88dd82aa2b75.jpg)
Adding measurement 204fccc5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.278e+03, gradient 1.945e-01, dot -0.188; [d4334b61-eac6-4428-b6fb-ba6612fbe11f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -173.4970288592322, -82.20064436668773, -30.184466715717697, -6.580499837893132
LBFGS Accumulation History: 3 points
Removed measurement 204fccc5 to history. Total: 3
th(0)=-173.4970288592322;dx=-0.0369484396420573
New Minimum: -173.4970288592322 > -299.1766582756083
END: th(15511.929768229566)=-299.1766582756083; dx=-0.002381067926184506 evalInputDelta=125.67962941637612
Fitness changed from -173.4970288592322 to -299.1766582756083
Iteration 4 complete. Error: -299.1766582756083 Total: 2.5622; Orientation: 0.3589; Line Search: 1.4614
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/749eea34-efa3-45eb-b952-5fe6eb7a6a94.jpg)
Adding measurement 4aa046a1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.306e+03, gradient 1.954e-01, dot -0.106; [d4334b61-eac6-4428-b6fb-ba6612fbe11f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -299.1766582756083, -82.20064436668773, -30.184466715717697, -6.580499837893132
LBFGS Accumulation History: 3 points
Removed measurement 4aa046a1 to history. Total: 3
th(0)=-299.1766582756083;dx=-0.03794537082822393
New Minimum: -299.1766582756083 > -406.9889934559782
END: th(33419.43960201202)=-406.9889934559782; dx=-6.185444992829283E-5 evalInputDelta=107.81233518036987
Fitness changed from -299.1766582756083 to -406.9889934559782
Iteration 5 complete. Error: -406.9889934559782 Total: 2.5076; Orientation: 0.3124; Line Search: 1.4632
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/ac32925a-9850-4f90-beff-70fbb2cd571c.jpg)
Adding measurement 4775541d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.760e+03, gradient 1.676e-01, dot -0.074; [d4334b61-eac6-4428-b6fb-ba6612fbe11f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -406.9889934559782, -82.20064436668773, -30.184466715717697, -6.580499837893132
LBFGS Accumulation History: 3 points
Removed measurement 4775541d to history. Total: 3
th(0)=-406.9889934559782;dx=-0.02756480061502807
Armijo: th(72000.00000000003)=-398.99995431383644; dx=-7.348201731715002E-5 evalInputDelta=-7.989039142141735
New Minimum: -406.9889934559782 > -565.0656234478043
END: th(36000.000000000015)=-565.0656234478043; dx=-0.002319220249422579 evalInputDelta=158.07662999182617
Fitness changed from -406.9889934559782 to -565.0656234478043
Iteration 6 complete. Error: -565.0656234478043 Total: 3.7038; Orientation: 0.3371; Line Search: 2.6232
Adding measurement 3c199794 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.074e+04, gradient 1.679e-01, dot -0.083; [d4334b61-eac6-4428-b6fb-ba6612fbe11f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -565.0656234478043, -82.20064436668773, -30.184466715717697, -6.580499837893132
LBFGS Accumulation History: 3 points
Removed measurement 3c199794 to history. Total: 3
th(0)=-565.0656234478043;dx=-0.027999696974794982
Armijo: th(77559.64884114785)=-509.5996370541237; dx=5.571983878848941E-4 evalInputDelta=-55.46598639368062
New Minimum: -565.0656234478043 > -793.42549434682
END: th(38779.824420573925)=-793.42549434682; dx=-0.003346100062883857 evalInputDelta=228.35987089901562
Fitness changed from -565.0656234478043 to -793.42549434682
Iteration 7 complete. Error: -793.42549434682 Total: 3.2900; Orientation: 0.2913; Line Search: 2.3288
Adding measurement 2ee639bd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.899e+04, gradient 1.812e-01, dot -0.092; [d4334b61-eac6-4428-b6fb-ba6612fbe11f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -793.42549434682, -82.20064436668773, -30.184466715717697, -6.580499837893132
LBFGS Accumulation History: 3 points
Removed measurement 2ee639bd to history. Total: 3
th(0)=-793.42549434682;dx=-0.03246080209804673
Armijo: th(83548.59900503006)=-518.1854470024365; dx=0.0011707010309980883 evalInputDelta=-275.24004734438347
New Minimum: -793.42549434682 > -916.7142911703058
END: th(41774.29950251503)=-916.7142911703058; dx=-0.0020909757451449034 evalInputDelta=123.28879682348588
Fitness changed from -793.42549434682 to -916.7142911703058
Iteration 8 complete. Error: -916.7142911703058 Total: 3.2708; Orientation: 0.3175; Line Search: 2.2173
Adding measurement 7796fa50 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 2.450e+04, gradient 1.844e-01, dot 0.135; [d4334b61-eac6-4428-b6fb-ba6612fbe11f = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-916.7142911703058;dx=-605.9005712118117
Armijo: th(90000.00000000004)=-33.926104088718716; dx=0.007535288467638289 evalInputDelta=-882.7881870815871
Armijo: th(45000.00000000002)=-34.03051972482251; dx=0.015049757308578444 evalInputDelta=-882.6837714454833
Armijo: th(15000.000000000007)=-34.32481665043548; dx=0.044956995721468745 evalInputDelta=-882.3894745198704
Armijo: th(3750.000000000002)=-36.30714901059201; dx=0.1794365644780226 evalInputDelta=-880.4071421597139
Armijo: th(750.0000000000003)=-51.373602940902344; dx=0.8664146999663718 evalInputDelta=-865.3406882294034
Armijo: th(125.00000000000006)=-179.17745468755862; dx=3.41569901852045 evalInputDelta=-737.5368364827473
Armijo: th(17.857142857142865)=-300.9990272828517; dx=13.835762436938342 evalInputDelta=-615.7152638874541
Armijo: th(2.232142857142858)=-522.6236086292017; dx=47.82087892041406 evalInputDelta=-394.0906825411041
Armijo: th(0.24801587301587313)=-894.5555021374327; dx=-39.54951461438556 evalInputDelta=-22.158789032873187
New Minimum: -916.7142911703058 > -919.6780565397496
END: th(0.024801587301587314)=-919.6780565397496; dx=-190.93158400624833 evalInputDelta=2.963765369443763
Fitness changed from -916.7142911703058 to -919.6780565397496
Iteration 9 complete. Error: -919.6780565397496 Total: 9.8113; Orientation: 0.2848; Line Search: 8.4725
Adding measurement 9abdac1 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 9.045e+05, gradient 1.825e-01, dot -0.101; [d4334b61-eac6-4428-b6fb-ba6612fbe11f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -919.6780565397496, -916.7142911703058, -82.20064436668773, -30.184466715717697, -6.580499837893132
Rejected: LBFGS Orientation magnitude: 2.489e+06, gradient 1.825e-01, dot -0.109; [d4334b61-eac6-4428-b6fb-ba6612fbe11f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -919.6780565397496, -916.7142911703058, -82.20064436668773, -30.184466715717697
LBFGS Accumulation History: 3 points
Removed measurement 9abdac1 to history. Total: 4
Removed measurement 7796fa50 to history. Total: 3
th(0)=-919.6780565397496;dx=-0.033003771178305066
New Minimum: -919.6780565397496 > -919.679313696192
END: th(0.05343340005039397)=-919.679313696192; dx=-0.02640773059748522 evalInputDelta=0.0012571564424206372
Fitness changed from -919.6780565397496 to -919.679313696192
Iteration 10 complete. Error: -919.679313696192 Total: 2.8315; Orientation: 0.6688; Line Search: 1.5030
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/1956ad88-d8af-4bec-aa7c-7f5df4fb5eeb.jpg)
Adding measurement 37973b49 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.421e+04, gradient 1.823e-01, dot -0.060; [d4334b61-eac6-4428-b6fb-ba6612fbe11f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -919.679313696192, -82.20064436668773, -30.184466715717697, -6.580499837893132
LBFGS Accumulation History: 3 points
Removed measurement 37973b49 to history. Total: 3
th(0)=-919.679313696192;dx=-0.0330021274945298
New Minimum: -919.679313696192 > -919.6819600849292
END: th(0.11511877067492018)=-919.6819600849292; dx=-0.026352882595652816 evalInputDelta=0.002646388737161942
Fitness changed from -919.679313696192 to -919.6819600849292
Iteration 11 complete. Error: -919.6819600849292 Total: 2.7275; Orientation: 0.3293; Line Search: 1.6931
Adding measurement 52f5f9bf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.805e+04, gradient 1.825e-01, dot -0.047; [d4334b61-eac6-4428-b6fb-ba6612fbe11f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -919.6819600849292, -82.20064436668773, -30.184466715717697, -6.580499837893132
LBFGS Accumulation History: 3 points
Removed measurement 52f5f9bf to history. Total: 3
th(0)=-919.6819600849292;dx=-0.033078350845282226
New Minimum: -919.6819600849292 > -919.6876773321281
END: th(0.2480158730158732)=-919.6876773321281; dx=-0.026113511114106355 evalInputDelta=0.00571724719895883
Fitness changed from -919.6819600849292 to -919.6876773321281
Iteration 12 complete. Error: -919.6876773321281 Total: 2.4276; Orientation: 0.2897; Line Search: 1.4099
Adding measurement 3180e9f8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.606e+04, gradient 1.826e-01, dot -0.063; [d4334b61-eac6-4428-b6fb-ba6612fbe11f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -919.6876773321281, -82.20064436668773, -30.184466715717697, -6.580499837893132
LBFGS Accumulation History: 3 points
Removed measurement 3180e9f8 to history. Total: 3
th(0)=-919.6876773321281;dx=-0.03312793323725291
New Minimum: -919.6876773321281 > -919.6999065775929
END: th(0.5343340005039399)=-919.6999065775929; dx=-0.02647794682734932 evalInputDelta=0.012229245464709493
Fitness changed from -919.6876773321281 to -919.6999065775929
Iteration 13 complete. Error: -919.6999065775929 Total: 2.6090; Orientation: 0.3289; Line Search: 1.5576
Adding measurement 3b613821 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.915e+04, gradient 1.821e-01, dot -0.075; [d4334b61-eac6-4428-b6fb-ba6612fbe11f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -919.6999065775929, -82.20064436668773, -30.184466715717697, -6.580499837893132
LBFGS Accumulation History: 3 points
Removed measurement 3b613821 to history. Total: 3
th(0)=-919.6999065775929;dx=-0.03309428238185247
New Minimum: -919.6999065775929 > -919.7264519256779
END: th(1.1511877067492022)=-919.7264519256779; dx=-0.026340864912183983 evalInputDelta=0.026545348085051046
Fitness changed from -919.6999065775929 to -919.7264519256779
Iteration 14 complete. Error: -919.7264519256779 Total: 2.7462; Orientation: 0.3085; Line Search: 1.7370
Adding measurement a821aea to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.540e+04, gradient 1.822e-01, dot -0.079; [d4334b61-eac6-4428-b6fb-ba6612fbe11f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -919.7264519256779, -82.20064436668773, -30.184466715717697, -6.580499837893132
LBFGS Accumulation History: 3 points
Removed measurement a821aea to history. Total: 3
th(0)=-919.7264519256779;dx=-0.0330400240946217
New Minimum: -919.7264519256779 > -919.7831062021238
END: th(2.480158730158733)=-919.7831062021238; dx=-0.02637017117615859 evalInputDelta=0.05665427644589727
Fitness changed from -919.7264519256779 to -919.7831062021238
Iteration 15 complete. Error: -919.7831062021238 Total: 2.4847; Orientation: 0.2908; Line Search: 1.5202
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/049d7be9-7f80-4e83-adb9-4bb9886e3ccb.jpg)
Final threshold in iteration 16: -919.7831062021238 (> -Infinity) after 53.666s (< 5400.000s)
Returns
-919.7831062021238