BasicOptimizer.scala:89 executed in 133.86 seconds (1.693 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: 75859621025600
Reset training subject: 75862179133500
Adding measurement 6a10da4f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-20.50627085390724;dx=-8.222912485537951E-7
New Minimum: -20.50627085390724 > -20.50627211272789
END: th(2.154434690031884)=-20.50627211272789; dx=-6.983312022702101E-7 evalInputDelta=1.2588206494967835E-6
Fitness changed from -20.50627085390724 to -20.50627211272789
Iteration 1 complete. Error: -20.50627211272789 Total: 12.9195; Orientation: 0.0603; Line Search: 5.1151
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 14cd443f to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-20.50627211272789;dx=-6.963386003232331E-7
New Minimum: -20.50627211272789 > -20.506275889189375
WOLFE (weak): th(4.641588833612779)=-20.506275889189375; dx=-6.959048784994929E-7 evalInputDelta=3.7764614866375723E-6
New Minimum: -20.506275889189375 > -20.506280295060236
WOLFE (weak): th(9.283177667225559)=-20.506280295060236; dx=-6.959648557458949E-7 evalInputDelta=8.182332347672627E-6
New Minimum: -20.506280295060236 > -20.506294771486388
WOLFE (weak): th(27.849533001676676)=-20.506294771486388; dx=-6.956932715086668E-7 evalInputDelta=2.2658758499716214E-5
New Minimum: -20.506294771486388 > -20.506359600573802
WOLFE (weak): th(111.3981320067067)=-20.506359600573802; dx=-6.958778924746396E-7 evalInputDelta=8.748784591361414E-5
New Minimum: -20.506359600573802 > -20.50670703063729
WOLFE (weak): th(556.9906600335335)=-20.50670703063729; dx=-6.957790391628983E-7 evalInputDelta=4.349179094020883E-4
New Minimum: -20.50670703063729 > -20.508879593848416
WOLFE (weak): th(3341.9439602012008)=-20.508879593848416; dx=-6.951550983947539E-7 evalInputDelta=0.002607481120527666
New Minimum: -20.508879593848416 > -20.52448167958032
WOLFE (weak): th(23393.607721408407)=-20.52448167958032; dx=-6.922959467840235E-7 evalInputDelta=0.01820956685243047
New Minimum: -20.52448167958032 > -20.649378393780157
WOLFE (weak): th(187148.86177126726)=-20.649378393780157; dx=-6.660031350161869E-7 evalInputDelta=0.14310628105226897
New Minimum: -20.649378393780157 > -21.489861023995388
END: th(1684339.7559414054)=-21.489861023995388; dx=-3.6097834071883494E-7 evalInputDelta=0.9835889112674998
Fitness changed from -20.50627211272789 to -21.489861023995388
Iteration 2 complete. Error: -21.489861023995388 Total: 29.1154; Orientation: 0.0586; Line Search: 26.1047
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 219e7126 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-21.489861023995388;dx=-6.593226964067326E-7
New Minimum: -21.489861023995388 > -22.73120247783715
END: th(3628800.0000000005)=-22.73120247783715; dx=-1.9106216531744517E-7 evalInputDelta=1.2413414538417626
Fitness changed from -21.489861023995388 to -22.73120247783715
Iteration 3 complete. Error: -22.73120247783715 Total: 8.3883; Orientation: 0.0588; Line Search: 5.2543
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 51dcfa58 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.467e+03, gradient 8.199e-04, dot -0.591; [f1c517f3-47a4-4614-a062-05bb3b186a2d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -22.73120247783715, -21.489861023995388, -20.50627211272789, -20.50627085390724
LBFGS Accumulation History: 3 points
Removed measurement 51dcfa58 to history. Total: 3
th(0)=-22.73120247783715;dx=-6.717702323252494E-7
New Minimum: -22.73120247783715 > -24.308914983827865
END: th(7818012.603187701)=-24.308914983827865; dx=-5.179872947219151E-8 evalInputDelta=1.5777125059907142
Fitness changed from -22.73120247783715 to -24.308914983827865
Iteration 4 complete. Error: -24.308914983827865 Total: 9.2431; Orientation: 1.0300; Line Search: 5.3079
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 52c39bb7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.211e+03, gradient 7.559e-04, dot -0.277; [f1c517f3-47a4-4614-a062-05bb3b186a2d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -24.308914983827865, -21.489861023995388, -20.50627211272789, -20.50627085390724
LBFGS Accumulation History: 3 points
Removed measurement 52c39bb7 to history. Total: 3
th(0)=-24.308914983827865;dx=-5.712986762919026E-7
New Minimum: -24.308914983827865 > -26.720224021480643
WOLF (strong): th(1.6843397559414055E7)=-26.720224021480643; dx=1.521788707092459E-8 evalInputDelta=2.411309037652778
New Minimum: -26.720224021480643 > -26.9001158992987
END: th(8421698.779707028)=-26.9001158992987; dx=-1.708324239852644E-8 evalInputDelta=2.5912009154708358
Fitness changed from -24.308914983827865 to -26.9001158992987
Iteration 5 complete. Error: -26.9001158992987 Total: 11.7513; Orientation: 1.0210; Line Search: 7.7417
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 370ed69a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.360e+03, gradient 7.620e-04, dot -0.343; [f1c517f3-47a4-4614-a062-05bb3b186a2d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -26.9001158992987, -21.489861023995388, -20.50627211272789, -20.50627085390724
LBFGS Accumulation History: 3 points
Removed measurement 370ed69a to history. Total: 3
th(0)=-26.9001158992987;dx=-5.799867170838103E-7
New Minimum: -26.9001158992987 > -27.70976835513714
WOLF (strong): th(1.8144000000000004E7)=-27.70976835513714; dx=3.3955136349067604E-8 evalInputDelta=0.8096524558384388
New Minimum: -27.70976835513714 > -28.462404209478382
WOLF (strong): th(9072000.000000002)=-28.462404209478382; dx=1.0265337574894081E-7 evalInputDelta=1.5622883101796816
New Minimum: -28.462404209478382 > -28.50736837866831
END: th(3024000.0000000005)=-28.50736837866831; dx=-2.8152042293507095E-7 evalInputDelta=1.6072524793696097
Fitness changed from -26.9001158992987 to -28.50736837866831
Iteration 6 complete. Error: -28.50736837866831 Total: 14.6028; Orientation: 0.9962; Line Search: 10.4427
Adding measurement 78f03927 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.545e+04, gradient 6.472e-04, dot -0.502; [f1c517f3-47a4-4614-a062-05bb3b186a2d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -28.50736837866831, -21.489861023995388, -20.50627211272789, -20.50627085390724
LBFGS Accumulation History: 3 points
Removed measurement 78f03927 to history. Total: 3
th(0)=-28.50736837866831;dx=-4.183735767554216E-7
New Minimum: -28.50736837866831 > -29.381278364003194
WOLF (strong): th(6515010.502656418)=-29.381278364003194; dx=1.34131080459334E-8 evalInputDelta=0.8739099853348833
END: th(3257505.251328209)=-29.369675341033954; dx=-6.057867741762598E-8 evalInputDelta=0.8623069623656434
Fitness changed from -28.50736837866831 to -29.381278364003194
Iteration 7 complete. Error: -29.381278364003194 Total: 10.9968; Orientation: 1.0035; Line Search: 7.6462
Adding measurement 6127626b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.429e+04, gradient 6.953e-04, dot -0.395; [f1c517f3-47a4-4614-a062-05bb3b186a2d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -29.381278364003194, -21.489861023995388, -20.50627211272789, -20.50627085390724
LBFGS Accumulation History: 3 points
Removed measurement 6127626b to history. Total: 3
th(0)=-29.381278364003194;dx=-4.829331240942921E-7
New Minimum: -29.381278364003194 > -30.56258253847127
WOLF (strong): th(7018082.316422524)=-30.56258253847127; dx=1.070971917240849E-7 evalInputDelta=1.1813041744680746
New Minimum: -30.56258253847127 > -30.75496725390038
END: th(3509041.158211262)=-30.75496725390038; dx=-1.1321350300301755E-7 evalInputDelta=1.3736888898971849
Fitness changed from -29.381278364003194 to -30.75496725390038
Iteration 8 complete. Error: -30.75496725390038 Total: 11.1940; Orientation: 0.9968; Line Search: 7.7340
Adding measurement 3932b27 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.968e+04, gradient 6.248e-04, dot -0.493; [f1c517f3-47a4-4614-a062-05bb3b186a2d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -30.75496725390038, -21.489861023995388, -20.50627211272789, -20.50627085390724
LBFGS Accumulation History: 3 points
Removed measurement 3932b27 to history. Total: 3
th(0)=-30.75496725390038;dx=-3.901019898739797E-7
New Minimum: -30.75496725390038 > -31.036352909912296
WOLF (strong): th(7560000.000000003)=-31.036352909912296; dx=5.755576812207261E-8 evalInputDelta=0.281385656011917
New Minimum: -31.036352909912296 > -31.358605301235496
WOLF (strong): th(3780000.0000000014)=-31.358605301235496; dx=5.192964577296693E-8 evalInputDelta=0.6036380473351173
END: th(1260000.0000000005)=-31.214195213405162; dx=-2.3180321609735232E-7 evalInputDelta=0.45922795950478346
Fitness changed from -30.75496725390038 to -31.358605301235496
Iteration 9 complete. Error: -31.358605301235496 Total: 13.8266; Orientation: 0.9634; Line Search: 10.1853
Adding measurement 3074304c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.984e+04, gradient 7.016e-04, dot -0.416; [f1c517f3-47a4-4614-a062-05bb3b186a2d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -31.358605301235496, -21.489861023995388, -20.50627211272789, -20.50627085390724
LBFGS Accumulation History: 3 points
Removed measurement 3074304c to history. Total: 3
th(0)=-31.358605301235496;dx=-4.921023896044162E-7
New Minimum: -31.358605301235496 > -32.0747151517554
WOLF (strong): th(2714587.7094401745)=-32.0747151517554; dx=8.695234599706599E-8 evalInputDelta=0.7161098505199028
END: th(1357293.8547200873)=-31.980881518636725; dx=-2.593791837112705E-7 evalInputDelta=0.6222762174012288
Fitness changed from -31.358605301235496 to -32.0747151517554
Iteration 10 complete. Error: -32.0747151517554 Total: 11.3263; Orientation: 1.0922; Line Search: 7.6412
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -32.0747151517554 (> -Infinity) after 133.855s (< 5400.000s)
Returns
-32.0747151517554