BasicOptimizer.scala:89 executed in 209.00 seconds (3.034 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: 11864119044625
Reset training subject: 11868696926750
Adding measurement 24865e40 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.3239949494600296;dx=-6.557703217420319E-7
New Minimum: -0.3239949494600296 > -0.323995441198349
END: th(2.154434690031884)=-0.323995441198349; dx=-5.804597604614486E-7 evalInputDelta=4.917383193969727E-7
Fitness changed from -0.3239949494600296 to -0.323995441198349
Iteration 1 complete. Error: -0.323995441198349 Total: 21.6496; Orientation: 0.0452; Line Search: 8.5308
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a1c1fc1f-21ef-43ad-bc44-f558e45b94ea.jpg)
Adding measurement 7d7fd10 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.323995441198349;dx=-5.804423065438377E-7
New Minimum: -0.323995441198349 > -0.3239968717098236
WOLFE (weak): th(4.641588833612779)=-0.3239968717098236; dx=-5.804329632315068E-7 evalInputDelta=1.430511474609375E-6
New Minimum: -0.3239968717098236 > -0.3239983469247818
WOLFE (weak): th(9.283177667225559)=-0.3239983469247818; dx=-5.804287472574006E-7 evalInputDelta=2.905726432800293E-6
New Minimum: -0.3239983469247818 > -0.32400356233119965
WOLFE (weak): th(27.849533001676676)=-0.32400356233119965; dx=-5.804278307739309E-7 evalInputDelta=8.121132850646973E-6
New Minimum: -0.32400356233119965 > -0.324027881026268
WOLFE (weak): th(111.3981320067067)=-0.324027881026268; dx=-5.803757506244541E-7 evalInputDelta=3.243982791900635E-5
New Minimum: -0.324027881026268 > -0.3241572231054306
WOLFE (weak): th(556.9906600335335)=-0.3241572231054306; dx=-5.803272025761747E-7 evalInputDelta=1.61781907081604E-4
New Minimum: -0.3241572231054306 > -0.3249650001525879
WOLFE (weak): th(3341.9439602012008)=-0.3249650001525879; dx=-5.798973708170734E-7 evalInputDelta=9.695589542388916E-4
New Minimum: -0.3249650001525879 > -0.3307606428861618
WOLFE (weak): th(23393.607721408407)=-0.3307606428861618; dx=-5.761501955758159E-7 evalInputDelta=0.006765201687812805
New Minimum: -0.3307606428861618 > -0.37678565084934235
WOLFE (weak): th(187148.86177126726)=-0.37678565084934235; dx=-5.475333342871829E-7 evalInputDelta=0.05279020965099335
New Minimum: -0.37678565084934235 > -0.6831521540880203
END: th(1684339.7559414054)=-0.6831521540880203; dx=-2.882661497116503E-7 evalInputDelta=0.3591567128896713
Fitness changed from -0.323995441198349 to -0.6831521540880203
Iteration 2 complete. Error: -0.6831521540880203 Total: 47.6935; Orientation: 0.0442; Line Search: 43.3359
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/b37af880-b022-4133-93d6-5879786cbe37.jpg)
Adding measurement 561b955a to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.6831521540880203;dx=-2.7659142454987277E-7
New Minimum: -0.6831521540880203 > -1.0221949070692062
END: th(3628800.0000000005)=-1.0221949070692062; dx=-1.213376761645789E-7 evalInputDelta=0.3390427529811859
Fitness changed from -0.6831521540880203 to -1.0221949070692062
Iteration 3 complete. Error: -1.0221949070692062 Total: 12.7981; Orientation: 0.0483; Line Search: 8.4578
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/e2269987-bea7-4c9e-9529-d9e9fdfabf43.jpg)
Adding measurement 63b69f8f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.926e+03, gradient 3.897e-04, dot -0.619; [eb27aec6-6b37-412a-a163-34573e45f7c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.0221949070692062, -0.6831521540880203, -0.323995441198349, -0.3239949494600296
LBFGS Accumulation History: 3 points
Removed measurement 63b69f8f to history. Total: 3
th(0)=-1.0221949070692062;dx=-1.5188373858536074E-7
New Minimum: -1.0221949070692062 > -1.3291501253843307
END: th(7818012.603187701)=-1.3291501253843307; dx=-3.606059769710493E-8 evalInputDelta=0.3069552183151245
Fitness changed from -1.0221949070692062 to -1.3291501253843307
Iteration 4 complete. Error: -1.3291501253843307 Total: 15.3860; Orientation: 1.0174; Line Search: 10.1199
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/06470934-0448-4d9c-84bd-e59791a0cda3.jpg)
Adding measurement 6d398981 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.649e+03, gradient 3.356e-04, dot -0.406; [eb27aec6-6b37-412a-a163-34573e45f7c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.3291501253843307, -0.6831521540880203, -0.323995441198349, -0.3239949494600296
LBFGS Accumulation History: 3 points
Removed measurement 6d398981 to history. Total: 3
th(0)=-1.3291501253843307;dx=-1.1261606999691396E-7
New Minimum: -1.3291501253843307 > -1.4874978810548782
WOLF (strong): th(1.6843397559414055E7)=-1.4874978810548782; dx=1.4963723554779914E-8 evalInputDelta=0.15834775567054749
New Minimum: -1.4874978810548782 > -1.5234372466802597
END: th(8421698.779707028)=-1.5234372466802597; dx=-3.296635467741734E-9 evalInputDelta=0.19428712129592896
Fitness changed from -1.3291501253843307 to -1.5234372466802597
Iteration 5 complete. Error: -1.5234372466802597 Total: 17.9507; Orientation: 1.0120; Line Search: 12.7276
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/54249c86-ade4-4bad-8d5c-0a9f4fd916b3.jpg)
Adding measurement 7dc081c7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.866e+03, gradient 2.961e-04, dot -0.349; [eb27aec6-6b37-412a-a163-34573e45f7c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5234372466802597, -0.6831521540880203, -0.323995441198349, -0.3239949494600296
LBFGS Accumulation History: 3 points
Removed measurement 7dc081c7 to history. Total: 3
th(0)=-1.5234372466802597;dx=-8.766220694104225E-8
New Minimum: -1.5234372466802597 > -1.5663092881441116
WOLF (strong): th(1.8144000000000004E7)=-1.5663092881441116; dx=2.8812089297950313E-8 evalInputDelta=0.04287204146385193
New Minimum: -1.5663092881441116 > -1.6718861013650894
WOLF (strong): th(9072000.000000002)=-1.6718861013650894; dx=7.931874973338435E-9 evalInputDelta=0.1484488546848297
END: th(3024000.0000000005)=-1.6220927089452744; dx=-4.424738680165786E-8 evalInputDelta=0.09865546226501465
Fitness changed from -1.5234372466802597 to -1.6718861013650894
Iteration 6 complete. Error: -1.6718861013650894 Total: 22.9420; Orientation: 1.0003; Line Search: 17.3969
Adding measurement 46195f6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.908e+03, gradient 2.585e-04, dot -0.334; [eb27aec6-6b37-412a-a163-34573e45f7c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.6718861013650894, -0.6831521540880203, -0.323995441198349, -0.3239949494600296
LBFGS Accumulation History: 3 points
Removed measurement 46195f6 to history. Total: 3
th(0)=-1.6718861013650894;dx=-6.68273209540397E-8
New Minimum: -1.6718861013650894 > -1.7828635722398758
END: th(6515010.502656418)=-1.7828635722398758; dx=-1.0041002365804E-8 evalInputDelta=0.11097747087478638
Fitness changed from -1.6718861013650894 to -1.7828635722398758
Iteration 7 complete. Error: -1.7828635722398758 Total: 13.5674; Orientation: 1.0095; Line Search: 8.5095
Adding measurement 645e8a46 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.296e+03, gradient 1.787e-04, dot -0.506; [eb27aec6-6b37-412a-a163-34573e45f7c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.7828635722398758, -0.6831521540880203, -0.323995441198349, -0.3239949494600296
LBFGS Accumulation History: 3 points
Removed measurement 645e8a46 to history. Total: 3
th(0)=-1.7828635722398758;dx=-3.193564786765003E-8
New Minimum: -1.7828635722398758 > -1.8728330731391907
WOLF (strong): th(1.4036164632845048E7)=-1.8728330731391907; dx=2.290269140524824E-9 evalInputDelta=0.08996950089931488
END: th(7018082.316422524)=-1.8584472388029099; dx=-1.1860968384357516E-8 evalInputDelta=0.07558366656303406
Fitness changed from -1.7828635722398758 to -1.8728330731391907
Iteration 8 complete. Error: -1.8728330731391907 Total: 18.7932; Orientation: 1.4194; Line Search: 13.1199
Adding measurement 1d2c5920 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.951e+03, gradient 2.360e-04, dot -0.265; [eb27aec6-6b37-412a-a163-34573e45f7c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8728330731391907, -0.6831521540880203, -0.323995441198349, -0.3239949494600296
LBFGS Accumulation History: 3 points
Removed measurement 1d2c5920 to history. Total: 3
th(0)=-1.8728330731391907;dx=-5.569649188855556E-8
New Minimum: -1.8728330731391907 > -1.894049495458603
WOLF (strong): th(1.5120000000000006E7)=-1.894049495458603; dx=2.0063241912382217E-8 evalInputDelta=0.02121642231941223
New Minimum: -1.894049495458603 > -1.9502647370100021
WOLF (strong): th(7560000.000000003)=-1.9502647370100021; dx=5.056642801371528E-9 evalInputDelta=0.07743166387081146
END: th(2520000.000000001)=-1.9259932190179825; dx=-2.9003105888201487E-8 evalInputDelta=0.05316014587879181
Fitness changed from -1.8728330731391907 to -1.9502647370100021
Iteration 9 complete. Error: -1.9502647370100021 Total: 24.1238; Orientation: 1.0156; Line Search: 18.5201
Adding measurement 405d54b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.207e+03, gradient 1.685e-04, dot -0.390; [eb27aec6-6b37-412a-a163-34573e45f7c0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.9502647370100021, -0.6831521540880203, -0.323995441198349, -0.3239949494600296
LBFGS Accumulation History: 3 points
Removed measurement 405d54b to history. Total: 3
th(0)=-1.9502647370100021;dx=-2.8399487316471495E-8
New Minimum: -1.9502647370100021 > -2.001598536968231
END: th(5429175.418880349)=-2.001598536968231; dx=-9.971898323943465E-9 evalInputDelta=0.051333799958229065
Fitness changed from -1.9502647370100021 to -2.001598536968231
Iteration 10 complete. Error: -2.001598536968231 Total: 14.0255; Orientation: 1.0205; Line Search: 8.8519
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/ee8a0b40-76f6-46b3-90d9-7f1e580e3680.jpg)
Final threshold in iteration 11: -2.001598536968231 (> -Infinity) after 208.998s (< 5400.000s)
Returns
-2.001598536968231