BasicOptimizer.scala:89 executed in 230.35 seconds (3.031 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: 6418711232309
Reset training subject: 6424172207046
Adding measurement 1f50bff1 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-10.583260297775269;dx=-4.594846745247004E-6
New Minimum: -10.583260297775269 > -10.583272278308868
WOLFE (weak): th(2.154434690031884)=-10.583272278308868; dx=-4.591121107608641E-6 evalInputDelta=1.1980533599853516E-5
New Minimum: -10.583272278308868 > -10.58328464627266
WOLFE (weak): th(4.308869380063768)=-10.58328464627266; dx=-4.590604552421055E-6 evalInputDelta=2.434849739074707E-5
New Minimum: -10.58328464627266 > -10.583332806825638
WOLFE (weak): th(12.926608140191302)=-10.583332806825638; dx=-4.589783605674417E-6 evalInputDelta=7.25090503692627E-5
New Minimum: -10.583332806825638 > -10.583550453186035
WOLFE (weak): th(51.70643256076521)=-10.583550453186035; dx=-4.5908187057375545E-6 evalInputDelta=2.9015541076660156E-4
New Minimum: -10.583550453186035 > -10.584712743759155
WOLFE (weak): th(258.53216280382605)=-10.584712743759155; dx=-4.588683500726646E-6 evalInputDelta=0.0014524459838867188
New Minimum: -10.584712743759155 > -10.591972172260284
WOLFE (weak): th(1551.1929768229563)=-10.591972172260284; dx=-4.585176624175171E-6 evalInputDelta=0.00871187448501587
New Minimum: -10.591972172260284 > -10.643990606069565
WOLFE (weak): th(10858.350837760694)=-10.643990606069565; dx=-4.545526805625235E-6 evalInputDelta=0.060730308294296265
New Minimum: -10.643990606069565 > -11.048197641968727
END: th(86866.80670208555)=-11.048197641968727; dx=-4.101032092292984E-6 evalInputDelta=0.46493734419345856
Fitness changed from -10.583260297775269 to -11.048197641968727
Iteration 1 complete. Error: -11.048197641968727 Total: 61.1471; Orientation: 0.0290; Line Search: 45.8885
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/38ea1fe4-73de-459f-ac63-319e5f1a3660.jpg)
Adding measurement 351d0bfb to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-11.048197641968727;dx=-3.8994840332524206E-6
New Minimum: -11.048197641968727 > -11.84009724855423
END: th(187148.86177126726)=-11.84009724855423; dx=-2.9498964696204424E-6 evalInputDelta=0.7918996065855026
Fitness changed from -11.048197641968727 to -11.84009724855423
Iteration 2 complete. Error: -11.84009724855423 Total: 15.5296; Orientation: 0.0307; Line Search: 9.9532
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/50497027-e01f-499d-b0b5-dea190944c04.jpg)
Adding measurement 3c4edb3c to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-11.84009724855423;dx=-2.8805286691205446E-6
New Minimum: -11.84009724855423 > -12.983110189437866
END: th(403200.00000000006)=-12.983110189437866; dx=-1.78866649910121E-6 evalInputDelta=1.1430129408836365
Fitness changed from -11.84009724855423 to -12.983110189437866
Iteration 3 complete. Error: -12.983110189437866 Total: 15.7457; Orientation: 0.0291; Line Search: 10.3158
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/af48f8ea-25bd-4f4a-a9bb-45040b3d61ee.jpg)
Adding measurement 15e4529e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.512e+03, gradient 1.429e-03, dot -0.813; [d05b7761-1100-40b3-874b-d027bfabe1bc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -12.983110189437866, -11.84009724855423, -11.048197641968727, -10.583260297775269
LBFGS Accumulation History: 3 points
Removed measurement 15e4529e to history. Total: 3
th(0)=-12.983110189437866;dx=-2.041608800050262E-6
New Minimum: -12.983110189437866 > -14.234623193740845
END: th(868668.0670208557)=-14.234623193740845; dx=-7.714293887440759E-7 evalInputDelta=1.2515130043029785
Fitness changed from -12.983110189437866 to -14.234623193740845
Iteration 4 complete. Error: -14.234623193740845 Total: 16.3379; Orientation: 0.6095; Line Search: 10.2965
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/59610a3e-71ab-4a02-acd8-df74054f40fa.jpg)
Adding measurement 45a0eeb7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.200e+03, gradient 1.176e-03, dot -0.624; [d05b7761-1100-40b3-874b-d027bfabe1bc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -14.234623193740845, -11.84009724855423, -11.048197641968727, -10.583260297775269
LBFGS Accumulation History: 3 points
Removed measurement 45a0eeb7 to history. Total: 3
th(0)=-14.234623193740845;dx=-1.3827155522885034E-6
New Minimum: -14.234623193740845 > -15.303125411272049
END: th(1871488.617712673)=-15.303125411272049; dx=-1.1180992187603114E-7 evalInputDelta=1.0685022175312042
Fitness changed from -14.234623193740845 to -15.303125411272049
Iteration 5 complete. Error: -15.303125411272049 Total: 16.0325; Orientation: 0.6180; Line Search: 10.1018
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/088b5a06-28d7-4c3f-b4b4-851343fb415b.jpg)
Adding measurement 697a8d9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.008e+03, gradient 1.189e-03, dot -0.381; [d05b7761-1100-40b3-874b-d027bfabe1bc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -15.303125411272049, -11.84009724855423, -11.048197641968727, -10.583260297775269
LBFGS Accumulation History: 3 points
Removed measurement 697a8d9 to history. Total: 3
th(0)=-15.303125411272049;dx=-1.4130867046825505E-6
New Minimum: -15.303125411272049 > -15.538666129112244
WOLF (strong): th(4032000.0000000014)=-15.538666129112244; dx=1.8923088161103414E-7 evalInputDelta=0.2355407178401947
New Minimum: -15.538666129112244 > -16.059280216693878
WOLF (strong): th(2016000.0000000007)=-16.059280216693878; dx=1.4880928004050237E-7 evalInputDelta=0.7561548054218292
END: th(672000.0000000002)=-16.056527256965637; dx=-4.1335463309322355E-7 evalInputDelta=0.7534018456935883
Fitness changed from -15.303125411272049 to -16.059280216693878
Iteration 6 complete. Error: -16.059280216693878 Total: 27.0092; Orientation: 0.5959; Line Search: 21.0880
Adding measurement 6a73fc4e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.591e+03, gradient 1.131e-03, dot -0.338; [d05b7761-1100-40b3-874b-d027bfabe1bc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.059280216693878, -11.84009724855423, -11.048197641968727, -10.583260297775269
LBFGS Accumulation History: 3 points
Removed measurement 6a73fc4e to history. Total: 3
th(0)=-16.059280216693878;dx=-1.2770399981006335E-6
New Minimum: -16.059280216693878 > -16.999331891536713
WOLF (strong): th(1447780.1117014263)=-16.999331891536713; dx=2.1686487340645886E-8 evalInputDelta=0.9400516748428345
END: th(723890.0558507132)=-16.83884745836258; dx=-4.722474724583442E-7 evalInputDelta=0.7795672416687012
Fitness changed from -16.059280216693878 to -16.999331891536713
Iteration 7 complete. Error: -16.999331891536713 Total: 21.1008; Orientation: 0.6146; Line Search: 15.2570
Adding measurement af02664 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.732e+03, gradient 8.132e-04, dot -0.382; [d05b7761-1100-40b3-874b-d027bfabe1bc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.999331891536713, -11.84009724855423, -11.048197641968727, -10.583260297775269
LBFGS Accumulation History: 3 points
Removed measurement af02664 to history. Total: 3
th(0)=-16.999331891536713;dx=-6.607198695262198E-7
New Minimum: -16.999331891536713 > -17.625568360090256
END: th(1559573.8480938943)=-17.625568360090256; dx=-5.629796151974733E-8 evalInputDelta=0.6262364685535431
Fitness changed from -16.999331891536713 to -17.625568360090256
Iteration 8 complete. Error: -17.625568360090256 Total: 16.2306; Orientation: 0.6170; Line Search: 10.2871
Adding measurement 2d02df to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.061e+03, gradient 6.265e-04, dot -0.474; [d05b7761-1100-40b3-874b-d027bfabe1bc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -17.625568360090256, -11.84009724855423, -11.048197641968727, -10.583260297775269
LBFGS Accumulation History: 3 points
Removed measurement 2d02df to history. Total: 3
th(0)=-17.625568360090256;dx=-3.921615681224812E-7
New Minimum: -17.625568360090256 > -17.95965227484703
WOLF (strong): th(3360000.0000000014)=-17.95965227484703; dx=1.004158525442965E-7 evalInputDelta=0.3340839147567749
New Minimum: -17.95965227484703 > -18.060466527938843
END: th(1680000.0000000007)=-18.060466527938843; dx=-5.5057186647107636E-8 evalInputDelta=0.43489816784858704
Fitness changed from -17.625568360090256 to -18.060466527938843
Iteration 9 complete. Error: -18.060466527938843 Total: 20.3859; Orientation: 0.6165; Line Search: 14.9325
Adding measurement 2d4138b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.208e+03, gradient 5.651e-04, dot -0.499; [d05b7761-1100-40b3-874b-d027bfabe1bc = 1.000/1.000e+00]
Orientation rejected. Popping history element from -18.060466527938843, -11.84009724855423, -11.048197641968727, -10.583260297775269
LBFGS Accumulation History: 3 points
Removed measurement 2d4138b to history. Total: 3
th(0)=-18.060466527938843;dx=-3.1878071203822473E-7
New Minimum: -18.060466527938843 > -18.23893168568611
WOLF (strong): th(3619450.279253566)=-18.23893168568611; dx=8.194190504626529E-8 evalInputDelta=0.17846515774726868
New Minimum: -18.23893168568611 > -18.37426447868347
END: th(1809725.139626783)=-18.37426447868347; dx=-5.922501943668179E-9 evalInputDelta=0.3137979507446289
Fitness changed from -18.060466527938843 to -18.37426447868347
Iteration 10 complete. Error: -18.37426447868347 Total: 20.5687; Orientation: 0.7013; Line Search: 14.9301
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/6ae23e63-cdae-4841-a749-050e9d2e84b1.jpg)
Final threshold in iteration 11: -18.37426447868347 (> -Infinity) after 230.353s (< 5400.000s)
Returns
-18.37426447868347