Code from BasicOptimizer.scala:75 executed in 850.09 seconds (8.572 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: 7834700520464
Reset training subject: 7838371692546
Adding measurement 47a2523 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=0.8329027946190041;dx=-3.6191268948603545E-7
New Minimum: 0.8329027946190041 > 0.832902117096064
WOLFE (weak): th(2.154434690031884)=0.832902117096064; dx=-3.6192792234176355E-7 evalInputDelta=6.775229400846072E-7
New Minimum: 0.832902117096064 > 0.8329014395357558
WOLFE (weak): th(4.308869380063768)=0.8329014395357558; dx=-3.619855279968157E-7 evalInputDelta=1.355083248277822E-6
New Minimum: 0.8329014395357558 > 0.8328987295715843
WOLFE (weak): th(12.926608140191302)=0.8328987295715843; dx=-3.6190215713763695E-7 evalInputDelta=4.0650474197878594E-6
New Minimum: 0.8328987295715843 > 0.8328865442796064
WOLFE (weak): th(51.70643256076521)=0.8328865442796064; dx=-3.6151384946812816E-7 evalInputDelta=1.6250339397672064E-5
New Minimum: 0.8328865442796064 > 0.832821701073217
WOLFE (weak): th(258.53216280382605)=0.832821701073217; dx=-3.6076995866009947E-7 evalInputDelta=8.109354578711425E-5
New Minimum: 0.832821701073217 > 0.8324216567601161
WOLFE (weak): th(1551.1929768229563)=0.8324216567601161; dx=-3.528921470620084E-7 evalInputDelta=4.811378588879256E-4
New Minimum: 0.8324216567601161 > 0.8297129981971859
END: th(10858.350837760694)=0.8297129981971859; dx=-3.1135033015657655E-7 evalInputDelta=0.0031897964218181585
Fitness changed from 0.8329027946190041 to 0.8297129981971859
Iteration 1 complete. Error: 0.8297129981971859 Total: 41.6180; Orientation: 0.0712; Line Search: 30.5221
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/3f5a91df-dcba-47be-afe0-21bf2d5f7e36.jpg)
Adding measurement 840f3a3 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=0.8297129981971859;dx=-3.1597825466069017E-7
New Minimum: 0.8297129981971859 > 0.82407875595362
END: th(23393.607721408407)=0.82407875595362; dx=-2.363646886890344E-7 evalInputDelta=0.005634242243565901
Fitness changed from 0.829712998197
...skipping 42823 bytes...
ion magnitude: 3.602e+01, gradient 4.902e-04, dot -0.596; [a6c8b15b-0896-47fa-bedf-f583949a94d2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.6861057372148065, 0.6850764773375828, 0.6843962186616328, 0.6822050967156246
LBFGS Accumulation History: 3 points
Removed measurement 4e11ba5c to history. Total: 4
th(0)=0.6822050967156246;dx=-2.4026513352464966E-7
New Minimum: 0.6822050967156246 > 0.6819906004269118
WOLF (strong): th(28190.65524168901)=0.6819906004269118; dx=1.5120104741655596E-8 evalInputDelta=2.1449628871272886E-4
New Minimum: 0.6819906004269118 > 0.6812497540231632
END: th(14095.327620844506)=0.6812497540231632; dx=-6.344574160853487E-8 evalInputDelta=9.553426924613362E-4
Fitness changed from 0.6822050967156246 to 0.6812497540231632
Iteration 49 complete. Error: 0.6812497540231632 Total: 16.7124; Orientation: 1.6005; Line Search: 11.4450
Adding measurement 13f788db to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.769e+01, gradient 4.453e-04, dot -0.713; [a6c8b15b-0896-47fa-bedf-f583949a94d2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.6850764773375828, 0.6843962186616328, 0.6822050967156246, 0.6812497540231632
LBFGS Accumulation History: 3 points
Removed measurement 4a100bff to history. Total: 4
th(0)=0.6812497540231632;dx=-1.9833254683247547E-7
New Minimum: 0.6812497540231632 > 0.6807212868653807
WOLF (strong): th(30367.462793711984)=0.6807212868653807; dx=3.055999777131224E-9 evalInputDelta=5.284671577825417E-4
New Minimum: 0.6807212868653807 > 0.6802860024130912
END: th(15183.731396855992)=0.6802860024130912; dx=-5.63803422465914E-8 evalInputDelta=9.637516100720056E-4
Fitness changed from 0.6812497540231632 to 0.6802860024130912
Iteration 50 complete. Error: 0.6802860024130912 Total: 16.7475; Orientation: 1.6217; Line Search: 11.4565
<a id="p-29"></a>Iteration 50
<a id="p-28"></a>![Iteration 50](etc/3f5818aa-16e6-49d6-90fa-d00b96f7b10b.jpg)
Final threshold in iteration 51: 0.6802860024130912 (> -Infinity) after 850.087s (< 3600.000s)
0.6802860024130912