Code from BasicOptimizer.scala:75 executed in 47.83 seconds (0.810 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: 921613346389200
Reset training subject: 921615045709500
Adding measurement 586ac3db to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=2.2118819393217564;dx=-3.6450983656037087E-6
New Minimum: 2.2118819393217564 > 2.211881436407566
WOLFE (weak): th(2.154434690031884)=2.211881436407566; dx=-3.645062907515276E-6 evalInputDelta=5.029141902923584E-7
New Minimum: 2.211881436407566 > 2.211880683898926
WOLFE (weak): th(4.308869380063768)=2.211880683898926; dx=-3.6449054458241895E-6 evalInputDelta=1.255422830581665E-6
New Minimum: 2.211880683898926 > 2.211878664791584
WOLFE (weak): th(12.926608140191302)=2.211878664791584; dx=-3.6447820095804087E-6 evalInputDelta=3.2745301723480225E-6
New Minimum: 2.211878664791584 > 2.211869314312935
WOLFE (weak): th(51.70643256076521)=2.211869314312935; dx=-3.643522418885659E-6 evalInputDelta=1.2625008821487427E-5
New Minimum: 2.211869314312935 > 2.2118189558386803
WOLFE (weak): th(258.53216280382605)=2.2118189558386803; dx=-3.6425341174069128E-6 evalInputDelta=6.298348307609558E-5
New Minimum: 2.2118189558386803 > 2.211502283811569
WOLFE (weak): th(1551.1929768229563)=2.211502283811569; dx=-3.6262882074766187E-6 evalInputDelta=3.7965551018714905E-4
New Minimum: 2.211502283811569 > 2.209164224565029
WOLFE (weak): th(10858.350837760694)=2.209164224565029; dx=-3.5042647235082186E-6 evalInputDelta=0.0027177147567272186
New Minimum: 2.209164224565029 > 2.1986395567655563
END: th(86866.80670208555)=2.1986395567655563; dx=-2.434792222645033E-6 evalInputDelta=0.013242382556200027
Fitness changed from 2.2118819393217564 to 2.1986395567655563
Iteration 1 complete. Error: 2.1986395567655563 Total: 19.2353; Orientation: 0.0082; Line Search: 14.4173
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/58841af5-8799-4f5d-8fb5-659cc55c20a1.jpg)
Adding measurement 2b503c0f to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=2.1986395567655563;dx=-3.5615996602862463E-6
...skipping 1853 bytes...
6527939
Fitness changed from 2.178808331489563 to 2.176149521023035
Iteration 4 complete. Error: 2.176149521023035 Total: 5.7277; Orientation: 0.2580; Line Search: 3.1584
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/663e2cb0-d9e0-48af-b254-dca4a73dd266.jpg)
Adding measurement 40093fae to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.193e+03, gradient 1.600e-03, dot -0.858; [aaf622c1-50bb-4202-a397-e9a5661077c6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.1986395567655563, 2.1916497871279716, 2.178808331489563, 2.176149521023035
LBFGS Accumulation History: 3 points
Removed measurement 2b503c0f to history. Total: 4
th(0)=2.176149521023035;dx=-2.5591209676853654E-6
New Minimum: 2.176149521023035 > 2.167426034808159
END: th(311914.76961877884)=2.167426034808159; dx=-1.1033433359001458E-6 evalInputDelta=0.008723486214876175
Fitness changed from 2.176149521023035 to 2.167426034808159
Iteration 5 complete. Error: 2.167426034808159 Total: 5.0569; Orientation: 0.2347; Line Search: 3.2158
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/93eaeb6c-4a7e-4748-84c8-40ce99476560.jpg)
Adding measurement e847ee7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.054e+03, gradient 1.475e-03, dot -0.776; [aaf622c1-50bb-4202-a397-e9a5661077c6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.1916497871279716, 2.178808331489563, 2.176149521023035, 2.167426034808159
LBFGS Accumulation History: 3 points
Removed measurement 27b0d3a1 to history. Total: 4
th(0)=2.167426034808159;dx=-2.175920966107062E-6
New Minimum: 2.167426034808159 > 2.111265257000923
END: th(672000.0000000002)=2.111265257000923; dx=-5.142374198551618E-7 evalInputDelta=0.05616077780723572
Fitness changed from 2.167426034808159 to 2.111265257000923
Iteration 6 complete. Error: 2.111265257000923 Total: 5.0468; Orientation: 0.2305; Line Search: 3.2402
Final threshold in iteration 7: 2.111265257000923 (> -Infinity) after 47.828s (< 720.000s)
2.111265257000923