BasicOptimizer.scala:89 executed in 135.37 seconds (2.130 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: 116285974147600
Reset training subject: 116288907072300
Adding measurement 2dc066e3 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-20.683878701042964;dx=-1.4293011700971854E-6
New Minimum: -20.683878701042964 > -20.683880745258495
END: th(2.154434690031884)=-20.683880745258495; dx=-1.2168154467139173E-6 evalInputDelta=2.0442155310718135E-6
Fitness changed from -20.683878701042964 to -20.683880745258495
Iteration 1 complete. Error: -20.683880745258495 Total: 13.8153; Orientation: 0.0660; Line Search: 5.5990
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 6e3e5236 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-20.683880745258495;dx=-1.2153993754236397E-6
New Minimum: -20.683880745258495 > -20.68388790001127
WOLFE (weak): th(4.641588833612779)=-20.68388790001127; dx=-1.2148877849211345E-6 evalInputDelta=7.1547527760174034E-6
New Minimum: -20.68388790001127 > -20.683894032654532
WOLFE (weak): th(9.283177667225559)=-20.683894032654532; dx=-1.2144208036958432E-6 evalInputDelta=1.3287396036787413E-5
New Minimum: -20.683894032654532 > -20.683918563209406
WOLFE (weak): th(27.849533001676676)=-20.683918563209406; dx=-1.214015782891636E-6 evalInputDelta=3.78179509112897E-5
New Minimum: -20.683918563209406 > -20.684028950346313
WOLFE (weak): th(111.3981320067067)=-20.684028950346313; dx=-1.214001253481287E-6 evalInputDelta=1.482050878180985E-4
New Minimum: -20.684028950346313 > -20.68462482629178
WOLFE (weak): th(556.9906600335335)=-20.68462482629178; dx=-1.2136846569492598E-6 evalInputDelta=7.440810332859371E-4
New Minimum: -20.68462482629178 > -20.688339720595298
WOLFE (weak): th(3341.9439602012008)=-20.688339720595298; dx=-1.2124280549730932E-6 evalInputDelta=0.0044589753368029506
New Minimum: -20.688339720595298 > -20.715083622374276
WOLFE (weak): th(23393.607721408407)=-20.715083622374276; dx=-1.2125854837388582E-6 evalInputDelta=0.03120287711578129
New Minimum: -20.715083622374276 > -20.93254179991073
WOLFE (weak): th(187148.86177126726)=-20.93254179991073; dx=-1.2021838249515503E-6 evalInputDelta=0.24866105465223498
New Minimum: -20.93254179991073 > -22.79320801675947
END: th(1684339.7559414054)=-22.79320801675947; dx=-1.0477714100263866E-6 evalInputDelta=2.109327271500973
Fitness changed from -20.683880745258495 to -22.79320801675947
Iteration 2 complete. Error: -22.79320801675947 Total: 30.8130; Orientation: 0.0633; Line Search: 27.5621
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 7c863e34 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-22.79320801675947;dx=-1.0833546063859361E-6
New Minimum: -22.79320801675947 > -26.347609328505452
END: th(3628800.0000000005)=-26.347609328505452; dx=-7.188203606935642E-7 evalInputDelta=3.554401311745984
Fitness changed from -22.79320801675947 to -26.347609328505452
Iteration 3 complete. Error: -26.347609328505452 Total: 8.7891; Orientation: 0.0654; Line Search: 5.4834
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 589676a1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.500e+04, gradient 8.748e-04, dot -0.765; [eabd9db7-e81e-4cb6-a5bb-af1e008d832a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -26.347609328505452, -22.79320801675947, -20.683880745258495, -20.683878701042964
LBFGS Accumulation History: 3 points
Removed measurement 589676a1 to history. Total: 3
th(0)=-26.347609328505452;dx=-7.647263957809127E-7
New Minimum: -26.347609328505452 > -31.169146456279513
END: th(7818012.603187701)=-31.169146456279513; dx=-3.812651399049979E-7 evalInputDelta=4.821537127774061
Fitness changed from -26.347609328505452 to -31.169146456279513
Iteration 4 complete. Error: -31.169146456279513 Total: 10.0189; Orientation: 1.2334; Line Search: 5.6090
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 946d988 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.467e+04, gradient 7.776e-04, dot -0.530; [eabd9db7-e81e-4cb6-a5bb-af1e008d832a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -31.169146456279513, -22.79320801675947, -20.683880745258495, -20.683878701042964
LBFGS Accumulation History: 3 points
Removed measurement 946d988 to history. Total: 3
th(0)=-31.169146456279513;dx=-6.018205510540244E-7
New Minimum: -31.169146456279513 > -36.27788760647209
END: th(1.6843397559414055E7)=-36.27788760647209; dx=-1.2267344156095722E-7 evalInputDelta=5.108741150192579
Fitness changed from -31.169146456279513 to -36.27788760647209
Iteration 5 complete. Error: -36.27788760647209 Total: 9.7132; Orientation: 1.1851; Line Search: 5.3719
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 49033c83 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.517e+04, gradient 8.248e-04, dot -0.322; [eabd9db7-e81e-4cb6-a5bb-af1e008d832a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -36.27788760647209, -22.79320801675947, -20.683880745258495, -20.683878701042964
LBFGS Accumulation History: 3 points
Removed measurement 49033c83 to history. Total: 3
th(0)=-36.27788760647209;dx=-6.792564647049594E-7
New Minimum: -36.27788760647209 > -38.86863848326871
WOLF (strong): th(3.628800000000001E7)=-38.86863848326871; dx=6.317299407240264E-8 evalInputDelta=2.590750876796619
New Minimum: -38.86863848326871 > -40.29065917950241
WOLF (strong): th(1.8144000000000004E7)=-40.29065917950241; dx=3.8478284469230604E-8 evalInputDelta=4.012771573030321
END: th(6048000.000000001)=-39.51368618649748; dx=-2.8635479844944427E-7 evalInputDelta=3.2357985800253886
Fitness changed from -36.27788760647209 to -40.29065917950241
Iteration 6 complete. Error: -40.29065917950241 Total: 16.0618; Orientation: 1.2129; Line Search: 11.3770
Adding measurement 4222068a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.696e+04, gradient 8.331e-04, dot -0.255; [eabd9db7-e81e-4cb6-a5bb-af1e008d832a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -40.29065917950241, -22.79320801675947, -20.683880745258495, -20.683878701042964
LBFGS Accumulation History: 3 points
Removed measurement 4222068a to history. Total: 3
th(0)=-40.29065917950241;dx=-6.935747929897074E-7
New Minimum: -40.29065917950241 > -45.188651950763386
END: th(1.3030021005312836E7)=-45.188651950763386; dx=-1.954731194571239E-8 evalInputDelta=4.897992771260974
Fitness changed from -40.29065917950241 to -45.188651950763386
Iteration 7 complete. Error: -45.188651950763386 Total: 9.0914; Orientation: 1.1028; Line Search: 5.4001
Adding measurement 499cd8e2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.627e+04, gradient 6.922e-04, dot -0.363; [eabd9db7-e81e-4cb6-a5bb-af1e008d832a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -45.188651950763386, -22.79320801675947, -20.683880745258495, -20.683878701042964
LBFGS Accumulation History: 3 points
Removed measurement 499cd8e2 to history. Total: 3
th(0)=-45.188651950763386;dx=-4.774726599763727E-7
New Minimum: -45.188651950763386 > -46.86928235207943
WOLF (strong): th(2.8072329265690096E7)=-46.86928235207943; dx=1.0290385318876133E-7 evalInputDelta=1.6806304013160442
New Minimum: -46.86928235207943 > -48.24277898439549
WOLF (strong): th(1.4036164632845048E7)=-48.24277898439549; dx=1.1915548034566088E-8 evalInputDelta=3.0541270336321062
END: th(4678721.544281683)=-47.160473894531556; dx=-2.8762844728952673E-7 evalInputDelta=1.9718219437681697
Fitness changed from -45.188651950763386 to -48.24277898439549
Iteration 8 complete. Error: -48.24277898439549 Total: 15.5755; Orientation: 1.0894; Line Search: 11.8709
Adding measurement 999a91e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.044e+04, gradient 6.986e-04, dot -0.351; [eabd9db7-e81e-4cb6-a5bb-af1e008d832a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -48.24277898439549, -22.79320801675947, -20.683880745258495, -20.683878701042964
LBFGS Accumulation History: 3 points
Removed measurement 999a91e to history. Total: 3
th(0)=-48.24277898439549;dx=-4.877448541520017E-7
New Minimum: -48.24277898439549 > -51.01635725959248
END: th(1.0080000000000004E7)=-51.01635725959248; dx=-2.7871045439831886E-8 evalInputDelta=2.7735782751969893
Fitness changed from -48.24277898439549 to -51.01635725959248
Iteration 9 complete. Error: -51.01635725959248 Total: 9.4147; Orientation: 1.0790; Line Search: 5.4305
Adding measurement 42ba7653 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.726e+04, gradient 5.817e-04, dot -0.442; [eabd9db7-e81e-4cb6-a5bb-af1e008d832a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -51.01635725959248, -22.79320801675947, -20.683880745258495, -20.683878701042964
LBFGS Accumulation History: 3 points
Removed measurement 42ba7653 to history. Total: 3
th(0)=-51.01635725959248;dx=-3.378561227002156E-7
New Minimum: -51.01635725959248 > -52.62856499197723
WOLF (strong): th(2.1716701675521396E7)=-52.62856499197723; dx=5.1750635087933254E-8 evalInputDelta=1.6122077323847464
New Minimum: -52.62856499197723 > -53.04544385254645
END: th(1.0858350837760698E7)=-53.04544385254645; dx=-3.383074467187528E-8 evalInputDelta=2.0290865929539663
Fitness changed from -51.01635725959248 to -53.04544385254645
Iteration 10 complete. Error: -53.04544385254645 Total: 11.5480; Orientation: 1.0412; Line Search: 7.9615
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -53.04544385254645 (> -Infinity) after 135.367s (< 5400.000s)
Returns
-53.04544385254645