BasicOptimizer.scala:89 executed in 13.15 seconds (0.471 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: 156678000304300
Reset training subject: 156678138871900
Adding measurement 7d23991f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-8.894548405231589;dx=-0.05236093358302214
New Minimum: -8.894548405231589 > -9.03624632015937
WOLFE (weak): th(2.154434690031884)=-9.03624632015937; dx=-0.054235793022015276 evalInputDelta=0.1416979149277804
New Minimum: -9.03624632015937 > -9.17821297997924
WOLFE (weak): th(4.308869380063768)=-9.17821297997924; dx=-0.050027559213494485 evalInputDelta=0.2836645747476503
New Minimum: -9.17821297997924 > -9.74661626542711
WOLFE (weak): th(12.926608140191302)=-9.74661626542711; dx=-0.053860302854477696 evalInputDelta=0.85206786019552
New Minimum: -9.74661626542711 > -12.465978481725209
WOLFE (weak): th(51.70643256076521)=-12.465978481725209; dx=-0.05919350294811422 evalInputDelta=3.5714300764936198
New Minimum: -12.465978481725209 > -27.39687139094022
END: th(258.53216280382605)=-27.39687139094022; dx=-0.044980878331932456 evalInputDelta=18.50232298570863
Fitness changed from -8.894548405231589 to -27.39687139094022
Iteration 1 complete. Error: -27.39687139094022 Total: 1.0732; Orientation: 0.0016; Line Search: 0.6823
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a89ee050-1555-4629-bb3d-0099c2e9cb88.jpg)
Adding measurement 70409c4f to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-27.39687139094022;dx=-0.07654652025374963
New Minimum: -27.39687139094022 > -55.76153581953357
END: th(556.9906600335335)=-55.76153581953357; dx=-0.027195205729405144 evalInputDelta=28.36466442859335
Fitness changed from -27.39687139094022 to -55.76153581953357
Iteration 2 complete. Error: -55.76153581953357 Total: 0.3486; Orientation: 0.0015; Line Search: 0.2246
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/09078a14-8d64-452a-8bf2-faa223107eae.jpg)
Adding measurement 7e252a99 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-55.76153581953357;dx=-0.1369183178468117
New Minimum: -55.76153581953357 > -75.45518446920165
END: th(1200.0)=-75.45518446920165; dx=-0.01678419350017868 evalInputDelta=19.693648649668084
Fitness changed from -55.76153581953357 to -75.45518446920165
Iteration 3 complete. Error: -75.45518446920165 Total: 0.3462; Orientation: 0.0014; Line Search: 0.2278
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/160ba82d-5cac-44c7-a6e9-3e7f8de4adce.jpg)
Adding measurement 7e366448 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.129e+03, gradient 4.310e-01, dot -0.170; [5747fd25-238f-46fd-8ea5-a9be8f417069 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -75.45518446920165, -55.76153581953357, -27.39687139094022, -8.894548405231589
LBFGS Accumulation History: 3 points
Removed measurement 7e366448 to history. Total: 3
th(0)=-75.45518446920165;dx=-0.1716683963676925
New Minimum: -75.45518446920165 > -149.52034638929578
END: th(2585.3216280382608)=-149.52034638929578; dx=-0.010283169297566116 evalInputDelta=74.06516192009413
Fitness changed from -75.45518446920165 to -149.52034638929578
Iteration 4 complete. Error: -149.52034638929578 Total: 0.3759; Orientation: 0.0277; Line Search: 0.2273
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/ac77f729-c4ac-4753-8509-719b94b99390.jpg)
Adding measurement 5f1ddad7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.935e+03, gradient 3.800e-01, dot -0.130; [5747fd25-238f-46fd-8ea5-a9be8f417069 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -149.52034638929578, -55.76153581953357, -27.39687139094022, -8.894548405231589
LBFGS Accumulation History: 3 points
Removed measurement 5f1ddad7 to history. Total: 3
th(0)=-149.52034638929578;dx=-0.13380759610695278
New Minimum: -149.52034638929578 > -223.38935670147762
WOLF (strong): th(5569.9066003353355)=-223.38935670147762; dx=0.004920147756837866 evalInputDelta=73.86901031218184
New Minimum: -223.38935670147762 > -317.80268544334234
END: th(2784.9533001676677)=-317.80268544334234; dx=-0.015736005511120595 evalInputDelta=168.28233905404656
Fitness changed from -149.52034638929578 to -317.80268544334234
Iteration 5 complete. Error: -317.80268544334234 Total: 0.5498; Orientation: 0.0385; Line Search: 0.3793
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/de0f85a6-9433-401e-b304-2876f9116801.jpg)
Adding measurement 6ffb4fa1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.083e+03, gradient 4.344e-01, dot -0.095; [5747fd25-238f-46fd-8ea5-a9be8f417069 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -317.80268544334234, -55.76153581953357, -27.39687139094022, -8.894548405231589
LBFGS Accumulation History: 3 points
Removed measurement 6ffb4fa1 to history. Total: 3
th(0)=-317.80268544334234;dx=-0.18250795754607624
New Minimum: -317.80268544334234 > -419.4513902110708
WOLF (strong): th(6000.000000000001)=-419.4513902110708; dx=0.004274396917178257 evalInputDelta=101.64870476772847
New Minimum: -419.4513902110708 > -590.0026482991411
END: th(3000.0000000000005)=-590.0026482991411; dx=-0.02288019803722469 evalInputDelta=272.1999628557988
Fitness changed from -317.80268544334234 to -590.0026482991411
Iteration 6 complete. Error: -590.0026482991411 Total: 0.5055; Orientation: 0.0275; Line Search: 0.3552
Adding measurement 3fd03613 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.370e+04, gradient 4.940e-01, dot -0.122; [5747fd25-238f-46fd-8ea5-a9be8f417069 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -590.0026482991411, -55.76153581953357, -27.39687139094022, -8.894548405231589
LBFGS Accumulation History: 3 points
Removed measurement 3fd03613 to history. Total: 3
th(0)=-590.0026482991411;dx=-0.22854152977943432
New Minimum: -590.0026482991411 > -691.0157152699206
WOLF (strong): th(6463.304070095653)=-691.0157152699206; dx=0.018093913981161915 evalInputDelta=101.0130669707795
New Minimum: -691.0157152699206 > -919.4203676773753
END: th(3231.6520350478263)=-919.4203676773753; dx=-0.0017954749508214249 evalInputDelta=329.4177193782342
Fitness changed from -590.0026482991411 to -919.4203676773753
Iteration 7 complete. Error: -919.4203676773753 Total: 0.4892; Orientation: 0.0294; Line Search: 0.3466
Adding measurement 43156e8f to history. Total: 3
Accepted: LBFGS Orientation magnitude: 2.204e+04, gradient 4.948e-01, dot 0.157; [5747fd25-238f-46fd-8ea5-a9be8f417069 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-919.4203676773753;dx=-1709.9860956310797
Armijo: th(6962.3832504191705)=-139.98185568806767; dx=0.00195352711997655 evalInputDelta=-779.4385119893077
Armijo: th(3481.1916252095853)=-140.3925996313552; dx=0.0033764894249230827 evalInputDelta=-779.0277680460201
Armijo: th(1160.397208403195)=-140.75387150536926; dx=0.0033817153565879957 evalInputDelta=-778.6664961720061
Armijo: th(290.09930210079875)=-141.3219811060898; dx=0.010596253410761612 evalInputDelta=-778.0983865712856
Armijo: th(58.01986042015975)=-144.6782934435916; dx=0.48620175816532046 evalInputDelta=-774.7420742337838
Armijo: th(9.669976736693291)=-136.70290265297953; dx=1.3770458533197305 evalInputDelta=-782.7174650243958
Armijo: th(1.3814252480990417)=-273.88147527717166; dx=31.34997150398414 evalInputDelta=-645.5388924002036
Armijo: th(0.1726781560123802)=-772.7261804805115; dx=-340.79471137508995 evalInputDelta=-146.69418719686382
New Minimum: -919.4203676773753 > -932.8889939322898
END: th(0.019186461779153355)=-932.8889939322898; dx=-1206.5755870051648 evalInputDelta=13.468626254914511
Fitness changed from -919.4203676773753 to -932.8889939322898
Iteration 8 complete. Error: -932.8889939322898 Total: 1.3341; Orientation: 0.0271; Line Search: 1.1915
Adding measurement 4f8ac66f to history. Total: 4
Rejected: LBFGS Orientation magnitude: 5.679e+05, gradient 5.071e-01, dot -0.114; [5747fd25-238f-46fd-8ea5-a9be8f417069 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -932.8889939322898, -919.4203676773753, -55.76153581953357, -27.39687139094022, -8.894548405231589
Rejected: LBFGS Orientation magnitude: 8.070e+05, gradi
...skipping 3506 bytes...
FGS Orientation magnitude: 1.115e+06, gradient 4.877e-01, dot -0.263; [5747fd25-238f-46fd-8ea5-a9be8f417069 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -998.7216829527633, -995.6182124690166, -55.76153581953357, -27.39687139094022
LBFGS Accumulation History: 3 points
Removed measurement 7ef4b992 to history. Total: 4
Removed measurement 777aaec2 to history. Total: 3
th(0)=-998.7216829527633;dx=-0.22364478963567408
New Minimum: -998.7216829527633 > -998.7284728593653
WOLFE (weak): th(0.023983077223941694)=-998.7284728593653; dx=-0.20786629948625826 evalInputDelta=0.006789906601966322
New Minimum: -998.7284728593653 > -998.7353565885209
WOLFE (weak): th(0.04796615444788339)=-998.7353565885209; dx=-0.20778453205587621 evalInputDelta=0.013673635757527336
New Minimum: -998.7353565885209 > -998.762515566138
WOLFE (weak): th(0.14389846334365017)=-998.762515566138; dx=-0.2047827046672645 evalInputDelta=0.04083261337461863
New Minimum: -998.762515566138 > -998.8847843970796
WOLFE (weak): th(0.5755938533746007)=-998.8847843970796; dx=-0.206401963161911 evalInputDelta=0.16310144431622575
New Minimum: -998.8847843970796 > -999.5361424180718
WOLFE (weak): th(2.8779692668730035)=-999.5361424180718; dx=-0.20560436406954968 evalInputDelta=0.8144594653084596
New Minimum: -999.5361424180718 > -1003.5827382433398
WOLFE (weak): th(17.26781560123802)=-1003.5827382433398; dx=-0.20640507257834736 evalInputDelta=4.8610552905764735
New Minimum: -1003.5827382433398 > -1032.0033914672956
END: th(120.87470920866613)=-1032.0033914672956; dx=-0.19879168978857775 evalInputDelta=33.28170851453228
Fitness changed from -998.7216829527633 to -1032.0033914672956
Iteration 11 complete. Error: -1032.0033914672956 Total: 1.0913; Orientation: 0.0627; Line Search: 0.9096
Adding measurement 4b605d5 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 2.077e+04, gradient 4.636e-01, dot 0.158; [5747fd25-238f-46fd-8ea5-a9be8f417069 = 1.000/1.000e+00]
th(0)=-1032.0033914672956;dx=-1438.812760271746
Armijo: th(260.4166666666667)=-217.5082254191781; dx=0.3309780202234528 evalInputDelta=-814.4951660481175
Armijo: th(130.20833333333334)=-220.9824211758709; dx=0.6468727626395654 evalInputDelta=-811.0209702914246
Armijo: th(43.40277777777778)=-230.45678994390684; dx=2.227157825343097 evalInputDelta=-801.5466015233887
Armijo: th(10.850694444444445)=-250.87770925293464; dx=6.418945444953206 evalInputDelta=-781.125682214361
Armijo: th(2.170138888888889)=-327.1449052980957; dx=34.457690995300716 evalInputDelta=-704.8584861692
Armijo: th(0.3616898148148148)=-748.883251915811; dx=-91.90647288838794 evalInputDelta=-283.1201395514846
Armijo: th(0.051669973544973546)=-1010.7235032391401; dx=-636.0844844364365 evalInputDelta=-21.279888228155528
New Minimum: -1032.0033914672956 > -1032.1888150915024
END: th(0.006458746693121693)=-1032.1888150915024; dx=-910.5166905768007 evalInputDelta=0.18542362420680547
Fitness changed from -1032.0033914672956 to -1032.1888150915024
Iteration 12 complete. Error: -1032.1888150915024 Total: 1.2378; Orientation: 0.0272; Line Search: 1.0938
Adding measurement 1a07395c to history. Total: 4
Rejected: LBFGS Orientation magnitude: 9.136e+05, gradient 4.639e-01, dot -0.122; [5747fd25-238f-46fd-8ea5-a9be8f417069 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1032.1888150915024, -1032.0033914672956, -55.76153581953357, -27.39687139094022, -8.894548405231589
Rejected: LBFGS Orientation magnitude: 1.925e+06, gradient 4.639e-01, dot -0.262; [5747fd25-238f-46fd-8ea5-a9be8f417069 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1032.1888150915024, -1032.0033914672956, -55.76153581953357, -27.39687139094022
LBFGS Accumulation History: 3 points
Removed measurement 1a07395c to history. Total: 4
Removed measurement 4b605d5 to history. Total: 3
th(0)=-1032.1888150915024;dx=-0.20436308813358423
New Minimum: -1032.1888150915024 > -1032.1924481413337
WOLFE (weak): th(0.013914947929790089)=-1032.1924481413337; dx=-0.19516412019458268 evalInputDelta=0.0036330498312509008
New Minimum: -1032.1924481413337 > -1032.195960077349
WOLFE (weak): th(0.027829895859580178)=-1032.195960077349; dx=-0.19363469598112196 evalInputDelta=0.007144985846480267
New Minimum: -1032.195960077349 > -1032.2101893509869
WOLFE (weak): th(0.08348968757874053)=-1032.2101893509869; dx=-0.19256940290267366 evalInputDelta=0.021374259484446156
New Minimum: -1032.2101893509869 > -1032.274370019909
WOLFE (weak): th(0.33395875031496214)=-1032.274370019909; dx=-0.1911925393319261 evalInputDelta=0.08555492840650913
New Minimum: -1032.274370019909 > -1032.6167004266395
WOLFE (weak): th(1.6697937515748107)=-1032.6167004266395; dx=-0.19312166762092087 evalInputDelta=0.4278853351370344
New Minimum: -1032.6167004266395 > -1034.7530502491886
WOLFE (weak): th(10.018762509448864)=-1034.7530502491886; dx=-0.18949308038599993 evalInputDelta=2.5642351576861984
New Minimum: -1034.7530502491886 > -1049.9330335788088
WOLFE (weak): th(70.13133756614205)=-1049.9330335788088; dx=-0.18993694753178075 evalInputDelta=17.744218487306398
New Minimum: -1049.9330335788088 > -1158.8393978459656
END: th(561.0507005291364)=-1158.8393978459656; dx=-0.1503265197387024 evalInputDelta=126.65058275446313
Fitness changed from -1032.1888150915024 to -1158.8393978459656
Iteration 13 complete. Error: -1158.8393978459656 Total: 1.2442; Orientation: 0.0592; Line Search: 1.0619
Adding measurement b4fd9d9 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 2.973e+04, gradient 4.184e-01, dot 0.192; [5747fd25-238f-46fd-8ea5-a9be8f417069 = 1.000/1.000e+00]
th(0)=-1158.8393978459656;dx=-2417.457358355975
Armijo: th(1208.7470920866613)=-219.0205113111555; dx=0.08353647013076337 evalInputDelta=-939.8188865348101
Armijo: th(604.3735460433306)=-219.12353821531818; dx=0.1660358023654906 evalInputDelta=-939.7158596306474
Armijo: th(201.45784868111022)=-223.9569311971612; dx=0.5799411004094175 evalInputDelta=-934.8824666488043
Armijo: th(50.364462170277555)=-232.5852498278857; dx=1.8928244359165098 evalInputDelta=-926.2541480180798
Armijo: th(10.072892434055511)=-250.59886085634946; dx=9.229884476676958 evalInputDelta=-908.2405369896161
Armijo: th(1.6788154056759186)=-338.71125239649183; dx=44.82396132481717 evalInputDelta=-820.1281454494738
Armijo: th(0.23983077223941693)=-842.9789069128599; dx=-67.2589293654998 evalInputDelta=-315.86049093310567
Armijo: th(0.029978846529927116)=-1149.2150582027716; dx=-921.1037473424105 evalInputDelta=-9.624339643193935
New Minimum: -1158.8393978459656 > -1161.1018473846298
END: th(0.0033309829477696797)=-1161.1018473846298; dx=-1431.4148474539177 evalInputDelta=2.262449538664214
Fitness changed from -1158.8393978459656 to -1161.1018473846298
Iteration 14 complete. Error: -1161.1018473846298 Total: 1.3187; Orientation: 0.0312; Line Search: 1.1694
Adding measurement 34a47ad6 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 1.830e+05, gradient 4.151e-01, dot -0.207; [5747fd25-238f-46fd-8ea5-a9be8f417069 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1161.1018473846298, -1158.8393978459656, -55.76153581953357, -27.39687139094022, -8.894548405231589
Rejected: LBFGS Orientation magnitude: 3.736e+05, gradient 4.151e-01, dot -0.316; [5747fd25-238f-46fd-8ea5-a9be8f417069 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1161.1018473846298, -1158.8393978459656, -55.76153581953357, -27.39687139094022
LBFGS Accumulation History: 3 points
Removed measurement 34a47ad6 to history. Total: 4
Removed measurement b4fd9d9 to history. Total: 3
th(0)=-1161.1018473846298;dx=-0.16555784342872773
New Minimum: -1161.1018473846298 > -1161.1029777758733
END: th(0.007176385214579661)=-1161.1029777758733; dx=-0.1460101358374687 evalInputDelta=0.001130391243577833
Fitness changed from -1161.1018473846298 to -1161.1029777758733
Iteration 15 complete. Error: -1161.1029777758733 Total: 0.4132; Orientation: 0.0694; Line Search: 0.2279
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/c4a8f821-2d8c-4ede-81c5-18f953d66c54.jpg)
Final threshold in iteration 16: -1161.1029777758733 (> -Infinity) after 13.154s (< 5400.000s)
Returns
-1161.1029777758733