BasicOptimizer.scala:89 executed in 236.61 seconds (3.095 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: 6753277073178
Reset training subject: 6758452166158
Adding measurement 4a4f247 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-13.457916975021362;dx=-2.567871999029876E-6
New Minimum: -13.457916975021362 > -13.457923799753189
WOLFE (weak): th(2.154434690031884)=-13.457923799753189; dx=-2.4508451690566874E-6 evalInputDelta=6.8247318267822266E-6
New Minimum: -13.457923799753189 > -13.45793041586876
WOLFE (weak): th(4.308869380063768)=-13.45793041586876; dx=-2.4502508708167227E-6 evalInputDelta=1.3440847396850586E-5
New Minimum: -13.45793041586876 > -13.4579558968544
WOLFE (weak): th(12.926608140191302)=-13.4579558968544; dx=-2.4507999183004623E-6 evalInputDelta=3.892183303833008E-5
New Minimum: -13.4579558968544 > -13.458069413900375
WOLFE (weak): th(51.70643256076521)=-13.458069413900375; dx=-2.449501396522384E-6 evalInputDelta=1.5243887901306152E-4
New Minimum: -13.458069413900375 > -13.458678513765335
WOLFE (weak): th(258.53216280382605)=-13.458678513765335; dx=-2.449599998345562E-6 evalInputDelta=7.615387439727783E-4
New Minimum: -13.458678513765335 > -13.462480396032333
WOLFE (weak): th(1551.1929768229563)=-13.462480396032333; dx=-2.4471222755673366E-6 evalInputDelta=0.004563421010971069
New Minimum: -13.462480396032333 > -13.489753544330597
WOLFE (weak): th(10858.350837760694)=-13.489753544330597; dx=-2.4317107856576648E-6 evalInputDelta=0.03183656930923462
New Minimum: -13.489753544330597 > -13.704361617565155
END: th(86866.80670208555)=-13.704361617565155; dx=-2.2603720109221583E-6 evalInputDelta=0.24644464254379272
Fitness changed from -13.457916975021362 to -13.704361617565155
Iteration 1 complete. Error: -13.704361617565155 Total: 61.2708; Orientation: 0.0300; Line Search: 46.2090
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/7a02767c-3be3-4a5e-afd8-fd5d28becf86.jpg)
Adding measurement 5912469b to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-13.704361617565155;dx=-2.139770362736609E-6
New Minimum: -13.704361617565155 > -14.13625317811966
END: th(187148.86177126726)=-14.13625317811966; dx=-1.7094540064448648E-6 evalInputDelta=0.4318915605545044
Fitness changed from -13.704361617565155 to -14.13625317811966
Iteration 2 complete. Error: -14.13625317811966 Total: 15.6338; Orientation: 0.0295; Line Search: 10.5834
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/65d1fb2d-3b8d-4840-ba2d-28713ef26e4f.jpg)
Adding measurement 53110c31 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-14.13625317811966;dx=-1.6015389252744369E-6
New Minimum: -14.13625317811966 > -14.780199944972992
END: th(403200.00000000006)=-14.780199944972992; dx=-1.113596816767005E-6 evalInputDelta=0.6439467668533325
Fitness changed from -14.13625317811966 to -14.780199944972992
Iteration 3 complete. Error: -14.780199944972992 Total: 16.2883; Orientation: 0.0318; Line Search: 10.3786
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/7a506a32-9c0d-4975-8a34-dba742049239.jpg)
Adding measurement e454cf3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.286e+03, gradient 1.067e-03, dot -0.872; [e8aa8ff3-6582-4ba2-ab01-00cf18e30e5c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -14.780199944972992, -14.13625317811966, -13.704361617565155, -13.457916975021362
LBFGS Accumulation History: 3 points
Removed measurement e454cf3 to history. Total: 3
th(0)=-14.780199944972992;dx=-1.13671541742188E-6
New Minimum: -14.780199944972992 > -15.632488012313843
END: th(868668.0670208557)=-15.632488012313843; dx=-6.107908621089056E-7 evalInputDelta=0.8522880673408508
Fitness changed from -14.780199944972992 to -15.632488012313843
Iteration 4 complete. Error: -15.632488012313843 Total: 16.0190; Orientation: 0.6148; Line Search: 10.1269
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/e9ee4eb7-0a96-4f0e-8913-7f609f66bacf.jpg)
Adding measurement 1c648a54 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.881e+03, gradient 9.086e-04, dot -0.735; [e8aa8ff3-6582-4ba2-ab01-00cf18e30e5c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -15.632488012313843, -14.13625317811966, -13.704361617565155, -13.457916975021362
LBFGS Accumulation History: 3 points
Removed measurement 1c648a54 to history. Total: 3
th(0)=-15.632488012313843;dx=-8.251935957744705E-7
New Minimum: -15.632488012313843 > -16.48648378252983
END: th(1871488.617712673)=-16.48648378252983; dx=-2.0979429363427583E-7 evalInputDelta=0.8539957702159882
Fitness changed from -15.632488012313843 to -16.48648378252983
Iteration 5 complete. Error: -16.48648378252983 Total: 16.3323; Orientation: 0.6214; Line Search: 10.0224
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/73dc2a70-1927-4887-bee3-4a71229774af.jpg)
Adding measurement 57b144e5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.665e+03, gradient 8.549e-04, dot -0.492; [e8aa8ff3-6582-4ba2-ab01-00cf18e30e5c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.48648378252983, -14.13625317811966, -13.704361617565155, -13.457916975021362
LBFGS Accumulation History: 3 points
Removed measurement 57b144e5 to history. Total: 3
th(0)=-16.48648378252983;dx=-7.303324818512996E-7
New Minimum: -16.48648378252983 > -16.777885735034943
WOLF (strong): th(4032000.0000000014)=-16.777885735034943; dx=1.061370850291803E-7 evalInputDelta=0.2914019525051117
New Minimum: -16.777885735034943 > -17.02202218770981
WOLF (strong): th(2016000.0000000007)=-17.02202218770981; dx=1.8939787067059543E-8 evalInputDelta=0.5355384051799774
END: th(672000.0000000002)=-16.90220880508423; dx=-2.95118288505283E-7 evalInputDelta=0.4157250225543976
Fitness changed from -16.48648378252983 to -17.02202218770981
Iteration 6 complete. Error: -17.02202218770981 Total: 26.7636; Orientation: 0.6199; Line Search: 20.7137
Adding measurement 1e889409 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.684e+03, gradient 8.832e-04, dot -0.386; [e8aa8ff3-6582-4ba2-ab01-00cf18e30e5c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -17.02202218770981, -14.13625317811966, -13.704361617565155, -13.457916975021362
LBFGS Accumulation History: 3 points
Removed measurement 1e889409 to history. Total: 3
th(0)=-17.02202218770981;dx=-7.779078817904589E-7
New Minimum: -17.02202218770981 > -17.59794509410858
END: th(1447780.1117014263)=-17.59794509410858; dx=-2.1159820121424264E-9 evalInputDelta=0.5759229063987732
Fitness changed from -17.02202218770981 to -17.59794509410858
Iteration 7 complete. Error: -17.59794509410858 Total: 15.9422; Orientation: 0.6241; Line Search: 10.1611
Adding measurement 78306a6f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.754e+03, gradient 6.593e-04, dot -0.462; [e8aa8ff3-6582-4ba2-ab01-00cf18e30e5c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -17.59794509410858, -14.13625317811966, -13.704361617565155, -13.457916975021362
LBFGS Accumulation History: 3 points
Removed measurement 78306a6f to history. Total: 3
th(0)=-17.59794509410858;dx=-4.33756015627604E-7
New Minimum: -17.59794509410858 > -17.81141433119774
WOLF (strong): th(3119147.6961877886)=-17.81141433119774; dx=1.9750774052223756E-7 evalInputDelta=0.2134692370891571
New Minimum: -17.81141433119774 > -18.021034061908722
END: th(1559573.8480938943)=-18.021034061908722; dx=-4.9010251623382915E-8 evalInputDelta=0.4230889678001404
Fitness changed from -17.59794509410858 to -18.021034061908722
Iteration 8 complete. Error: -18.021034061908722 Total: 20.9069; Orientation: 0.6209; Line Search: 15.0951
Adding measurement 50c1ce59 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.994e+03, gradient 5.325e-04, dot -0.543; [e8aa8ff3-6582-4ba2-ab01-00cf18e30e5c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -18.021034061908722, -14.13625317811966, -13.704361617565155, -13.457916975021362
LBFGS Accumulation History: 3 points
Removed measurement 50c1ce59 to history. Total: 3
th(0)=-18.021034061908722;dx=-2.831344520619111E-7
New Minimum: -18.021034061908722 > -18.240507572889328
WOLF (strong): th(3360000.0000000014)=-18.240507572889328; dx=7.227401175132334E-8 evalInputDelta=0.21947351098060608
New Minimum: -18.240507572889328 > -18.32095554471016
END: th(1680000.0000000007)=-18.32095554471016; dx=-3.884913481736602E-8 evalInputDelta=0.2999214828014374
Fitness changed from -18.021034061908722 to -18.32095554471016
Iteration 9 complete. Error: -18.32095554471016 Total: 20.8792; Orientation: 0.6100; Line Search: 15.4507
Adding measurement 26f017e2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.213e+03, gradient 5.154e-04, dot -0.544; [e8aa8ff3-6582-4ba2-ab01-00cf18e30e5c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -18.32095554471016, -14.13625317811966, -13.704361617565155, -13.457916975021362
LBFGS Accumulation History: 3 points
Removed measurement 26f017e2 to history. Total: 3
th(0)=-18.32095554471016;dx=-2.6534987811503386E-7
New Minimum: -18.32095554471016 > -18.42341583967209
WOLF (strong): th(3619450.279253566)=-18.42341583967209; dx=6.344594721861546E-8 evalInputDelta=0.10246029496192932
New Minimum: -18.42341583967209 > -18.5500927567482
WOLF (strong): th(1809725.139626783)=-18.5500927567482; dx=1.183146196458575E-8 evalInputDelta=0.22913721203804016
END: th(603241.7132089277)=-18.473888784646988; dx=-1.607277476994478E-7 evalInputDelta=0.1529332399368286
Fitness changed from -18.32095554471016 to -18.5500927567482
Iteration 10 complete. Error: -18.5500927567482 Total: 26.3005; Orientation: 0.6218; Line Search: 20.4476
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f777eb1d-4ccc-4b84-9b4c-be6136bded7e.jpg)
Final threshold in iteration 11: -18.5500927567482 (> -Infinity) after 236.610s (< 5400.000s)
Returns
-18.5500927567482