Code from BasicOptimizer.scala:75 executed in 3746.47 seconds (36.036 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: 1380510774600300
Reset training subject: 1380556220888200
Adding measurement 4c91a008 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=8.339074663817883;dx=-1.3796923786423194E-5
New Minimum: 8.339074663817883 > 8.339064359664917
WOLFE (weak): th(2.154434690031884)=8.339064359664917; dx=-1.3751735544547742E-5 evalInputDelta=1.0304152965545654E-5
New Minimum: 8.339064359664917 > 8.339054122567177
WOLFE (weak): th(4.308869380063768)=8.339054122567177; dx=-1.3751199061802179E-5 evalInputDelta=2.0541250705718994E-5
New Minimum: 8.339054122567177 > 8.33901096880436
WOLFE (weak): th(12.926608140191302)=8.33901096880436; dx=-1.3751976185322887E-5 evalInputDelta=6.36950135231018E-5
New Minimum: 8.33901096880436 > 8.33882101625204
WOLFE (weak): th(51.70643256076521)=8.33882101625204; dx=-1.3748628809283158E-5 evalInputDelta=2.536475658416748E-4
New Minimum: 8.33882101625204 > 8.337806269526482
WOLFE (weak): th(258.53216280382605)=8.337806269526482; dx=-1.3726400024610928E-5 evalInputDelta=0.0012683942914009094
New Minimum: 8.337806269526482 > 8.331513613462448
WOLFE (weak): th(1551.1929768229563)=8.331513613462448; dx=-1.3588788197036984E-5 evalInputDelta=0.007561050355434418
New Minimum: 8.331513613462448 > 8.288411475718021
END: th(10858.350837760694)=8.288411475718021; dx=-1.2289268421988706E-5 evalInputDelta=0.050663188099861145
Fitness changed from 8.339074663817883 to 8.288411475718021
Iteration 1 complete. Error: 8.288411475718021 Total: 504.5142; Orientation: 0.0502; Line Search: 366.5731
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/ff635db4-35b6-4792-98a7-75a168f440f8.jpg)
Adding measurement 389bc2d3 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=8.288411475718021;dx=-1.1896109211963333E-5
New Minimum: 8.288411475718021 > 8.196168802678585
END: th(23393.607721408407)=8.196168802678585; dx=-1.0234962176333461E-5 evalInputDelta=0.09224267303943634
Fitness changed from
...skipping 13387 bytes...
. Error: 5.460483208298683 Total: 232.7253; Orientation: 1.4467; Line Search: 185.1585
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/ecc756d5-c41c-4ba6-a9dc-109f938ec24e.jpg)
Adding measurement 49fb693d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.249e+03, gradient 1.116e-03, dot -0.771; [55ca63ef-0d05-4b5c-b048-323408da73bc = 1.000/1.000e+00]
Orientation rejected. Popping history element from 6.004732977598906, 5.7828777357935905, 5.586364585906267, 5.460483208298683
LBFGS Accumulation History: 3 points
Removed measurement 462f8fe9 to history. Total: 4
th(0)=5.460483208298683;dx=-1.2448302691249966E-6
New Minimum: 5.460483208298683 > 5.3129597418010235
END: th(558557.1418601185)=5.3129597418010235; dx=-5.518298312247615E-7 evalInputDelta=0.14752346649765968
Fitness changed from 5.460483208298683 to 5.3129597418010235
Iteration 16 complete. Error: 5.3129597418010235 Total: 139.1216; Orientation: 1.4506; Line Search: 91.6447
Adding measurement 182dcd2b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.135e+03, gradient 1.188e-03, dot -0.709; [55ca63ef-0d05-4b5c-b048-323408da73bc = 1.000/1.000e+00]
Orientation rejected. Popping history element from 5.7828777357935905, 5.586364585906267, 5.460483208298683, 5.3129597418010235
LBFGS Accumulation History: 3 points
Removed measurement f83d121 to history. Total: 4
th(0)=5.3129597418010235;dx=-1.4104032326965086E-6
New Minimum: 5.3129597418010235 > 5.255436554551125
WOLF (strong): th(1203374.8827884994)=5.255436554551125; dx=4.891196789923112E-8 evalInputDelta=0.05752318724989891
New Minimum: 5.255436554551125 > 5.2091595232486725
END: th(601687.4413942497)=5.2091595232486725; dx=-1.7432124889849625E-7 evalInputDelta=0.103800218552351
Fitness changed from 5.3129597418010235 to 5.2091595232486725
Iteration 17 complete. Error: 5.2091595232486725 Total: 185.5910; Orientation: 1.4365; Line Search: 137.4921
Final threshold in iteration 17: 5.2091595232486725 (> -Infinity) after 3746.465s (< 3600.000s)
5.2091595232486725