BasicOptimizer.scala:89 executed in 299.50 seconds (3.802 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: 579770947790000
Reset training subject: 579777056260100
Adding measurement 532ea15a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-39.638786746262255;dx=-2.1293569537931425E-6
New Minimum: -39.638786746262255 > -39.63878865164974
END: th(2.154434690031884)=-39.63878865164974; dx=-1.8536002019607494E-6 evalInputDelta=1.9053874851238106E-6
Fitness changed from -39.638786746262255 to -39.63878865164974
Iteration 1 complete. Error: -39.63878865164974 Total: 30.2557; Orientation: 0.1450; Line Search: 12.0660
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/cf769b6d-a174-4a62-8b4b-008e720627d8.jpg)
Adding measurement 2a87fdcb to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-39.63878865164974;dx=-1.852679664149539E-6
New Minimum: -39.63878865164974 > -39.638800083972754
WOLFE (weak): th(4.641588833612779)=-39.638800083972754; dx=-1.8508528464216464E-6 evalInputDelta=1.143232301359376E-5
New Minimum: -39.638800083972754 > -39.63881151629247
WOLFE (weak): th(9.283177667225559)=-39.63881151629247; dx=-1.8509122404256824E-6 evalInputDelta=2.2864642730269225E-5
New Minimum: -39.63881151629247 > -39.63884771861648
WOLFE (weak): th(27.849533001676676)=-39.63884771861648; dx=-1.849712092963464E-6 evalInputDelta=5.9066966741738725E-5
New Minimum: -39.63884771861648 > -39.63901729748351
WOLFE (weak): th(111.3981320067067)=-39.63901729748351; dx=-1.8490326848935323E-6 evalInputDelta=2.286458337721342E-4
New Minimum: -39.63901729748351 > -39.639918530300456
WOLFE (weak): th(556.9906600335335)=-39.639918530300456; dx=-1.8488737650530901E-6 evalInputDelta=0.0011298786507154546
New Minimum: -39.639918530300456 > -39.645556010167894
WOLFE (weak): th(3341.9439602012008)=-39.645556010167894; dx=-1.8481533594866332E-6 evalInputDelta=0.006767358518153799
New Minimum: -39.645556010167894 > -39.68611689648629
WOLFE (weak): th(23393.607721408407)=-39.68611689648629; dx=-1.8454450541749798E-6 evalInputDelta=0.047328244836549516
New Minimum: -39.68611689648629 > -40.015250854635354
WOLFE (weak): th(187148.86177126726)=-40.015250854635354; dx=-1.8241969141559782E-6 evalInputDelta=0.37646220298561417
New Minimum: -40.015250854635354 > -42.807301992684756
END: th(1684339.7559414054)=-42.807301992684756; dx=-1.5741812547489767E-6 evalInputDelta=3.168513341035016
Fitness changed from -39.63878865164974 to -42.807301992684756
Iteration 2 complete. Error: -42.807301992684756 Total: 68.5914; Orientation: 0.1427; Line Search: 61.3937
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/875b9cb3-869c-4f74-9d59-770ddb7209f2.jpg)
Adding measurement 75e9c720 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-42.807301992684756;dx=-1.5063548676985006E-6
New Minimum: -42.807301992684756 > -47.70570122111269
END: th(3628800.0000000005)=-47.70570122111269; dx=-9.938041199914122E-7 evalInputDelta=4.898399228427934
Fitness changed from -42.807301992684756 to -47.70570122111269
Iteration 3 complete. Error: -47.70570122111269 Total: 19.3703; Orientation: 0.1355; Line Search: 12.3646
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/f62d366d-5302-429c-b153-7775be42f8bf.jpg)
Adding measurement 5b1a83c2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.061e+04, gradient 9.789e-04, dot -0.804; [eb5225b7-9001-427e-875b-e08db102c43f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -47.70570122111269, -42.807301992684756, -39.63878865164974, -39.638786746262255
LBFGS Accumulation History: 3 points
Removed measurement 5b1a83c2 to history. Total: 3
th(0)=-47.70570122111269;dx=-9.573792999942133E-7
New Minimum: -47.70570122111269 > -53.81141933572204
END: th(7818012.603187701)=-53.81141933572204; dx=-5.047654100498357E-7 evalInputDelta=6.105718114609353
Fitness changed from -47.70570122111269 to -53.81141933572204
Iteration 4 complete. Error: -53.81141933572204 Total: 22.1144; Orientation: 2.5270; Line Search: 12.0382
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/5a2ba4fe-ef8e-4622-a3d6-cd39c1ab3b26.jpg)
Adding measurement 69a4d330 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.513e+03, gradient 8.525e-04, dot -0.586; [eb5225b7-9001-427e-875b-e08db102c43f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -53.81141933572204, -42.807301992684756, -39.63878865164974, -39.638786746262255
LBFGS Accumulation History: 3 points
Removed measurement 69a4d330 to history. Total: 3
th(0)=-53.81141933572204;dx=-7.262945055387894E-7
New Minimum: -53.81141933572204 > -59.857033108188794
END: th(1.6843397559414055E7)=-59.857033108188794; dx=-1.2663462452657292E-7 evalInputDelta=6.045613772466751
Fitness changed from -53.81141933572204 to -59.857033108188794
Iteration 5 complete. Error: -59.857033108188794 Total: 22.1008; Orientation: 2.5570; Line Search: 12.3111
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/610567e2-47e6-4f47-8f4b-932dde184e82.jpg)
Adding measurement 53c0cbd3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.115e+04, gradient 1.026e-03, dot -0.317; [eb5225b7-9001-427e-875b-e08db102c43f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.857033108188794, -42.807301992684756, -39.63878865164974, -39.638786746262255
LBFGS Accumulation History: 3 points
Removed measurement 53c0cbd3 to history. Total: 3
th(0)=-59.857033108188794;dx=-1.0516527434864983E-6
Armijo: th(3.628800000000001E7)=-56.63877442161108; dx=2.59162198779346E-7 evalInputDelta=-3.2182586865777125
New Minimum: -59.857033108188794 > -63.011871418400126
WOLF (strong): th(1.8144000000000004E7)=-63.011871418400126; dx=3.004773685970287E-7 evalInputDelta=3.154838310211332
New Minimum: -63.011871418400126 > -64.56327601092424
END: th(6048000.000000001)=-64.56327601092424; dx=-3.4181938686038576E-7 evalInputDelta=4.706242902735447
Fitness changed from -59.857033108188794 to -64.56327601092424
Iteration 6 complete. Error: -64.56327601092424 Total: 34.4908; Orientation: 2.4163; Line Search: 24.7472
Adding measurement 20d12dae to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.922e+04, gradient 7.202e-04, dot -0.595; [eb5225b7-9001-427e-875b-e08db102c43f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -64.56327601092424, -42.807301992684756, -39.63878865164974, -39.638786746262255
LBFGS Accumulation History: 3 points
Removed measurement 20d12dae to history. Total: 3
th(0)=-64.56327601092424;dx=-5.172225281027037E-7
New Minimum: -64.56327601092424 > -68.7536529288767
END: th(1.3030021005312836E7)=-68.7536529288767; dx=-1.4356688385416388E-7 evalInputDelta=4.190376917952463
Fitness changed from -64.56327601092424 to -68.7536529288767
Iteration 7 complete. Error: -68.7536529288767 Total: 20.7385; Orientation: 2.4357; Line Search: 12.1581
Adding measurement 3a926b4d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.470e+04, gradient 8.374e-04, dot -0.474; [eb5225b7-9001-427e-875b-e08db102c43f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -68.7536529288767, -42.807301992684756, -39.63878865164974, -39.638786746262255
LBFGS Accumulation History: 3 points
Removed measurement 3a926b4d to history. Total: 3
th(0)=-68.7536529288767;dx=-7.006084087632092E-7
New Minimum: -68.7536529288767 > -68.93862991519737
WOLF (strong): th(2.8072329265690096E7)=-68.93862991519737; dx=1.8350385078451039E-7 evalInputDelta=0.18497698632066317
New Minimum: -68.93862991519737 > -71.7494564477478
WOLF (strong): th(1.4036164632845048E7)=-71.7494564477478; dx=1.0803002296962696E-7 evalInputDelta=2.9958035188710994
END: th(4678721.544281683)=-71.38629858656843; dx=-3.214707338213821E-7 evalInputDelta=2.632645657691725
Fitness changed from -68.7536529288767 to -71.7494564477478
Iteration 8 complete. Error: -71.7494564477478 Total: 33.7790; Orientation: 2.5765; Line Search: 25.1039
Adding measurement 2834eca2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.572e+04, gradient 9.624e-04, dot -0.352; [eb5225b7-9001-427e-875b-e08db102c43f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -71.7494564477478, -42.807301992684756, -39.63878865164974, -39.638786746262255
LBFGS Accumulation History: 3 points
Removed measurement 2834eca2 to history. Total: 3
th(0)=-71.7494564477478;dx=-9.242327328506891E-7
New Minimum: -71.7494564477478 > -76.71016561390428
WOLF (strong): th(1.0080000000000004E7)=-76.71016561390428; dx=5.440495264764708E-8 evalInputDelta=4.960709166156477
END: th(5040000.000000002)=-75.6918417428763; dx=-4.713681904669913E-7 evalInputDelta=3.9423852951285028
Fitness changed from -71.7494564477478 to -76.71016561390428
Iteration 9 complete. Error: -76.71016561390428 Total: 26.3458; Orientation: 2.4572; Line Search: 18.1693
Adding measurement 5e34d931 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.714e+04, gradient 7.500e-04, dot -0.507; [eb5225b7-9001-427e-875b-e08db102c43f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -76.71016561390428, -42.807301992684756, -39.63878865164974, -39.638786746262255
LBFGS Accumulation History: 3 points
Removed measurement 5e34d931 to history. Total: 3
th(0)=-76.71016561390428;dx=-5.621130689820086E-7
New Minimum: -76.71016561390428 > -79.82687243799917
END: th(1.0858350837760698E7)=-79.82687243799917; dx=-1.4486036885396566E-8 evalInputDelta=3.1167068240948907
Fitness changed from -76.71016561390428 to -79.82687243799917
Iteration 10 complete. Error: -79.82687243799917 Total: 20.4753; Orientation: 2.4311; Line Search: 11.9652
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/1ec7cf18-300c-40c4-9252-ea65f759e448.jpg)
Final threshold in iteration 11: -79.82687243799917 (> -Infinity) after 299.503s (< 5400.000s)
Returns
-79.82687243799917