BasicOptimizer.scala:89 executed in 593.79 seconds (4.367 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: 4310237323709
Reset training subject: 4322746744055
Adding measurement 1823d08a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-29.41495330631733;dx=-1.9511896579457145E-6
New Minimum: -29.41495330631733 > -29.414956018328667
END: th(2.154434690031884)=-29.414956018328667; dx=-1.3953405568489339E-6 evalInputDelta=2.7120113372802734E-6
Fitness changed from -29.41495330631733 to -29.414956018328667
Iteration 1 complete. Error: -29.414956018328667 Total: 63.9837; Orientation: 0.0735; Line Search: 25.1922
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/96b61c0d-643d-4b52-8c60-ea3769176042.jpg)
Adding measurement 2cb9fdf8 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-29.414956018328667;dx=-1.3906397547093768E-6
New Minimum: -29.414956018328667 > -29.41496315598488
WOLFE (weak): th(4.641588833612779)=-29.41496315598488; dx=-1.3893054559210987E-6 evalInputDelta=7.137656211853027E-6
New Minimum: -29.41496315598488 > -29.41497102379799
WOLFE (weak): th(9.283177667225559)=-29.41497102379799; dx=-1.3883466752779652E-6 evalInputDelta=1.500546932220459E-5
New Minimum: -29.41497102379799 > -29.415001913905144
WOLFE (weak): th(27.849533001676676)=-29.415001913905144; dx=-1.3865309869120062E-6 evalInputDelta=4.589557647705078E-5
New Minimum: -29.415001913905144 > -29.415133148431778
WOLFE (weak): th(111.3981320067067)=-29.415133148431778; dx=-1.3854186715934738E-6 evalInputDelta=1.771301031112671E-4
New Minimum: -29.415133148431778 > -29.41583725810051
WOLFE (weak): th(556.9906600335335)=-29.41583725810051; dx=-1.3852751412073465E-6 evalInputDelta=8.812397718429565E-4
New Minimum: -29.41583725810051 > -29.420238375663757
WOLFE (weak): th(3341.9439602012008)=-29.420238375663757; dx=-1.384718721761268E-6 evalInputDelta=0.005282357335090637
New Minimum: -29.420238375663757 > -29.451849445700645
WOLFE (weak): th(23393.607721408407)=-29.451849445700645; dx=-1.3787062565833582E-6 evalInputDelta=0.03689342737197876
New Minimum: -29.451849445700645 > -29.70398224890232
WOLFE (weak): th(187148.86177126726)=-29.70398224890232; dx=-1.317238025425869E-6 evalInputDelta=0.2890262305736542
New Minimum: -29.70398224890232 > -31.35458092391491
END: th(1684339.7559414054)=-31.35458092391491; dx=-6.513427090870551E-7 evalInputDelta=1.9396249055862427
Fitness changed from -29.414956018328667 to -31.35458092391491
Iteration 2 complete. Error: -31.35458092391491 Total: 138.5200; Orientation: 0.0738; Line Search: 125.0637
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/efa5a03c-a912-40f5-9553-526f62738a94.jpg)
Adding measurement 2f884847 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-31.35458092391491;dx=-1.0105407659086655E-6
New Minimum: -31.35458092391491 > -33.58071210980415
END: th(3628800.0000000005)=-33.58071210980415; dx=-3.2117903884530106E-7 evalInputDelta=2.226131185889244
Fitness changed from -31.35458092391491 to -33.58071210980415
Iteration 3 complete. Error: -33.58071210980415 Total: 37.8352; Orientation: 0.0744; Line Search: 25.4272
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/7d2e1750-c408-4f7a-ac77-69ead41eb69c.jpg)
Adding measurement 6128bb1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.731e+03, gradient 8.725e-04, dot -0.521; [bb8f6f0f-6216-483b-80d4-219a8d9c21ae = 1.000/1.000e+00]
Orientation rejected. Popping history element from -33.58071210980415, -31.35458092391491, -29.414956018328667, -29.41495330631733
LBFGS Accumulation History: 3 points
Removed measurement 6128bb1 to history. Total: 3
th(0)=-33.58071210980415;dx=-7.610930170812221E-7
New Minimum: -33.58071210980415 > -35.90743386745453
END: th(7818012.603187701)=-35.90743386745453; dx=-9.259328501348441E-8 evalInputDelta=2.3267217576503754
Fitness changed from -33.58071210980415 to -35.90743386745453
Iteration 4 complete. Error: -35.90743386745453 Total: 40.3860; Orientation: 1.5587; Line Search: 24.9765
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/81cb264b-00ab-4d58-98a2-3b067c0a6286.jpg)
Adding measurement 6b07ce2f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.012e+03, gradient 8.658e-04, dot -0.290; [bb8f6f0f-6216-483b-80d4-219a8d9c21ae = 1.000/1.000e+00]
Orientation rejected. Popping history element from -35.90743386745453, -31.35458092391491, -29.414956018328667, -29.41495330631733
LBFGS Accumulation History: 3 points
Removed measurement 6b07ce2f to history. Total: 3
th(0)=-35.90743386745453;dx=-7.494847461083057E-7
New Minimum: -35.90743386745453 > -37.48943829536438
WOLF (strong): th(1.6843397559414055E7)=-37.48943829536438; dx=4.6924451021290886E-8 evalInputDelta=1.582004427909851
New Minimum: -37.48943829536438 > -38.04502359032631
WOLF (strong): th(8421698.779707028)=-38.04502359032631; dx=3.4324904151069366E-8 evalInputDelta=2.1375897228717804
END: th(2807232.926569009)=-37.560801684856415; dx=-2.906199936977692E-7 evalInputDelta=1.653367817401886
Fitness changed from -35.90743386745453 to -38.04502359032631
Iteration 5 complete. Error: -38.04502359032631 Total: 64.0858; Orientation: 1.5778; Line Search: 49.7513
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/1e9e5285-200c-44b6-91c5-38d3296b16bd.jpg)
Adding measurement 5509b341 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.023e+03, gradient 7.946e-04, dot -0.284; [bb8f6f0f-6216-483b-80d4-219a8d9c21ae = 1.000/1.000e+00]
Orientation rejected. Popping history element from -38.04502359032631, -31.35458092391491, -29.414956018328667, -29.41495330631733
LBFGS Accumulation History: 3 points
Removed measurement 5509b341 to history. Total: 3
th(0)=-38.04502359032631;dx=-6.312304455713734E-7
New Minimum: -38.04502359032631 > -40.17907676100731
END: th(6048000.000000001)=-40.17907676100731; dx=-5.441103565242001E-8 evalInputDelta=2.1340531706809998
Fitness changed from -38.04502359032631 to -40.17907676100731
Iteration 6 complete. Error: -40.17907676100731 Total: 40.0394; Orientation: 1.5465; Line Search: 24.9633
Adding measurement 3504cdcb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.519e+03, gradient 5.628e-04, dot -0.454; [bb8f6f0f-6216-483b-80d4-219a8d9c21ae = 1.000/1.000e+00]
Orientation rejected. Popping history element from -40.17907676100731, -31.35458092391491, -29.414956018328667, -29.41495330631733
LBFGS Accumulation History: 3 points
Removed measurement 3504cdcb to history. Total: 3
th(0)=-40.17907676100731;dx=-3.167434772924023E-7
New Minimum: -40.17907676100731 > -41.60152164101601
WOLF (strong): th(1.3030021005312836E7)=-41.60152164101601; dx=3.173680239484691E-8 evalInputDelta=1.4224448800086975
END: th(6515010.502656418)=-41.54012283682823; dx=-6.961760582221692E-8 evalInputDelta=1.3610460758209229
Fitness changed from -40.17907676100731 to -41.60152164101601
Iteration 7 complete. Error: -41.60152164101601 Total: 52.4790; Orientation: 1.5503; Line Search: 38.6159
Adding measurement 30c76138 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.574e+03, gradient 6.511e-04, dot -0.306; [bb8f6f0f-6216-483b-80d4-219a8d9c21ae = 1.000/1.000e+00]
Orientation rejected. Popping history element from -41.60152164101601, -31.35458092391491, -29.414956018328667, -29.41495330631733
LBFGS Accumulation History: 3 points
Removed measurement 30c76138 to history. Total: 3
th(0)=-41.60152164101601;dx=-4.2383166701105184E-7
New Minimum: -41.60152164101601 > -42.804760962724686
WOLF (strong): th(1.4036164632845048E7)=-42.804760962724686; dx=1.1930953700213838E-7 evalInputDelta=1.2032393217086792
New Minimum: -42.804760962724686 > -43.29904192686081
END: th(7018082.316422524)=-43.29904192686081; dx=-3.7006231604258394E-8 evalInputDelta=1.6975202858448029
Fitness changed from -41.60152164101601 to -43.29904192686081
Iteration 8 complete. Error: -43.29904192686081 Total: 51.7459; Orientation: 1.5570; Line Search: 37.7589
Adding measurement 331b07af to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.064e+04, gradient 4.252e-04, dot -0.507; [bb8f6f0f-6216-483b-80d4-219a8d9c21ae = 1.000/1.000e+00]
Orientation rejected. Popping history element from -43.29904192686081, -31.35458092391491, -29.414956018328667, -29.41495330631733
LBFGS Accumulation History: 3 points
Removed measurement 331b07af to history. Total: 3
th(0)=-43.29904192686081;dx=-1.8079332366644627E-7
New Minimum: -43.29904192686081 > -44.4112149477005
WOLF (strong): th(1.5120000000000006E7)=-44.4112149477005; dx=1.683029527975399E-8 evalInputDelta=1.1121730208396912
END: th(7560000.000000003)=-44.29772683978081; dx=-5.545370443035059E-8 evalInputDelta=0.9986849129199982
Fitness changed from -43.29904192686081 to -44.4112149477005
Iteration 9 complete. Error: -44.4112149477005 Total: 51.3081; Orientation: 1.5817; Line Search: 37.3223
Adding measurement 3a7eb9be to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.024e+04, gradient 5.145e-04, dot -0.344; [bb8f6f0f-6216-483b-80d4-219a8d9c21ae = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.4112149477005, -31.35458092391491, -29.414956018328667, -29.41495330631733
LBFGS Accumulation History: 3 points
Removed measurement 3a7eb9be to history. Total: 3
th(0)=-44.4112149477005;dx=-2.646279446601256E-7
New Minimum: -44.4112149477005 > -45.03547382354736
WOLF (strong): th(1.6287526256641047E7)=-45.03547382354736; dx=9.401451972572506E-8 evalInputDelta=0.6242588758468628
New Minimum: -45.03547382354736 > -45.581123888492584
END: th(8143763.128320524)=-45.581123888492584; dx=-8.174295981001183E-9 evalInputDelta=1.1699089407920837
Fitness changed from -44.4112149477005 to -45.581123888492584
Iteration 10 complete. Error: -45.581123888492584 Total: 52.7019; Orientation: 1.5503; Line Search: 38.5237
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/94908bb1-f700-4858-b2ea-b93dc43bdf2a.jpg)
Final threshold in iteration 11: -45.581123888492584 (> -Infinity) after 593.785s (< 5400.000s)
Returns
-45.581123888492584