BasicOptimizer.scala:89 executed in 298.55 seconds (4.194 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: 577905019189600
Reset training subject: 577910949333400
Adding measurement 398bde6a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-44.087746959562345;dx=-2.0996176373471807E-6
New Minimum: -44.087746959562345 > -44.08774867267435
END: th(2.154434690031884)=-44.08774867267435; dx=-1.871216851299585E-6 evalInputDelta=1.71311200602986E-6
Fitness changed from -44.087746959562345 to -44.08774867267435
Iteration 1 complete. Error: -44.08774867267435 Total: 30.4372; Orientation: 0.1468; Line Search: 12.4327
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/98f9e089-bba0-4cfc-9e6b-d8c25ff17ca6.jpg)
Adding measurement 511858a4 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-44.08774867267435;dx=-1.8698108911552106E-6
New Minimum: -44.08774867267435 > -44.08776237756802
WOLFE (weak): th(4.641588833612779)=-44.08776237756802; dx=-1.8688948878287732E-6 evalInputDelta=1.3704893667920715E-5
New Minimum: -44.08776237756802 > -44.08777265623547
WOLFE (weak): th(9.283177667225559)=-44.08777265623547; dx=-1.8682180459725902E-6 evalInputDelta=2.398356112109923E-5
New Minimum: -44.08777265623547 > -44.08780863155268
WOLFE (weak): th(27.849533001676676)=-44.08780863155268; dx=-1.8671642207152803E-6 evalInputDelta=5.995887833165625E-5
New Minimum: -44.08780863155268 > -44.08797822908128
WOLFE (weak): th(111.3981320067067)=-44.08797822908128; dx=-1.8671544898754353E-6 evalInputDelta=2.2955640692856605E-4
New Minimum: -44.08797822908128 > -44.08889130355429
WOLFE (weak): th(556.9906600335335)=-44.08889130355429; dx=-1.8671752993436103E-6 evalInputDelta=0.001142630879940043
New Minimum: -44.08889130355429 > -44.094585172510136
WOLFE (weak): th(3341.9439602012008)=-44.094585172510136; dx=-1.8669260757880425E-6 evalInputDelta=0.006836499835785048
New Minimum: -44.094585172510136 > -44.13554770829128
WOLFE (weak): th(23393.607721408407)=-44.13554770829128; dx=-1.8646914462981304E-6 evalInputDelta=0.04779903561692578
New Minimum: -44.13554770829128 > -44.46821492112032
WOLFE (weak): th(187148.86177126726)=-44.46821492112032; dx=-1.8453932759307156E-6 evalInputDelta=0.38046624844596977
New Minimum: -44.46821492112032 > -47.33745452883577
END: th(1684339.7559414054)=-47.33745452883577; dx=-1.650608094239661E-6 evalInputDelta=3.2497058561614196
Fitness changed from -44.08774867267435 to -47.33745452883577
Iteration 2 complete. Error: -47.33745452883577 Total: 67.7728; Orientation: 0.1432; Line Search: 60.6056
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/ce2fd2d2-a934-4ec5-a15e-9f17c8d26f53.jpg)
Adding measurement 6bb271c3 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-47.33745452883577;dx=-1.5871306871664732E-6
New Minimum: -47.33745452883577 > -52.68816517897245
END: th(3628800.0000000005)=-52.68816517897245; dx=-1.1390752920437185E-6 evalInputDelta=5.350710650136676
Fitness changed from -47.33745452883577 to -52.68816517897245
Iteration 3 complete. Error: -52.68816517897245 Total: 19.4975; Orientation: 0.1379; Line Search: 12.4174
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/b97c4223-d573-4273-9519-9227d9f5dfb9.jpg)
Adding measurement 1efa5244 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.479e+04, gradient 1.024e-03, dot -0.867; [7eda5bb0-96ae-4fe2-a8e3-5f1ab755370d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -52.68816517897245, -47.33745452883577, -44.08774867267435, -44.087746959562345
LBFGS Accumulation History: 3 points
Removed measurement 1efa5244 to history. Total: 3
th(0)=-52.68816517897245;dx=-1.0470465093380072E-6
New Minimum: -52.68816517897245 > -59.5890236064246
END: th(7818012.603187701)=-59.5890236064246; dx=-5.866682420801465E-7 evalInputDelta=6.90085842745215
Fitness changed from -52.68816517897245 to -59.5890236064246
Iteration 4 complete. Error: -59.5890236064246 Total: 22.3128; Orientation: 2.6134; Line Search: 12.3955
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/cee5a012-2ac1-4a43-a110-706ae26467c9.jpg)
Adding measurement 405df1b1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.042e+04, gradient 8.319e-04, dot -0.630; [7eda5bb0-96ae-4fe2-a8e3-5f1ab755370d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.5890236064246, -47.33745452883577, -44.08774867267435, -44.087746959562345
LBFGS Accumulation History: 3 points
Removed measurement 405df1b1 to history. Total: 3
th(0)=-59.5890236064246;dx=-6.914126967493392E-7
New Minimum: -59.5890236064246 > -66.95907561723304
END: th(1.6843397559414055E7)=-66.95907561723304; dx=-2.134348557119991E-7 evalInputDelta=7.370052010808443
Fitness changed from -59.5890236064246 to -66.95907561723304
Iteration 5 complete. Error: -66.95907561723304 Total: 21.5661; Orientation: 2.4690; Line Search: 12.0860
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/068dc8d2-f2ed-4986-b9e1-4d0dc67cd0e4.jpg)
Adding measurement 9e53cf4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.283e+04, gradient 9.023e-04, dot -0.408; [7eda5bb0-96ae-4fe2-a8e3-5f1ab755370d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -66.95907561723304, -47.33745452883577, -44.08774867267435, -44.087746959562345
LBFGS Accumulation History: 3 points
Removed measurement 9e53cf4 to history. Total: 3
th(0)=-66.95907561723304;dx=-8.139707541620163E-7
Armijo: th(3.628800000000001E7)=-66.63610129516569; dx=1.9659574820525576E-7 evalInputDelta=-0.32297432206735266
New Minimum: -66.95907561723304 > -70.77860143640862
WOLF (strong): th(1.8144000000000004E7)=-70.77860143640862; dx=1.4370126648197555E-7 evalInputDelta=3.819525819175581
END: th(6048000.000000001)=-70.72312294371184; dx=-3.255873068008575E-7 evalInputDelta=3.764047326478803
Fitness changed from -66.95907561723304 to -70.77860143640862
Iteration 6 complete. Error: -70.77860143640862 Total: 34.4838; Orientation: 2.3945; Line Search: 24.4984
Adding measurement 68446f15 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.079e+04, gradient 1.054e-03, dot -0.235; [7eda5bb0-96ae-4fe2-a8e3-5f1ab755370d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -70.77860143640862, -47.33745452883577, -44.08774867267435, -44.087746959562345
LBFGS Accumulation History: 3 points
Removed measurement 68446f15 to history. Total: 3
th(0)=-70.77860143640862;dx=-1.110209830226472E-6
New Minimum: -70.77860143640862 > -77.64596757584077
WOLF (strong): th(1.3030021005312836E7)=-77.64596757584077; dx=1.526627595305191E-7 evalInputDelta=6.86736613943215
END: th(6515010.502656418)=-76.67641468324543; dx=-5.019605513515035E-7 evalInputDelta=5.8978132468368045
Fitness changed from -70.77860143640862 to -77.64596757584077
Iteration 7 complete. Error: -77.64596757584077 Total: 26.0019; Orientation: 2.4558; Line Search: 17.8499
Adding measurement 60e2057a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.273e+04, gradient 8.432e-04, dot -0.407; [7eda5bb0-96ae-4fe2-a8e3-5f1ab755370d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -77.64596757584077, -47.33745452883577, -44.08774867267435, -44.087746959562345
LBFGS Accumulation History: 3 points
Removed measurement 60e2057a to history. Total: 3
th(0)=-77.64596757584077;dx=-7.098789565020303E-7
New Minimum: -77.64596757584077 > -81.61452114699759
WOLF (strong): th(1.4036164632845048E7)=-81.61452114699759; dx=1.1051751552738226E-7 evalInputDelta=3.968553571156818
END: th(7018082.316422524)=-81.34216887445405; dx=-2.493827259755867E-7 evalInputDelta=3.696201298613275
Fitness changed from -77.64596757584077 to -81.61452114699759
Iteration 8 complete. Error: -81.61452114699759 Total: 26.7914; Orientation: 2.7018; Line Search: 17.9296
Adding measurement 634a644e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.460e+04, gradient 8.430e-04, dot -0.388; [7eda5bb0-96ae-4fe2-a8e3-5f1ab755370d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -81.61452114699759, -47.33745452883577, -44.08774867267435, -44.087746959562345
LBFGS Accumulation History: 3 points
Removed measurement 634a644e to history. Total: 3
th(0)=-81.61452114699759;dx=-7.106313516108115E-7
New Minimum: -81.61452114699759 > -85.1551081050908
WOLF (strong): th(1.5120000000000006E7)=-85.1551081050908; dx=1.7922813072435446E-7 evalInputDelta=3.5405869580932148
New Minimum: -85.1551081050908 > -85.43501607878804
END: th(7560000.000000003)=-85.43501607878804; dx=-1.997447658105506E-7 evalInputDelta=3.8204949317904493
Fitness changed from -81.61452114699759 to -85.43501607878804
Iteration 9 complete. Error: -85.43501607878804 Total: 27.2471; Orientation: 2.4935; Line Search: 18.4996
Adding measurement 697d43db to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.483e+04, gradient 5.580e-04, dot -0.669; [7eda5bb0-96ae-4fe2-a8e3-5f1ab755370d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -85.43501607878804, -47.33745452883577, -44.08774867267435, -44.087746959562345
LBFGS Accumulation History: 3 points
Removed measurement 697d43db to history. Total: 3
th(0)=-85.43501607878804;dx=-3.109812201720576E-7
New Minimum: -85.43501607878804 > -89.2045987892043
END: th(1.6287526256641047E7)=-89.2045987892043; dx=-1.5000024969794217E-7 evalInputDelta=3.769582710416259
Fitness changed from -85.43501607878804 to -89.2045987892043
Iteration 10 complete. Error: -89.2045987892043 Total: 21.1412; Orientation: 2.4640; Line Search: 12.6202
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/285e00c1-a865-453a-afe1-13956bd536b0.jpg)
Final threshold in iteration 11: -89.2045987892043 (> -Infinity) after 298.549s (< 5400.000s)
Returns
-89.2045987892043