Code from BasicOptimizer.scala:75 executed in 119.36 seconds (3.050 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: 1332416564846
Reset training subject: 1333053492232
Adding measurement 37245ebf to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=1.1582121338856046;dx=-2.476859425984478E-8
New Minimum: 1.1582121338856046 > 1.1582120034179046
WOLFE (weak): th(2.154434690031884)=1.1582120034179046; dx=-2.4768557155375498E-8 evalInputDelta=1.3046769997693275E-7
WOLFE (weak): th(4.308869380063768)=1.1582120034179046; dx=-2.4768555347488092E-8 evalInputDelta=1.3046769997693275E-7
New Minimum: 1.1582120034179046 > 1.1582118729502047
WOLFE (weak): th(12.926608140191302)=1.1582118729502047; dx=-2.4768572128316006E-8 evalInputDelta=2.609353999538655E-7
New Minimum: 1.1582118729502047 > 1.1582110901440044
WOLFE (weak): th(51.70643256076521)=1.1582110901440044; dx=-2.476856418769103E-8 evalInputDelta=1.0437416002595512E-6
New Minimum: 1.1582110901440044 > 1.1582066542422025
WOLFE (weak): th(258.53216280382605)=1.1582066542422025; dx=-2.4768502597700284E-8 evalInputDelta=5.4796434021398E-6
New Minimum: 1.1582066542422025 > 1.1581788646220916
WOLFE (weak): th(1551.1929768229563)=1.1581788646220916; dx=-2.476683105797188E-8 evalInputDelta=3.326926351299164E-5
New Minimum: 1.1581788646220916 > 1.1579791185733135
WOLFE (weak): th(10858.350837760694)=1.1579791185733135; dx=-2.4760106713968338E-8 evalInputDelta=2.3301531229114048E-4
New Minimum: 1.1579791185733135 > 1.1563493160642755
WOLFE (weak): th(86866.80670208555)=1.1563493160642755; dx=-2.4696543803806298E-8 evalInputDelta=0.0018628178213291324
New Minimum: 1.1563493160642755 > 1.1416389524158168
WOLFE (weak): th(781801.26031877)=1.1416389524158168; dx=-2.3941183045477094E-8 evalInputDelta=0.016573181469787812
New Minimum: 1.1416389524158168 > 1.0233538695585618
END: th(7818012.6031877)=1.0233538695585618; dx=-1.4781237670987394E-8 evalInputDelta=0.13485826432704284
Fitness changed from 1.1582121338856046 to 1.0233538695585618
Iteration 1 complete. Error: 1.0233538695585618 Total: 10.3181; Orientation: 0.0
...skipping 20055 bytes...
856071673 to 0.30367893444055605
Iteration 23 complete. Error: 0.30367893444055605 Total: 5.3758; Orientation: 1.6219; Line Search: 3.1384
Adding measurement 192a465a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.862e+03, gradient 2.932e-05, dot -0.812; [235a6d4b-796f-435c-ba4a-04b1c6917ac1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.3187139343436668, 0.3131859852755778, 0.30977317856071673, 0.30367893444055605
LBFGS Accumulation History: 3 points
Removed measurement 4f3894b3 to history. Total: 4
th(0)=0.30367893444055605;dx=-8.597166853456354E-10
New Minimum: 0.30367893444055605 > 0.2994122818627108
END: th(2.0254629629629653E7)=0.2994122818627108; dx=-4.303025827755699E-10 evalInputDelta=0.0042666525778452535
Fitness changed from 0.30367893444055605 to 0.2994122818627108
Iteration 24 complete. Error: 0.2994122818627108 Total: 3.8125; Orientation: 1.6245; Line Search: 1.5685
Adding measurement c49251c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.137e+03, gradient 2.956e-05, dot -0.751; [235a6d4b-796f-435c-ba4a-04b1c6917ac1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.3131859852755778, 0.30977317856071673, 0.30367893444055605, 0.2994122818627108
LBFGS Accumulation History: 3 points
Removed measurement 22120149 to history. Total: 4
th(0)=0.2994122818627108;dx=-8.740750815888613E-10
Armijo: th(4.363727670782177E7)=0.3024918088377913; dx=-3.6049890847337345E-11 evalInputDelta=-0.0030795269750805154
New Minimum: 0.2994122818627108 > 0.29607883212640584
END: th(2.1818638353910886E7)=0.29607883212640584; dx=-3.045076580546881E-10 evalInputDelta=0.00333344973630495
Fitness changed from 0.2994122818627108 to 0.29607883212640584
Iteration 25 complete. Error: 0.29607883212640584 Total: 4.5754; Orientation: 1.6276; Line Search: 2.3318
<a id="p-19"></a>Iteration 25
<a id="p-18"></a>![Iteration 25](etc/93b392dc-1357-47f7-928a-92a736eb5537.jpg)
Final threshold in iteration 26: 0.29607883212640584 (> -Infinity) after 119.360s (< 3600.000s)
0.29607883212640584