Code from BasicOptimizer.scala:75 executed in 518.98 seconds (5.950 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: 4302259560150
Reset training subject: 4304222520538
Adding measurement 1fcad5ac to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=0.9882138873396964;dx=-8.242968990664616E-8
New Minimum: 0.9882138873396964 > 0.9882137328028386
WOLFE (weak): th(2.154434690031884)=0.9882137328028386; dx=-8.24293027620737E-8 evalInputDelta=1.5453685775490555E-7
New Minimum: 0.9882137328028386 > 0.988213578264384
WOLFE (weak): th(4.308869380063768)=0.988213578264384; dx=-8.242871314747946E-8 evalInputDelta=3.0907531234358743E-7
New Minimum: 0.988213578264384 > 0.9882129601342197
WOLFE (weak): th(12.926608140191302)=0.9882129601342197; dx=-8.242614362368372E-8 evalInputDelta=9.272054767306415E-7
New Minimum: 0.9882129601342197 > 0.9882101783601706
WOLFE (weak): th(51.70643256076521)=0.9882101783601706; dx=-8.243640520199328E-8 evalInputDelta=3.7089795258404834E-6
New Minimum: 0.9882101783601706 > 0.9881953402089989
WOLFE (weak): th(258.53216280382605)=0.9881953402089989; dx=-8.245501360782554E-8 evalInputDelta=1.8547130697488257E-5
New Minimum: 0.9881953402089989 > 0.9881025400495196
WOLFE (weak): th(1551.1929768229563)=0.9881025400495196; dx=-8.255665172868067E-8 evalInputDelta=1.1134729017681089E-4
New Minimum: 0.9881025400495196 > 0.9874317903427389
WOLFE (weak): th(10858.350837760694)=0.9874317903427389; dx=-8.298162898560377E-8 evalInputDelta=7.820969969575264E-4
New Minimum: 0.9874317903427389 > 0.9818706607690568
WOLFE (weak): th(86866.80670208555)=0.9818706607690568; dx=-8.41210537999301E-8 evalInputDelta=0.006343226570639571
New Minimum: 0.9818706607690568 > 0.945355228804767
END: th(781801.26031877)=0.945355228804767; dx=-4.0373199878200564E-8 evalInputDelta=0.04285865853492943
Fitness changed from 0.9882138873396964 to 0.945355228804767
Iteration 1 complete. Error: 0.945355228804767 Total: 27.7964; Orientation: 0.0733; Line Search: 21.6866
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/e5aeafb6-efa5-4eb4-995d-c6399a5b8fba.jpg
...skipping 42606 bytes...
8.0209; Orientation: 1.6104; Line Search: 4.3783
Adding measurement 629b3e62 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.972e+02, gradient 6.300e-05, dot -0.773; [39c26056-1202-40d5-857a-c93735277715 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.3599878711876779, 0.3586115823433223, 0.3550263916715572, 0.3524995374424139
LBFGS Accumulation History: 3 points
Removed measurement 2b1c60d3 to history. Total: 4
th(0)=0.3524995374424139;dx=-3.969002326198698E-9
New Minimum: 0.3524995374424139 > 0.3512746800460841
END: th(5412605.806404287)=0.3512746800460841; dx=-8.669090042996583E-10 evalInputDelta=0.001224857396329826
Fitness changed from 0.3524995374424139 to 0.3512746800460841
Iteration 49 complete. Error: 0.3512746800460841 Total: 8.0072; Orientation: 1.6117; Line Search: 4.3687
Adding measurement 48e50448 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.931e+02, gradient 9.023e-05, dot -0.538; [39c26056-1202-40d5-857a-c93735277715 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.3586115823433223, 0.3550263916715572, 0.3524995374424139, 0.3512746800460841
LBFGS Accumulation History: 3 points
Removed measurement 15ebbec1 to history. Total: 4
th(0)=0.3512746800460841;dx=-8.140749982537E-9
Armijo: th(1.1661105712785395E7)=0.3927259416204599; dx=3.7096891251532935E-9 evalInputDelta=-0.041451261574375786
Armijo: th(5830552.856392697)=0.3604454171609921; dx=3.2042854788866393E-9 evalInputDelta=-0.009170737114908012
New Minimum: 0.3512746800460841 > 0.3468669719020616
END: th(1943517.6187975658)=0.3468669719020616; dx=-1.4493676732386601E-9 evalInputDelta=0.004407708144022471
Fitness changed from 0.3512746800460841 to 0.3468669719020616
Iteration 50 complete. Error: 0.3468669719020616 Total: 12.3927; Orientation: 1.6054; Line Search: 8.7626
<a id="p-29"></a>Iteration 50
<a id="p-28"></a>![Iteration 50](etc/5e02de95-acc7-4918-9f0b-d7fd54822329.jpg)
Final threshold in iteration 51: 0.3468669719020616 (> -Infinity) after 518.975s (< 3600.000s)
0.3468669719020616