BasicOptimizer.scala:89 executed in 133.97 seconds (1.694 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: 333347561264900
Reset training subject: 333350129124300
Adding measurement 169f5c0a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-121.15282928015726;dx=-2.7321050716061404E-5
New Minimum: -121.15282928015726 > -121.15288102635664
END: th(2.154434690031884)=-121.15288102635664; dx=-2.1188919081579256E-5 evalInputDelta=5.1746199375202195E-5
Fitness changed from -121.15282928015726 to -121.15288102635664
Iteration 1 complete. Error: -121.15288102635664 Total: 12.6062; Orientation: 0.0598; Line Search: 4.9715
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/e5224b6d-cc19-4348-b7aa-e673f60727e5.jpg)
Adding measurement 7862aada to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-121.15288102635664;dx=-2.108198724301667E-5
New Minimum: -121.15288102635664 > -121.15299247963408
WOLFE (weak): th(4.641588833612779)=-121.15299247963408; dx=-2.107743496940862E-5 evalInputDelta=1.1145327744088718E-4
New Minimum: -121.15299247963408 > -121.15309597187131
WOLFE (weak): th(9.283177667225559)=-121.15309597187131; dx=-2.1072077352565086E-5 evalInputDelta=2.1494551467071688E-4
New Minimum: -121.15309597187131 > -121.15354178357492
WOLFE (weak): th(27.849533001676676)=-121.15354178357492; dx=-2.107268377633059E-5 evalInputDelta=6.607572182844024E-4
New Minimum: -121.15354178357492 > -121.15551607282931
WOLFE (weak): th(111.3981320067067)=-121.15551607282931; dx=-2.106778367979993E-5 evalInputDelta=0.0026350464726760947
New Minimum: -121.15551607282931 > -121.16604772557925
WOLFE (weak): th(556.9906600335335)=-121.16604772557925; dx=-2.105802149858611E-5 evalInputDelta=0.013166699222608713
New Minimum: -121.16604772557925 > -121.23182397069246
WOLFE (weak): th(3341.9439602012008)=-121.23182397069246; dx=-2.1039791563121364E-5 evalInputDelta=0.07894294433582161
New Minimum: -121.23182397069246 > -121.70334041629744
WOLFE (weak): th(23393.607721408407)=-121.70334041629744; dx=-2.087822470105253E-5 evalInputDelta=0.5504593899407979
New Minimum: -121.70334041629744 > -125.39371682956036
WOLFE (weak): th(187148.86177126726)=-125.39371682956036; dx=-1.922307396163015E-5 evalInputDelta=4.240835803203723
New Minimum: -125.39371682956036 > -144.5636521121177
END: th(1684339.7559414054)=-144.5636521121177; dx=-5.19330408898398E-6 evalInputDelta=23.410771085761056
Fitness changed from -121.15288102635664 to -144.5636521121177
Iteration 2 complete. Error: -144.5636521121177 Total: 28.9518; Orientation: 0.0603; Line Search: 25.7484
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/ac76366f-b2e5-48d3-b733-cb56ba756b1d.jpg)
Adding measurement 667fcbb1 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-144.5636521121177;dx=-9.658215555239986E-6
New Minimum: -144.5636521121177 > -160.78554215997173
END: th(3628800.0000000005)=-160.78554215997173; dx=-4.162130830903837E-7 evalInputDelta=16.221890047854032
Fitness changed from -144.5636521121177 to -160.78554215997173
Iteration 3 complete. Error: -160.78554215997173 Total: 8.3905; Orientation: 0.0618; Line Search: 5.3507
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/fc5250b1-7e92-4c4a-888a-bca0685269c2.jpg)
Adding measurement 49dd9529 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.512e+03, gradient 3.273e-03, dot -0.318; [b1d78ccd-4626-4183-94f6-a1e73e431058 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -160.78554215997173, -144.5636521121177, -121.15288102635664, -121.15282928015726
LBFGS Accumulation History: 3 points
Removed measurement 49dd9529 to history. Total: 3
th(0)=-160.78554215997173;dx=-1.0700437490756771E-5
Armijo: th(7818012.603187701)=-153.17573016564668; dx=3.857089383487947E-6 evalInputDelta=-7.609811994325042
New Minimum: -160.78554215997173 > -169.6543384738901
WOLF (strong): th(3909006.3015938504)=-169.6543384738901; dx=2.6595827936403138E-6 evalInputDelta=8.86879631391838
New Minimum: -169.6543384738901 > -170.83344638012457
END: th(1303002.1005312835)=-170.83344638012457; dx=-3.529026215365145E-6 evalInputDelta=10.047904220152844
Fitness changed from -160.78554215997173 to -170.83344638012457
Iteration 4 complete. Error: -170.83344638012457 Total: 14.7229; Orientation: 1.0627; Line Search: 10.5974
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/981c4fcc-be86-483b-9fa4-9079dd6d363d.jpg)
Adding measurement 1d75b5ae to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.000e+04, gradient 2.170e-03, dot -0.544; [b1d78ccd-4626-4183-94f6-a1e73e431058 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -170.83344638012457, -144.5636521121177, -121.15288102635664, -121.15282928015726
LBFGS Accumulation History: 3 points
Removed measurement 1d75b5ae to history. Total: 3
th(0)=-170.83344638012457;dx=-4.706398714577906E-6
New Minimum: -170.83344638012457 > -180.5443401272648
END: th(2807232.926569009)=-180.5443401272648; dx=-1.941743861171471E-6 evalInputDelta=9.710893747140233
Fitness changed from -170.83344638012457 to -180.5443401272648
Iteration 5 complete. Error: -180.5443401272648 Total: 9.4987; Orientation: 1.4037; Line Search: 5.1535
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/3c7cf50b-fe0a-46b6-abad-3a4dcc4393a6.jpg)
Adding measurement 32f1e4c2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.444e+04, gradient 2.219e-03, dot -0.532; [b1d78ccd-4626-4183-94f6-a1e73e431058 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -180.5443401272648, -144.5636521121177, -121.15288102635664, -121.15282928015726
LBFGS Accumulation History: 3 points
Removed measurement 32f1e4c2 to history. Total: 3
th(0)=-180.5443401272648;dx=-4.909508359053844E-6
New Minimum: -180.5443401272648 > -186.2998253799811
WOLF (strong): th(6048000.000000001)=-186.2998253799811; dx=7.930702799906499E-7 evalInputDelta=5.755485252716284
New Minimum: -186.2998253799811 > -187.71645330057913
END: th(3024000.0000000005)=-187.71645330057913; dx=-4.4651661177736024E-7 evalInputDelta=7.1721131733143295
Fitness changed from -180.5443401272648 to -187.71645330057913
Iteration 6 complete. Error: -187.71645330057913 Total: 11.9340; Orientation: 1.0178; Line Search: 7.8133
Adding measurement 75f00573 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.608e+04, gradient 2.455e-03, dot -0.425; [b1d78ccd-4626-4183-94f6-a1e73e431058 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -187.71645330057913, -144.5636521121177, -121.15288102635664, -121.15282928015726
LBFGS Accumulation History: 3 points
Removed measurement 75f00573 to history. Total: 3
th(0)=-187.71645330057913;dx=-6.020235074708069E-6
Armijo: th(6515010.502656418)=-184.22349400453365; dx=2.8458684402400707E-6 evalInputDelta=-3.492959296045484
New Minimum: -187.71645330057913 > -193.72150179439723
WOLF (strong): th(3257505.251328209)=-193.72150179439723; dx=1.4267908367622168E-6 evalInputDelta=6.005048493818094
END: th(1085835.0837760696)=-193.05995005302782; dx=-2.9378305243291107E-6 evalInputDelta=5.3434967524486865
Fitness changed from -187.71645330057913 to -193.72150179439723
Iteration 7 complete. Error: -193.72150179439723 Total: 13.7467; Orientation: 1.0160; Line Search: 10.2708
Adding measurement 71997343 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.475e+04, gradient 2.799e-03, dot -0.301; [b1d78ccd-4626-4183-94f6-a1e73e431058 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -193.72150179439723, -144.5636521121177, -121.15288102635664, -121.15282928015726
LBFGS Accumulation History: 3 points
Removed measurement 71997343 to history. Total: 3
th(0)=-193.72150179439723;dx=-7.828137623958445E-6
New Minimum: -193.72150179439723 > -201.59428441637138
WOLF (strong): th(2339360.772140841)=-201.59428441637138; dx=1.0324638099500728E-6 evalInputDelta=7.872782621974153
END: th(1169680.3860704205)=-200.71975563150596; dx=-2.916115655549518E-6 evalInputDelta=6.998253837108734
Fitness changed from -193.72150179439723 to -201.59428441637138
Iteration 8 complete. Error: -201.59428441637138 Total: 11.1289; Orientation: 1.0162; Line Search: 7.5667
Adding measurement 4b4ab6dc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.167e+04, gradient 2.180e-03, dot -0.444; [b1d78ccd-4626-4183-94f6-a1e73e431058 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -201.59428441637138, -144.5636521121177, -121.15288102635664, -121.15282928015726
LBFGS Accumulation History: 3 points
Removed measurement 4b4ab6dc to history. Total: 3
th(0)=-201.59428441637138;dx=-4.7507157877948785E-6
New Minimum: -201.59428441637138 > -207.5661067439673
WOLF (strong): th(2520000.0000000005)=-207.5661067439673; dx=1.9945879063233267E-7 evalInputDelta=5.97182232759593
END: th(1260000.0000000002)=-206.38560756993755; dx=-2.215912314148884E-6 evalInputDelta=4.791323153566168
Fitness changed from -201.59428441637138 to -207.5661067439673
Iteration 9 complete. Error: -207.5661067439673 Total: 11.2356; Orientation: 0.9583; Line Search: 7.7204
Adding measurement c4d04a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.344e+04, gradient 2.031e-03, dot -0.459; [b1d78ccd-4626-4183-94f6-a1e73e431058 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -207.5661067439673, -144.5636521121177, -121.15288102635664, -121.15282928015726
LBFGS Accumulation History: 3 points
Removed measurement c4d04a to history. Total: 3
th(0)=-207.5661067439673;dx=-4.115824478079833E-6
New Minimum: -207.5661067439673 > -212.1262959062927
WOLF (strong): th(2714587.709440174)=-212.1262959062927; dx=5.209560992742463E-7 evalInputDelta=4.5601891623254005
END: th(1357293.854720087)=-211.68346805970523; dx=-1.5046302966234151E-6 evalInputDelta=4.117361315737924
Fitness changed from -207.5661067439673 to -212.1262959062927
Iteration 10 complete. Error: -212.1262959062927 Total: 11.2451; Orientation: 0.9995; Line Search: 7.7130
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/1bdaa2da-0dab-4100-990b-3c08dfcf1331.jpg)
Final threshold in iteration 11: -212.1262959062927 (> -Infinity) after 133.967s (< 5400.000s)
Returns
-212.1262959062927