BasicOptimizer.scala:89 executed in 207.74 seconds (3.138 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: 14602810895980
Reset training subject: 14607569261353
Adding measurement 9d8df39 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.6005300432443619;dx=-5.218769824279322E-7
New Minimum: -0.6005300432443619 > -0.6005302667617798
END: th(2.154434690031884)=-0.6005302667617798; dx=-4.679646086094811E-7 evalInputDelta=2.2351741790771484E-7
Fitness changed from -0.6005300432443619 to -0.6005302667617798
Iteration 1 complete. Error: -0.6005302667617798 Total: 21.5975; Orientation: 0.0461; Line Search: 8.5675
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/e468f37b-96ea-4eff-b600-a6e26e54cac8.jpg)
Adding measurement 701668d9 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.6005302667617798;dx=-4.679679380032566E-7
New Minimum: -0.6005302667617798 > -0.6005316227674484
WOLFE (weak): th(4.641588833612779)=-0.6005316227674484; dx=-4.6795102947776357E-7 evalInputDelta=1.3560056686401367E-6
New Minimum: -0.6005316227674484 > -0.6005326509475708
WOLFE (weak): th(9.283177667225559)=-0.6005326509475708; dx=-4.6795038631699263E-7 evalInputDelta=2.384185791015625E-6
New Minimum: -0.6005326509475708 > -0.600536972284317
WOLFE (weak): th(27.849533001676676)=-0.600536972284317; dx=-4.679422895819037E-7 evalInputDelta=6.705522537231445E-6
New Minimum: -0.600536972284317 > -0.6005566120147705
WOLFE (weak): th(111.3981320067067)=-0.6005566120147705; dx=-4.6792988288631217E-7 evalInputDelta=2.6345252990722656E-5
New Minimum: -0.6005566120147705 > -0.6006608307361603
WOLFE (weak): th(556.9906600335335)=-0.6006608307361603; dx=-4.678802871398863E-7 evalInputDelta=1.3056397438049316E-4
New Minimum: -0.6006608307361603 > -0.6013120710849762
WOLFE (weak): th(3341.9439602012008)=-0.6013120710849762; dx=-4.675015074451924E-7 evalInputDelta=7.818043231964111E-4
New Minimum: -0.6013120710849762 > -0.6059864163398743
WOLFE (weak): th(23393.607721408407)=-0.6059864163398743; dx=-4.6483319362716517E-7 evalInputDelta=0.005456149578094482
New Minimum: -0.6059864163398743 > -0.6431452184915543
WOLFE (weak): th(187148.86177126726)=-0.6431452184915543; dx=-4.4239840701042357E-7 evalInputDelta=0.042614951729774475
New Minimum: -0.6431452184915543 > -0.8936583697795868
END: th(1684339.7559414054)=-0.8936583697795868; dx=-2.391976560945479E-7 evalInputDelta=0.293128103017807
Fitness changed from -0.6005302667617798 to -0.8936583697795868
Iteration 2 complete. Error: -0.8936583697795868 Total: 47.5636; Orientation: 0.0435; Line Search: 43.2271
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/d49ce8d9-e015-4602-a0c3-9d7aefcc5888.jpg)
Adding measurement 3ab306f7 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.8936583697795868;dx=-2.2494471611762377E-7
New Minimum: -0.8936583697795868 > -1.1767953634262085
END: th(3628800.0000000005)=-1.1767953634262085; dx=-1.044102878804837E-7 evalInputDelta=0.2831369936466217
Fitness changed from -0.8936583697795868 to -1.1767953634262085
Iteration 3 complete. Error: -1.1767953634262085 Total: 12.7125; Orientation: 0.0450; Line Search: 8.5502
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/83f98af0-8bb5-480f-9fbc-d819794491e5.jpg)
Adding measurement 2b401d05 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.830e+03, gradient 3.538e-04, dot -0.643; [b48d2b79-ed81-40c2-93d4-e45e1d0b0dc4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.1767953634262085, -0.8936583697795868, -0.6005302667617798, -0.6005300432443619
LBFGS Accumulation History: 3 points
Removed measurement 2b401d05 to history. Total: 3
th(0)=-1.1767953634262085;dx=-1.2515294311622387E-7
New Minimum: -1.1767953634262085 > -1.444022685289383
END: th(7818012.603187701)=-1.444022685289383; dx=-3.4608596186075304E-8 evalInputDelta=0.26722732186317444
Fitness changed from -1.1767953634262085 to -1.444022685289383
Iteration 4 complete. Error: -1.444022685289383 Total: 14.0299; Orientation: 1.0971; Line Search: 9.0729
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/a2de73a5-9d2e-498b-9366-0c1415fc1022.jpg)
Adding measurement 42509506 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.655e+03, gradient 3.060e-04, dot -0.437; [b48d2b79-ed81-40c2-93d4-e45e1d0b0dc4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.444022685289383, -0.8936583697795868, -0.6005302667617798, -0.6005300432443619
LBFGS Accumulation History: 3 points
Removed measurement 42509506 to history. Total: 3
th(0)=-1.444022685289383;dx=-9.360703618972382E-8
New Minimum: -1.444022685289383 > -1.6067013069987297
WOLF (strong): th(1.6843397559414055E7)=-1.6067013069987297; dx=9.503761763679827E-9 evalInputDelta=0.16267862170934677
New Minimum: -1.6067013069987297 > -1.618986763060093
END: th(8421698.779707028)=-1.618986763060093; dx=-7.645870815491931E-9 evalInputDelta=0.17496407777071
Fitness changed from -1.444022685289383 to -1.618986763060093
Iteration 5 complete. Error: -1.618986763060093 Total: 17.9860; Orientation: 1.0059; Line Search: 12.7518
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/759d3f76-ff0b-4b26-bda2-fde194666855.jpg)
Adding measurement 7c1d8021 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.959e+03, gradient 2.729e-04, dot -0.383; [b48d2b79-ed81-40c2-93d4-e45e1d0b0dc4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.618986763060093, -0.8936583697795868, -0.6005302667617798, -0.6005300432443619
LBFGS Accumulation History: 3 points
Removed measurement 7c1d8021 to history. Total: 3
th(0)=-1.618986763060093;dx=-7.447447814396457E-8
New Minimum: -1.618986763060093 > -1.6812451481819153
WOLF (strong): th(1.8144000000000004E7)=-1.6812451481819153; dx=2.1428998395613473E-8 evalInputDelta=0.06225838512182236
New Minimum: -1.6812451481819153 > -1.7546348199248314
WOLF (strong): th(9072000.000000002)=-1.7546348199248314; dx=3.762794908891649E-9 evalInputDelta=0.13564805686473846
END: th(3024000.0000000005)=-1.704783596098423; dx=-3.986822285878378E-8 evalInputDelta=0.08579683303833008
Fitness changed from -1.618986763060093 to -1.7546348199248314
Iteration 6 complete. Error: -1.7546348199248314 Total: 22.3299; Orientation: 1.0256; Line Search: 17.0418
Adding measurement 3a9ec8de to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.032e+03, gradient 2.437e-04, dot -0.359; [b48d2b79-ed81-40c2-93d4-e45e1d0b0dc4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.7546348199248314, -0.8936583697795868, -0.6005302667617798, -0.6005300432443619
LBFGS Accumulation History: 3 points
Removed measurement 3a9ec8de to history. Total: 3
th(0)=-1.7546348199248314;dx=-5.938428659631836E-8
New Minimum: -1.7546348199248314 > -1.8569850623607635
END: th(6515010.502656418)=-1.8569850623607635; dx=-1.0455343546415292E-8 evalInputDelta=0.10235024243593216
Fitness changed from -1.7546348199248314 to -1.8569850623607635
Iteration 7 complete. Error: -1.8569850623607635 Total: 14.3110; Orientation: 1.0041; Line Search: 9.0876
Adding measurement 14396118 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.436e+03, gradient 1.727e-04, dot -0.525; [b48d2b79-ed81-40c2-93d4-e45e1d0b0dc4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8569850623607635, -0.8936583697795868, -0.6005302667617798, -0.6005300432443619
LBFGS Accumulation History: 3 points
Removed measurement 14396118 to history. Total: 3
th(0)=-1.8569850623607635;dx=-2.9832098914852497E-8
New Minimum: -1.8569850623607635 > -1.9473048821091652
WOLF (strong): th(1.4036164632845048E7)=-1.9473048821091652; dx=9.187329558925108E-10 evalInputDelta=0.09031981974840164
END: th(7018082.316422524)=-1.92952299118042; dx=-1.2002981264131861E-8 evalInputDelta=0.07253792881965637
Fitness changed from -1.8569850623607635 to -1.9473048821091652
Iteration 8 complete. Error: -1.9473048821091652 Total: 18.6569; Orientation: 1.0172; Line Search: 13.1104
Adding measurement 529b1b8c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.142e+03, gradient 2.301e-04, dot -0.278; [b48d2b79-ed81-40c2-93d4-e45e1d0b0dc4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.9473048821091652, -0.8936583697795868, -0.6005302667617798, -0.6005300432443619
LBFGS Accumulation History: 3 points
Removed measurement 529b1b8c to history. Total: 3
th(0)=-1.9473048821091652;dx=-5.295955812902542E-8
New Minimum: -1.9473048821091652 > -1.9665003344416618
WOLF (strong): th(1.5120000000000006E7)=-1.9665003344416618; dx=1.8645571077431986E-8 evalInputDelta=0.019195452332496643
New Minimum: -1.9665003344416618 > -2.018202841281891
WOLF (strong): th(7560000.000000003)=-2.018202841281891; dx=4.717418872673681E-9 evalInputDelta=0.07089795917272568
END: th(2520000.000000001)=-1.9967471212148666; dx=-2.6151954089250565E-8 evalInputDelta=0.04944223910570145
Fitness changed from -1.9473048821091652 to -2.018202841281891
Iteration 9 complete. Error: -2.018202841281891 Total: 24.3305; Orientation: 0.9982; Line Search: 18.8446
Adding measurement 3e74f2e0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.387e+03, gradient 1.683e-04, dot -0.392; [b48d2b79-ed81-40c2-93d4-e45e1d0b0dc4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.018202841281891, -0.8936583697795868, -0.6005302667617798, -0.6005300432443619
LBFGS Accumulation History: 3 points
Removed measurement 3e74f2e0 to history. Total: 3
th(0)=-2.018202841281891;dx=-2.8332965548560627E-8
New Minimum: -2.018202841281891 > -2.0697562023997307
END: th(5429175.418880349)=-2.0697562023997307; dx=-1.0167938582297824E-8 evalInputDelta=0.05155336111783981
Fitness changed from -2.018202841281891 to -2.0697562023997307
Iteration 10 complete. Error: -2.0697562023997307 Total: 14.1502; Orientation: 1.0052; Line Search: 8.9334
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/d4f631f7-9060-4685-8ba2-69dbaa2e45fc.jpg)
Final threshold in iteration 11: -2.0697562023997307 (> -Infinity) after 207.737s (< 5400.000s)
Returns
-2.0697562023997307