BasicOptimizer.scala:89 executed in 299.06 seconds (6.337 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: 586921806799600
Reset training subject: 586927654587900
Adding measurement 63bf1839 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-39.024468175092395;dx=-2.062104325460812E-6
New Minimum: -39.024468175092395 > -39.024472045856044
END: th(2.154434690031884)=-39.024472045856044; dx=-1.7969303996297857E-6 evalInputDelta=3.8707636491608355E-6
Fitness changed from -39.024468175092395 to -39.024472045856044
Iteration 1 complete. Error: -39.024472045856044 Total: 30.0238; Orientation: 0.1820; Line Search: 12.3334
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/127fc57f-3de1-4f68-8863-e31647a3c066.jpg)
Adding measurement 6af1ec99 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-39.024472045856044;dx=-1.7965485292305808E-6
New Minimum: -39.024472045856044 > -39.02448172276349
WOLFE (weak): th(4.641588833612779)=-39.02448172276349; dx=-1.794967464883437E-6 evalInputDelta=9.676907446021232E-6
New Minimum: -39.02448172276349 > -39.024491399668534
WOLFE (weak): th(9.283177667225559)=-39.024491399668534; dx=-1.7932657448151412E-6 evalInputDelta=1.9353812490408018E-5
New Minimum: -39.024491399668534 > -39.02452623650682
WOLFE (weak): th(27.849533001676676)=-39.02452623650682; dx=-1.7927732650263727E-6 evalInputDelta=5.41906507791623E-5
New Minimum: -39.02452623650682 > -39.02469267874942
WOLFE (weak): th(111.3981320067067)=-39.02469267874942; dx=-1.7917235724814032E-6 evalInputDelta=2.2063289337381775E-4
New Minimum: -39.02469267874942 > -39.02556939186784
WOLFE (weak): th(556.9906600335335)=-39.02556939186784; dx=-1.7916089414960924E-6 evalInputDelta=0.0010973460117966738
New Minimum: -39.02556939186784 > -39.031047918931804
WOLFE (weak): th(3341.9439602012008)=-39.031047918931804; dx=-1.7902643364952445E-6 evalInputDelta=0.006575873075760796
New Minimum: -39.031047918931804 > -39.07047024967008
WOLFE (weak): th(23393.607721408407)=-39.07047024967008; dx=-1.789161664873864E-6 evalInputDelta=0.04599820381403674
New Minimum: -39.07047024967008 > -39.39042260425298
WOLFE (weak): th(187148.86177126726)=-39.39042260425298; dx=-1.768244660015298E-6 evalInputDelta=0.36595055839693913
New Minimum: -39.39042260425298 > -42.110427970928065
END: th(1684339.7559414054)=-42.110427970928065; dx=-1.532988142718929E-6 evalInputDelta=3.085955925072021
Fitness changed from -39.024472045856044 to -42.110427970928065
Iteration 2 complete. Error: -42.110427970928065 Total: 67.6541; Orientation: 0.1369; Line Search: 60.2933
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/f9e5bf33-be30-430e-9905-2d5ed811323c.jpg)
Adding measurement 5a270c2a to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-42.110427970928065;dx=-1.4708691743071714E-6
New Minimum: -42.110427970928065 > -46.895725997464396
END: th(3628800.0000000005)=-46.895725997464396; dx=-9.724761882119603E-7 evalInputDelta=4.785298026536331
Fitness changed from -42.110427970928065 to -46.895725997464396
Iteration 3 complete. Error: -46.895725997464396 Total: 19.3290; Orientation: 0.1305; Line Search: 12.0641
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/4807b1ed-0844-452b-9a04-5dd323cce8a6.jpg)
Adding measurement 3dc216a0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.076e+04, gradient 9.661e-04, dot -0.807; [bdb3abe1-24c7-4d0b-8faf-9ed5cba9bbe7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -46.895725997464396, -42.110427970928065, -39.024472045856044, -39.024468175092395
LBFGS Accumulation History: 3 points
Removed measurement 3dc216a0 to history. Total: 3
th(0)=-46.895725997464396;dx=-9.319549699816044E-7
New Minimum: -46.895725997464396 > -52.90733799901086
END: th(7818012.603187701)=-52.90733799901086; dx=-5.0154834915155E-7 evalInputDelta=6.011612001546467
Fitness changed from -46.895725997464396 to -52.90733799901086
Iteration 4 complete. Error: -52.90733799901086 Total: 21.7349; Orientation: 2.5217; Line Search: 12.1310
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/c5c043c0-434f-4705-ba15-299568efa363.jpg)
Adding measurement 63beee13 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.501e+03, gradient 8.415e-04, dot -0.589; [bdb3abe1-24c7-4d0b-8faf-9ed5cba9bbe7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -52.90733799901086, -42.110427970928065, -39.024472045856044, -39.024468175092395
LBFGS Accumulation History: 3 points
Removed measurement 63beee13 to history. Total: 3
th(0)=-52.90733799901086;dx=-7.06697894727875E-7
New Minimum: -52.90733799901086 > -59.044689272230315
END: th(1.6843397559414055E7)=-59.044689272230315; dx=-1.3683576908555224E-7 evalInputDelta=6.137351273219451
Fitness changed from -52.90733799901086 to -59.044689272230315
Iteration 5 complete. Error: -59.044689272230315 Total: 21.9679; Orientation: 2.4498; Line Search: 12.2819
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/d6592578-d7ff-403c-8b1e-3d9e26973be9.jpg)
Adding measurement 266be358 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.174e+04, gradient 1.015e-03, dot -0.329; [bdb3abe1-24c7-4d0b-8faf-9ed5cba9bbe7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.044689272230315, -42.110427970928065, -39.024472045856044, -39.024468175092395
LBFGS Accumulation History: 3 points
Removed measurement 266be358 to history. Total: 3
th(0)=-59.044689272230315;dx=-1.030111388640393E-6
Armijo: th(3.628800000000001E7)=-56.101900410738544; dx=2.449218119123554E-7 evalInputDelta=-2.9427888614917705
New Minimum: -59.044689272230315 > -62.20310023964171
WOLF (strong): th(1.8144000000000004E7)=-62.20310023964171; dx=2.8666078540320467E-7 evalInputDelta=3.158410967411392
New Minimum: -62.20310023964171 > -63.67958211875823
END: th(6048000.000000001)=-63.67958211875823; dx=-3.391853456974204E-7 evalInputDelta=4.634892846527919
Fitness changed from -59.044689272230315 to -63.67958211875823
Iteration 6 complete. Error: -63.67958211875823 Total: 35.1089; Orientation: 2.4923; Line Search: 25.1138
Adding measurement 40b9ed8b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.990e+04, gradient 7.163e-04, dot -0.605; [bdb3abe1-24c7-4d0b-8faf-9ed5cba9bbe7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -63.67958211875823, -42.110427970928065, -39.024472045856044, -39.024468175092395
LBFGS Accumulation History: 3 points
Removed measurement 40b9ed8b to history. Total: 3
th(0)=-63.67958211875823;dx=-5.121673062744958E-7
New Minimum: -63.67958211875823 > -67.87348080817564
END: th(1.3030021005312836E7)=-67.87348080817564; dx=-1.5013406390300862E-7 evalInputDelta=4.193898689417409
Fitness changed from -63.67958211875823 to -67.87348080817564
Iteration 7 complete. Error: -67.87348080817564 Total: 21.2301; Orientation: 2.5087; Line Search: 12.3870
Adding measurement 59c1a4d0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.576e+04, gradient 8.389e-04, dot -0.478; [bdb3abe1-24c7-4d0b-8faf-9ed5cba9bbe7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -67.87348080817564, -42.110427970928065, -39.024472045856044, -39.024468175092395
LBFGS Accumulation History: 3 points
Removed measurement 59c1a4d0 to history. Total: 3
th(0)=-67.87348080817564;dx=-7.037228231702671E-7
New Minimum: -67.87348080817564 > -68.13616151008874
WOLF (strong): th(2.8072329265690096E7)=-68.13616151008874; dx=1.801717238380937E-7 evalInputDelta=0.2626807019130979
New Minimum: -68.13616151008874 > -70.92102158414835
WOLF (strong): th(1.4036164632845048E7)=-70.92102158414835; dx=1.0196460402918052E-7 evalInputDelta=3.0475407759727062
END: th(4678721.544281683)=-70.52698644648203; dx=-3.237430781451166E-7 evalInputDelta=2.6535056383063846
Fitness changed from -67.87348080817564 to -70.92102158414835
Iteration 8 complete. Error: -70.92102158414835 Total: 33.2567; Orientation: 2.4431; Line Search: 24.4845
Adding measurement 3c414a39 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.674e+04, gradient 9.640e-04, dot -0.356; [bdb3abe1-24c7-4d0b-8faf-9ed5cba9bbe7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -70.92102158414835, -42.110427970928065, -39.024472045856044, -39.024468175092395
LBFGS Accumulation History: 3 points
Removed measurement 3c414a39 to history. Total: 3
th(0)=-70.92102158414835;dx=-9.276313866523815E-7
New Minimum: -70.92102158414835 > -75.97347888451871
WOLF (strong): th(1.0080000000000004E7)=-75.97347888451871; dx=4.7137505838116535E-8 evalInputDelta=5.052457300370364
END: th(5040000.000000002)=-74.90622790918886; dx=-4.788233287944608E-7 evalInputDelta=3.985206325040508
Fitness changed from -70.92102158414835 to -75.97347888451871
Iteration 9 complete. Error: -75.97347888451871 Total: 26.7959; Orientation: 2.4575; Line Search: 18.6080
Adding measurement 29d67f66 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.925e+04, gradient 7.514e-04, dot -0.512; [bdb3abe1-24c7-4d0b-8faf-9ed5cba9bbe7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -75.97347888451871, -42.110427970928065, -39.024472045856044, -39.024468175092395
LBFGS Accumulation History: 3 points
Removed measurement 29d67f66 to history. Total: 3
th(0)=-75.97347888451871;dx=-5.633382743209574E-7
New Minimum: -75.97347888451871 > -79.15794302770963
END: th(1.0858350837760698E7)=-79.15794302770963; dx=-2.3754501083438396E-8 evalInputDelta=3.1844641431909224
Fitness changed from -75.97347888451871 to -79.15794302770963
Iteration 10 complete. Error: -79.15794302770963 Total: 20.7131; Orientation: 2.3701; Line Search: 12.5752
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/17173914-6992-4937-aad9-9f627cbb9535.jpg)
Final threshold in iteration 11: -79.15794302770963 (> -Infinity) after 299.057s (< 5400.000s)
Returns
-79.15794302770963