Code from BasicOptimizer.scala:88 executed in 1857.53 seconds (8.494 gc):
val lineSearchInstance: LineSearchStrategy = lineSearchFactory
val trainer = new IterativeTrainer(trainable)
trainer.setOrientation(orientation())
trainer.setMonitor(new TrainingMonitor() {
override def clear(): Unit = trainingMonitor.clear()
override def log(msg: String): Unit = {
trainingMonitor.log(msg)
BasicOptimizer.this.log(msg)
}
override def onStepFail(currentPoint: Step): Boolean = {
BasicOptimizer.this.onStepFail(trainable.addRef().asInstanceOf[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.addRef().asInstanceOf[Trainable], currentPoint)
trainingMonitor.onStepComplete(currentPoint)
super.onStepComplete(currentPoint)
}
})
trainer.setTimeout(trainingMinutes, TimeUnit.MINUTES)
trainer.setMaxIterations(trainingIterations)
trainer.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
trainer.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
val result = trainer.run.asInstanceOf[lang.Double]
trainer.freeRef()
result
Reset training subject: 833144863622
Reset training subject: 941441225937
Adding measurement 70c8bca to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=40.19641412049532;dx=-6.655463286548708E-7
New Minimum: 40.19641412049532 > 40.19641173258424
WOLFE (weak): th(2.154434690031884)=40.19641173258424; dx=-6.632176598336933E-7 evalInputDelta=2.387911081314087E-6
New Minimum: 40.19641173258424 > 40.19640700891614
WOLFE (weak): th(4.308869380063768)=40.19640700891614; dx=-6.743416984283135E-7 evalInputDelta=7.111579179763794E-6
New Minimum: 40.19640700891614 > 40.19638967141509
WOLFE (weak): th(12.926608140191302)=40.19638967141509; dx=-6.647304674184561E-7 evalInputDelta=2.4449080228805542E-5
New Minimum: 40.19638967141509 > 40.196316827088594
WOLFE (weak): th(51.70643256076521)=40.196316827088594; dx=-6.73917089959609E-7 evalInputDelta=9.729340672492981E-5
New Minimum: 40.196316827088594 > 40.195929791778326
WOLFE (weak): th(258.53216280382605)=40.195929791778326; dx=-6.702694199712818E-7 evalInputDelta=4.843287169933319E-4
New Minimum: 40.195929791778326 > 40.193507965654135
WOLFE (weak): th(1551.1929768229563)=40.193507965654135; dx=-6.696382324157751E-7 evalInputDelta=0.002906154841184616
New Minimum: 40.193507965654135 > 40.17606044188142
WOLFE (weak): th(10858.350837760694)=40.17606044188142; dx=-6.67845959048373E-7 evalInputDelta=0.02035367861390114
New Minimum: 40.17606044188142 > 40.032216906547546
WOLFE (weak): th(86866.80670208555)=40.032216906547546; dx=-6.713398073625749E-7 evalInputDelta=0.16419721394777298
New Minimum: 40.032216906547546 > 38.730148300528526
WOLFE (weak): th(781801.26031877)=38.730148300528526; dx=-6.066216969350466E-7 evalInputDelta=1.466265819966793
New Minimum: 38.730148300528526 > 32.28248646110296
END: th(7818012.6031877)=32.28248646110296; dx=-2.0905139836641541E-7 evalInputDelta=7.913927659392357
Fitness changed from 40.19641412049532 to 32.28248646110296
Iteration 1 complete. Error: 32.28248646110296 Total: 1527.5735; Orientation: 0.2800; Line Search: 1203.9203
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/867734f1-4d4a-4164-833a-4f1a7288d1b7.jpg)
Adding measurement 3ac8ae4f to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=32.28248646110296;dx=-4.866734434810119E-7
New Minimum: 32.28248646110296 > 23.72488808631897
END: th(1.684339755941405E7)=23.72488808631897; dx=-9.461243223949399E-8 evalInputDelta=8.557598374783993
Fitness changed from 32.28248646110296 to 23.72488808631897
Iteration 2 complete. Error: 23.72488808631897 Total: 328.3743; Orientation: 0.1034; Line Search: 218.1877
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/d6a7eca9-aaa7-4109-939a-7761474b39a9.jpg)
Final threshold in iteration 2: 23.72488808631897 (> -Infinity) after 1857.510s (< 1800.000s)
23.72488808631897