BasicOptimizer.scala:89 executed in 204.16 seconds (2.991 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: 22409209217802
Reset training subject: 22413591295548
Adding measurement f7f999f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.5729223787784576;dx=-8.138223044532327E-7
New Minimum: -0.5729223787784576 > -0.5729231238365173
END: th(2.154434690031884)=-0.5729231238365173; dx=-7.033245107482554E-7 evalInputDelta=7.450580596923828E-7
Fitness changed from -0.5729223787784576 to -0.5729231238365173
Iteration 1 complete. Error: -0.5729231238365173 Total: 21.1012; Orientation: 0.0446; Line Search: 8.1648
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/6d99eea0-7211-4d65-81cd-aae023b56b93.jpg)
Adding measurement 31de1492 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.5729231238365173;dx=-7.033258183474431E-7
New Minimum: -0.5729231238365173 > -0.5729248374700546
WOLFE (weak): th(4.641588833612779)=-0.5729248374700546; dx=-7.033222247426367E-7 evalInputDelta=1.7136335372924805E-6
New Minimum: -0.5729248374700546 > -0.5729265064001083
WOLFE (weak): th(9.283177667225559)=-0.5729265064001083; dx=-7.03329500774295E-7 evalInputDelta=3.382563591003418E-6
New Minimum: -0.5729265064001083 > -0.5729329138994217
WOLFE (weak): th(27.849533001676676)=-0.5729329138994217; dx=-7.03333570150141E-7 evalInputDelta=9.79006290435791E-6
New Minimum: -0.5729329138994217 > -0.5729624181985855
WOLFE (weak): th(111.3981320067067)=-0.5729624181985855; dx=-7.032890298735699E-7 evalInputDelta=3.929436206817627E-5
New Minimum: -0.5729624181985855 > -0.5731190890073776
WOLFE (weak): th(556.9906600335335)=-0.5731190890073776; dx=-7.031733391197366E-7 evalInputDelta=1.9596517086029053E-4
New Minimum: -0.5731190890073776 > -0.5740977674722672
WOLFE (weak): th(3341.9439602012008)=-0.5740977674722672; dx=-7.023291355936342E-7 evalInputDelta=0.001174643635749817
New Minimum: -0.5740977674722672 > -0.5811122357845306
WOLFE (weak): th(23393.607721408407)=-0.5811122357845306; dx=-6.969289703598062E-7 evalInputDelta=0.008189111948013306
New Minimum: -0.5811122357845306 > -0.6362808793783188
WOLFE (weak): th(187148.86177126726)=-0.6362808793783188; dx=-6.494576006785938E-7 evalInputDelta=0.06335775554180145
New Minimum: -0.6362808793783188 > -0.968245804309845
END: th(1684339.7559414054)=-0.968245804309845; dx=-2.7747042939294507E-7 evalInputDelta=0.39532268047332764
Fitness changed from -0.5729231238365173 to -0.968245804309845
Iteration 2 complete. Error: -0.968245804309845 Total: 49.5287; Orientation: 0.0449; Line Search: 44.9182
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/91edf1f8-294d-4aa8-9beb-0dd3190cac75.jpg)
Adding measurement 423b0fd5 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.968245804309845;dx=-2.8875761297437987E-7
New Minimum: -0.968245804309845 > -1.2973439916968346
END: th(3628800.0000000005)=-1.2973439916968346; dx=-1.0930999205560431E-7 evalInputDelta=0.3290981873869896
Fitness changed from -0.968245804309845 to -1.2973439916968346
Iteration 3 complete. Error: -1.2973439916968346 Total: 12.9877; Orientation: 0.0454; Line Search: 8.6361
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/2ad80ce1-71e0-476b-bb83-bf0651e9dee8.jpg)
Adding measurement a3a0048 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.687e+03, gradient 3.971e-04, dot -0.562; [07111aa8-1748-4456-b4f0-9e168ea98b70 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.2973439916968346, -0.968245804309845, -0.5729231238365173, -0.5729223787784576
LBFGS Accumulation History: 3 points
Removed measurement a3a0048 to history. Total: 3
th(0)=-1.2973439916968346;dx=-1.5767424592594307E-7
New Minimum: -1.2973439916968346 > -1.5875075310468674
END: th(7818012.603187701)=-1.5875075310468674; dx=-2.75174859658775E-8 evalInputDelta=0.2901635393500328
Fitness changed from -1.2973439916968346 to -1.5875075310468674
Iteration 4 complete. Error: -1.5875075310468674 Total: 13.5211; Orientation: 1.0208; Line Search: 8.3542
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/0e090094-48be-4f55-9c37-a32ef3de51a1.jpg)
Adding measurement 2149c290 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.560e+03, gradient 3.539e-04, dot -0.356; [07111aa8-1748-4456-b4f0-9e168ea98b70 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5875075310468674, -0.968245804309845, -0.5729231238365173, -0.5729223787784576
LBFGS Accumulation History: 3 points
Removed measurement 2149c290 to history. Total: 3
th(0)=-1.5875075310468674;dx=-1.2524051609323418E-7
New Minimum: -1.5875075310468674 > -1.7108589857816696
WOLF (strong): th(1.6843397559414055E7)=-1.7108589857816696; dx=2.364588958522577E-8 evalInputDelta=0.12335145473480225
New Minimum: -1.7108589857816696 > -1.7794963866472244
WOLF (strong): th(8421698.779707028)=-1.7794963866472244; dx=1.8496600825957494E-9 evalInputDelta=0.19198885560035706
END: th(2807232.926569009)=-1.7131779789924622; dx=-5.803937179476022E-8 evalInputDelta=0.1256704479455948
Fitness changed from -1.5875075310468674 to -1.7794963866472244
Iteration 5 complete. Error: -1.7794963866472244 Total: 23.7287; Orientation: 1.0490; Line Search: 17.0644
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/ae1d3539-a897-4393-892d-06e81f3a5a0b.jpg)
Adding measurement 9b5098a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.718e+03, gradient 3.031e-04, dot -0.314; [07111aa8-1748-4456-b4f0-9e168ea98b70 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.7794963866472244, -0.968245804309845, -0.5729231238365173, -0.5729223787784576
LBFGS Accumulation History: 3 points
Removed measurement 9b5098a to history. Total: 3
th(0)=-1.7794963866472244;dx=-9.186978368789908E-8
New Minimum: -1.7794963866472244 > -1.9246680811047554
END: th(6048000.000000001)=-1.9246680811047554; dx=-1.7013963458854894E-8 evalInputDelta=0.14517169445753098
Fitness changed from -1.7794963866472244 to -1.9246680811047554
Iteration 6 complete. Error: -1.9246680811047554 Total: 14.2857; Orientation: 1.0005; Line Search: 8.8877
Adding measurement 6b435297 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.154e+03, gradient 2.082e-04, dot -0.488; [07111aa8-1748-4456-b4f0-9e168ea98b70 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.9246680811047554, -0.968245804309845, -0.5729231238365173, -0.5729223787784576
LBFGS Accumulation History: 3 points
Removed measurement 6b435297 to history. Total: 3
th(0)=-1.9246680811047554;dx=-4.3364664640724E-8
New Minimum: -1.9246680811047554 > -2.0410821735858917
WOLF (strong): th(1.3030021005312836E7)=-2.0410821735858917; dx=5.846653151362546E-10 evalInputDelta=0.11641409248113632
END: th(6515010.502656418)=-2.0180359706282616; dx=-1.6234456888122203E-8 evalInputDelta=0.09336788952350616
Fitness changed from -1.9246680811047554 to -2.0410821735858917
Iteration 7 complete. Error: -2.0410821735858917 Total: 17.7569; Orientation: 1.0301; Line Search: 12.6298
Adding measurement 70ebbc09 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.828e+03, gradient 2.518e-04, dot -0.270; [07111aa8-1748-4456-b4f0-9e168ea98b70 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.0410821735858917, -0.968245804309845, -0.5729231238365173, -0.5729223787784576
LBFGS Accumulation History: 3 points
Removed measurement 70ebbc09 to history. Total: 3
th(0)=-2.0410821735858917;dx=-6.339446084111435E-8
New Minimum: -2.0410821735858917 > -2.083716355264187
WOLF (strong): th(1.4036164632845048E7)=-2.083716355264187; dx=2.1175421142189238E-8 evalInputDelta=0.042634181678295135
New Minimum: -2.083716355264187 > -2.1304262951016426
WOLF (strong): th(7018082.316422524)=-2.1304262951016426; dx=1.1174795711432036E-9 evalInputDelta=0.08934412151575089
END: th(2339360.7721408415)=-2.097394675016403; dx=-3.3747953078189135E-8 evalInputDelta=0.056312501430511475
Fitness changed from -2.0410821735858917 to -2.1304262951016426
Iteration 8 complete. Error: -2.1304262951016426 Total: 22.6035; Orientation: 1.0137; Line Search: 17.1913
Adding measurement 4cde1097 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.141e+03, gradient 1.759e-04, dot -0.409; [07111aa8-1748-4456-b4f0-9e168ea98b70 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.1304262951016426, -0.968245804309845, -0.5729231238365173, -0.5729223787784576
LBFGS Accumulation History: 3 points
Removed measurement 4cde1097 to history. Total: 3
th(0)=-2.1304262951016426;dx=-3.0933678569758195E-8
New Minimum: -2.1304262951016426 > -2.184314988553524
END: th(5040000.000000002)=-2.184314988553524; dx=-1.2840271075726729E-8 evalInputDelta=0.05388869345188141
Fitness changed from -2.1304262951016426 to -2.184314988553524
Iteration 9 complete. Error: -2.184314988553524 Total: 14.2314; Orientation: 1.0121; Line Search: 8.8434
Adding measurement 56f9144a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.302e+03, gradient 1.335e-04, dot -0.540; [07111aa8-1748-4456-b4f0-9e168ea98b70 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.184314988553524, -0.968245804309845, -0.5729231238365173, -0.5729223787784576
LBFGS Accumulation History: 3 points
Removed measurement 56f9144a to history. Total: 3
th(0)=-2.184314988553524;dx=-1.783415437055128E-8
New Minimum: -2.184314988553524 > -2.24642127007246
END: th(1.0858350837760698E7)=-2.24642127007246; dx=-6.283438143423293E-9 evalInputDelta=0.06210628151893616
Fitness changed from -2.184314988553524 to -2.24642127007246
Iteration 10 complete. Error: -2.24642127007246 Total: 14.3411; Orientation: 1.1025; Line Search: 8.8913
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/b0e851dc-3eaa-4443-b28f-65ea4400e861.jpg)
Final threshold in iteration 11: -2.24642127007246 (> -Infinity) after 204.156s (< 5400.000s)
Returns
-2.24642127007246