BasicOptimizer.scala:89 executed in 130.12 seconds (1.789 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: 26242713683500
Reset training subject: 26245379673600
Adding measurement 29f843f4 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-69.22225860793796;dx=-4.903428054358017E-6
New Minimum: -69.22225860793796 > -69.22226849461249
END: th(2.154434690031884)=-69.22226849461249; dx=-3.5214805835578225E-6 evalInputDelta=9.886674533277073E-6
Fitness changed from -69.22225860793796 to -69.22226849461249
Iteration 1 complete. Error: -69.22226849461249 Total: 12.9661; Orientation: 0.0627; Line Search: 5.1394
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/f7c0e5dc-af0e-4719-b416-44b2ef70e43d.jpg)
Adding measurement 68876539 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-69.22226849461249;dx=-3.49783730908603E-6
New Minimum: -69.22226849461249 > -69.22228332462163
WOLFE (weak): th(4.641588833612779)=-69.22228332462163; dx=-3.49597050182423E-6 evalInputDelta=1.4830009135380351E-5
New Minimum: -69.22228332462163 > -69.22230062629495
WOLFE (weak): th(9.283177667225559)=-69.22230062629495; dx=-3.496177308875217E-6 evalInputDelta=3.213168245963516E-5
New Minimum: -69.22230062629495 > -69.22237971960364
WOLFE (weak): th(27.849533001676676)=-69.22237971960364; dx=-3.494135903312631E-6 evalInputDelta=1.1122499114435414E-4
New Minimum: -69.22237971960364 > -69.22271339350479
WOLFE (weak): th(111.3981320067067)=-69.22271339350479; dx=-3.4921908785973365E-6 evalInputDelta=4.44898892297374E-4
New Minimum: -69.22271339350479 > -69.2244855457133
WOLFE (weak): th(556.9906600335335)=-69.2244855457133; dx=-3.492458013264209E-6 evalInputDelta=0.0022170511008141602
New Minimum: -69.2244855457133 > -69.23559691943052
WOLFE (weak): th(3341.9439602012008)=-69.23559691943052; dx=-3.4902078685555005E-6 evalInputDelta=0.013328424818027429
New Minimum: -69.23559691943052 > -69.31548155953858
WOLFE (weak): th(23393.607721408407)=-69.31548155953858; dx=-3.485186901284029E-6 evalInputDelta=0.09321306492608983
New Minimum: -69.31548155953858 > -69.96200391125522
WOLFE (weak): th(187148.86177126726)=-69.96200391125522; dx=-3.4270812218404483E-6 evalInputDelta=0.7397354166427306
New Minimum: -69.96200391125522 > -75.21955934948662
END: th(1684339.7559414054)=-75.21955934948662; dx=-2.6687423058693413E-6 evalInputDelta=5.997290854874123
Fitness changed from -69.22226849461249 to -75.21955934948662
Iteration 2 complete. Error: -75.21955934948662 Total: 28.5882; Orientation: 0.0630; Line Search: 25.5789
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/6adb94dd-0602-4a3b-b141-54cafbd05bdf.jpg)
Adding measurement 5f34eac6 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-75.21955934948662;dx=-2.529259878381848E-6
New Minimum: -75.21955934948662 > -82.9938661573731
END: th(3628800.0000000005)=-82.9938661573731; dx=-1.2938444354404395E-6 evalInputDelta=7.774306807886489
Fitness changed from -75.21955934948662 to -82.9938661573731
Iteration 3 complete. Error: -82.9938661573731 Total: 8.1284; Orientation: 0.0614; Line Search: 5.2282
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/22a18939-1f72-4eaa-b4cd-8032cb2c2f30.jpg)
Adding measurement 54721f65 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.340e+03, gradient 1.238e-03, dot -0.615; [8a8b14d2-4040-4af5-92db-6865965c87d2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -82.9938661573731, -75.21955934948662, -69.22226849461249, -69.22225860793796
LBFGS Accumulation History: 3 points
Removed measurement 54721f65 to history. Total: 3
th(0)=-82.9938661573731;dx=-1.5304407344196158E-6
New Minimum: -82.9938661573731 > -91.78539226157356
END: th(7818012.603187701)=-91.78539226157356; dx=-5.638256738941437E-7 evalInputDelta=8.791526104200457
Fitness changed from -82.9938661573731 to -91.78539226157356
Iteration 4 complete. Error: -91.78539226157356 Total: 9.6344; Orientation: 1.0907; Line Search: 5.4313
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/8a1bb615-f013-43c0-aa74-bad1aaa1181e.jpg)
Adding measurement 644fcde4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.386e+04, gradient 1.312e-03, dot -0.485; [8a8b14d2-4040-4af5-92db-6865965c87d2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -91.78539226157356, -75.21955934948662, -69.22226849461249, -69.22225860793796
LBFGS Accumulation History: 3 points
Removed measurement 644fcde4 to history. Total: 3
th(0)=-91.78539226157356;dx=-1.7215833458367478E-6
Armijo: th(1.6843397559414055E7)=-91.25216930627008; dx=5.298738936419926E-7 evalInputDelta=-0.5332229553034864
New Minimum: -91.78539226157356 > -95.94786782533242
WOLF (strong): th(8421698.779707028)=-95.94786782533242; dx=3.0858370079975485E-7 evalInputDelta=4.162475563758861
END: th(2807232.926569009)=-95.6202298177544; dx=-6.97795261896686E-7 evalInputDelta=3.834837556180844
Fitness changed from -91.78539226157356 to -95.94786782533242
Iteration 5 complete. Error: -95.94786782533242 Total: 14.0204; Orientation: 1.0343; Line Search: 10.0050
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/90c3ff1c-701b-400e-b8dd-06faa5e95c90.jpg)
Adding measurement 514ca4af to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.907e+03, gradient 1.636e-03, dot -0.226; [8a8b14d2-4040-4af5-92db-6865965c87d2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -95.94786782533242, -75.21955934948662, -69.22226849461249, -69.22225860793796
LBFGS Accumulation History: 3 points
Removed measurement 514ca4af to history. Total: 3
th(0)=-95.94786782533242;dx=-2.674408251145296E-6
New Minimum: -95.94786782533242 > -102.81439478279054
WOLF (strong): th(6048000.000000001)=-102.81439478279054; dx=6.558049946760188E-7 evalInputDelta=6.86652695745812
END: th(3024000.0000000005)=-102.54726090570621; dx=-1.0333230705738817E-6 evalInputDelta=6.599393080373787
Fitness changed from -95.94786782533242 to -102.81439478279054
Iteration 6 complete. Error: -102.81439478279054 Total: 11.7236; Orientation: 1.0463; Line Search: 7.8162
Adding measurement 2ef57a4b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.135e+04, gradient 1.407e-03, dot -0.373; [8a8b14d2-4040-4af5-92db-6865965c87d2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -102.81439478279054, -75.21955934948662, -69.22226849461249, -69.22225860793796
LBFGS Accumulation History: 3 points
Removed measurement 2ef57a4b to history. Total: 3
th(0)=-102.81439478279054;dx=-1.9800220347075133E-6
New Minimum: -102.81439478279054 > -106.95612578072544
WOLF (strong): th(6515010.502656418)=-106.95612578072544; dx=6.58641168345408E-7 evalInputDelta=4.1417309979349
New Minimum: -106.95612578072544 > -107.56319573430906
END: th(3257505.251328209)=-107.56319573430906; dx=-5.187912652136783E-7 evalInputDelta=4.748800951518518
Fitness changed from -102.81439478279054 to -107.56319573430906
Iteration 7 complete. Error: -107.56319573430906 Total: 11.0042; Orientation: 1.0363; Line Search: 7.5262
Adding measurement 35c1773f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.785e+04, gradient 8.750e-04, dot -0.675; [8a8b14d2-4040-4af5-92db-6865965c87d2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -107.56319573430906, -75.21955934948662, -69.22226849461249, -69.22225860793796
LBFGS Accumulation History: 3 points
Removed measurement 35c1773f to history. Total: 3
th(0)=-107.56319573430906;dx=-7.649773769637666E-7
New Minimum: -107.56319573430906 > -112.0088466251958
END: th(7018082.316422524)=-112.0088466251958; dx=-4.042506116235093E-7 evalInputDelta=4.445650890886739
Fitness changed from -107.56319573430906 to -112.0088466251958
Iteration 8 complete. Error: -112.0088466251958 Total: 8.3632; Orientation: 0.9897; Line Search: 4.9345
Adding measurement 39546bf4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.283e+04, gradient 9.617e-04, dot -0.578; [8a8b14d2-4040-4af5-92db-6865965c87d2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -112.0088466251958, -75.21955934948662, -69.22226849461249, -69.22225860793796
LBFGS Accumulation History: 3 points
Removed measurement 39546bf4 to history. Total: 3
th(0)=-112.0088466251958;dx=-9.243036443166845E-7
New Minimum: -112.0088466251958 > -113.90660994460848
WOLF (strong): th(1.5120000000000006E7)=-113.90660994460848; dx=2.2861694261797726E-7 evalInputDelta=1.8977633194126753
New Minimum: -113.90660994460848 > -115.22392918885117
END: th(7560000.000000003)=-115.22392918885117; dx=-1.5914518605011248E-8 evalInputDelta=3.215082563655372
Fitness changed from -112.0088466251958 to -115.22392918885117
Iteration 9 complete. Error: -115.22392918885117 Total: 11.3212; Orientation: 0.9954; Line Search: 7.7595
Adding measurement 3040d1a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.974e+04, gradient 1.197e-03, dot -0.400; [8a8b14d2-4040-4af5-92db-6865965c87d2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -115.22392918885117, -75.21955934948662, -69.22226849461249, -69.22225860793796
LBFGS Accumulation History: 3 points
Removed measurement 3040d1a to history. Total: 3
th(0)=-115.22392918885117;dx=-1.4315569873653803E-6
Armijo: th(1.6287526256641047E7)=-109.66939639967362; dx=8.41275806522044E-7 evalInputDelta=-5.554532789177557
New Minimum: -115.22392918885117 > -117.38974346665407
WOLF (strong): th(8143763.128320524)=-117.38974346665407; dx=6.312162789637443E-7 evalInputDelta=2.1658142778028946
New Minimum: -117.38974346665407 > -118.43364432938995
END: th(2714587.7094401745)=-118.43364432938995; dx=-6.197297837757835E-7 evalInputDelta=3.2097151405387763
Fitness changed from -115.22392918885117 to -118.43364432938995
Iteration 10 complete. Error: -118.43364432938995 Total: 13.6548; Orientation: 1.0332; Line Search: 10.1501
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/6a8a3bb9-780a-49cf-a9c9-b37a4ae3c4fd.jpg)
Final threshold in iteration 11: -118.43364432938995 (> -Infinity) after 130.124s (< 5400.000s)
Returns
-118.43364432938995