BasicOptimizer.scala:89 executed in 284.88 seconds (3.402 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: 644962737390200
Reset training subject: 644968486456900
Adding measurement 377bac0b to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-36.85157687597116;dx=-1.8406060266821432E-6
New Minimum: -36.85157687597116 > -36.85157892546957
END: th(2.154434690031884)=-36.85157892546957; dx=-1.5942997502706368E-6 evalInputDelta=2.049498405654049E-6
Fitness changed from -36.85157687597116 to -36.85157892546957
Iteration 1 complete. Error: -36.85157892546957 Total: 29.6321; Orientation: 0.1429; Line Search: 12.2301
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/4ef53c02-4b1d-4ce6-89b8-038340676f28.jpg)
Adding measurement f457c94 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-36.85157892546957;dx=-1.5919368711989811E-6
New Minimum: -36.85157892546957 > -36.85158917295989
WOLFE (weak): th(4.641588833612779)=-36.85158917295989; dx=-1.591417276394156E-6 evalInputDelta=1.0247490322967678E-5
New Minimum: -36.85158917295989 > -36.851597370950095
WOLFE (weak): th(9.283177667225559)=-36.851597370950095; dx=-1.5904095034891079E-6 evalInputDelta=1.8445480527873315E-5
New Minimum: -36.851597370950095 > -36.851630162892675
WOLFE (weak): th(27.849533001676676)=-36.851630162892675; dx=-1.5903644938354209E-6 evalInputDelta=5.123742310786383E-5
New Minimum: -36.851630162892675 > -36.85177567678585
WOLFE (weak): th(111.3981320067067)=-36.85177567678585; dx=-1.5898076719807746E-6 evalInputDelta=1.967513162810519E-4
New Minimum: -36.85177567678585 > -36.85256267154668
WOLFE (weak): th(556.9906600335335)=-36.85256267154668; dx=-1.5893836983352568E-6 evalInputDelta=9.837460771109363E-4
New Minimum: -36.85256267154668 > -36.8574687130585
WOLFE (weak): th(3341.9439602012008)=-36.8574687130585; dx=-1.5893287266096244E-6 evalInputDelta=0.005889787588934325
New Minimum: -36.8574687130585 > -36.892773362224
WOLFE (weak): th(23393.607721408407)=-36.892773362224; dx=-1.5864550616744404E-6 evalInputDelta=0.0411944367544308
New Minimum: -36.892773362224 > -37.17897887525235
WOLFE (weak): th(187148.86177126726)=-37.17897887525235; dx=-1.5657090842353513E-6 evalInputDelta=0.3273999497827802
New Minimum: -37.17897887525235 > -39.590411830120715
END: th(1684339.7559414054)=-39.590411830120715; dx=-1.3325002951047639E-6 evalInputDelta=2.7388329046511473
Fitness changed from -36.85157892546957 to -39.590411830120715
Iteration 2 complete. Error: -39.590411830120715 Total: 64.9276; Orientation: 0.1357; Line Search: 58.0008
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/29196c17-9aed-4054-a0e4-8d74a336e768.jpg)
Adding measurement 750f20b5 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-39.590411830120715;dx=-1.2568376625666214E-6
New Minimum: -39.590411830120715 > -43.68044732072053
END: th(3628800.0000000005)=-43.68044732072053; dx=-8.127792188364175E-7 evalInputDelta=4.090035490599817
Fitness changed from -39.590411830120715 to -43.68044732072053
Iteration 3 complete. Error: -43.68044732072053 Total: 18.4438; Orientation: 0.1346; Line Search: 11.6349
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d34ab68b-e6ec-4d14-ae27-6c2d02efc21d.jpg)
Adding measurement 2b98c40b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.277e+03, gradient 8.826e-04, dot -0.791; [4577eb9f-095d-4e8b-80d1-b8c99887aa2f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -43.68044732072053, -39.590411830120715, -36.85157892546957, -36.85157687597116
LBFGS Accumulation History: 3 points
Removed measurement 2b98c40b to history. Total: 3
th(0)=-43.68044732072053;dx=-7.784451929539592E-7
New Minimum: -43.68044732072053 > -48.83377496512292
END: th(7818012.603187701)=-48.83377496512292; dx=-4.3767480083339643E-7 evalInputDelta=5.153327644402388
Fitness changed from -43.68044732072053 to -48.83377496512292
Iteration 4 complete. Error: -48.83377496512292 Total: 21.2880; Orientation: 2.4809; Line Search: 11.8425
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/ede2d844-e036-4ad8-80ee-7c2966a34614.jpg)
Adding measurement 2e9e8f14 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.738e+03, gradient 7.847e-04, dot -0.613; [4577eb9f-095d-4e8b-80d1-b8c99887aa2f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -48.83377496512292, -39.590411830120715, -36.85157892546957, -36.85157687597116
LBFGS Accumulation History: 3 points
Removed measurement 2e9e8f14 to history. Total: 3
th(0)=-48.83377496512292;dx=-6.152744149182784E-7
New Minimum: -48.83377496512292 > -54.42239601463904
END: th(1.6843397559414055E7)=-54.42239601463904; dx=-1.3919548755596616E-7 evalInputDelta=5.588621049516121
Fitness changed from -48.83377496512292 to -54.42239601463904
Iteration 5 complete. Error: -54.42239601463904 Total: 21.1324; Orientation: 2.4308; Line Search: 12.0292
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/6d2342db-53c6-4ef0-86f8-74e86256b28d.jpg)
Adding measurement 3a8466ea to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.140e+04, gradient 9.666e-04, dot -0.340; [4577eb9f-095d-4e8b-80d1-b8c99887aa2f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -54.42239601463904, -39.590411830120715, -36.85157892546957, -36.85157687597116
LBFGS Accumulation History: 3 points
Removed measurement 3a8466ea to history. Total: 3
th(0)=-54.42239601463904;dx=-9.331682585806978E-7
Armijo: th(3.628800000000001E7)=-52.63583736796942; dx=1.6604097397853376E-7 evalInputDelta=-1.7865586466696186
New Minimum: -54.42239601463904 > -57.30119247992475
WOLF (strong): th(1.8144000000000004E7)=-57.30119247992475; dx=2.4208699838377653E-7 evalInputDelta=2.87879646528571
New Minimum: -57.30119247992475 > -58.65615730435031
END: th(6048000.000000001)=-58.65615730435031; dx=-2.9633621547265847E-7 evalInputDelta=4.233761289711268
Fitness changed from -54.42239601463904 to -58.65615730435031
Iteration 6 complete. Error: -58.65615730435031 Total: 31.6991; Orientation: 2.4262; Line Search: 22.7848
Adding measurement 42db1714 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.104e+04, gradient 6.901e-04, dot -0.624; [4577eb9f-095d-4e8b-80d1-b8c99887aa2f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -58.65615730435031, -39.590411830120715, -36.85157892546957, -36.85157687597116
LBFGS Accumulation History: 3 points
Removed measurement 42db1714 to history. Total: 3
th(0)=-58.65615730435031;dx=-4.7586071409447326E-7
New Minimum: -58.65615730435031 > -62.57985595671605
END: th(1.3030021005312836E7)=-62.57985595671605; dx=-1.3626907474768108E-7 evalInputDelta=3.9236986523657436
Fitness changed from -58.65615730435031 to -62.57985595671605
Iteration 7 complete. Error: -62.57985595671605 Total: 19.9960; Orientation: 2.4151; Line Search: 11.6791
Adding measurement 69f74a98 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.720e+04, gradient 8.204e-04, dot -0.480; [4577eb9f-095d-4e8b-80d1-b8c99887aa2f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -62.57985595671605, -39.590411830120715, -36.85157892546957, -36.85157687597116
LBFGS Accumulation History: 3 points
Removed measurement 69f74a98 to history. Total: 3
th(0)=-62.57985595671605;dx=-6.725204393230295E-7
New Minimum: -62.57985595671605 > -62.92931636678312
WOLF (strong): th(2.8072329265690096E7)=-62.92931636678312; dx=1.417355548106988E-7 evalInputDelta=0.3494604100670671
New Minimum: -62.92931636678312 > -65.4214523711138
WOLF (strong): th(1.4036164632845048E7)=-65.4214523711138; dx=1.1029251495643513E-7 evalInputDelta=2.841596414397749
END: th(4678721.544281683)=-65.15095909727437; dx=-3.0814855732917746E-7 evalInputDelta=2.5711031405583142
Fitness changed from -62.57985595671605 to -65.4214523711138
Iteration 8 complete. Error: -65.4214523711138 Total: 31.0468; Orientation: 2.3746; Line Search: 23.2749
Adding measurement 3c3eb05d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.838e+04, gradient 9.480e-04, dot -0.351; [4577eb9f-095d-4e8b-80d1-b8c99887aa2f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -65.4214523711138, -39.590411830120715, -36.85157892546957, -36.85157687597116
LBFGS Accumulation History: 3 points
Removed measurement 3c3eb05d to history. Total: 3
th(0)=-65.4214523711138;dx=-8.979938472600268E-7
New Minimum: -65.4214523711138 > -70.36368239332468
WOLF (strong): th(1.0080000000000004E7)=-70.36368239332468; dx=5.784200886525133E-8 evalInputDelta=4.942230022210879
END: th(5040000.000000002)=-69.33861987529436; dx=-4.691736006946277E-7 evalInputDelta=3.9171675041805543
Fitness changed from -65.4214523711138 to -70.36368239332468
Iteration 9 complete. Error: -70.36368239332468 Total: 25.8345; Orientation: 2.4248; Line Search: 17.7309
Adding measurement 2bba2115 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.281e+04, gradient 7.372e-04, dot -0.512; [4577eb9f-095d-4e8b-80d1-b8c99887aa2f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -70.36368239332468, -39.590411830120715, -36.85157892546957, -36.85157687597116
LBFGS Accumulation History: 3 points
Removed measurement 2bba2115 to history. Total: 3
th(0)=-70.36368239332468;dx=-5.427994452946079E-7
New Minimum: -70.36368239332468 > -73.43094496562497
END: th(1.0858350837760698E7)=-73.43094496562497; dx=-1.3460690368551519E-8 evalInputDelta=3.0672625723002938
Fitness changed from -70.36368239332468 to -73.43094496562497
Iteration 10 complete. Error: -73.43094496562497 Total: 19.8080; Orientation: 2.3685; Line Search: 11.8062
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/d528cb97-894e-4e33-91d3-3efbc78a91a3.jpg)
Final threshold in iteration 11: -73.43094496562497 (> -Infinity) after 284.875s (< 5400.000s)
Returns
-73.43094496562497