BasicOptimizer.scala:89 executed in 208.16 seconds (2.663 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: 10831302101701
Reset training subject: 10835431285481
Adding measurement 5c9c8df9 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.6317247450351715;dx=-4.579121112235707E-7
New Minimum: -0.6317247450351715 > -0.6317250728607178
END: th(2.154434690031884)=-0.6317250728607178; dx=-4.109652819372874E-7 evalInputDelta=3.2782554626464844E-7
Fitness changed from -0.6317247450351715 to -0.6317250728607178
Iteration 1 complete. Error: -0.6317250728607178 Total: 21.1029; Orientation: 0.0451; Line Search: 8.3273
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/01d5f62f-1fa3-4cd2-be7e-caddea19790f.jpg)
Adding measurement 3a9df873 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.6317250728607178;dx=-4.1096316325791725E-7
New Minimum: -0.6317250728607178 > -0.6317261010408401
WOLFE (weak): th(4.641588833612779)=-0.6317261010408401; dx=-4.1094014181740573E-7 evalInputDelta=1.0281801223754883E-6
New Minimum: -0.6317261010408401 > -0.6317271292209625
WOLFE (weak): th(9.283177667225559)=-0.6317271292209625; dx=-4.109392660415018E-7 evalInputDelta=2.0563602447509766E-6
New Minimum: -0.6317271292209625 > -0.631730929017067
WOLFE (weak): th(27.849533001676676)=-0.631730929017067; dx=-4.109364649242367E-7 evalInputDelta=5.856156349182129E-6
New Minimum: -0.631730929017067 > -0.6317480802536011
WOLFE (weak): th(111.3981320067067)=-0.6317480802536011; dx=-4.1093156420323115E-7 evalInputDelta=2.300739288330078E-5
New Minimum: -0.6317480802536011 > -0.6318396180868149
WOLFE (weak): th(556.9906600335335)=-0.6318396180868149; dx=-4.109187908066968E-7 evalInputDelta=1.1454522609710693E-4
New Minimum: -0.6318396180868149 > -0.6324115991592407
WOLFE (weak): th(3341.9439602012008)=-0.6324115991592407; dx=-4.106279290614942E-7 evalInputDelta=6.865262985229492E-4
New Minimum: -0.6324115991592407 > -0.6365180313587189
WOLFE (weak): th(23393.607721408407)=-0.6365180313587189; dx=-4.085856427972783E-7 evalInputDelta=0.004792958498001099
New Minimum: -0.6365180313587189 > -0.6692429929971695
WOLFE (weak): th(187148.86177126726)=-0.6692429929971695; dx=-3.9076343904730496E-7 evalInputDelta=0.03751792013645172
New Minimum: -0.6692429929971695 > -0.8998651504516602
END: th(1684339.7559414054)=-0.8998651504516602; dx=-2.320784662525471E-7 evalInputDelta=0.2681400775909424
Fitness changed from -0.6317250728607178 to -0.8998651504516602
Iteration 2 complete. Error: -0.8998651504516602 Total: 48.7220; Orientation: 0.0444; Line Search: 44.1247
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/a0f3e06c-88ca-4706-856e-a64a45838332.jpg)
Adding measurement 1b35ac77 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.8998651504516602;dx=-1.9679207062472438E-7
New Minimum: -0.8998651504516602 > -1.1625336706638336
END: th(3628800.0000000005)=-1.1625336706638336; dx=-1.0185602896780283E-7 evalInputDelta=0.26266852021217346
Fitness changed from -0.8998651504516602 to -1.1625336706638336
Iteration 3 complete. Error: -1.1625336706638336 Total: 12.8522; Orientation: 0.0466; Line Search: 8.4861
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/c01c8c95-9037-4bb3-8ac4-7fe9cb2f586c.jpg)
Adding measurement 18218845 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.617e+03, gradient 3.169e-04, dot -0.718; [e9a0e88e-52af-439b-8b74-0337ae2de42b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.1625336706638336, -0.8998651504516602, -0.6317250728607178, -0.6317247450351715
LBFGS Accumulation History: 3 points
Removed measurement 18218845 to history. Total: 3
th(0)=-1.1625336706638336;dx=-1.0043623521908939E-7
New Minimum: -1.1625336706638336 > -1.4240629374980927
END: th(7818012.603187701)=-1.4240629374980927; dx=-4.1467817699938975E-8 evalInputDelta=0.26152926683425903
Fitness changed from -1.1625336706638336 to -1.4240629374980927
Iteration 4 complete. Error: -1.4240629374980927 Total: 13.8033; Orientation: 1.0504; Line Search: 8.1820
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/e337a2b7-e27d-4e6d-a6dd-e35f4916b5e0.jpg)
Adding measurement 664f58e5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.709e+03, gradient 2.534e-04, dot -0.559; [e9a0e88e-52af-439b-8b74-0337ae2de42b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.4240629374980927, -0.8998651504516602, -0.6317250728607178, -0.6317247450351715
LBFGS Accumulation History: 3 points
Removed measurement 664f58e5 to history. Total: 3
th(0)=-1.4240629374980927;dx=-6.420225418255421E-8
New Minimum: -1.4240629374980927 > -1.6406858339905739
END: th(1.6843397559414055E7)=-1.6406858339905739; dx=-6.559783861019568E-9 evalInputDelta=0.21662289649248123
Fitness changed from -1.4240629374980927 to -1.6406858339905739
Iteration 5 complete. Error: -1.6406858339905739 Total: 14.7481; Orientation: 1.0242; Line Search: 8.7884
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/8c2c53b8-721c-44d1-bdd6-4e56e0a3743c.jpg)
Adding measurement a9823fb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.456e+03, gradient 2.575e-04, dot -0.240; [e9a0e88e-52af-439b-8b74-0337ae2de42b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.6406858339905739, -0.8998651504516602, -0.6317250728607178, -0.6317247450351715
LBFGS Accumulation History: 3 points
Removed measurement a9823fb to history. Total: 3
th(0)=-1.6406858339905739;dx=-6.63070765056552E-8
Armijo: th(3.628800000000001E7)=-1.5677400380373; dx=2.5716475599472817E-8 evalInputDelta=-0.07294579595327377
New Minimum: -1.6406858339905739 > -1.7635560184717178
WOLF (strong): th(1.8144000000000004E7)=-1.7635560184717178; dx=1.4679246366060271E-8 evalInputDelta=0.12287018448114395
New Minimum: -1.7635560184717178 > -1.7659425884485245
END: th(6048000.000000001)=-1.7659425884485245; dx=-2.1088253223260264E-8 evalInputDelta=0.1252567544579506
Fitness changed from -1.6406858339905739 to -1.7659425884485245
Iteration 6 complete. Error: -1.7659425884485245 Total: 22.9735; Orientation: 1.0064; Line Search: 17.6728
Adding measurement 3efa4a1b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.152e+03, gradient 1.771e-04, dot -0.453; [e9a0e88e-52af-439b-8b74-0337ae2de42b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.7659425884485245, -0.8998651504516602, -0.6317250728607178, -0.6317247450351715
LBFGS Accumulation History: 3 points
Removed measurement 3efa4a1b to history. Total: 3
th(0)=-1.7659425884485245;dx=-3.137595048038796E-8
New Minimum: -1.7659425884485245 > -1.8853317648172379
END: th(1.3030021005312836E7)=-1.8853317648172379; dx=-6.634839891324778E-9 evalInputDelta=0.11938917636871338
Fitness changed from -1.7659425884485245 to -1.8853317648172379
Iteration 7 complete. Error: -1.8853317648172379 Total: 14.6276; Orientation: 1.0005; Line Search: 9.0987
Adding measurement 452ebc8a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.379e+03, gradient 1.924e-04, dot -0.359; [e9a0e88e-52af-439b-8b74-0337ae2de42b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8853317648172379, -0.8998651504516602, -0.6317250728607178, -0.6317247450351715
LBFGS Accumulation History: 3 points
Removed measurement 452ebc8a to history. Total: 3
th(0)=-1.8853317648172379;dx=-3.701011105258075E-8
New Minimum: -1.8853317648172379 > -1.8927107751369476
WOLF (strong): th(2.8072329265690096E7)=-1.8927107751369476; dx=1.0545031668271876E-8 evalInputDelta=0.007379010319709778
New Minimum: -1.8927107751369476 > -1.9508415162563324
WOLF (strong): th(1.4036164632845048E7)=-1.9508415162563324; dx=5.0001983788068945E-9 evalInputDelta=0.06550975143909454
END: th(4678721.544281683)=-1.9425076842308044; dx=-1.3330514736484716E-8 evalInputDelta=0.05717591941356659
Fitness changed from -1.8853317648172379 to -1.9508415162563324
Iteration 8 complete. Error: -1.9508415162563324 Total: 23.0212; Orientation: 1.0094; Line Search: 17.6665
Adding measurement 158ebca0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.177e+03, gradient 2.063e-04, dot -0.268; [e9a0e88e-52af-439b-8b74-0337ae2de42b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.9508415162563324, -0.8998651504516602, -0.6317250728607178, -0.6317247450351715
LBFGS Accumulation History: 3 points
Removed measurement 158ebca0 to history. Total: 3
th(0)=-1.9508415162563324;dx=-4.2559889531655654E-8
New Minimum: -1.9508415162563324 > -2.0418956130743027
WOLF (strong): th(1.0080000000000004E7)=-2.0418956130743027; dx=3.4748099443362355E-9 evalInputDelta=0.09105409681797028
END: th(5040000.000000002)=-2.0257155895233154; dx=-1.7093553729248818E-8 evalInputDelta=0.07487407326698303
Fitness changed from -1.9508415162563324 to -2.0418956130743027
Iteration 9 complete. Error: -2.0418956130743027 Total: 18.1010; Orientation: 1.0219; Line Search: 12.5344
Adding measurement 7368e76c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.593e+03, gradient 1.668e-04, dot -0.335; [e9a0e88e-52af-439b-8b74-0337ae2de42b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.0418956130743027, -0.8998651504516602, -0.6317250728607178, -0.6317247450351715
LBFGS Accumulation History: 3 points
Removed measurement 7368e76c to history. Total: 3
th(0)=-2.0418956130743027;dx=-2.782844060500195E-8
New Minimum: -2.0418956130743027 > -2.09883338958025
WOLF (strong): th(1.0858350837760698E7)=-2.09883338958025; dx=2.2026441153528814E-9 evalInputDelta=0.05693777650594711
END: th(5429175.418880349)=-2.0904925912618637; dx=-9.17977782996488E-9 evalInputDelta=0.048596978187561035
Fitness changed from -2.0418956130743027 to -2.09883338958025
Iteration 10 complete. Error: -2.09883338958025 Total: 18.1393; Orientation: 1.4487; Line Search: 12.6206
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/8e54eac3-f86a-4be8-932c-d66b266f70bf.jpg)
Final threshold in iteration 11: -2.09883338958025 (> -Infinity) after 208.162s (< 5400.000s)
Returns
-2.09883338958025