BasicOptimizer.scala:89 executed in 126.32 seconds (1.490 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: 28881323134000
Reset training subject: 28883865319700
Adding measurement 62810e9f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-67.64585743835029;dx=-4.81729935654355E-6
New Minimum: -67.64585743835029 > -67.64586755542125
END: th(2.154434690031884)=-67.64586755542125; dx=-3.9858365250028455E-6 evalInputDelta=1.0117070956994212E-5
Fitness changed from -67.64585743835029 to -67.64586755542125
Iteration 1 complete. Error: -67.64586755542125 Total: 12.6522; Orientation: 0.0637; Line Search: 5.0410
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/4b126cf2-7bf3-47bf-9fdc-46cfa6d826a9.jpg)
Adding measurement 25829c65 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-67.64586755542125;dx=-3.95668451559728E-6
New Minimum: -67.64586755542125 > -67.64589031882532
WOLFE (weak): th(4.641588833612779)=-67.64589031882532; dx=-3.957539015497353E-6 evalInputDelta=2.27634040754765E-5
New Minimum: -67.64589031882532 > -67.64590802368988
WOLFE (weak): th(9.283177667225559)=-67.64590802368988; dx=-3.956954829786652E-6 evalInputDelta=4.046826863657316E-5
New Minimum: -67.64590802368988 > -67.64599401868035
WOLFE (weak): th(27.849533001676676)=-67.64599401868035; dx=-3.957193177282064E-6 evalInputDelta=1.2646325910736778E-4
New Minimum: -67.64599401868035 > -67.64637340703918
WOLFE (weak): th(111.3981320067067)=-67.64637340703918; dx=-3.955680052074527E-6 evalInputDelta=5.058516179303751E-4
New Minimum: -67.64637340703918 > -67.64839677568507
WOLFE (weak): th(556.9906600335335)=-67.64839677568507; dx=-3.956216855572451E-6 evalInputDelta=0.0025292202638240724
New Minimum: -67.64839677568507 > -67.66103387274069
WOLFE (weak): th(3341.9439602012008)=-67.66103387274069; dx=-3.955273769348932E-6 evalInputDelta=0.015166317319440736
New Minimum: -67.66103387274069 > -67.75188219735848
WOLFE (weak): th(23393.607721408407)=-67.75188219735848; dx=-3.942030837117567E-6 evalInputDelta=0.10601464193723587
New Minimum: -67.75188219735848 > -68.47067409656346
WOLFE (weak): th(187148.86177126726)=-68.47067409656346; dx=-3.7183809090901166E-6 evalInputDelta=0.824806541142209
New Minimum: -68.47067409656346 > -73.60235662694353
END: th(1684339.7559414054)=-73.60235662694353; dx=-2.305445231711996E-6 evalInputDelta=5.9564890715222845
Fitness changed from -67.64586755542125 to -73.60235662694353
Iteration 2 complete. Error: -73.60235662694353 Total: 27.9450; Orientation: 0.0661; Line Search: 25.0311
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/fe27e6e3-164d-4000-bac0-f2c1eb3c3b29.jpg)
Adding measurement 4652d02f to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-73.60235662694353;dx=-2.1611892944251242E-6
New Minimum: -73.60235662694353 > -80.46460400678346
END: th(3628800.0000000005)=-80.46460400678346; dx=-1.2393547652949444E-6 evalInputDelta=6.862247379839928
Fitness changed from -73.60235662694353 to -80.46460400678346
Iteration 3 complete. Error: -80.46460400678346 Total: 7.9052; Orientation: 0.0632; Line Search: 4.9369
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/65c65582-566d-4605-9918-00209f7b762f.jpg)
Adding measurement 41d009df to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.848e+03, gradient 1.224e-03, dot -0.680; [4d7f3307-fd85-4e20-a427-bfd642a71388 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -80.46460400678346, -73.60235662694353, -67.64586755542125, -67.64585743835029
LBFGS Accumulation History: 3 points
Removed measurement 41d009df to history. Total: 3
th(0)=-80.46460400678346;dx=-1.4978785290134191E-6
New Minimum: -80.46460400678346 > -88.81209612430816
END: th(7818012.603187701)=-88.81209612430816; dx=-5.442651531011881E-7 evalInputDelta=8.347492117524695
Fitness changed from -80.46460400678346 to -88.81209612430816
Iteration 4 complete. Error: -88.81209612430816 Total: 9.1811; Orientation: 1.0933; Line Search: 5.0227
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/7da52020-22dd-4355-9532-281db1d2dcc4.jpg)
Adding measurement 12145061 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.159e+04, gradient 1.421e-03, dot -0.429; [4d7f3307-fd85-4e20-a427-bfd642a71388 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -88.81209612430816, -73.60235662694353, -67.64586755542125, -67.64585743835029
LBFGS Accumulation History: 3 points
Removed measurement 12145061 to history. Total: 3
th(0)=-88.81209612430816;dx=-2.018582407514302E-6
Armijo: th(1.6843397559414055E7)=-85.23840286229377; dx=6.545609328918775E-7 evalInputDelta=-3.5736932620143875
New Minimum: -88.81209612430816 > -91.74341496575744
WOLF (strong): th(8421698.779707028)=-91.74341496575744; dx=5.476614131297522E-7 evalInputDelta=2.931318841449283
New Minimum: -91.74341496575744 > -92.96181782182454
END: th(2807232.926569009)=-92.96181782182454; dx=-5.856564804933926E-7 evalInputDelta=4.149721697516384
Fitness changed from -88.81209612430816 to -92.96181782182454
Iteration 5 complete. Error: -92.96181782182454 Total: 14.4041; Orientation: 1.1055; Line Search: 10.3471
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/5fc97403-2154-47cc-9c04-13f99c265373.jpg)
Adding measurement 32cdb22f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.777e+04, gradient 1.066e-03, dot -0.668; [4d7f3307-fd85-4e20-a427-bfd642a71388 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -92.96181782182454, -73.60235662694353, -67.64586755542125, -67.64585743835029
LBFGS Accumulation History: 3 points
Removed measurement 32cdb22f to history. Total: 3
th(0)=-92.96181782182454;dx=-1.1347298063374777E-6
New Minimum: -92.96181782182454 > -97.55702438474732
END: th(6048000.000000001)=-97.55702438474732; dx=-3.412020985774718E-7 evalInputDelta=4.595206562922783
Fitness changed from -92.96181782182454 to -97.55702438474732
Iteration 6 complete. Error: -97.55702438474732 Total: 9.1313; Orientation: 1.1196; Line Search: 5.1701
Adding measurement 61036775 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.156e+04, gradient 1.305e-03, dot -0.487; [4d7f3307-fd85-4e20-a427-bfd642a71388 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -97.55702438474732, -73.60235662694353, -67.64586755542125, -67.64585743835029
LBFGS Accumulation History: 3 points
Removed measurement 61036775 to history. Total: 3
th(0)=-97.55702438474732;dx=-1.7027937100711066E-6
Armijo: th(1.3030021005312836E7)=-96.2182021257056; dx=5.800727970343014E-7 evalInputDelta=-1.33882225904172
New Minimum: -97.55702438474732 > -100.42906970079113
WOLF (strong): th(6515010.502656418)=-100.42906970079113; dx=4.0598471727533086E-7 evalInputDelta=2.8720453160438097
New Minimum: -100.42906970079113 > -100.55447776183124
END: th(2171670.167552139)=-100.55447776183124; dx=-7.009384907257269E-7 evalInputDelta=2.9974533770839145
Fitness changed from -97.55702438474732 to -100.55447776183124
Iteration 7 complete. Error: -100.55447776183124 Total: 13.7301; Orientation: 1.0387; Line Search: 10.2804
Adding measurement 6d6241b4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.801e+04, gradient 8.981e-04, dot -0.771; [4d7f3307-fd85-4e20-a427-bfd642a71388 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -100.55447776183124, -73.60235662694353, -67.64586755542125, -67.64585743835029
LBFGS Accumulation History: 3 points
Removed measurement 6d6241b4 to history. Total: 3
th(0)=-100.55447776183124;dx=-8.045922391666753E-7
New Minimum: -100.55447776183124 > -104.18650059393408
END: th(4678721.544281682)=-104.18650059393408; dx=-5.989397487808467E-7 evalInputDelta=3.632022832102848
Fitness changed from -100.55447776183124 to -104.18650059393408
Iteration 8 complete. Error: -104.18650059393408 Total: 8.5219; Orientation: 1.0983; Line Search: 5.0237
Adding measurement 1d24196f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.192e+04, gradient 9.101e-04, dot -0.727; [4d7f3307-fd85-4e20-a427-bfd642a71388 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -104.18650059393408, -73.60235662694353, -67.64586755542125, -67.64585743835029
LBFGS Accumulation History: 3 points
Removed measurement 1d24196f to history. Total: 3
th(0)=-104.18650059393408;dx=-8.281001367059906E-7
New Minimum: -104.18650059393408 > -109.34665614624389
END: th(1.0080000000000002E7)=-109.34665614624389; dx=-2.4490902230197496E-7 evalInputDelta=5.160155552309803
Fitness changed from -104.18650059393408 to -109.34665614624389
Iteration 9 complete. Error: -109.34665614624389 Total: 8.5114; Orientation: 1.1004; Line Search: 5.0321
Adding measurement 4990510 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.014e+04, gradient 1.276e-03, dot -0.416; [4d7f3307-fd85-4e20-a427-bfd642a71388 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -109.34665614624389, -73.60235662694353, -67.64586755542125, -67.64585743835029
LBFGS Accumulation History: 3 points
Removed measurement 4990510 to history. Total: 3
th(0)=-109.34665614624389;dx=-1.6253688543076276E-6
Armijo: th(2.1716701675521392E7)=-98.52994230628204; dx=7.316754835530031E-7 evalInputDelta=-10.81671383996185
Armijo: th(1.0858350837760696E7)=-108.84649248986923; dx=8.116406821327354E-7 evalInputDelta=-0.500163656374653
New Minimum: -109.34665614624389 > -113.2482593607634
END: th(3619450.2792535652)=-113.2482593607634; dx=-2.2193719883983032E-7 evalInputDelta=3.901603214519511
Fitness changed from -109.34665614624389 to -113.2482593607634
Iteration 10 complete. Error: -113.2482593607634 Total: 13.8377; Orientation: 1.1180; Line Search: 10.3479
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f5bcf370-ea62-4a59-b33f-20f34d21389f.jpg)
Final threshold in iteration 11: -113.2482593607634 (> -Infinity) after 126.324s (< 5400.000s)
Returns
-113.2482593607634