Code from BasicOptimizer.scala:88 executed in 696.14 seconds (6.691 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: 17467333619894
Reset training subject: 17480656045613
Adding measurement 1c766330 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=1.4627366289496422;dx=-6.294727881049116E-8
New Minimum: 1.4627366289496422 > 1.4627364799380302
WOLFE (weak): th(2.154434690031884)=1.4627364799380302; dx=-6.294747748704569E-8 evalInputDelta=1.4901161193847656E-7
New Minimum: 1.4627364799380302 > 1.462736316025257
WOLFE (weak): th(4.308869380063768)=1.462736316025257; dx=-6.294747573201668E-8 evalInputDelta=3.129243850708008E-7
New Minimum: 1.462736316025257 > 1.4627356752753258
WOLFE (weak): th(12.926608140191302)=1.4627356752753258; dx=-6.294744386349549E-8 evalInputDelta=9.5367431640625E-7
New Minimum: 1.4627356752753258 > 1.4627328738570213
WOLFE (weak): th(51.70643256076521)=1.4627328738570213; dx=-6.294734977762812E-8 evalInputDelta=3.7550926208496094E-6
New Minimum: 1.4627328738570213 > 1.462717853486538
WOLFE (weak): th(258.53216280382605)=1.462717853486538; dx=-6.294561838219243E-8 evalInputDelta=1.8775463104248047E-5
New Minimum: 1.462717853486538 > 1.4626239314675331
WOLFE (weak): th(1551.1929768229563)=1.4626239314675331; dx=-6.293891995665578E-8 evalInputDelta=1.1269748210906982E-4
New Minimum: 1.4626239314675331 > 1.4619478806853294
WOLFE (weak): th(10858.350837760694)=1.4619478806853294; dx=-6.288569258247623E-8 evalInputDelta=7.887482643127441E-4
New Minimum: 1.4619478806853294 > 1.456446722149849
WOLFE (weak): th(86866.80670208555)=1.456446722149849; dx=-6.251643876026578E-8 evalInputDelta=0.006289906799793243
New Minimum: 1.456446722149849 > 1.4078277200460434
WOLFE (weak): th(781801.26031877)=1.4078277200460434; dx=-5.892717211730294E-8 evalInputDelta=0.054908908903598785
New Minimum: 1.4078277200460434 > 1.082723893225193
END: th(7818012.6031877)=1.082723893225193; dx=-2.7077558182953178E-8 evalInputDelta=0.38001273572444916
Fitness changed from 1.4627366289496422 to 1.082723893225193
Iteration 1 complete. Error: 1.08272389322519
...skipping 6003 bytes...
005676; dx=-5.265811186826495E-9 evalInputDelta=0.0842788964509964
Fitness changed from -0.021430209279060364 to -0.10570910573005676
Iteration 8 complete. Error: -0.10570910573005676 Total: 45.5189; Orientation: 1.6032; Line Search: 28.7030
Adding measurement 187ccfd4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.133e+04, gradient 1.025e-04, dot -0.680; [ccad28bb-9754-4a45-99fd-ecc549919fd1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.10570910573005676, 0.767203152179718, 1.082723893225193, 1.4627366289496422
LBFGS Accumulation History: 3 points
Removed measurement 187ccfd4 to history. Total: 3
th(0)=-0.10570910573005676;dx=-1.0505345935794105E-8
New Minimum: -0.10570910573005676 > -0.19290518015623093
END: th(1.2600000000000004E7)=-0.19290518015623093; dx=-4.8732391684890775E-9 evalInputDelta=0.08719607442617416
Fitness changed from -0.10570910573005676 to -0.19290518015623093
Iteration 9 complete. Error: -0.19290518015623093 Total: 45.1987; Orientation: 1.5579; Line Search: 28.9119
Adding measurement 2544f11 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.137e+04, gradient 1.042e-04, dot -0.538; [ccad28bb-9754-4a45-99fd-ecc549919fd1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.19290518015623093, 0.767203152179718, 1.082723893225193, 1.4627366289496422
LBFGS Accumulation History: 3 points
Removed measurement 2544f11 to history. Total: 3
th(0)=-0.19290518015623093;dx=-1.0859297224768938E-8
New Minimum: -0.19290518015623093 > -0.2385496348142624
END: th(2.7145877094401743E7)=-0.2385496348142624; dx=-3.1000986409401795E-9 evalInputDelta=0.045644454658031464
Fitness changed from -0.19290518015623093 to -0.2385496348142624
Iteration 10 complete. Error: -0.2385496348142624 Total: 43.3689; Orientation: 1.5495; Line Search: 28.5230
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f7379078-a405-4101-8673-cf8ba6eccaec.jpg)
Final threshold in iteration 11: -0.2385496348142624 (> -Infinity) after 696.141s (< 3600.000s)
-0.2385496348142624