BasicOptimizer.scala:89 executed in 87.11 seconds (1.159 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: 305751080230000
Reset training subject: 305752766202100
Adding measurement 5f78ae83 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-164.92166441604675;dx=-3.001511839998324E-5
New Minimum: -164.92166441604675 > -164.92172681413186
END: th(2.154434690031884)=-164.92172681413186; dx=-2.533759841817965E-5 evalInputDelta=6.239808510599687E-5
Fitness changed from -164.92166441604675 to -164.92172681413186
Iteration 1 complete. Error: -164.92172681413186 Total: 7.9906; Orientation: 0.0625; Line Search: 3.1709
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a6fd13e1-5122-42b2-8c3c-05b906b996d0.jpg)
Adding measurement 7b166f1f to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-164.92172681413186;dx=-2.527946656801371E-5
New Minimum: -164.92172681413186 > -164.92185785003372
WOLFE (weak): th(4.641588833612779)=-164.92185785003372; dx=-2.5255364473276702E-5 evalInputDelta=1.3103590185892244E-4
New Minimum: -164.92185785003372 > -164.92198888583147
WOLFE (weak): th(9.283177667225559)=-164.92198888583147; dx=-2.527563108776379E-5 evalInputDelta=2.6207169960912324E-4
New Minimum: -164.92198888583147 > -164.92251302798138
WOLFE (weak): th(27.849533001676676)=-164.92251302798138; dx=-2.527149666382056E-5 evalInputDelta=7.8621384952271E-4
New Minimum: -164.92251302798138 > -164.92486540735376
WOLFE (weak): th(111.3981320067067)=-164.92486540735376; dx=-2.5267353752920732E-5 evalInputDelta=0.0031385932219052393
New Minimum: -164.92486540735376 > -164.93739422614206
WOLFE (weak): th(556.9906600335335)=-164.93739422614206; dx=-2.5263113201849436E-5 evalInputDelta=0.015667412010202497
New Minimum: -164.93739422614206 > -165.0157339180768
WOLFE (weak): th(3341.9439602012008)=-165.0157339180768; dx=-2.5240160320257042E-5 evalInputDelta=0.09400710394493217
New Minimum: -165.0157339180768 > -165.57878624048246
WOLFE (weak): th(23393.607721408407)=-165.57878624048246; dx=-2.51641603856151E-5 evalInputDelta=0.6570594263505996
New Minimum: -165.57878624048246 > -170.05459894164215
WOLFE (weak): th(187148.86177126726)=-170.05459894164215; dx=-2.3904597821869204E-5 evalInputDelta=5.132872127510296
New Minimum: -170.05459894164215 > -200.4722183584259
END: th(1684339.7559414054)=-200.4722183584259; dx=-1.2809761034783029E-5 evalInputDelta=35.55049154429403
Fitness changed from -164.92172681413186 to -200.4722183584259
Iteration 2 complete. Error: -200.4722183584259 Total: 18.6508; Orientation: 0.0594; Line Search: 16.4724
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/f4867269-2ec2-4a9f-a784-2afd1d3f5c44.jpg)
Adding measurement c72f49f to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-200.4722183584259;dx=-1.3803507374660484E-5
New Minimum: -200.4722183584259 > -234.38759456571367
END: th(3628800.0000000005)=-234.38759456571367; dx=-4.635449672737567E-6 evalInputDelta=33.91537620728778
Fitness changed from -200.4722183584259 to -234.38759456571367
Iteration 3 complete. Error: -234.38759456571367 Total: 5.4290; Orientation: 0.0560; Line Search: 3.3664
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/8084ce10-e16c-4876-8dee-ac269027364a.jpg)
Adding measurement 6c8db123 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.343e+03, gradient 3.019e-03, dot -0.422; [e19b423f-687e-4b25-9f49-669ce91db7c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -234.38759456571367, -200.4722183584259, -164.92172681413186, -164.92166441604675
LBFGS Accumulation History: 3 points
Removed measurement 6c8db123 to history. Total: 3
th(0)=-234.38759456571367;dx=-9.087699918640753E-6
New Minimum: -234.38759456571367 > -256.3399661159087
WOLF (strong): th(7818012.603187701)=-256.3399661159087; dx=5.865441439843602E-7 evalInputDelta=21.95237155019501
END: th(3909006.3015938504)=-254.98769194910903; dx=-1.9520068485681986E-6 evalInputDelta=20.600097383395365
Fitness changed from -234.38759456571367 to -256.3399661159087
Iteration 4 complete. Error: -256.3399661159087 Total: 8.1346; Orientation: 1.1032; Line Search: 5.2182
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/f453d887-2c4d-489d-80b1-63ef3f3c1d76.jpg)
Adding measurement 45479253 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.623e+03, gradient 3.780e-03, dot -0.138; [e19b423f-687e-4b25-9f49-669ce91db7c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -256.3399661159087, -200.4722183584259, -164.92172681413186, -164.92166441604675
LBFGS Accumulation History: 3 points
Removed measurement 45479253 to history. Total: 3
th(0)=-256.3399661159087;dx=-1.424692740499569E-5
Armijo: th(8421698.779707028)=-254.96694708371834; dx=6.200330863750216E-6 evalInputDelta=-1.3730190321903422
New Minimum: -256.3399661159087 > -280.4277704088591
WOLF (strong): th(4210849.389853514)=-280.4277704088591; dx=2.331663078305786E-6 evalInputDelta=24.08780429295041
END: th(1403616.4632845046)=-273.7129056982233; dx=-8.107913901513086E-6 evalInputDelta=17.372939582314643
Fitness changed from -256.3399661159087 to -280.4277704088591
Iteration 5 complete. Error: -280.4277704088591 Total: 9.9463; Orientation: 1.1749; Line Search: 6.9307
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/8da1082b-da6c-435a-8486-734f0231f399.jpg)
Adding measurement 1f269882 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.139e+04, gradient 3.094e-03, dot -0.216; [e19b423f-687e-4b25-9f49-669ce91db7c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -280.4277704088591, -200.4722183584259, -164.92172681413186, -164.92166441604675
LBFGS Accumulation History: 3 points
Removed measurement 1f269882 to history. Total: 3
th(0)=-280.4277704088591;dx=-9.550749537991444E-6
New Minimum: -280.4277704088591 > -296.36839387769277
END: th(3024000.0000000005)=-296.36839387769277; dx=-4.6589380807470475E-7 evalInputDelta=15.940623468833678
Fitness changed from -280.4277704088591 to -296.36839387769277
Iteration 6 complete. Error: -296.36839387769277 Total: 6.1161; Orientation: 1.0342; Line Search: 3.2081
Adding measurement 5badc081 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.043e+04, gradient 2.246e-03, dot -0.415; [e19b423f-687e-4b25-9f49-669ce91db7c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -296.36839387769277, -200.4722183584259, -164.92172681413186, -164.92166441604675
LBFGS Accumulation History: 3 points
Removed measurement 5badc081 to history. Total: 3
th(0)=-296.36839387769277;dx=-5.032611417595878E-6
New Minimum: -296.36839387769277 > -304.15820857513535
WOLF (strong): th(6515010.502656418)=-304.15820857513535; dx=1.3703048563795295E-6 evalInputDelta=7.78981469744258
New Minimum: -304.15820857513535 > -306.2580956921897
END: th(3257505.251328209)=-306.2580956921897; dx=-9.336011549833077E-7 evalInputDelta=9.88970181449696
Fitness changed from -296.36839387769277 to -306.2580956921897
Iteration 7 complete. Error: -306.2580956921897 Total: 7.7056; Orientation: 1.0720; Line Search: 5.0716
Adding measurement 48f05303 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.222e+04, gradient 2.103e-03, dot -0.431; [e19b423f-687e-4b25-9f49-669ce91db7c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -306.2580956921897, -200.4722183584259, -164.92172681413186, -164.92166441604675
LBFGS Accumulation History: 3 points
Removed measurement 48f05303 to history. Total: 3
th(0)=-306.2580956921897;dx=-4.414685524152208E-6
New Minimum: -306.2580956921897 > -310.98490413035955
WOLF (strong): th(7018082.316422524)=-310.98490413035955; dx=1.29971771112639E-6 evalInputDelta=4.726808438169826
New Minimum: -310.98490413035955 > -314.1390519478411
END: th(3509041.158211262)=-314.1390519478411; dx=-3.327273220443746E-7 evalInputDelta=7.88095625565137
Fitness changed from -306.2580956921897 to -314.1390519478411
Iteration 8 complete. Error: -314.1390519478411 Total: 7.6990; Orientation: 1.0518; Line Search: 5.0971
Adding measurement 341b037b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.328e+04, gradient 2.147e-03, dot -0.396; [e19b423f-687e-4b25-9f49-669ce91db7c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -314.1390519478411, -200.4722183584259, -164.92172681413186, -164.92166441604675
LBFGS Accumulation History: 3 points
Removed measurement 341b037b to history. Total: 3
th(0)=-314.1390519478411;dx=-4.596179109227168E-6
Armijo: th(7560000.000000003)=-313.4659774996683; dx=2.198455769094007E-6 evalInputDelta=-0.6730744481727697
New Minimum: -314.1390519478411 > -320.95207988561083
WOLF (strong): th(3780000.0000000014)=-320.95207988561083; dx=5.825260188212377E-7 evalInputDelta=6.813027937769732
END: th(1260000.0000000005)=-318.99936860086666; dx=-2.6324336499157277E-6 evalInputDelta=4.8603166530255635
Fitness changed from -314.1390519478411 to -320.95207988561083
Iteration 9 complete. Error: -320.95207988561083 Total: 9.1491; Orientation: 1.0382; Line Search: 6.5662
Adding measurement 7b11d5ef to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.227e+04, gradient 2.284e-03, dot -0.332; [e19b423f-687e-4b25-9f49-669ce91db7c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -320.95207988561083, -200.4722183584259, -164.92172681413186, -164.92166441604675
LBFGS Accumulation History: 3 points
Removed measurement 7b11d5ef to history. Total: 3
th(0)=-320.95207988561083;dx=-5.205913521269036E-6
New Minimum: -320.95207988561083 > -328.3285562243084
END: th(2714587.7094401745)=-328.3285562243084; dx=-6.473843152289057E-8 evalInputDelta=7.376476338697557
Fitness changed from -320.95207988561083 to -328.3285562243084
Iteration 10 complete. Error: -328.3285562243084 Total: 6.0052; Orientation: 1.0319; Line Search: 3.3202
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/b8492511-d09d-4bfe-bd81-e8db55f6748e.jpg)
Final threshold in iteration 11: -328.3285562243084 (> -Infinity) after 87.111s (< 5400.000s)
Returns
-328.3285562243084