BasicOptimizer.scala:89 executed in 137.38 seconds (2.002 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: 110374044654500
Reset training subject: 110376731020000
Adding measurement 3110893a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-29.533907877672494;dx=-1.2012285083928883E-6
New Minimum: -29.533907877672494 > -29.533909309325477
END: th(2.154434690031884)=-29.533909309325477; dx=-8.306412883732573E-7 evalInputDelta=1.4316529828306557E-6
Fitness changed from -29.533907877672494 to -29.533909309325477
Iteration 1 complete. Error: -29.533909309325477 Total: 13.2459; Orientation: 0.0655; Line Search: 5.3543
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 7798d07e to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-29.533909309325477;dx=-8.297773673487007E-7
New Minimum: -29.533909309325477 > -29.533913604283992
WOLFE (weak): th(4.641588833612779)=-29.533913604283992; dx=-8.291912509251206E-7 evalInputDelta=4.294958515060898E-6
New Minimum: -29.533913604283992 > -29.53391933089438
WOLFE (weak): th(9.283177667225559)=-29.53391933089438; dx=-8.291288093715724E-7 evalInputDelta=1.0021568904505784E-5
New Minimum: -29.53391933089438 > -29.53393507906722
WOLFE (weak): th(27.849533001676676)=-29.53393507906722; dx=-8.282883170428984E-7 evalInputDelta=2.57697417431757E-5
New Minimum: -29.53393507906722 > -29.534010956509558
WOLFE (weak): th(111.3981320067067)=-29.534010956509558; dx=-8.275413766590739E-7 evalInputDelta=1.0164718408134377E-4
New Minimum: -29.534010956509558 > -29.534411815233767
WOLFE (weak): th(556.9906600335335)=-29.534411815233767; dx=-8.279861199627499E-7 evalInputDelta=5.025059082903738E-4
New Minimum: -29.534411815233767 > -29.536919922018953
WOLFE (weak): th(3341.9439602012008)=-29.536919922018953; dx=-8.275233569242514E-7 evalInputDelta=0.0030106126934761335
New Minimum: -29.536919922018953 > -29.554959990400135
WOLFE (weak): th(23393.607721408407)=-29.554959990400135; dx=-8.264879329664208E-7 evalInputDelta=0.021050681074658684
New Minimum: -29.554959990400135 > -29.701375994781525
WOLFE (weak): th(187148.86177126726)=-29.701375994781525; dx=-8.173868122917156E-7 evalInputDelta=0.16746668545604848
New Minimum: -29.701375994781525 > -30.952072037059548
END: th(1684339.7559414054)=-30.952072037059548; dx=-7.16082334549306E-7 evalInputDelta=1.418162727734071
Fitness changed from -29.533909309325477 to -30.952072037059548
Iteration 2 complete. Error: -30.952072037059548 Total: 30.7022; Orientation: 0.0647; Line Search: 27.4890
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 3d1642a0 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-30.952072037059548;dx=-7.372088488976221E-7
New Minimum: -30.952072037059548 > -33.29432094196306
END: th(3628800.0000000005)=-33.29432094196306; dx=-4.984790850786111E-7 evalInputDelta=2.34224890490351
Fitness changed from -30.952072037059548 to -33.29432094196306
Iteration 3 complete. Error: -33.29432094196306 Total: 8.6455; Orientation: 0.0725; Line Search: 5.4554
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 7ebe4ba7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.327e+04, gradient 7.064e-04, dot -0.818; [baeba471-1949-457f-a469-23a92a6a08ac = 1.000/1.000e+00]
Orientation rejected. Popping history element from -33.29432094196306, -30.952072037059548, -29.533909309325477, -29.533907877672494
LBFGS Accumulation History: 3 points
Removed measurement 7ebe4ba7 to history. Total: 3
th(0)=-33.29432094196306;dx=-4.989053176489306E-7
New Minimum: -33.29432094196306 > -36.55552011848804
END: th(7818012.603187701)=-36.55552011848804; dx=-2.8363128918440333E-7 evalInputDelta=3.2611991765249826
Fitness changed from -33.29432094196306 to -36.55552011848804
Iteration 4 complete. Error: -36.55552011848804 Total: 9.8589; Orientation: 1.1542; Line Search: 5.5637
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 242507 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.131e+04, gradient 6.154e-04, dot -0.623; [baeba471-1949-457f-a469-23a92a6a08ac = 1.000/1.000e+00]
Orientation rejected. Popping history element from -36.55552011848804, -30.952072037059548, -29.533909309325477, -29.533907877672494
LBFGS Accumulation History: 3 points
Removed measurement 242507 to history. Total: 3
th(0)=-36.55552011848804;dx=-3.7815761036802904E-7
New Minimum: -36.55552011848804 > -40.32252832059499
END: th(1.6843397559414055E7)=-40.32252832059499; dx=-1.1573801576936663E-7 evalInputDelta=3.7670082021069504
Fitness changed from -36.55552011848804 to -40.32252832059499
Iteration 5 complete. Error: -40.32252832059499 Total: 9.6083; Orientation: 1.1160; Line Search: 5.2902
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 647ec94b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.206e+04, gradient 6.582e-04, dot -0.394; [baeba471-1949-457f-a469-23a92a6a08ac = 1.000/1.000e+00]
Orientation rejected. Popping history element from -40.32252832059499, -30.952072037059548, -29.533909309325477, -29.533907877672494
LBFGS Accumulation History: 3 points
Removed measurement 647ec94b to history. Total: 3
th(0)=-40.32252832059499;dx=-4.33097332839002E-7
New Minimum: -40.32252832059499 > -42.74780372813447
WOLF (strong): th(3.628800000000001E7)=-42.74780372813447; dx=1.7847722338516356E-8 evalInputDelta=2.4252754075394805
New Minimum: -42.74780372813447 > -43.11444173290704
END: th(1.8144000000000004E7)=-43.11444173290704; dx=-1.1275727047501828E-9 evalInputDelta=2.7919134123120486
Fitness changed from -40.32252832059499 to -43.11444173290704
Iteration 6 complete. Error: -43.11444173290704 Total: 12.5832; Orientation: 1.1592; Line Search: 8.1891
Adding measurement 1e365d1a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.433e+04, gradient 6.826e-04, dot -0.308; [baeba471-1949-457f-a469-23a92a6a08ac = 1.000/1.000e+00]
Orientation rejected. Popping history element from -43.11444173290704, -30.952072037059548, -29.533909309325477, -29.533907877672494
LBFGS Accumulation History: 3 points
Removed measurement 1e365d1a to history. Total: 3
th(0)=-43.11444173290704;dx=-4.6533053052024246E-7
New Minimum: -43.11444173290704 > -44.107793585369755
WOLF (strong): th(3.9090063015938506E7)=-44.107793585369755; dx=7.317613973133683E-8 evalInputDelta=0.9933518524627161
New Minimum: -44.107793585369755 > -46.055268566472726
WOLF (strong): th(1.9545031507969253E7)=-46.055268566472726; dx=7.021335242822055E-8 evalInputDelta=2.940826833565687
END: th(6515010.502656418)=-45.62046185096594; dx=-2.299709969865948E-7 evalInputDelta=2.506020118058899
Fitness changed from -43.11444173290704 to -46.055268566472726
Iteration 7 complete. Error: -46.055268566472726 Total: 16.5913; Orientation: 2.5901; Line Search: 10.5416
Adding measurement 264783d4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.741e+04, gradient 6.789e-04, dot -0.282; [baeba471-1949-457f-a469-23a92a6a08ac = 1.000/1.000e+00]
Orientation rejected. Popping history element from -46.055268566472726, -30.952072037059548, -29.533909309325477, -29.533907877672494
LBFGS Accumulation History: 3 points
Removed measurement 264783d4 to history. Total: 3
th(0)=-46.055268566472726;dx=-4.606054298215602E-7
New Minimum: -46.055268566472726 > -49.4704631185024
WOLF (strong): th(1.4036164632845048E7)=-49.4704631185024; dx=5.152832152741139E-9 evalInputDelta=3.415194552029675
END: th(7018082.316422524)=-48.73049203189512; dx=-2.2633503060674272E-7 evalInputDelta=2.675223465422391
Fitness changed from -46.055268566472726 to -49.4704631185024
Iteration 8 complete. Error: -49.4704631185024 Total: 12.3769; Orientation: 1.1450; Line Search: 8.5018
Adding measurement 67b4cb2f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.589e+04, gradient 5.401e-04, dot -0.415; [baeba471-1949-457f-a469-23a92a6a08ac = 1.000/1.000e+00]
Orientation rejected. Popping history element from -49.4704631185024, -30.952072037059548, -29.533909309325477, -29.533907877672494
LBFGS Accumulation History: 3 points
Removed measurement 67b4cb2f to history. Total: 3
th(0)=-49.4704631185024;dx=-2.913876458642825E-7
New Minimum: -49.4704631185024 > -51.49201869552368
WOLF (strong): th(1.5120000000000006E7)=-51.49201869552368; dx=6.014280688869202E-9 evalInputDelta=2.0215555770212816
END: th(7560000.000000003)=-51.14838649333712; dx=-1.1878443201836099E-7 evalInputDelta=1.6779233748347195
Fitness changed from -49.4704631185024 to -51.49201869552368
Iteration 9 complete. Error: -51.49201869552368 Total: 11.5763; Orientation: 1.1390; Line Search: 7.8588
Adding measurement 3fefe9e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.948e+04, gradient 5.489e-04, dot -0.396; [baeba471-1949-457f-a469-23a92a6a08ac = 1.000/1.000e+00]
Orientation rejected. Popping history element from -51.49201869552368, -30.952072037059548, -29.533909309325477, -29.533907877672494
LBFGS Accumulation History: 3 points
Removed measurement 3fefe9e to history. Total: 3
th(0)=-51.49201869552368;dx=-3.007104246210028E-7
New Minimum: -51.49201869552368 > -53.189738772234044
WOLF (strong): th(1.6287526256641047E7)=-53.189738772234044; dx=4.839825515618264E-8 evalInputDelta=1.697720076710361
New Minimum: -53.189738772234044 > -53.22880971539627
END: th(8143763.128320524)=-53.22880971539627; dx=-8.440236882705237E-8 evalInputDelta=1.7367910198725838
Fitness changed from -51.49201869552368 to -53.22880971539627
Iteration 10 complete. Error: -53.22880971539627 Total: 11.7485; Orientation: 1.1181; Line Search: 7.8381
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -53.22880971539627 (> -Infinity) after 137.382s (< 5400.000s)
Returns
-53.22880971539627