Code from BasicOptimizer.scala:75 executed in 14.24 seconds (0.302 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: 913060953492000
Reset training subject: 913061523065500
Adding measurement 46e06832 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=1.7139423489570618;dx=-2.111934989423425E-6
New Minimum: 1.7139423489570618 > 1.7139391154050827
WOLFE (weak): th(2.154434690031884)=1.7139391154050827; dx=-2.1119695397170994E-6 evalInputDelta=3.2335519790649414E-6
New Minimum: 1.7139391154050827 > 1.7139360010623932
WOLFE (weak): th(4.308869380063768)=1.7139360010623932; dx=-2.1120178547307138E-6 evalInputDelta=6.3478946685791016E-6
New Minimum: 1.7139360010623932 > 1.7139231115579605
WOLFE (weak): th(12.926608140191302)=1.7139231115579605; dx=-2.1117440952075604E-6 evalInputDelta=1.9237399101257324E-5
New Minimum: 1.7139231115579605 > 1.7138657569885254
WOLFE (weak): th(51.70643256076521)=1.7138657569885254; dx=-2.1115219988381768E-6 evalInputDelta=7.659196853637695E-5
New Minimum: 1.7138657569885254 > 1.7135585844516754
WOLFE (weak): th(258.53216280382605)=1.7135585844516754; dx=-2.1126475653857227E-6 evalInputDelta=3.8376450538635254E-4
New Minimum: 1.7135585844516754 > 1.7116387635469437
WOLFE (weak): th(1551.1929768229563)=1.7116387635469437; dx=-2.1083061335998432E-6 evalInputDelta=0.002303585410118103
New Minimum: 1.7116387635469437 > 1.6978976875543594
WOLFE (weak): th(10858.350837760694)=1.6978976875543594; dx=-2.058398813522664E-6 evalInputDelta=0.01604466140270233
New Minimum: 1.6978976875543594 > 1.591961920261383
END: th(86866.80670208555)=1.591961920261383; dx=-1.6284455715159582E-6 evalInputDelta=0.12198042869567871
Fitness changed from 1.7139423489570618 to 1.591961920261383
Iteration 1 complete. Error: 1.591961920261383 Total: 6.3340; Orientation: 0.0036; Line Search: 4.7738
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/2110aea6-f275-46ce-a4f6-0e20305a3b0a.jpg)
Adding measurement 773a1031 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=1.591961920261383;dx=-2.45356491807
...skipping 1664 bytes...
1.0196849703788757 to 0.7386803030967712
Iteration 4 complete. Error: 0.7386803030967712 Total: 1.6307; Orientation: 0.1132; Line Search: 1.0271
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/ad844ba7-399b-438b-a978-2d8152482ffb.jpg)
Adding measurement 62a32d7e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.090e+03, gradient 6.164e-04, dot -0.871; [261bb4c8-1601-496f-8cc3-288d0ab18689 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.591961920261383, 1.3317678421735764, 1.0196849703788757, 0.7386803030967712
LBFGS Accumulation History: 3 points
Removed measurement 773a1031 to history. Total: 4
th(0)=0.7386803030967712;dx=-3.799395390205211E-7
New Minimum: 0.7386803030967712 > 0.47736042737960815
END: th(1871488.617712673)=0.47736042737960815; dx=-1.1962648913689605E-7 evalInputDelta=0.2613198757171631
Fitness changed from 0.7386803030967712 to 0.47736042737960815
Iteration 5 complete. Error: 0.47736042737960815 Total: 1.6196; Orientation: 0.1091; Line Search: 1.0191
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/cdc3eaad-6038-43e1-b5fc-760a74e690db.jpg)
Adding measurement 37878749 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.595e+03, gradient 4.627e-04, dot -0.831; [261bb4c8-1601-496f-8cc3-288d0ab18689 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.3317678421735764, 1.0196849703788757, 0.7386803030967712, 0.47736042737960815
LBFGS Accumulation History: 3 points
Removed measurement 46171c1e to history. Total: 4
th(0)=0.47736042737960815;dx=-2.1411324190876284E-7
New Minimum: 0.47736042737960815 > 0.2267719805240631
END: th(4032000.0000000014)=0.2267719805240631; dx=-4.9975865586802645E-8 evalInputDelta=0.25058844685554504
Fitness changed from 0.47736042737960815 to 0.2267719805240631
Iteration 6 complete. Error: 0.2267719805240631 Total: 1.4589; Orientation: 0.1167; Line Search: 0.8631
Final threshold in iteration 7: 0.2267719805240631 (> -Infinity) after 14.243s (< 720.000s)
0.2267719805240631