BasicOptimizer.scala:89 executed in 135.18 seconds (1.602 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: 69878170311600
Reset training subject: 69880998135799
Adding measurement 4e894add to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-13.489220344561911;dx=-1.2320062959509962E-6
New Minimum: -13.489220344561911 > -13.489222736630825
WOLFE (weak): th(2.154434690031884)=-13.489222736630825; dx=-1.1097117170587978E-6 evalInputDelta=2.392068914502943E-6
New Minimum: -13.489222736630825 > -13.489225128699315
WOLFE (weak): th(4.308869380063768)=-13.489225128699315; dx=-1.1093510666280767E-6 evalInputDelta=4.784137404456601E-6
New Minimum: -13.489225128699315 > -13.489236132208903
WOLFE (weak): th(12.926608140191302)=-13.489236132208903; dx=-1.109737348653818E-6 evalInputDelta=1.5787646992393434E-5
New Minimum: -13.489236132208903 > -13.48928493027369
WOLFE (weak): th(51.70643256076521)=-13.48928493027369; dx=-1.1097309398376047E-6 evalInputDelta=6.458571177958561E-5
New Minimum: -13.48928493027369 > -13.489545183637905
WOLFE (weak): th(258.53216280382605)=-13.489545183637905; dx=-1.1092076845395738E-6 evalInputDelta=3.24839075993566E-4
New Minimum: -13.489545183637905 > -13.491168783351492
WOLFE (weak): th(1551.1929768229563)=-13.491168783351492; dx=-1.1094115871479493E-6 evalInputDelta=0.001948438789581175
New Minimum: -13.491168783351492 > -13.502853989736591
END: th(10858.350837760694)=-13.502853989736591; dx=-1.1072906231523591E-6 evalInputDelta=0.013633645174680353
Fitness changed from -13.489220344561911 to -13.502853989736591
Iteration 1 complete. Error: -13.502853989736591 Total: 28.8535; Orientation: 0.0627; Line Search: 20.8163
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 52271e2b to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-13.502853989736591;dx=-1.1051524683120982E-6
New Minimum: -13.502853989736591 > -13.532037405561447
WOLFE (weak): th(23393.607721408407)=-13.532037405561447; dx=-1.1005536910899095E-6 evalInputDelta=0.029183415824855174
New Minimum: -13.532037405561447 > -13.561091396440847
WOLFE (weak): th(46787.215442816814)=-13.561091396440847; dx=-1.09592210528154E-6 evalInputDelta=0.058237406704256145
New Minimum: -13.561091396440847 > -13.675918188908492
WOLFE (weak): th(140361.64632845044)=-13.675918188908492; dx=-1.0729470813311335E-6 evalInputDelta=0.1730641991719004
New Minimum: -13.675918188908492 > -14.154414669081083
END: th(561446.5853138018)=-14.154414669081083; dx=-9.221934201039419E-7 evalInputDelta=0.6515606793444917
Fitness changed from -13.502853989736591 to -14.154414669081083
Iteration 2 complete. Error: -14.154414669081083 Total: 15.9205; Orientation: 0.0551; Line Search: 12.9229
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 21e9a536 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-14.154414669081083;dx=-9.373555871725718E-7
New Minimum: -14.154414669081083 > -15.261464505228039
END: th(1209600.0000000002)=-15.261464505228039; dx=-6.817737086899874E-7 evalInputDelta=1.107049836146956
Fitness changed from -14.154414669081083 to -15.261464505228039
Iteration 3 complete. Error: -15.261464505228039 Total: 8.3142; Orientation: 0.0612; Line Search: 5.1448
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 39ca30a8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.400e+03, gradient 9.218e-04, dot -0.780; [409dae35-623a-4c01-9534-babbbc9121e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -15.261464505228039, -14.154414669081083, -13.502853989736591, -13.489220344561911
LBFGS Accumulation History: 3 points
Removed measurement 39ca30a8 to history. Total: 3
th(0)=-15.261464505228039;dx=-8.484968714351191E-7
New Minimum: -15.261464505228039 > -16.866990279547277
END: th(2606004.201062567)=-16.866990279547277; dx=-4.00402918482126E-7 evalInputDelta=1.6055257743192382
Fitness changed from -15.261464505228039 to -16.866990279547277
Iteration 4 complete. Error: -16.866990279547277 Total: 9.3905; Orientation: 1.1016; Line Search: 5.1663
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 281b333e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.835e+03, gradient 9.481e-04, dot -0.567; [409dae35-623a-4c01-9534-babbbc9121e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.866990279547277, -14.154414669081083, -13.502853989736591, -13.489220344561911
LBFGS Accumulation History: 3 points
Removed measurement 281b333e to history. Total: 3
th(0)=-16.866990279547277;dx=-8.980499949185941E-7
New Minimum: -16.866990279547277 > -18.675744828038827
END: th(5614465.853138018)=-18.675744828038827; dx=-1.3813734892854632E-7 evalInputDelta=1.8087545484915495
Fitness changed from -16.866990279547277 to -18.675744828038827
Iteration 5 complete. Error: -18.675744828038827 Total: 9.3904; Orientation: 1.1011; Line Search: 5.3046
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 34b99727 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.897e+03, gradient 9.089e-04, dot -0.358; [409dae35-623a-4c01-9534-babbbc9121e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -18.675744828038827, -14.154414669081083, -13.502853989736591, -13.489220344561911
LBFGS Accumulation History: 3 points
Removed measurement 34b99727 to history. Total: 3
th(0)=-18.675744828038827;dx=-8.255799754215804E-7
New Minimum: -18.675744828038827 > -20.615034681769664
WOLF (strong): th(1.2096000000000002E7)=-20.615034681769664; dx=1.2975202850550904E-8 evalInputDelta=1.9392898537308376
New Minimum: -20.615034681769664 > -20.817187060987433
WOLF (strong): th(6048000.000000001)=-20.817187060987433; dx=1.1152529322466528E-8 evalInputDelta=2.141442232948606
END: th(2016000.0000000002)=-20.199715569658785; dx=-4.4564211963939163E-7 evalInputDelta=1.5239707416199586
Fitness changed from -18.675744828038827 to -20.817187060987433
Iteration 6 complete. Error: -20.817187060987433 Total: 14.5023; Orientation: 1.1031; Line Search: 10.4653
Adding measurement 873ba05 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.082e+03, gradient 9.369e-04, dot -0.310; [409dae35-623a-4c01-9534-babbbc9121e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -20.817187060987433, -14.154414669081083, -13.502853989736591, -13.489220344561911
LBFGS Accumulation History: 3 points
Removed measurement 873ba05 to history. Total: 3
th(0)=-20.817187060987433;dx=-8.770863262167466E-7
New Minimum: -20.817187060987433 > -23.05144547291868
WOLF (strong): th(4343340.335104278)=-23.05144547291868; dx=4.481558859869173E-8 evalInputDelta=2.234258411931247
END: th(2171670.167552139)=-22.61268588685296; dx=-4.773407211854875E-7 evalInputDelta=1.7954988258655291
Fitness changed from -20.817187060987433 to -23.05144547291868
Iteration 7 complete. Error: -23.05144547291868 Total: 11.3773; Orientation: 1.0941; Line Search: 7.7694
Adding measurement 1dbc6df0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.227e+04, gradient 8.952e-04, dot -0.372; [409dae35-623a-4c01-9534-babbbc9121e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -23.05144547291868, -14.154414669081083, -13.502853989736591, -13.489220344561911
LBFGS Accumulation History: 3 points
Removed measurement 1dbc6df0 to history. Total: 3
th(0)=-23.05144547291868;dx=-7.996350025767694E-7
New Minimum: -23.05144547291868 > -24.05155643208082
WOLF (strong): th(4678721.544281682)=-24.05155643208082; dx=2.336007266273317E-7 evalInputDelta=1.0001109591621393
New Minimum: -24.05155643208082 > -24.415244436546352
END: th(2339360.772140841)=-24.415244436546352; dx=-1.0831525602382774E-7 evalInputDelta=1.3637989636276728
Fitness changed from -23.05144547291868 to -24.415244436546352
Iteration 8 complete. Error: -24.415244436546352 Total: 11.3195; Orientation: 1.0596; Line Search: 7.7576
Adding measurement 153d08d8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.718e+04, gradient 7.418e-04, dot -0.506; [409dae35-623a-4c01-9534-babbbc9121e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -24.415244436546352, -14.154414669081083, -13.502853989736591, -13.489220344561911
LBFGS Accumulation History: 3 points
Removed measurement 153d08d8 to history. Total: 3
th(0)=-24.415244436546352;dx=-5.500164223176341E-7
New Minimum: -24.415244436546352 > -24.84304697670951
WOLF (strong): th(5040000.000000001)=-24.84304697670951; dx=6.113509578605126E-8 evalInputDelta=0.42780254016315666
New Minimum: -24.84304697670951 > -25.029903017281836
WOLF (strong): th(2520000.0000000005)=-25.029903017281836; dx=3.305268154047588E-8 evalInputDelta=0.6146585807354832
END: th(840000.0000000001)=-24.841996452563386; dx=-3.2851824232471835E-7 evalInputDelta=0.4267520160170335
Fitness changed from -24.415244436546352 to -25.029903017281836
Iteration 9 complete. Error: -25.029903017281836 Total: 14.2122; Orientation: 1.0449; Line Search: 10.4237
Adding measurement 757a5b98 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.707e+04, gradient 8.175e-04, dot -0.436; [409dae35-623a-4c01-9534-babbbc9121e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -25.029903017281836, -14.154414669081083, -13.502853989736591, -13.489220344561911
LBFGS Accumulation History: 3 points
Removed measurement 757a5b98 to history. Total: 3
th(0)=-25.029903017281836;dx=-6.679917763411713E-7
New Minimum: -25.029903017281836 > -25.74777177046391
WOLF (strong): th(1809725.1396267826)=-25.74777177046391; dx=5.204832457440262E-8 evalInputDelta=0.7178687531820742
END: th(904862.5698133913)=-25.596329646580084; dx=-3.93605682694939E-7 evalInputDelta=0.5664266292982489
Fitness changed from -25.029903017281836 to -25.74777177046391
Iteration 10 complete. Error: -25.74777177046391 Total: 11.4354; Orientation: 1.0619; Line Search: 7.9280
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -25.74777177046391 (> -Infinity) after 135.182s (< 5400.000s)
Returns
-25.74777177046391