BasicOptimizer.scala:89 executed in 128.99 seconds (1.616 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: 36288357285900
Reset training subject: 36291190799600
Adding measurement f936ef8 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-84.89436501060968;dx=-5.2244742325479755E-6
New Minimum: -84.89436501060968 > -84.89436904137176
END: th(2.154434690031884)=-84.89436904137176; dx=-3.441635421871674E-6 evalInputDelta=4.0307620849944215E-6
Fitness changed from -84.89436501060968 to -84.89436904137176
Iteration 1 complete. Error: -84.89436904137176 Total: 13.0738; Orientation: 0.0620; Line Search: 5.2092
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/37368bcf-136e-4c56-849b-6bc5097d98f8.jpg)
Adding measurement 39e27a95 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-84.89436904137176;dx=-3.412417158422995E-6
New Minimum: -84.89436904137176 > -84.89438919517926
WOLFE (weak): th(4.641588833612779)=-84.89438919517926; dx=-3.410758045443905E-6 evalInputDelta=2.0153807497536036E-5
New Minimum: -84.89438919517926 > -84.89440128746146
WOLFE (weak): th(9.283177667225559)=-84.89440128746146; dx=-3.410138266668748E-6 evalInputDelta=3.2246089702425706E-5
New Minimum: -84.89440128746146 > -84.89447384111851
WOLFE (weak): th(27.849533001676676)=-84.89447384111851; dx=-3.4076749296902654E-6 evalInputDelta=1.0479974675092762E-4
New Minimum: -84.89447384111851 > -84.89480033180791
WOLFE (weak): th(111.3981320067067)=-84.89480033180791; dx=-3.405494064365489E-6 evalInputDelta=4.312904361540859E-4
New Minimum: -84.89480033180791 > -84.8965375636201
WOLFE (weak): th(556.9906600335335)=-84.8965375636201; dx=-3.4047353693184137E-6 evalInputDelta=0.0021685222483398547
New Minimum: -84.8965375636201 > -84.90736725367175
WOLFE (weak): th(3341.9439602012008)=-84.90736725367175; dx=-3.40395024553371E-6 evalInputDelta=0.012998212299990541
New Minimum: -84.90736725367175 > -84.98528659366627
WOLFE (weak): th(23393.607721408407)=-84.98528659366627; dx=-3.39959643093941E-6 evalInputDelta=0.09091755229451337
New Minimum: -84.98528659366627 > -85.61705988091015
WOLFE (weak): th(187148.86177126726)=-85.61705988091015; dx=-3.3525032827442518E-6 evalInputDelta=0.7226908395383873
New Minimum: -85.61705988091015 > -90.90630681360011
END: th(1684339.7559414054)=-90.90630681360011; dx=-2.8008393317239734E-6 evalInputDelta=6.01193777222835
Fitness changed from -84.89436904137176 to -90.90630681360011
Iteration 2 complete. Error: -90.90630681360011 Total: 28.6187; Orientation: 0.0588; Line Search: 25.5183
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/e3fc4bd3-6a4d-4e94-afc7-469e475fd32b.jpg)
Adding measurement 19ca9eff to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-90.90630681360011;dx=-2.7368274356399998E-6
New Minimum: -90.90630681360011 > -99.73536252238407
END: th(3628800.0000000005)=-99.73536252238407; dx=-1.620288160823826E-6 evalInputDelta=8.829055708783955
Fitness changed from -90.90630681360011 to -99.73536252238407
Iteration 3 complete. Error: -99.73536252238407 Total: 8.1916; Orientation: 0.0614; Line Search: 5.1934
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/718a1795-f29f-401c-ba5d-60c77acee20f.jpg)
Adding measurement 5204505f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.277e+04, gradient 1.282e-03, dot -0.735; [388d0cc1-6cd6-44ea-a7aa-a8eeaa3387e4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -99.73536252238407, -90.90630681360011, -84.89436904137176, -84.89436501060968
LBFGS Accumulation History: 3 points
Removed measurement 5204505f to history. Total: 3
th(0)=-99.73536252238407;dx=-1.640934801449184E-6
New Minimum: -99.73536252238407 > -110.25099218577634
END: th(7818012.603187701)=-110.25099218577634; dx=-7.667564222714583E-7 evalInputDelta=10.515629663392275
Fitness changed from -99.73536252238407 to -110.25099218577634
Iteration 4 complete. Error: -110.25099218577634 Total: 9.3204; Orientation: 1.0630; Line Search: 5.0617
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/5d791c97-5fbc-43d1-88e6-2c74f7465714.jpg)
Adding measurement 4c03621b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.312e+04, gradient 1.157e-03, dot -0.519; [388d0cc1-6cd6-44ea-a7aa-a8eeaa3387e4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -110.25099218577634, -90.90630681360011, -84.89436904137176, -84.89436501060968
LBFGS Accumulation History: 3 points
Removed measurement 4c03621b to history. Total: 3
th(0)=-110.25099218577634;dx=-1.337010943009762E-6
New Minimum: -110.25099218577634 > -116.54958325219927
WOLF (strong): th(1.6843397559414055E7)=-116.54958325219927; dx=1.619166370703561E-7 evalInputDelta=6.298591066422929
New Minimum: -116.54958325219927 > -116.69384510123221
END: th(8421698.779707028)=-116.69384510123221; dx=-2.2530736560768944E-7 evalInputDelta=6.442852915455873
Fitness changed from -110.25099218577634 to -116.69384510123221
Iteration 5 complete. Error: -116.69384510123221 Total: 11.7527; Orientation: 1.0596; Line Search: 7.6889
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/b9bec61b-f0dd-4ffd-9928-6f26cf63a2aa.jpg)
Adding measurement 7fd25549 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.429e+04, gradient 1.321e-03, dot -0.392; [388d0cc1-6cd6-44ea-a7aa-a8eeaa3387e4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -116.69384510123221, -90.90630681360011, -84.89436904137176, -84.89436501060968
LBFGS Accumulation History: 3 points
Removed measurement 7fd25549 to history. Total: 3
th(0)=-116.69384510123221;dx=-1.7421858261155311E-6
Armijo: th(1.8144000000000004E7)=-113.35379033788034; dx=7.354304053981175E-7 evalInputDelta=-3.3400547633518727
New Minimum: -116.69384510123221 > -120.67956239672542
WOLF (strong): th(9072000.000000002)=-120.67956239672542; dx=5.045305009658364E-7 evalInputDelta=3.9857172954932025
New Minimum: -120.67956239672542 > -121.0287784951228
END: th(3024000.0000000005)=-121.0287784951228; dx=-7.580699703095284E-7 evalInputDelta=4.33493339389058
Fitness changed from -116.69384510123221 to -121.0287784951228
Iteration 6 complete. Error: -121.0287784951228 Total: 14.3714; Orientation: 1.0573; Line Search: 10.2946
Adding measurement 4d009405 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.202e+04, gradient 8.939e-04, dot -0.685; [388d0cc1-6cd6-44ea-a7aa-a8eeaa3387e4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -121.0287784951228, -90.90630681360011, -84.89436904137176, -84.89436501060968
LBFGS Accumulation History: 3 points
Removed measurement 4d009405 to history. Total: 3
th(0)=-121.0287784951228;dx=-7.988306295034348E-7
New Minimum: -121.0287784951228 > -125.63099578550079
END: th(6515010.502656418)=-125.63099578550079; dx=-4.91489997691381E-7 evalInputDelta=4.602217290377993
Fitness changed from -121.0287784951228 to -125.63099578550079
Iteration 7 complete. Error: -125.63099578550079 Total: 8.8184; Orientation: 1.1231; Line Search: 5.1492
Adding measurement 2523be1e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.416e+04, gradient 9.012e-04, dot -0.616; [388d0cc1-6cd6-44ea-a7aa-a8eeaa3387e4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -125.63099578550079, -90.90630681360011, -84.89436904137176, -84.89436501060968
LBFGS Accumulation History: 3 points
Removed measurement 2523be1e to history. Total: 3
th(0)=-125.63099578550079;dx=-8.118032038228546E-7
New Minimum: -125.63099578550079 > -130.59142591811286
END: th(1.4036164632845048E7)=-130.59142591811286; dx=-5.2775572919709815E-8 evalInputDelta=4.960430132612075
Fitness changed from -125.63099578550079 to -130.59142591811286
Iteration 8 complete. Error: -130.59142591811286 Total: 9.1563; Orientation: 1.0010; Line Search: 5.1707
Adding measurement 66fe957 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.038e+04, gradient 1.305e-03, dot -0.292; [388d0cc1-6cd6-44ea-a7aa-a8eeaa3387e4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -130.59142591811286, -90.90630681360011, -84.89436904137176, -84.89436501060968
LBFGS Accumulation History: 3 points
Removed measurement 66fe957 to history. Total: 3
th(0)=-130.59142591811286;dx=-1.7012552719257636E-6
Armijo: th(3.024000000000001E7)=-109.62068570759416; dx=8.201514957504711E-7 evalInputDelta=-20.9707402105187
Armijo: th(1.5120000000000006E7)=-127.27782403217188; dx=1.0742650034882758E-6 evalInputDelta=-3.313601885940983
New Minimum: -130.59142591811286 > -136.05450619519092
END: th(5040000.000000002)=-136.05450619519092; dx=-1.4306001335646535E-7 evalInputDelta=5.463080277078063
Fitness changed from -130.59142591811286 to -136.05450619519092
Iteration 9 complete. Error: -136.05450619519092 Total: 13.7923; Orientation: 1.0287; Line Search: 10.2596
Adding measurement 2c5fa6a1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.812e+04, gradient 8.745e-04, dot -0.510; [388d0cc1-6cd6-44ea-a7aa-a8eeaa3387e4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -136.05450619519092, -90.90630681360011, -84.89436904137176, -84.89436501060968
LBFGS Accumulation History: 3 points
Removed measurement 2c5fa6a1 to history. Total: 3
th(0)=-136.05450619519092;dx=-7.63711850700851E-7
New Minimum: -136.05450619519092 > -138.7302389508741
WOLF (strong): th(1.0858350837760698E7)=-138.7302389508741; dx=1.572006320851377E-7 evalInputDelta=2.6757327556831854
New Minimum: -138.7302389508741 > -138.86531208575678
END: th(5429175.418880349)=-138.86531208575678; dx=-1.9747833241130022E-7 evalInputDelta=2.8108058905658595
Fitness changed from -136.05450619519092 to -138.86531208575678
Iteration 10 complete. Error: -138.86531208575678 Total: 11.4540; Orientation: 1.0231; Line Search: 7.9611
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/9f8fcfdf-1d64-4e95-981f-bebfd0f7760b.jpg)
Final threshold in iteration 11: -138.86531208575678 (> -Infinity) after 128.987s (< 5400.000s)
Returns
-138.86531208575678