BasicOptimizer.scala:89 executed in 127.55 seconds (1.409 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: 28400742464300
Reset training subject: 28403465392700
Adding measurement 5ed5b321 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-75.71930549209635;dx=-4.897253430192168E-6
New Minimum: -75.71930549209635 > -75.71931227086257
END: th(2.154434690031884)=-75.71931227086257; dx=-3.850080212798825E-6 evalInputDelta=6.778766220350008E-6
Fitness changed from -75.71930549209635 to -75.71931227086257
Iteration 1 complete. Error: -75.71931227086257 Total: 13.8063; Orientation: 0.1577; Line Search: 5.7757
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a9bfb8ba-b217-4328-a947-a338a1522b56.jpg)
Adding measurement 23e61112 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-75.71931227086257;dx=-3.815063093232456E-6
New Minimum: -75.71931227086257 > -75.71933486674556
WOLFE (weak): th(4.641588833612779)=-75.71933486674556; dx=-3.815684176635929E-6 evalInputDelta=2.2595882981590876E-5
New Minimum: -75.71933486674556 > -75.71935746262179
WOLFE (weak): th(9.283177667225559)=-75.71935746262179; dx=-3.816146528293754E-6 evalInputDelta=4.519175921302576E-5
New Minimum: -75.71935746262179 > -75.71943428855054
WOLFE (weak): th(27.849533001676676)=-75.71943428855054; dx=-3.815679665310147E-6 evalInputDelta=1.2201768797126533E-4
New Minimum: -75.71943428855054 > -75.71980260000879
WOLFE (weak): th(111.3981320067067)=-75.71980260000879; dx=-3.81492551664935E-6 evalInputDelta=4.9032914621705E-4
New Minimum: -75.71980260000879 > -75.72175710629614
WOLFE (weak): th(556.9906600335335)=-75.72175710629614; dx=-3.81347456652147E-6 evalInputDelta=0.0024448354335646627
New Minimum: -75.72175710629614 > -75.73396880384972
WOLFE (weak): th(3341.9439602012008)=-75.73396880384972; dx=-3.811372773249567E-6 evalInputDelta=0.01465653298714642
New Minimum: -75.73396880384972 > -75.82166121337892
WOLFE (weak): th(23393.607721408407)=-75.82166121337892; dx=-3.7888726532957907E-6 evalInputDelta=0.1023489425163433
New Minimum: -75.82166121337892 > -76.50716765668422
WOLFE (weak): th(187148.86177126726)=-76.50716765668422; dx=-3.502170413535812E-6 evalInputDelta=0.7878553858216435
New Minimum: -76.50716765668422 > -81.02246546658907
END: th(1684339.7559414054)=-81.02246546658907; dx=-1.8235182922173896E-6 evalInputDelta=5.303153195726495
Fitness changed from -75.71931227086257 to -81.02246546658907
Iteration 2 complete. Error: -81.02246546658907 Total: 28.8667; Orientation: 0.0408; Line Search: 25.8035
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/3cb7bc5a-42e9-4774-9123-8afadd4817c3.jpg)
Adding measurement 299786b1 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-81.02246546658907;dx=-1.8440888629190522E-6
New Minimum: -81.02246546658907 > -87.01740383769567
END: th(3628800.0000000005)=-87.01740383769567; dx=-1.1446885021791248E-6 evalInputDelta=5.994938371106599
Fitness changed from -81.02246546658907 to -87.01740383769567
Iteration 3 complete. Error: -87.01740383769567 Total: 8.2544; Orientation: 0.0450; Line Search: 5.2218
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/38ad4de9-c08f-4329-b9db-8bde11144f4b.jpg)
Adding measurement 6f2864c3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.796e+03, gradient 1.184e-03, dot -0.723; [72e03055-23e4-4c1b-8867-9f7c704ceb3e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -87.01740383769567, -81.02246546658907, -75.71931227086257, -75.71930549209635
LBFGS Accumulation History: 3 points
Removed measurement 6f2864c3 to history. Total: 3
th(0)=-87.01740383769567;dx=-1.4020037852757943E-6
New Minimum: -87.01740383769567 > -94.25929529542452
END: th(7818012.603187701)=-94.25929529542452; dx=-4.5146759379648383E-7 evalInputDelta=7.241891457728855
Fitness changed from -87.01740383769567 to -94.25929529542452
Iteration 4 complete. Error: -94.25929529542452 Total: 9.1495; Orientation: 1.1184; Line Search: 5.1787
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/deb150c3-a762-4d57-b54e-da585704aeb6.jpg)
Adding measurement 6db04a6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.058e+04, gradient 1.436e-03, dot -0.398; [72e03055-23e4-4c1b-8867-9f7c704ceb3e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -94.25929529542452, -81.02246546658907, -75.71931227086257, -75.71930549209635
LBFGS Accumulation History: 3 points
Removed measurement 6db04a6 to history. Total: 3
th(0)=-94.25929529542452;dx=-2.061789801365953E-6
Armijo: th(1.6843397559414055E7)=-87.83184649318818; dx=7.411672386217632E-7 evalInputDelta=-6.427448802236341
New Minimum: -94.25929529542452 > -95.77754204438374
WOLF (strong): th(8421698.779707028)=-95.77754204438374; dx=7.781767482829945E-7 evalInputDelta=1.5182467489592142
New Minimum: -95.77754204438374 > -98.37459312365594
END: th(2807232.926569009)=-98.37459312365594; dx=-4.885425524342506E-7 evalInputDelta=4.115297828231419
Fitness changed from -94.25929529542452 to -98.37459312365594
Iteration 5 complete. Error: -98.37459312365594 Total: 14.0146; Orientation: 1.0350; Line Search: 10.1263
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/5aa5eff0-faef-4411-b8ef-213560613568.jpg)
Adding measurement 5c28009f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.936e+04, gradient 1.015e-03, dot -0.692; [72e03055-23e4-4c1b-8867-9f7c704ceb3e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -98.37459312365594, -81.02246546658907, -75.71931227086257, -75.71930549209635
LBFGS Accumulation History: 3 points
Removed measurement 5c28009f to history. Total: 3
th(0)=-98.37459312365594;dx=-1.0289924989477739E-6
New Minimum: -98.37459312365594 > -102.4786381474091
END: th(6048000.000000001)=-102.4786381474091; dx=-2.834572699770686E-7 evalInputDelta=4.104045023753159
Fitness changed from -98.37459312365594 to -102.4786381474091
Iteration 6 complete. Error: -102.4786381474091 Total: 8.9776; Orientation: 1.0273; Line Search: 5.0520
Adding measurement 4645a575 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.124e+04, gradient 1.261e-03, dot -0.498; [72e03055-23e4-4c1b-8867-9f7c704ceb3e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -102.4786381474091, -81.02246546658907, -75.71931227086257, -75.71930549209635
LBFGS Accumulation History: 3 points
Removed measurement 4645a575 to history. Total: 3
th(0)=-102.4786381474091;dx=-1.5887164689262476E-6
Armijo: th(1.3030021005312836E7)=-99.4819138462569; dx=7.138523265303368E-7 evalInputDelta=-2.9967243011521987
New Minimum: -102.4786381474091 > -104.74222493876167
WOLF (strong): th(6515010.502656418)=-104.74222493876167; dx=5.118632494577165E-7 evalInputDelta=2.263586791352566
New Minimum: -104.74222493876167 > -105.23961521287228
END: th(2171670.167552139)=-105.23961521287228; dx=-6.181029373089879E-7 evalInputDelta=2.7609770654631802
Fitness changed from -102.4786381474091 to -105.23961521287228
Iteration 7 complete. Error: -105.23961521287228 Total: 13.6214; Orientation: 1.0617; Line Search: 10.1176
Adding measurement 7acbd3d0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.884e+04, gradient 8.531e-04, dot -0.803; [72e03055-23e4-4c1b-8867-9f7c704ceb3e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -105.23961521287228, -81.02246546658907, -75.71931227086257, -75.71930549209635
LBFGS Accumulation History: 3 points
Removed measurement 7acbd3d0 to history. Total: 3
th(0)=-105.23961521287228;dx=-7.269179276812098E-7
New Minimum: -105.23961521287228 > -108.53727788156426
END: th(4678721.544281682)=-108.53727788156426; dx=-5.454718276177312E-7 evalInputDelta=3.2976626686919843
Fitness changed from -105.23961521287228 to -108.53727788156426
Iteration 8 complete. Error: -108.53727788156426 Total: 8.4823; Orientation: 1.0199; Line Search: 5.0226
Adding measurement 2d2afbdf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.286e+04, gradient 8.721e-04, dot -0.759; [72e03055-23e4-4c1b-8867-9f7c704ceb3e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -108.53727788156426, -81.02246546658907, -75.71931227086257, -75.71930549209635
LBFGS Accumulation History: 3 points
Removed measurement 2d2afbdf to history. Total: 3
th(0)=-108.53727788156426;dx=-7.597537174547966E-7
New Minimum: -108.53727788156426 > -113.29402709229198
END: th(1.0080000000000002E7)=-113.29402709229198; dx=-2.2415380713749857E-7 evalInputDelta=4.756749210727719
Fitness changed from -108.53727788156426 to -113.29402709229198
Iteration 9 complete. Error: -113.29402709229198 Total: 8.4687; Orientation: 1.0170; Line Search: 4.8486
Adding measurement 1c4335c8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.181e+04, gradient 1.255e-03, dot -0.435; [72e03055-23e4-4c1b-8867-9f7c704ceb3e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -113.29402709229198, -81.02246546658907, -75.71931227086257, -75.71930549209635
LBFGS Accumulation History: 3 points
Removed measurement 1c4335c8 to history. Total: 3
th(0)=-113.29402709229198;dx=-1.5747187414168408E-6
Armijo: th(2.1716701675521392E7)=-100.67223160880685; dx=8.200347912090764E-7 evalInputDelta=-12.62179548348513
Armijo: th(1.0858350837760696E7)=-112.08627677758477; dx=8.863478822853695E-7 evalInputDelta=-1.2077503147072122
New Minimum: -113.29402709229198 > -117.00796542958012
END: th(3619450.2792535652)=-117.00796542958012; dx=-1.8191368378893304E-7 evalInputDelta=3.713938337288141
Fitness changed from -113.29402709229198 to -117.00796542958012
Iteration 10 complete. Error: -117.00796542958012 Total: 13.4764; Orientation: 1.0154; Line Search: 9.8445
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/5453912c-f6e8-4fce-adbe-79270f06ff0b.jpg)
Final threshold in iteration 11: -117.00796542958012 (> -Infinity) after 127.539s (< 5400.000s)
Returns
-117.00796542958012