BasicOptimizer.scala:88 executed in 1564.66 seconds (8.652 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: 3408980926009
Reset training subject: 3442809468049
Adding measurement 205eb944 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=10.876761242747307;dx=-1.2383643062617014E-6
New Minimum: 10.876761242747307 > 10.876755475997925
WOLFE (weak): th(2.154434690031884)=10.876755475997925; dx=-1.2379123840386061E-6 evalInputDelta=5.766749382019043E-6
New Minimum: 10.876755475997925 > 10.876748085021973
WOLFE (weak): th(4.308869380063768)=10.876748085021973; dx=-1.2371432612770925E-6 evalInputDelta=1.315772533416748E-5
New Minimum: 10.876748085021973 > 10.876721009612083
WOLFE (weak): th(12.926608140191302)=10.876721009612083; dx=-1.2351089361154068E-6 evalInputDelta=4.023313522338867E-5
New Minimum: 10.876721009612083 > 10.876599118113518
WOLFE (weak): th(51.70643256076521)=10.876599118113518; dx=-1.2351793181298294E-6 evalInputDelta=1.621246337890625E-4
New Minimum: 10.876599118113518 > 10.875949695706367
WOLFE (weak): th(258.53216280382605)=10.875949695706367; dx=-1.2340815216312246E-6 evalInputDelta=8.115470409393311E-4
New Minimum: 10.875949695706367 > 10.871890634298325
WOLFE (weak): th(1551.1929768229563)=10.871890634298325; dx=-1.2331179181000959E-6 evalInputDelta=0.004870608448982239
New Minimum: 10.871890634298325 > 10.842706188559532
WOLFE (weak): th(10858.350837760694)=10.842706188559532; dx=-1.228750146422826E-6 evalInputDelta=0.03405505418777466
New Minimum: 10.842706188559532 > 10.60746155679226
WOLFE (weak): th(86866.80670208555)=10.60746155679226; dx=-1.1984332589230374E-6 evalInputDelta=0.2692996859550476
New Minimum: 10.60746155679226 > 8.817002758383751
END: th(781801.26031877)=8.817002758383751; dx=-8.106360117940551E-7 evalInputDelta=2.059758484363556
Fitness changed from 10.876761242747307 to 8.817002758383751
Iteration 1 complete. Error: 8.817002758383751 Total: 439.5339; Orientation: 0.0820; Line Search: 339.7754
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/fbcbafc3-0e6e-4396-9c1d-d147e5f989d3.jpg)
Adding measurement 6b0b09b3 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=8.817002758383751;dx=-8.358428098987917E-7
New Minimum: 8.817002758383751 > 6.348058804869652
END: th(1684339.7559414052)=6.348058804869652; dx=-4.256387993481798E-7 evalInputDelta=2.468943953514099
Fitness changed from 8.817002758383751 to 6.348058804869652
Iteration 2 complete. Error: 6.348058804869652 Total: 101.3460; Orientation: 0.0842; Line Search: 66.2824
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/2159a09f-6c4e-44f8-9042-b73dd23a51ea.jpg)
Adding measurement 5179c0e0 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=6.348058804869652;dx=-5.297832496242983E-7
New Minimum: 6.348058804869652 > 3.7890883833169937
END: th(3628800.0)=3.7890883833169937; dx=-2.074620846349432E-7 evalInputDelta=2.558970421552658
Fitness changed from 6.348058804869652 to 3.7890883833169937
Iteration 3 complete. Error: 3.7890883833169937 Total: 101.4787; Orientation: 0.0867; Line Search: 68.5601
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/497da8c0-23f1-45b5-bff8-7376dee2151e.jpg)
Adding measurement 2bfdfb37 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.476e+03, gradient 6.488e-04, dot -0.577; [71143e4b-c21f-40d8-b598-6fc8bde52444 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 3.7890883833169937, 6.348058804869652, 8.817002758383751, 10.876761242747307
LBFGS Accumulation History: 3 points
Removed measurement 2bfdfb37 to history. Total: 3
th(0)=3.7890883833169937;dx=-4.2016456456732616E-7
New Minimum: 3.7890883833169937 > 1.9142125397920609
END: th(7818012.6031877)=1.9142125397920609; dx=-5.9456836854002945E-8 evalInputDelta=1.8748758435249329
Fitness changed from 3.7890883833169937 to 1.9142125397920609
Iteration 4 complete. Error: 1.9142125397920609 Total: 105.2620; Orientation: 1.9697; Line Search: 67.3719
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/6299242e-54b0-4b6a-ac36-95ddd39b2c1a.jpg)
Adding measurement 5c8a3ebd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.887e+03, gradient 6.495e-04, dot -0.355; [71143e4b-c21f-40d8-b598-6fc8bde52444 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.9142125397920609, 6.348058804869652, 8.817002758383751, 10.876761242747307
LBFGS Accumulation History: 3 points
Removed measurement 5c8a3ebd to history. Total: 3
th(0)=1.9142125397920609;dx=-4.2066602946933393E-7
New Minimum: 1.9142125397920609 > 1.9021979421377182
WOLF (strong): th(1.684339755941405E7)=1.9021979421377182; dx=5.289724903174814E-8 evalInputDelta=0.012014597654342651
New Minimum: 1.9021979421377182 > 0.665127769112587
WOLF (strong): th(8421698.779707026)=0.665127769112587; dx=1.1673521101525227E-8 evalInputDelta=1.2490847706794739
New Minimum: 0.665127769112587 > 0.5384057611227036
END: th(2807232.9265690087)=0.5384057611227036; dx=-1.0205802069940813E-7 evalInputDelta=1.3758067786693573
Fitness changed from 1.9142125397920609 to 0.5384057611227036
Iteration 5 complete. Error: 0.5384057611227036 Total: 168.8655; Orientation: 1.8845; Line Search: 131.8905
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/c818e6c9-926c-40a1-96d7-6449fd18853c.jpg)
Adding measurement 29e961cf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.814e+03, gradient 4.615e-04, dot -0.452; [71143e4b-c21f-40d8-b598-6fc8bde52444 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.5384057611227036, 6.348058804869652, 8.817002758383751, 10.876761242747307
LBFGS Accumulation History: 3 points
Removed measurement 29e961cf to history. Total: 3
th(0)=0.5384057611227036;dx=-2.1271811496712E-7
New Minimum: 0.5384057611227036 > -0.35472525656223297
END: th(6048000.0)=-0.35472525656223297; dx=-2.162505042129673E-8 evalInputDelta=0.8931310176849365
Fitness changed from 0.5384057611227036 to -0.35472525656223297
Iteration 6 complete. Error: -0.35472525656223297 Total: 103.7888; Orientation: 1.8769; Line Search: 67.9493
Adding measurement 484a758a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.629e+03, gradient 5.678e-04, dot -0.348; [71143e4b-c21f-40d8-b598-6fc8bde52444 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.35472525656223297, 6.348058804869652, 8.817002758383751, 10.876761242747307
LBFGS Accumulation History: 3 points
Removed measurement 484a758a to history. Total: 3
th(0)=-0.35472525656223297;dx=-3.216440117434923E-7
Armijo: th(1.3030021005312834E7)=0.4978611320257187; dx=4.72541913600083E-8 evalInputDelta=-0.8525863885879517
New Minimum: -0.35472525656223297 > -0.6610454767942429
WOLF (strong): th(6515010.502656417)=-0.6610454767942429; dx=3.8251412094746474E-8 evalInputDelta=0.3063202202320099
New Minimum: -0.6610454767942429 > -1.161793291568756
END: th(2171670.167552139)=-1.161793291568756; dx=-5.196316907780817E-8 evalInputDelta=0.8070680350065231
Fitness changed from -0.35472525656223297 to -1.161793291568756
Iteration 7 complete. Error: -1.161793291568756 Total: 169.0263; Orientation: 1.8677; Line Search: 134.1507
Adding measurement 110567af to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.227e+03, gradient 3.356e-04, dot -0.522; [71143e4b-c21f-40d8-b598-6fc8bde52444 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.161793291568756, 6.348058804869652, 8.817002758383751, 10.876761242747307
LBFGS Accumulation History: 3 points
Removed measurement 110567af to history. Total: 3
th(0)=-1.161793291568756;dx=-1.1239818801985377E-7
New Minimum: -1.161793291568756 > -1.7466487437486649
END: th(4678721.544281682)=-1.7466487437486649; dx=-4.766629773293522E-8 evalInputDelta=0.5848554521799088
Fitness changed from -1.161793291568756 to -1.7466487437486649
Iteration 8 complete. Error: -1.7466487437486649 Total: 100.2278; Orientation: 1.9310; Line Search: 65.6892
Adding measurement daa8c39 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.102e+03, gradient 3.205e-04, dot -0.504; [71143e4b-c21f-40d8-b598-6fc8bde52444 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.7466487437486649, 6.348058804869652, 8.817002758383751, 10.876761242747307
LBFGS Accumulation History: 3 points
Removed measurement daa8c39 to history. Total: 3
th(0)=-1.7466487437486649;dx=-1.0245753340871021E-7
New Minimum: -1.7466487437486649 > -1.981841802597046
END: th(1.0080000000000002E7)=-1.981841802597046; dx=-2.919371251583486E-9 evalInputDelta=0.23519305884838104
Fitness changed from -1.7466487437486649 to -1.981841802597046
Iteration 9 complete. Error: -1.981841802597046 Total: 102.6068; Orientation: 1.8813; Line Search: 67.4202
Adding measurement 44baaddc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.132e+03, gradient 4.781e-04, dot -0.321; [71143e4b-c21f-40d8-b598-6fc8bde52444 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.981841802597046, 6.348058804869652, 8.817002758383751, 10.876761242747307
LBFGS Accumulation History: 3 points
Removed measurement 44baaddc to history. Total: 3
th(0)=-1.981841802597046;dx=-2.2813387667741722E-7
Armijo: th(2.1716701675521392E7)=1.0315049290657043; dx=5.901297083731955E-8 evalInputDelta=-3.0133467316627502
Armijo: th(1.0858350837760696E7)=-1.3510389924049377; dx=7.105059106864195E-8 evalInputDelta=-0.6308028101921082
New Minimum: -1.981841802597046 > -2.7154801040887833
END: th(3619450.2792535652)=-2.7154801040887833; dx=-8.41394688623967E-9 evalInputDelta=0.7336383014917374
Fitness changed from -1.981841802597046 to -2.7154801040887833
Iteration 10 complete. Error: -2.7154801040887833 Total: 171.6138; Orientation: 1.8611; Line Search: 136.2803
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/a6847fb3-478f-483c-aede-fdf200e6f9a2.jpg)
Final threshold in iteration 11: -2.7154801040887833 (> -Infinity) after 1564.662s (< 1800.000s)
Returns
-2.7154801040887833