BasicOptimizer.scala:89 executed in 218.74 seconds (3.555 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: 687766929194300
Reset training subject: 687771558492100
Adding measurement da3988b to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-1284.924705965295;dx=-0.008904382350390214
New Minimum: -1284.924705965295 > -1284.945524137113
WOLFE (weak): th(2.154434690031884)=-1284.945524137113; dx=-0.008745401047154338 evalInputDelta=0.020818171817836628
New Minimum: -1284.945524137113 > -1284.9662446928323
WOLFE (weak): th(4.308869380063768)=-1284.9662446928323; dx=-0.008741573414064313 evalInputDelta=0.04153872753727228
New Minimum: -1284.9662446928323 > -1285.0494640285253
WOLFE (weak): th(12.926608140191302)=-1285.0494640285253; dx=-0.008719364515679583 evalInputDelta=0.12475806323027427
New Minimum: -1285.0494640285253 > -1285.423762811315
WOLFE (weak): th(51.70643256076521)=-1285.423762811315; dx=-0.008731672215327606 evalInputDelta=0.4990568460200393
New Minimum: -1285.423762811315 > -1287.4183469253496
WOLFE (weak): th(258.53216280382605)=-1287.4183469253496; dx=-0.008720218129195611 evalInputDelta=2.493640960054563
New Minimum: -1287.4183469253496 > -1299.778731169271
WOLFE (weak): th(1551.1929768229563)=-1299.778731169271; dx=-0.008588520094653926 evalInputDelta=14.85402520397588
New Minimum: -1299.778731169271 > -1382.5132006603046
END: th(10858.350837760694)=-1382.5132006603046; dx=-0.007476006755105145 evalInputDelta=97.58849469500956
Fitness changed from -1284.924705965295 to -1382.5132006603046
Iteration 1 complete. Error: -1382.5132006603046 Total: 50.2418; Orientation: 0.0998; Line Search: 36.6252
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/1c479463-0502-456b-b75c-f6c0f47c14d2.jpg)
Adding measurement 494f2a8b to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-1382.5132006603046;dx=-0.0069429020823870355
New Minimum: -1382.5132006603046 > -1537.2447755643861
END: th(23393.607721408407)=-1537.2447755643861; dx=-0.005027565644939147 evalInputDelta=154.73157490408153
Fitness changed from -1382.5132006603046 to -1537.2447755643861
Iteration 2 complete. Error: -1537.2447755643861 Total: 14.7618; Orientation: 0.0926; Line Search: 9.1753
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/594fdc08-27a1-478b-9d9f-d0cdf54d07fe.jpg)
Adding measurement 607a58aa to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-1537.2447755643861;dx=-0.004583105640120536
New Minimum: -1537.2447755643861 > -1738.350079817066
END: th(50400.00000000001)=-1738.350079817066; dx=-0.002746330898558888 evalInputDelta=201.10530425267984
Fitness changed from -1537.2447755643861 to -1738.350079817066
Iteration 3 complete. Error: -1738.350079817066 Total: 14.4294; Orientation: 0.0843; Line Search: 8.9699
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/979577a1-7be6-430f-9271-d4a8dad447f5.jpg)
Adding measurement 6da177b3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.037e+04, gradient 5.529e-02, dot -0.798; [311b0666-d91f-456d-b034-2da0dc960782 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1738.350079817066, -1537.2447755643861, -1382.5132006603046, -1284.924705965295
LBFGS Accumulation History: 3 points
Removed measurement 6da177b3 to history. Total: 3
th(0)=-1738.350079817066;dx=-0.0030523898521127874
New Minimum: -1738.350079817066 > -1968.3858869642406
END: th(108583.50837760697)=-1968.3858869642406; dx=-0.0012588905009168318 evalInputDelta=230.03580714717464
Fitness changed from -1738.350079817066 to -1968.3858869642406
Iteration 4 complete. Error: -1968.3858869642406 Total: 16.2795; Orientation: 1.7337; Line Search: 9.0363
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/b98dfb19-e667-424c-8eab-789fa76dffe9.jpg)
Adding measurement 4a00c8ea to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.101e+04, gradient 5.872e-02, dot -0.561; [311b0666-d91f-456d-b034-2da0dc960782 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1968.3858869642406, -1537.2447755643861, -1382.5132006603046, -1284.924705965295
LBFGS Accumulation History: 3 points
Removed measurement 4a00c8ea to history. Total: 3
th(0)=-1968.3858869642406;dx=-0.003441904426347825
New Minimum: -1968.3858869642406 > -2104.531539321756
WOLF (strong): th(233936.07721408413)=-2104.531539321756; dx=1.1064781564030059E-4 evalInputDelta=136.14565235751547
New Minimum: -2104.531539321756 > -2109.1871657109996
END: th(116968.03860704206)=-2109.1871657109996; dx=-2.564277759171731E-4 evalInputDelta=140.80127874675895
Fitness changed from -1968.3858869642406 to -2109.1871657109996
Iteration 5 complete. Error: -2109.1871657109996 Total: 20.6442; Orientation: 1.6602; Line Search: 13.6526
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/75b866c8-327c-499a-97af-6094bea1745e.jpg)
Adding measurement 57c01b3b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.248e+04, gradient 6.284e-02, dot -0.443; [311b0666-d91f-456d-b034-2da0dc960782 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2109.1871657109996, -1537.2447755643861, -1382.5132006603046, -1284.924705965295
LBFGS Accumulation History: 3 points
Removed measurement 57c01b3b to history. Total: 3
th(0)=-2109.1871657109996;dx=-0.003944094521283538
New Minimum: -2109.1871657109996 > -2153.482412280165
WOLF (strong): th(252000.0000000001)=-2153.482412280165; dx=7.017420398776232E-4 evalInputDelta=44.295246569165556
New Minimum: -2153.482412280165 > -2255.004656314483
WOLF (strong): th(126000.00000000004)=-2255.004656314483; dx=3.753078904787588E-4 evalInputDelta=145.8174906034833
END: th(42000.000000000015)=-2230.8956721460554; dx=-0.0014777777002474989 evalInputDelta=121.70850643505582
Fitness changed from -2109.1871657109996 to -2255.004656314483
Iteration 6 complete. Error: -2255.004656314483 Total: 25.8959; Orientation: 1.6859; Line Search: 18.5875
Adding measurement c9bfa23 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.491e+04, gradient 6.549e-02, dot -0.384; [311b0666-d91f-456d-b034-2da0dc960782 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2255.004656314483, -1537.2447755643861, -1382.5132006603046, -1284.924705965295
LBFGS Accumulation History: 3 points
Removed measurement c9bfa23 to history. Total: 3
th(0)=-2255.004656314483;dx=-0.004282858052246612
New Minimum: -2255.004656314483 > -2424.5152092738044
WOLF (strong): th(90486.25698133915)=-2424.5152092738044; dx=5.2139455712550076E-5 evalInputDelta=169.51055295932156
END: th(45243.12849066957)=-2396.55930450302; dx=-0.00150303650018901 evalInputDelta=141.55464818853716
Fitness changed from -2255.004656314483 to -2424.5152092738044
Iteration 7 complete. Error: -2424.5152092738044 Total: 19.7834; Orientation: 1.6175; Line Search: 13.8121
Adding measurement 35fedffb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.990e+04, gradient 5.662e-02, dot -0.442; [311b0666-d91f-456d-b034-2da0dc960782 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2424.5152092738044, -1537.2447755643861, -1382.5132006603046, -1284.924705965295
LBFGS Accumulation History: 3 points
Removed measurement 35fedffb to history. Total: 3
th(0)=-2424.5152092738044;dx=-0.0032030616930235826
New Minimum: -2424.5152092738044 > -2545.3121616021876
WOLF (strong): th(97473.3655058684)=-2545.3121616021876; dx=1.2510962307546932E-4 evalInputDelta=120.79695232838321
END: th(48736.6827529342)=-2530.2305230946845; dx=-9.843147200150827E-4 evalInputDelta=105.71531382088006
Fitness changed from -2424.5152092738044 to -2545.3121616021876
Iteration 8 complete. Error: -2545.3121616021876 Total: 20.2874; Orientation: 1.6147; Line Search: 13.9915
Adding measurement 4977f324 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.558e+04, gradient 5.726e-02, dot -0.437; [311b0666-d91f-456d-b034-2da0dc960782 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2545.3121616021876, -1537.2447755643861, -1382.5132006603046, -1284.924705965295
LBFGS Accumulation History: 3 points
Removed measurement 4977f324 to history. Total: 3
th(0)=-2545.3121616021876;dx=-0.003274044570789298
New Minimum: -2545.3121616021876 > -2646.121123455992
WOLF (strong): th(105000.00000000004)=-2646.121123455992; dx=4.2087607069857974E-4 evalInputDelta=100.80896185380425
New Minimum: -2646.121123455992 > -2648.610107207174
END: th(52500.00000000002)=-2648.610107207174; dx=-6.664198580394365E-4 evalInputDelta=103.29794560498658
Fitness changed from -2545.3121616021876 to -2648.610107207174
Iteration 9 complete. Error: -2648.610107207174 Total: 19.8354; Orientation: 1.6262; Line Search: 13.8089
Adding measurement c414493 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.016e+04, gradient 4.278e-02, dot -0.584; [311b0666-d91f-456d-b034-2da0dc960782 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2648.610107207174, -1537.2447755643861, -1382.5132006603046, -1284.924705965295
LBFGS Accumulation History: 3 points
Removed measurement c414493 to history. Total: 3
th(0)=-2648.610107207174;dx=-0.0018285788142096571
New Minimum: -2648.610107207174 > -2748.499772603229
END: th(113107.82122667394)=-2748.499772603229; dx=-3.2252000934722435E-4 evalInputDelta=99.88966539605462
Fitness changed from -2648.610107207174 to -2748.499772603229
Iteration 10 complete. Error: -2748.499772603229 Total: 15.6799; Orientation: 1.7713; Line Search: 9.1891
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/e9ad2aa7-2413-4027-ba07-085481ee28d3.jpg)
Final threshold in iteration 11: -2748.499772603229 (> -Infinity) after 218.736s (< 5400.000s)
Returns
-2748.499772603229