BasicOptimizer.scala:89 executed in 291.72 seconds (3.712 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: 650396329339800
Reset training subject: 650402320711900
Adding measurement 7c8fd9e6 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-32.13475613067541;dx=-1.92876279151487E-6
New Minimum: -32.13475613067541 > -32.13475965616876
END: th(2.154434690031884)=-32.13475965616876; dx=-1.7004279688257382E-6 evalInputDelta=3.5254933479222927E-6
Fitness changed from -32.13475613067541 to -32.13475965616876
Iteration 1 complete. Error: -32.13475965616876 Total: 30.1373; Orientation: 0.1501; Line Search: 12.4544
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/fe12067f-99a7-4222-8b44-16634d9d8656.jpg)
Adding measurement 424580f8 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-32.13475965616876;dx=-1.6983820385769374E-6
New Minimum: -32.13475965616876 > -32.134769057482465
WOLFE (weak): th(4.641588833612779)=-32.134769057482465; dx=-1.697985520409657E-6 evalInputDelta=9.40131370441577E-6
New Minimum: -32.134769057482465 > -32.13477845879343
WOLFE (weak): th(9.283177667225559)=-32.13477845879343; dx=-1.6970632410401807E-6 evalInputDelta=1.880262466613658E-5
New Minimum: -32.13477845879343 > -32.13481371368503
WOLFE (weak): th(27.849533001676676)=-32.13481371368503; dx=-1.696844749088197E-6 evalInputDelta=5.405751626597066E-5
New Minimum: -32.13481371368503 > -32.13497118506195
WOLFE (weak): th(111.3981320067067)=-32.13497118506195; dx=-1.696151590467306E-6 evalInputDelta=2.115288931889836E-4
New Minimum: -32.13497118506195 > -32.13580671057804
WOLFE (weak): th(556.9906600335335)=-32.13580671057804; dx=-1.696146542776364E-6 evalInputDelta=0.0010470544092768819
New Minimum: -32.13580671057804 > -32.14104499578206
WOLFE (weak): th(3341.9439602012008)=-32.14104499578206; dx=-1.695825694124123E-6 evalInputDelta=0.006285339613299357
New Minimum: -32.14104499578206 > -32.1787113014889
WOLFE (weak): th(23393.607721408407)=-32.1787113014889; dx=-1.6929191706675774E-6 evalInputDelta=0.04395164532014206
New Minimum: -32.1787113014889 > -32.4840056430751
WOLFE (weak): th(187148.86177126726)=-32.4840056430751; dx=-1.669445721424795E-6 evalInputDelta=0.34924598690633957
New Minimum: -32.4840056430751 > -35.043653921853775
END: th(1684339.7559414054)=-35.043653921853775; dx=-1.4025984240831974E-6 evalInputDelta=2.9088942656850136
Fitness changed from -32.13475965616876 to -35.043653921853775
Iteration 2 complete. Error: -35.043653921853775 Total: 70.0195; Orientation: 0.1545; Line Search: 62.4127
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/b04b7ef9-3c12-4b19-8aa8-c605dc1e71df.jpg)
Adding measurement 4543ea59 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-35.043653921853775;dx=-1.3236875176052517E-6
New Minimum: -35.043653921853775 > -39.30988611160597
END: th(3628800.0000000005)=-39.30988611160597; dx=-8.247419928541439E-7 evalInputDelta=4.266232189752195
Fitness changed from -35.043653921853775 to -39.30988611160597
Iteration 3 complete. Error: -39.30988611160597 Total: 19.2291; Orientation: 0.1390; Line Search: 12.2954
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/49e0002b-d2d2-4abc-9002-70bd4e9fe063.jpg)
Adding measurement 7f09e1e1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.679e+03, gradient 9.009e-04, dot -0.759; [89f01501-aa24-4cf6-8ff0-13b637fafa61 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -39.30988611160597, -35.043653921853775, -32.13475965616876, -32.13475613067541
LBFGS Accumulation History: 3 points
Removed measurement 7f09e1e1 to history. Total: 3
th(0)=-39.30988611160597;dx=-8.112512701075556E-7
New Minimum: -39.30988611160597 > -44.487406715089335
END: th(7818012.603187701)=-44.487406715089335; dx=-4.0968143587719035E-7 evalInputDelta=5.177520603483366
Fitness changed from -39.30988611160597 to -44.487406715089335
Iteration 4 complete. Error: -44.487406715089335 Total: 22.1724; Orientation: 2.6411; Line Search: 12.4413
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/4c93390d-1545-44ca-8468-a5857ddc4718.jpg)
Adding measurement 4a96dce3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.206e+03, gradient 8.228e-04, dot -0.545; [89f01501-aa24-4cf6-8ff0-13b637fafa61 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.487406715089335, -35.043653921853775, -32.13475965616876, -32.13475613067541
LBFGS Accumulation History: 3 points
Removed measurement 4a96dce3 to history. Total: 3
th(0)=-44.487406715089335;dx=-6.765067441198672E-7
New Minimum: -44.487406715089335 > -49.30162257476132
END: th(1.6843397559414055E7)=-49.30162257476132; dx=-7.320207496304505E-8 evalInputDelta=4.814215859671982
Fitness changed from -44.487406715089335 to -49.30162257476132
Iteration 5 complete. Error: -49.30162257476132 Total: 21.5214; Orientation: 2.4760; Line Search: 11.8643
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/67ae142c-e012-4ca8-8f71-2e2dcffbbeb4.jpg)
Adding measurement 6e4e0910 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.911e+03, gradient 1.063e-03, dot -0.276; [89f01501-aa24-4cf6-8ff0-13b637fafa61 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -49.30162257476132, -35.043653921853775, -32.13475965616876, -32.13475613067541
LBFGS Accumulation History: 3 points
Removed measurement 6e4e0910 to history. Total: 3
th(0)=-49.30162257476132;dx=-1.1293650260902299E-6
Armijo: th(3.628800000000001E7)=-45.27806220937374; dx=2.2425751665566244E-7 evalInputDelta=-4.023560365387574
New Minimum: -49.30162257476132 > -51.76083642521148
WOLF (strong): th(1.8144000000000004E7)=-51.76083642521148; dx=3.6440770552814236E-7 evalInputDelta=2.459213850450162
New Minimum: -51.76083642521148 > -54.33736586691025
END: th(6048000.000000001)=-54.33736586691025; dx=-3.118502770794946E-7 evalInputDelta=5.035743292148929
Fitness changed from -49.30162257476132 to -54.33736586691025
Iteration 6 complete. Error: -54.33736586691025 Total: 32.9474; Orientation: 2.4655; Line Search: 23.4007
Adding measurement 3ade8c5e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.127e+04, gradient 7.374e-04, dot -0.575; [89f01501-aa24-4cf6-8ff0-13b637fafa61 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -54.33736586691025, -35.043653921853775, -32.13475965616876, -32.13475613067541
LBFGS Accumulation History: 3 points
Removed measurement 3ade8c5e to history. Total: 3
th(0)=-54.33736586691025;dx=-5.42917972189194E-7
New Minimum: -54.33736586691025 > -58.30397962510215
END: th(1.3030021005312836E7)=-58.30397962510215; dx=-8.89162310672146E-8 evalInputDelta=3.9666137581919045
Fitness changed from -54.33736586691025 to -58.30397962510215
Iteration 7 complete. Error: -58.30397962510215 Total: 20.8323; Orientation: 2.6236; Line Search: 12.2205
Adding measurement 13679eee to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.724e+04, gradient 8.952e-04, dot -0.426; [89f01501-aa24-4cf6-8ff0-13b637fafa61 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -58.30397962510215, -35.043653921853775, -32.13475965616876, -32.13475613067541
LBFGS Accumulation History: 3 points
Removed measurement 13679eee to history. Total: 3
th(0)=-58.30397962510215;dx=-8.01025118019244E-7
Armijo: th(2.8072329265690096E7)=-56.97386802667089; dx=2.257657071140996E-7 evalInputDelta=-1.3301115984312588
New Minimum: -58.30397962510215 > -60.973972023138124
WOLF (strong): th(1.4036164632845048E7)=-60.973972023138124; dx=2.0809071936396436E-7 evalInputDelta=2.6699923980359728
New Minimum: -60.973972023138124 > -61.30232907866111
END: th(4678721.544281683)=-61.30232907866111; dx=-3.335052820104242E-7 evalInputDelta=2.9983494535589585
Fitness changed from -58.30397962510215 to -61.30232907866111
Iteration 8 complete. Error: -61.30232907866111 Total: 33.0927; Orientation: 2.4426; Line Search: 24.5922
Adding measurement 174d25d4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.844e+04, gradient 6.134e-04, dot -0.706; [89f01501-aa24-4cf6-8ff0-13b637fafa61 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -61.30232907866111, -35.043653921853775, -32.13475965616876, -32.13475613067541
LBFGS Accumulation History: 3 points
Removed measurement 174d25d4 to history. Total: 3
th(0)=-61.30232907866111;dx=-3.7573348027986404E-7
New Minimum: -61.30232907866111 > -64.54415368187308
END: th(1.0080000000000004E7)=-64.54415368187308; dx=-2.3293778245265967E-7 evalInputDelta=3.241824603211974
Fitness changed from -61.30232907866111 to -64.54415368187308
Iteration 9 complete. Error: -64.54415368187308 Total: 20.4573; Orientation: 2.4188; Line Search: 12.2367
Adding measurement 4d0fc85b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.568e+04, gradient 6.533e-04, dot -0.642; [89f01501-aa24-4cf6-8ff0-13b637fafa61 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -64.54415368187308, -35.043653921853775, -32.13475965616876, -32.13475613067541
LBFGS Accumulation History: 3 points
Removed measurement 4d0fc85b to history. Total: 3
th(0)=-64.54415368187308;dx=-4.2622088875731416E-7
New Minimum: -64.54415368187308 > -68.21711192785611
END: th(2.1716701675521396E7)=-68.21711192785611; dx=-3.706626105484679E-8 evalInputDelta=3.6729582459830254
Fitness changed from -64.54415368187308 to -68.21711192785611
Iteration 10 complete. Error: -68.21711192785611 Total: 20.3110; Orientation: 2.5040; Line Search: 11.9252
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/4d0ae5cf-aae3-4187-9d09-ac46fd899f64.jpg)
Final threshold in iteration 11: -68.21711192785611 (> -Infinity) after 291.716s (< 5400.000s)
Returns
-68.21711192785611