Code from BasicOptimizer.scala:75 executed in 2747.47 seconds (29.049 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: 1180352151109000
Reset training subject: 1180373554536100
Adding measurement 1613b471 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=0.5043309172990292;dx=-2.99117220375056E-7
New Minimum: 0.5043309172990292 > 0.5043307163474724
WOLFE (weak): th(2.154434690031884)=0.5043307163474724; dx=-2.956330221089321E-7 evalInputDelta=2.0095155683907961E-7
New Minimum: 0.5043307163474724 > 0.5043304864788105
WOLFE (weak): th(4.308869380063768)=0.5043304864788105; dx=-2.956327706601183E-7 evalInputDelta=4.308202187219834E-7
New Minimum: 0.5043304864788105 > 0.5043296986280533
WOLFE (weak): th(12.926608140191302)=0.5043296986280533; dx=-2.9563264568423556E-7 evalInputDelta=1.218670975910996E-6
New Minimum: 0.5043296986280533 > 0.5043258897675709
WOLFE (weak): th(51.70643256076521)=0.5043258897675709; dx=-2.9563060677052764E-7 evalInputDelta=5.027531458368095E-6
New Minimum: 0.5043258897675709 > 0.5043059577467303
WOLFE (weak): th(258.53216280382605)=0.5043059577467303; dx=-2.956204944782506E-7 evalInputDelta=2.4959552298975396E-5
New Minimum: 0.5043059577467303 > 0.5041813480867678
WOLFE (weak): th(1551.1929768229563)=0.5041813480867678; dx=-2.955681290025741E-7 evalInputDelta=1.495692122613912E-4
New Minimum: 0.5041813480867678 > 0.5032847150288373
WOLFE (weak): th(10858.350837760694)=0.5032847150288373; dx=-2.951456823653617E-7 evalInputDelta=0.0010462022701919205
New Minimum: 0.5032847150288373 > 0.49601709919458975
WOLFE (weak): th(86866.80670208555)=0.49601709919458975; dx=-2.9173236532642673E-7 evalInputDelta=0.008313818104439485
New Minimum: 0.49601709919458975 > 0.43480169917735145
END: th(781801.26031877)=0.43480169917735145; dx=-2.6068869917932326E-7 evalInputDelta=0.06952921812167778
Fitness changed from 0.5043309172990292 to 0.43480169917735145
Iteration 1 complete. Error: 0.43480169917735145 Total: 270.1126; Orientation: 0.0188; Line Search: 207.4440
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iterati
...skipping 25564 bytes...
-0.04962584593335995, -0.05006499937270903
LBFGS Accumulation History: 3 points
Removed measurement 59a9a136 to history. Total: 4
th(0)=-0.05006499937270903;dx=-2.1486188832068395E-8
Armijo: th(5875853.919865724)=-0.04602212653721516; dx=-1.7437839256607846E-8 evalInputDelta=-0.0040428728354938714
New Minimum: -0.05006499937270903 > -0.050137311832018305
END: th(2937926.959932862)=-0.050137311832018305; dx=-1.8577956542718115E-8 evalInputDelta=7.23124593092761E-5
Fitness changed from -0.05006499937270903 to -0.050137311832018305
Iteration 29 complete. Error: -0.050137311832018305 Total: 85.3243; Orientation: 0.5490; Line Search: 62.2718
Adding measurement 5d3e24e2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.096e+04, gradient 1.452e-04, dot -0.936; [2e8ae5a8-4c40-43db-add8-4cfa311b2ac7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.04879858326643349, -0.04962584593335995, -0.05006499937270903, -0.050137311832018305
LBFGS Accumulation History: 3 points
Removed measurement 55bcd722 to history. Total: 4
th(0)=-0.050137311832018305;dx=-2.1075831671005712E-8
Armijo: th(6329571.75925927)=-0.04448304556955707; dx=-1.697972780669232E-8 evalInputDelta=-0.005654266262461238
Armijo: th(3164785.879629635)=-0.049652889051110094; dx=-1.8140560956321094E-8 evalInputDelta=-4.8442278090821134E-4
New Minimum: -0.050137311832018305 > -0.050487870115691114
WOLFE (weak): th(1054928.6265432115)=-0.050487870115691114; dx=-1.907347078433376E-8 evalInputDelta=3.505582836728083E-4
END: th(2109857.253086423)=-0.05033092111724957; dx=-1.8557507977362176E-8 evalInputDelta=1.9360928523126653E-4
Fitness changed from -0.050137311832018305 to -0.050487870115691114
Iteration 30 complete. Error: -0.050487870115691114 Total: 123.9208; Orientation: 0.5410; Line Search: 102.8394
<a id="p-21"></a>Iteration 30
<a id="p-20"></a>![Iteration 30](etc/e9b5b646-56c5-4e56-80ca-596ee7fd42c5.jpg)
Final threshold in iteration 31: -0.050487870115691114 (> -Infinity) after 2747.467s (< 3600.000s)
-0.050487870115691114