Code from BasicOptimizer.scala:75 executed in 911.73 seconds (8.245 gc):
val lineSearchInstance: LineSearchStrategy = lineSearchFactory
IterativeTrainer.wrap(trainable)
.setOrientation(orientation())
.setMonitor(new TrainingMonitor() {
override def clear(): Unit = trainingMonitor.clear()
override def log(msg: String): Unit = trainingMonitor.log(msg)
override def onStepFail(currentPoint: Step): Boolean = {
BasicOptimizer.this.onStepFail(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, currentPoint)
trainingMonitor.onStepComplete(currentPoint)
super.onStepComplete(currentPoint)
}
})
.setTimeout(trainingMinutes, TimeUnit.MINUTES)
.setMaxIterations(trainingIterations)
.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
.runAndFree
.asInstanceOf[lang.Double]
Reset training subject: 983436211228500
Reset training subject: 983443792130000
Adding measurement 1ed52f44 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=12.416887866224751;dx=-3.0247870049556672E-5
New Minimum: 12.416887866224751 > 12.416814453532208
WOLFE (weak): th(2.154434690031884)=12.416814453532208; dx=-3.0248616106092246E-5 evalInputDelta=7.341269254368399E-5
New Minimum: 12.416814453532208 > 12.416740923516592
WOLFE (weak): th(4.308869380063768)=12.416740923516592; dx=-3.0239645406278693E-5 evalInputDelta=1.4694270815951427E-4
New Minimum: 12.416740923516592 > 12.416448412732393
WOLFE (weak): th(12.926608140191302)=12.416448412732393; dx=-3.0241909471320686E-5 evalInputDelta=4.3945349235841036E-4
New Minimum: 12.416448412732393 > 12.415130104267957
WOLFE (weak): th(51.70643256076521)=12.415130104267957; dx=-3.0237529742344895E-5 evalInputDelta=0.0017577619567941127
New Minimum: 12.415130104267957 > 12.408102984830109
WOLFE (weak): th(258.53216280382605)=12.408102984830109; dx=-3.0198823796014268E-5 evalInputDelta=0.008784881394642952
New Minimum: 12.408102984830109 > 12.364354535012685
WOLFE (weak): th(1551.1929768229563)=12.364354535012685; dx=-2.9972028543954852E-5 evalInputDelta=0.05253333121206616
New Minimum: 12.364354535012685 > 12.058311437784598
WOLFE (weak): th(10858.350837760694)=12.058311437784598; dx=-2.8270644700750307E-5 evalInputDelta=0.3585764284401538
New Minimum: 12.058311437784598 > 10.164087077890079
END: th(86866.80670208555)=10.164087077890079; dx=-1.6098343662711584E-5 evalInputDelta=2.252800788334673
Fitness changed from 12.416887866224751 to 10.164087077890079
Iteration 1 complete. Error: 10.164087077890079 Total: 90.6070; Orientation: 0.0097; Line Search: 67.7850
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/c7fa5418-ec6c-4f9d-b844-843e05c640af.jpg)
Adding measurement 4c418496 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=10.164087077890079;dx=-1.1729248
...skipping 23968 bytes...
99
Adding measurement 69abeb14 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.039e+03, gradient 1.580e-04, dot -0.646; [b05b61ee-1fa6-404c-b049-7fb9a98226cf = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.4493290193260804, 0.3804437439508286, 0.3420103705899278, 0.30288553621454506
LBFGS Accumulation History: 3 points
Removed measurement 68543a35 to history. Total: 4
th(0)=0.30288553621454506;dx=-2.493173261044629E-8
Armijo: th(1.3927950032274304E7)=0.6057510771074548; dx=2.6344613407985626E-8 evalInputDelta=-0.30286554089290973
Armijo: th(6963975.016137152)=0.3304264839926647; dx=1.2893499425886937E-8 evalInputDelta=-0.027540947778119662
New Minimum: 0.30288553621454506 > 0.26875198568876835
END: th(2321325.0053790505)=0.26875198568876835; dx=-9.004526063201894E-9 evalInputDelta=0.03413355052577671
Fitness changed from 0.30288553621454506 to 0.26875198568876835
Iteration 29 complete. Error: 0.26875198568876835 Total: 39.0153; Orientation: 0.2559; Line Search: 31.3155
Adding measurement 5008559a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.342e+03, gradient 1.202e-04, dot -0.842; [b05b61ee-1fa6-404c-b049-7fb9a98226cf = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.3804437439508286, 0.3420103705899278, 0.30288553621454506, 0.26875198568876835
LBFGS Accumulation History: 3 points
Removed measurement 5c3924fd to history. Total: 4
th(0)=0.26875198568876835;dx=-1.4397728071114112E-8
New Minimum: 0.26875198568876835 > 0.23853768710503642
END: th(5001143.118427075)=0.23853768710503642; dx=-8.137956312907676E-9 evalInputDelta=0.030214298583731924
Fitness changed from 0.26875198568876835 to 0.23853768710503642
Iteration 30 complete. Error: 0.23853768710503642 Total: 22.6396; Orientation: 0.2680; Line Search: 14.9526
<a id="p-21"></a>Iteration 30
<a id="p-20"></a>![Iteration 30](etc/00c0f6df-b654-471e-a8d6-922cd6265499.jpg)
Final threshold in iteration 31: 0.23853768710503642 (> -Infinity) after 911.727s (< 3600.000s)
0.23853768710503642