BasicOptimizer.scala:89 executed in 296.83 seconds (3.672 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: 580751134572200
Reset training subject: 580757368952700
Adding measurement 7efeddd3 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-39.364396787281635;dx=-2.1026566771970568E-6
New Minimum: -39.364396787281635 > -39.36439870595064
END: th(2.154434690031884)=-39.36439870595064; dx=-1.8296887151479888E-6 evalInputDelta=1.9186690067840573E-6
Fitness changed from -39.364396787281635 to -39.36439870595064
Iteration 1 complete. Error: -39.36439870595064 Total: 30.2031; Orientation: 0.1443; Line Search: 12.1092
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/aff599ab-2dca-4a76-a57f-8886a973c5ef.jpg)
Adding measurement 3ed35376 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-39.36439870595064;dx=-1.8301302978602892E-6
New Minimum: -39.36439870595064 > -39.364408299294304
WOLFE (weak): th(4.641588833612779)=-39.364408299294304; dx=-1.8280660012536012E-6 evalInputDelta=9.593343662572806E-6
New Minimum: -39.364408299294304 > -39.36441981130361
WOLFE (weak): th(9.283177667225559)=-39.36441981130361; dx=-1.827843857128947E-6 evalInputDelta=2.110535297106253E-5
New Minimum: -39.36441981130361 > -39.364456265977545
WOLFE (weak): th(27.849533001676676)=-39.364456265977545; dx=-1.8263388976640206E-6 evalInputDelta=5.75600269030474E-5
New Minimum: -39.364456265977545 > -39.3646231895796
WOLFE (weak): th(111.3981320067067)=-39.3646231895796; dx=-1.8258125849368719E-6 evalInputDelta=2.2448362896199114E-4
New Minimum: -39.3646231895796 > -39.36551919267986
WOLFE (weak): th(556.9906600335335)=-39.36551919267986; dx=-1.825805780182883E-6 evalInputDelta=0.0011204867292207155
New Minimum: -39.36551919267986 > -39.37111922965533
WOLFE (weak): th(3341.9439602012008)=-39.37111922965533; dx=-1.8251636139756523E-6 evalInputDelta=0.006720523704686343
New Minimum: -39.37111922965533 > -39.411391476587696
WOLFE (weak): th(23393.607721408407)=-39.411391476587696; dx=-1.8229512733489716E-6 evalInputDelta=0.04699277063705409
New Minimum: -39.411391476587696 > -39.73814631166558
WOLFE (weak): th(187148.86177126726)=-39.73814631166558; dx=-1.8005522411258742E-6 evalInputDelta=0.37374760571493937
New Minimum: -39.73814631166558 > -42.51298039008328
END: th(1684339.7559414054)=-42.51298039008328; dx=-1.5578698981263862E-6 evalInputDelta=3.148581684132637
Fitness changed from -39.36439870595064 to -42.51298039008328
Iteration 2 complete. Error: -42.51298039008328 Total: 68.4545; Orientation: 0.1507; Line Search: 61.3491
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/ca139d0b-f2ba-4549-88ae-a675ef7bdfac.jpg)
Adding measurement 120bc585 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-42.51298039008328;dx=-1.4917658236478195E-6
New Minimum: -42.51298039008328 > -47.41476711234613
END: th(3628800.0000000005)=-47.41476711234613; dx=-9.978957150951053E-7 evalInputDelta=4.901786722262848
Fitness changed from -42.51298039008328 to -47.41476711234613
Iteration 3 complete. Error: -47.41476711234613 Total: 19.0468; Orientation: 0.1329; Line Search: 11.9246
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/dfc56add-ed35-4853-8280-03734c6feb4c.jpg)
Adding measurement 43829c37 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.114e+04, gradient 9.804e-04, dot -0.810; [15f9f60a-64d0-437d-809e-8bd469767f99 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -47.41476711234613, -42.51298039008328, -39.36439870595064, -39.364396787281635
LBFGS Accumulation History: 3 points
Removed measurement 43829c37 to history. Total: 3
th(0)=-47.41476711234613;dx=-9.609441202959532E-7
New Minimum: -47.41476711234613 > -53.65652190441153
END: th(7818012.603187701)=-53.65652190441153; dx=-5.225391635322474E-7 evalInputDelta=6.2417547920654
Fitness changed from -47.41476711234613 to -53.65652190441153
Iteration 4 complete. Error: -53.65652190441153 Total: 22.1527; Orientation: 2.5288; Line Search: 12.3850
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/6b71e478-d3d6-4643-a8a2-796116b21287.jpg)
Adding measurement 342cab25 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.013e+04, gradient 8.552e-04, dot -0.598; [15f9f60a-64d0-437d-809e-8bd469767f99 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -53.65652190441153, -42.51298039008328, -39.36439870595064, -39.364396787281635
LBFGS Accumulation History: 3 points
Removed measurement 342cab25 to history. Total: 3
th(0)=-53.65652190441153;dx=-7.30235491241127E-7
New Minimum: -53.65652190441153 > -60.04588569121605
END: th(1.6843397559414055E7)=-60.04588569121605; dx=-1.4936993596085532E-7 evalInputDelta=6.389363786804523
Fitness changed from -53.65652190441153 to -60.04588569121605
Iteration 5 complete. Error: -60.04588569121605 Total: 21.7667; Orientation: 2.4638; Line Search: 12.1351
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/dcf35e56-6261-46bf-a262-cd052a229170.jpg)
Adding measurement 25467a88 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.205e+04, gradient 1.016e-03, dot -0.332; [15f9f60a-64d0-437d-809e-8bd469767f99 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -60.04588569121605, -42.51298039008328, -39.36439870595064, -39.364396787281635
LBFGS Accumulation History: 3 points
Removed measurement 25467a88 to history. Total: 3
th(0)=-60.04588569121605;dx=-1.0330237876967821E-6
Armijo: th(3.628800000000001E7)=-57.83986984587241; dx=2.3047635532354562E-7 evalInputDelta=-2.206015845343643
New Minimum: -60.04588569121605 > -63.622991815769865
WOLF (strong): th(1.8144000000000004E7)=-63.622991815769865; dx=2.6181612011712476E-7 evalInputDelta=3.577106124553815
New Minimum: -63.622991815769865 > -64.76806002209092
END: th(6048000.000000001)=-64.76806002209092; dx=-3.5911538750334763E-7 evalInputDelta=4.722174330874871
Fitness changed from -60.04588569121605 to -64.76806002209092
Iteration 6 complete. Error: -64.76806002209092 Total: 33.8597; Orientation: 2.4648; Line Search: 24.0309
Adding measurement 764813ed to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.062e+04, gradient 7.211e-04, dot -0.611; [15f9f60a-64d0-437d-809e-8bd469767f99 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -64.76806002209092, -42.51298039008328, -39.36439870595064, -39.364396787281635
LBFGS Accumulation History: 3 points
Removed measurement 764813ed to history. Total: 3
th(0)=-64.76806002209092;dx=-5.196657550005595E-7
New Minimum: -64.76806002209092 > -69.16062107541609
END: th(1.3030021005312836E7)=-69.16062107541609; dx=-1.6567746143119852E-7 evalInputDelta=4.392561053325167
Fitness changed from -64.76806002209092 to -69.16062107541609
Iteration 7 complete. Error: -69.16062107541609 Total: 20.6481; Orientation: 2.4316; Line Search: 12.3107
Adding measurement 4ac95311 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.626e+04, gradient 8.279e-04, dot -0.489; [15f9f60a-64d0-437d-809e-8bd469767f99 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -69.16062107541609, -42.51298039008328, -39.36439870595064, -39.364396787281635
LBFGS Accumulation History: 3 points
Removed measurement 4ac95311 to history. Total: 3
th(0)=-69.16062107541609;dx=-6.843360833146785E-7
New Minimum: -69.16062107541609 > -70.09287028014603
WOLF (strong): th(2.8072329265690096E7)=-70.09287028014603; dx=1.5136277747923649E-7 evalInputDelta=0.932249204729942
New Minimum: -70.09287028014603 > -72.39125987355581
WOLF (strong): th(1.4036164632845048E7)=-72.39125987355581; dx=6.980804501489868E-8 evalInputDelta=3.230638798139722
END: th(4678721.544281683)=-71.7656528375411; dx=-3.2707206425401555E-7 evalInputDelta=2.6050317621250088
Fitness changed from -69.16062107541609 to -72.39125987355581
Iteration 8 complete. Error: -72.39125987355581 Total: 32.2418; Orientation: 2.4741; Line Search: 24.0062
Adding measurement 7d71c20c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.803e+04, gradient 9.427e-04, dot -0.376; [15f9f60a-64d0-437d-809e-8bd469767f99 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -72.39125987355581, -42.51298039008328, -39.36439870595064, -39.364396787281635
LBFGS Accumulation History: 3 points
Removed measurement 7d71c20c to history. Total: 3
th(0)=-72.39125987355581;dx=-8.861853186987525E-7
New Minimum: -72.39125987355581 > -77.33115862348836
WOLF (strong): th(1.0080000000000004E7)=-77.33115862348836; dx=1.9289335853390577E-8 evalInputDelta=4.939898749932553
END: th(5040000.000000002)=-76.22292914677014; dx=-4.643919858733761E-7 evalInputDelta=3.831669273214331
Fitness changed from -72.39125987355581 to -77.33115862348836
Iteration 9 complete. Error: -77.33115862348836 Total: 26.7758; Orientation: 2.4511; Line Search: 18.3160
Adding measurement 7c0cf73c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.948e+04, gradient 7.408e-04, dot -0.524; [15f9f60a-64d0-437d-809e-8bd469767f99 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -77.33115862348836, -42.51298039008328, -39.36439870595064, -39.364396787281635
LBFGS Accumulation History: 3 points
Removed measurement 7c0cf73c to history. Total: 3
th(0)=-77.33115862348836;dx=-5.483921459654339E-7
New Minimum: -77.33115862348836 > -80.55156061109679
END: th(1.0858350837760698E7)=-80.55156061109679; dx=-4.4458666507290395E-8 evalInputDelta=3.220401987608426
Fitness changed from -77.33115862348836 to -80.55156061109679
Iteration 10 complete. Error: -80.55156061109679 Total: 20.4860; Orientation: 2.4437; Line Search: 12.1111
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/38290be1-b99e-4f2d-83ed-05b775ab2771.jpg)
Final threshold in iteration 11: -80.55156061109679 (> -Infinity) after 296.829s (< 5400.000s)
Returns
-80.55156061109679