BasicOptimizer.scala:89 executed in 111.31 seconds (2.372 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: 215651489098900
Reset training subject: 215652117660100
Adding measurement 669aa552 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.13505099014243527;dx=-7.959815036500698E-8
New Minimum: -0.13505099014243527 > -0.13505111965862834
WOLFE (weak): th(2.154434690031884)=-0.13505111965862834; dx=-7.93943623194336E-8 evalInputDelta=1.295161930758848E-7
New Minimum: -0.13505111965862834 > -0.13505126150904465
WOLFE (weak): th(4.308869380063768)=-0.13505126150904465; dx=-7.842016181009807E-8 evalInputDelta=2.713666093778766E-7
New Minimum: -0.13505126150904465 > -0.13505179806593023
WOLFE (weak): th(12.926608140191302)=-0.13505179806593023; dx=-7.906962811700104E-8 evalInputDelta=8.079234949665004E-7
New Minimum: -0.13505179806593023 > -0.1350541908373032
WOLFE (weak): th(51.70643256076521)=-0.1350541908373032; dx=-7.850736836335912E-8 evalInputDelta=3.2006948679219605E-6
New Minimum: -0.1350541908373032 > -0.13506710027125823
WOLFE (weak): th(258.53216280382605)=-0.13506710027125823; dx=-7.820151859361412E-8 evalInputDelta=1.611012882296592E-5
New Minimum: -0.13506710027125823 > -0.1351474565981669
WOLFE (weak): th(1551.1929768229563)=-0.1351474565981669; dx=-7.855394213820134E-8 evalInputDelta=9.646645573163637E-5
New Minimum: -0.1351474565981669 > -0.1357219870548886
WOLFE (weak): th(10858.350837760694)=-0.1357219870548886; dx=-7.89115685206277E-8 evalInputDelta=6.709969124533421E-4
New Minimum: -0.1357219870548886 > -0.14008122035038764
WOLFE (weak): th(86866.80670208555)=-0.14008122035038764; dx=-7.553821192350353E-8 evalInputDelta=0.005030230207952374
New Minimum: -0.14008122035038764 > -0.14877237419617192
END: th(781801.26031877)=-0.14877237419617192; dx=-3.217994393759368E-8 evalInputDelta=0.013721384053736657
Fitness changed from -0.13505099014243527 to -0.14877237419617192
Iteration 1 complete. Error: -0.14877237419617192 Total: 8.0230; Orientation: 0.0158; Line Search: 6.2784
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/9bd291be-fd5b-4816-843d-00fd89d2eca0.jpg)
Adding measurement 6c79cc37 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.14877237419617192;dx=-1.1110202833533044E-7
Armijo: th(1684339.7559414052)=-0.05666005661589574; dx=4.245284044258043E-10 evalInputDelta=-0.09211231758027619
Armijo: th(842169.8779707026)=-0.144781238017198; dx=-4.0121617343234116E-8 evalInputDelta=-0.003991136178973925
New Minimum: -0.14877237419617192 > -0.15896127640907795
END: th(280723.2926569009)=-0.15896127640907795; dx=-8.217892270662279E-8 evalInputDelta=0.010188902212906026
Fitness changed from -0.14877237419617192 to -0.15896127640907795
Iteration 2 complete. Error: -0.15896127640907795 Total: 3.0916; Orientation: 0.0161; Line Search: 2.4734
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/bfd73c36-2f7c-4e29-b521-b04298fd2a66.jpg)
Adding measurement 1063e972 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.15896127640907795;dx=-1.046532779083229E-7
New Minimum: -0.15896127640907795 > -0.16155297704144322
END: th(604800.0000000001)=-0.16155297704144322; dx=-6.146904717486055E-8 evalInputDelta=0.0025917006323652736
Fitness changed from -0.15896127640907795 to -0.16155297704144322
Iteration 3 complete. Error: -0.16155297704144322 Total: 1.7630; Orientation: 0.0161; Line Search: 1.1703
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/60c9d1c0-6419-43d6-b75b-9a4df266cf02.jpg)
Adding measurement 4921985c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.321e+03, gradient 3.734e-04, dot -0.360; [b8ed6080-f5b7-4259-b9fa-6faed118d2c3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.16155297704144322, -0.15896127640907795, -0.14877237419617192, -0.13505099014243527
LBFGS Accumulation History: 3 points
Removed measurement 4921985c to history. Total: 3
th(0)=-0.16155297704144322;dx=-1.3657868332574657E-7
Armijo: th(1303002.1005312835)=-0.08086791790197811; dx=-1.8082514357433138E-8 evalInputDelta=-0.08068505913946511
Armijo: th(651501.0502656418)=-0.15764472326548923; dx=-6.241992360869156E-8 evalInputDelta=-0.003908253775953996
New Minimum: -0.16155297704144322 > -0.16838633232147748
END: th(217167.01675521393)=-0.16838633232147748; dx=-1.1223308233520621E-7 evalInputDelta=0.006833355280034259
Fitness changed from -0.16155297704144322 to -0.16838633232147748
Iteration 4 complete. Error: -0.16838633232147748 Total: 3.3470; Orientation: 0.2940; Line Search: 2.4586
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/400bd79c-f194-42ef-a6e7-a993fbb634d7.jpg)
Adding measurement 12e74387 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.131e+03, gradient 3.646e-04, dot -0.353; [b8ed6080-f5b7-4259-b9fa-6faed118d2c3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.16838633232147748, -0.15896127640907795, -0.14877237419617192, -0.13505099014243527
LBFGS Accumulation History: 3 points
Removed measurement 12e74387 to history. Total: 3
th(0)=-0.16838633232147748;dx=-1.3169026903323125E-7
New Minimum: -0.16838633232147748 > -0.1722730259686171
END: th(467872.15442816826)=-0.1722730259686171; dx=-6.54756807634187E-8 evalInputDelta=0.0038866936471396163
Fitness changed from -0.16838633232147748 to -0.1722730259686171
Iteration 5 complete. Error: -0.1722730259686171 Total: 2.3737; Orientation: 0.2918; Line Search: 1.4799
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/1f8ea355-98af-44b0-951a-a505989a71f8.jpg)
Adding measurement 31ff3b74 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.709e+03, gradient 3.446e-04, dot -0.287; [b8ed6080-f5b7-4259-b9fa-6faed118d2c3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.1722730259686171, -0.15896127640907795, -0.14877237419617192, -0.13505099014243527
LBFGS Accumulation History: 3 points
Removed measurement 31ff3b74 to history. Total: 3
th(0)=-0.1722730259686171;dx=-1.1674487430211187E-7
Armijo: th(1008000.0000000003)=-0.1289071495550385; dx=-3.2309322160007374E-8 evalInputDelta=-0.043365876413578586
Armijo: th(504000.0000000002)=-0.167201676776919; dx=-6.103831549126616E-8 evalInputDelta=-0.005071349191698105
New Minimum: -0.1722730259686171 > -0.17561781715531033
END: th(168000.00000000006)=-0.17561781715531033; dx=-9.380441311463899E-8 evalInputDelta=0.00334479118669323
Fitness changed from -0.1722730259686171 to -0.17561781715531033
Iteration 6 complete. Error: -0.17561781715531033 Total: 3.3104; Orientation: 0.2805; Line Search: 2.4330
Adding measurement 78f2a7cd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.365e+03, gradient 3.156e-04, dot -0.320; [b8ed6080-f5b7-4259-b9fa-6faed118d2c3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.17561781715531033, -0.15896127640907795, -0.14877237419617192, -0.13505099014243527
LBFGS Accumulation History: 3 points
Removed measurement 78f2a7cd to history. Total: 3
th(0)=-0.17561781715531033;dx=-9.761717365296944E-8
Armijo: th(361945.0279253566)=-0.17491317826622071; dx=-6.72976854501862E-8 evalInputDelta=-7.046388890896149E-4
New Minimum: -0.17561781715531033 > -0.17724484891242648
END: th(180972.5139626783)=-0.17724484891242648; dx=-7.878580310236204E-8 evalInputDelta=0.0016270317571161486
Fitness changed from -0.17561781715531033 to -0.17724484891242648
Iteration 7 complete. Error: -0.17724484891242648 Total: 2.6765; Orientation: 0.2949; Line Search: 1.8524
Adding measurement 3cdc43a1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.686e+03, gradient 2.916e-04, dot -0.347; [b8ed6080-f5b7-4259-b9fa-6faed118d2c3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.17724484891242648, -0.15896127640907795, -0.14877237419617192, -0.13505099014243527
LBFGS Accumulation History: 3 points
Removed measurement 3cdc43a1 to history. Total: 3
th(0)=-0.17724484891242648;dx=-8.385882123732838E-8
Armijo: th(389893.4620234736)=-0.17451339936630222; dx=-6.320990486524477E-8 evalInputDelta=-0.002731449546124254
New Minimum: -0.17724484891242648 > -0.1774045363356152
END: th(194946.7310117368)=-0.1774045363356152; dx=-7.105261
...skipping 10812 bytes...
235957643; dx=-6.651879323930064E-8 evalInputDelta=3.5970473655222435E-8
WOLFE (weak): th(16426.144486440422)=-0.1784154835010121; dx=-6.686185380968682E-8 evalInputDelta=1.7111909333955566E-8
Armijo: th(16429.839075843578)=-0.1784154647584113; dx=-6.721820242959616E-8 evalInputDelta=-1.6306914707442388E-9
Armijo: th(16427.991781142002)=-0.17841546483101184; dx=-6.712504984017658E-8 evalInputDelta=-1.5580909340506821E-9
Armijo: th(16427.06813379121)=-0.17841546486004534; dx=-6.684405476973963E-8 evalInputDelta=-1.5290574362225584E-9
Armijo: th(16426.606310115814)=-0.17841546486004534; dx=-6.580789799362927E-8 evalInputDelta=-1.5290574362225584E-9
WOLFE (weak): th(16426.37539827812)=-0.17841548348649683; dx=-6.627978145771456E-8 evalInputDelta=1.7097394056087012E-8
Armijo: th(16426.490854196967)=-0.17841546487456061; dx=-6.661743753809556E-8 evalInputDelta=-1.5145421583540042E-9
mu ~= nu (16426.37539827812): th(15133.038195335126)=-0.17841591223456216
Fitness changed from -0.17841546638910277 to -0.17841591223456216
Iteration 13 complete. Error: -0.17841591223456216 Total: 15.2582; Orientation: 0.2846; Line Search: 14.4126
Adding measurement 3ac26edf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.719e+03, gradient 2.681e-04, dot -0.366; [b8ed6080-f5b7-4259-b9fa-6faed118d2c3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.17841591223456216, -0.15896127640907795, -0.14877237419617192, -0.13505099014243527
LBFGS Accumulation History: 3 points
Removed measurement 3ac26edf to history. Total: 3
th(0)=-0.17841591223456216;dx=-7.018942325185849E-8
New Minimum: -0.17841591223456216 > -0.17843188149190542
WOLFE (weak): th(35389.67736065505)=-0.17843188149190542; dx=-6.648488779544485E-8 evalInputDelta=1.5969257343262377E-5
Armijo: th(70779.3547213101)=-0.1783593506676191; dx=-6.579687934006295E-8 evalInputDelta=-5.656156694305858E-5
Armijo: th(53084.51604098258)=-0.17840707702898634; dx=-6.499718830894043E-8 evalInputDelta=-8.83520557581896E-6
WOLFE (weak): th(44237.096700818816)=-0.17842312654640008; dx=-6.643244145540486E-8 evalInputDelta=7.214311837921983E-6
WOLFE (weak): th(48660.8063709007)=-0.1784161980856931; dx=-6.611458568256256E-8 evalInputDelta=2.8585113093226866E-7
Armijo: th(50872.66120594164)=-0.17841191853645044; dx=-6.65327177701077E-8 evalInputDelta=-3.993698111715016E-6
Armijo: th(49766.73378842117)=-0.17841417232745854; dx=-6.578209699281696E-8 evalInputDelta=-1.739907103615046E-6
Armijo: th(49213.77007966093)=-0.17841525059888352; dx=-6.499588908539098E-8 evalInputDelta=-6.616356786337541E-7
Armijo: th(48937.28822528081)=-0.17841565974605633; dx=-6.512831716550212E-8 evalInputDelta=-2.524885058252657E-7
WOLFE (weak): th(48799.04729809075)=-0.17841591982434402; dx=-6.617573240004379E-8 evalInputDelta=7.589781858552413E-9
Armijo: th(48868.16776168578)=-0.17841584526459686; dx=-6.631590269437061E-8 evalInputDelta=-6.6969965295538E-8
Armijo: th(48833.607529888264)=-0.17841585478402938; dx=-6.644193917618457E-8 evalInputDelta=-5.7450532775504826E-8
WOLFE (weak): th(48816.32741398951)=-0.17841593351869017; dx=-6.539205638989346E-8 evalInputDelta=2.1284128015608417E-8
Armijo: th(48824.967471938886)=-0.1784158570160787; dx=-6.589431295808576E-8 evalInputDelta=-5.521848345235725E-8
Armijo: th(48820.6474429642)=-0.1784158952086891; dx=-6.615189022804912E-8 evalInputDelta=-1.702587304475145E-8
WOLFE (weak): th(48818.48742847685)=-0.17841591442242682; dx=-6.596516616835118E-8 evalInputDelta=2.187864667213546E-9
Armijo: th(48819.56743572053)=-0.17841589567852; dx=-6.620673733937987E-8 evalInputDelta=-1.6556042148341277E-8
Armijo: th(48819.027432098694)=-0.17841589567852; dx=-6.572002880525175E-8 evalInputDelta=-1.6556042148341277E-8
WOLFE (weak): th(48818.75743028778)=-0.178415932931423; dx=-6.597271626241889E-8 evalInputDelta=2.0696860836277864E-8
mu ~= nu (48818.75743028778): th(35389.67736065505)=-0.17843188149190542
Fitness changed from -0.17841591223456216 to -0.17843188149190542
Iteration 14 complete. Error: -0.17843188149190542 Total: 13.7379; Orientation: 0.2766; Line Search: 12.9174
Adding measurement 549e1c68 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.322e+03, gradient 2.660e-04, dot -0.361; [b8ed6080-f5b7-4259-b9fa-6faed118d2c3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.17843188149190542, -0.15896127640907795, -0.14877237419617192, -0.13505099014243527
LBFGS Accumulation History: 3 points
Removed measurement 549e1c68 to history. Total: 3
th(0)=-0.17843188149190542;dx=-6.931293532195776E-8
Armijo: th(105177.11538269768)=-0.17796615782571856; dx=-6.440882243760556E-8 evalInputDelta=-4.657236661868569E-4
Armijo: th(52588.55769134884)=-0.17829597328304142; dx=-6.411199714511952E-8 evalInputDelta=-1.3590820886399957E-4
Armijo: th(17529.519230449612)=-0.1784098183829968; dx=-6.550565247971978E-8 evalInputDelta=-2.2063108908620954E-5
Armijo: th(4382.379807612403)=-0.17842874187360813; dx=-6.615074618899076E-8 evalInputDelta=-3.139618297287594E-6
Armijo: th(876.4759615224806)=-0.17843134210589445; dx=-6.612522496354361E-8 evalInputDelta=-5.393860109670356E-7
Armijo: th(146.07932692041342)=-0.17843181654159757; dx=-6.591622624541256E-8 evalInputDelta=-6.495030785425016E-8
Armijo: th(20.868475274344775)=-0.17843187759149792; dx=-6.716686935822771E-8 evalInputDelta=-3.900407496981728E-9
New Minimum: -0.17843188149190542 > -0.1784318995865921
WOLFE (weak): th(2.608559409293097)=-0.1784318995865921; dx=-6.660448459713308E-8 evalInputDelta=1.809468669344838E-8
Armijo: th(11.738517341818936)=-0.17843187927599186; dx=-6.640450281843196E-8 evalInputDelta=-2.215913563752281E-9
New Minimum: -0.1784318995865921 > -0.17843191723805218
WOLFE (weak): th(7.173538375556016)=-0.17843191723805218; dx=-6.647210890913559E-8 evalInputDelta=3.574614676482568E-8
WOLFE (weak): th(9.456027858687476)=-0.17843189825702965; dx=-6.636025335588326E-8 evalInputDelta=1.6765124233319995E-8
WOLFE (weak): th(10.597272600253206)=-0.17843191661754282; dx=-6.654961193830203E-8 evalInputDelta=3.5125637398714105E-8
WOLFE (weak): th(11.16789497103607)=-0.17843189799109133; dx=-6.686170889790342E-8 evalInputDelta=1.6499185906404534E-8
WOLFE (weak): th(11.453206156427502)=-0.17843189781379437; dx=-6.712949366129761E-8 evalInputDelta=1.6321888951509322E-8
WOLFE (weak): th(11.59586174912322)=-0.17843189781379437; dx=-6.714104482168543E-8 evalInputDelta=1.6321888951509322E-8
WOLFE (weak): th(11.667189545471079)=-0.17843189781379437; dx=-6.623618095366082E-8 evalInputDelta=1.6321888951509322E-8
WOLFE (weak): th(11.702853443645008)=-0.17843189781379437; dx=-6.653154079588992E-8 evalInputDelta=1.6321888951509322E-8
WOLFE (weak): th(11.720685392731973)=-0.17843189781379437; dx=-6.630069017426735E-8 evalInputDelta=1.6321888951509322E-8
WOLFE (weak): th(11.729601367275453)=-0.17843189781379437; dx=-6.676341248315048E-8 evalInputDelta=1.6321888951509322E-8
Armijo: th(11.734059354547195)=-0.17843187927599186; dx=-6.661822611335292E-8 evalInputDelta=-2.215913563752281E-9
WOLFE (weak): th(11.731830360911324)=-0.17843189781379437; dx=-6.645985514853808E-8 evalInputDelta=1.6321888951509322E-8
Armijo: th(11.73294485772926)=-0.17843187927599186; dx=-6.723106573402697E-8 evalInputDelta=-2.215913563752281E-9
WOLFE (weak): th(11.732387609320291)=-0.17843189781379437; dx=-6.660731422313056E-8 evalInputDelta=1.6321888951509322E-8
Armijo: th(11.732666233524775)=-0.17843187927599186; dx=-6.634336070934604E-8 evalInputDelta=-2.215913563752281E-9
Armijo: th(11.732526921422533)=-0.17843187927599186; dx=-6.676184879864966E-8 evalInputDelta=-2.215913563752281E-9
Armijo: th(11.732457265371412)=-0.17843187927599186; dx=-6.678943025908221E-8 evalInputDelta=-2.215913563752281E-9
mu ~= nu (11.732387609320291): th(7.173538375556016)=-0.17843191723805218
Fitness changed from -0.17843188149190542 to -0.17843191723805218
Iteration 15 complete. Error: -0.17843191723805218 Total: 18.2479; Orientation: 0.2867; Line Search: 17.4200
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/17fab172-1cc4-47b1-947e-2c0123ba7a77.jpg)
Final threshold in iteration 16: -0.17843191723805218 (> -Infinity) after 111.312s (< 5400.000s)
Returns
-0.17843191723805218