BasicOptimizer.scala:89 executed in 95.45 seconds (1.605 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: 287674823240000
Reset training subject: 287676808349000
Adding measurement 6633eecd to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-56.07962280510873;dx=-5.136447733486105E-6
New Minimum: -56.07962280510873 > -56.07962948917531
END: th(2.154434690031884)=-56.07962948917531; dx=-3.2821472095888657E-6 evalInputDelta=6.684066583773074E-6
Fitness changed from -56.07962280510873 to -56.07962948917531
Iteration 1 complete. Error: -56.07962948917531 Total: 9.6759; Orientation: 0.0626; Line Search: 3.9990
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 8ec726 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-56.07962948917531;dx=-3.282179432221613E-6
New Minimum: -56.07962948917531 > -56.0796495413703
WOLFE (weak): th(4.641588833612779)=-56.0796495413703; dx=-3.2821776596116137E-6 evalInputDelta=2.0052194990682892E-5
New Minimum: -56.0796495413703 > -56.079666251527314
WOLFE (weak): th(9.283177667225559)=-56.079666251527314; dx=-3.282172655715008E-6 evalInputDelta=3.6762352003449905E-5
New Minimum: -56.079666251527314 > -56.07972640805133
WOLFE (weak): th(27.849533001676676)=-56.07972640805133; dx=-3.282162973046341E-6 evalInputDelta=9.691887601803728E-5
New Minimum: -56.07972640805133 > -56.08000045362193
WOLFE (weak): th(111.3981320067067)=-56.08000045362193; dx=-3.282095794965404E-6 evalInputDelta=3.709644466169948E-4
New Minimum: -56.08000045362193 > -56.081460893407225
WOLFE (weak): th(556.9906600335335)=-56.081460893407225; dx=-3.2819339831410827E-6 evalInputDelta=0.001831404231914746
New Minimum: -56.081460893407225 > -56.09060031071962
WOLFE (weak): th(3341.9439602012008)=-56.09060031071962; dx=-3.2807287310758924E-6 evalInputDelta=0.01097082154431206
New Minimum: -56.09060031071962 > -56.156303469336706
WOLFE (weak): th(23393.607721408407)=-56.156303469336706; dx=-3.2729828812004096E-6 evalInputDelta=0.07667398016139515
New Minimum: -56.156303469336706 > -56.68787950320419
WOLFE (weak): th(187148.86177126726)=-56.68787950320419; dx=-3.218910999587545E-6 evalInputDelta=0.6082500140288758
New Minimum: -56.68787950320419 > -61.07125685796241
END: th(1684339.7559414054)=-61.07125685796241; dx=-2.615700225308954E-6 evalInputDelta=4.9916273687871
Fitness changed from -56.07962948917531 to -61.07125685796241
Iteration 2 complete. Error: -61.07125685796241 Total: 21.5284; Orientation: 0.0580; Line Search: 19.3550
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 7376a46d to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-61.07125685796241;dx=-2.353800244323947E-6
New Minimum: -61.07125685796241 > -68.02503948591897
END: th(3628800.0000000005)=-68.02503948591897; dx=-1.4639348715517903E-6 evalInputDelta=6.953782627956556
Fitness changed from -61.07125685796241 to -68.02503948591897
Iteration 3 complete. Error: -68.02503948591897 Total: 6.2276; Orientation: 0.0579; Line Search: 4.0055
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 29171c4f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.670e+03, gradient 1.186e-03, dot -0.769; [2817d6ee-b281-4671-9be3-0b1d05c403b4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -68.02503948591897, -61.07125685796241, -56.07962948917531, -56.07962280510873
LBFGS Accumulation History: 3 points
Removed measurement 29171c4f to history. Total: 3
th(0)=-68.02503948591897;dx=-1.4070648488662373E-6
New Minimum: -68.02503948591897 > -75.939436483697
END: th(7818012.603187701)=-75.939436483697; dx=-6.534877505358565E-7 evalInputDelta=7.914396997778027
Fitness changed from -68.02503948591897 to -75.939436483697
Iteration 4 complete. Error: -75.939436483697 Total: 6.9267; Orientation: 1.0139; Line Search: 3.7240
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 717a5340 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.002e+03, gradient 1.015e-03, dot -0.540; [2817d6ee-b281-4671-9be3-0b1d05c403b4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -75.939436483697, -61.07125685796241, -56.07962948917531, -56.07962280510873
LBFGS Accumulation History: 3 points
Removed measurement 717a5340 to history. Total: 3
th(0)=-75.939436483697;dx=-1.0311736390368486E-6
New Minimum: -75.939436483697 > -82.52879753090434
END: th(1.6843397559414055E7)=-82.52879753090434; dx=-5.513897843731038E-8 evalInputDelta=6.589361047207348
Fitness changed from -75.939436483697 to -82.52879753090434
Iteration 5 complete. Error: -82.52879753090434 Total: 7.3216; Orientation: 0.9994; Line Search: 3.9059
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 1433e522 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.391e+03, gradient 1.246e-03, dot -0.212; [2817d6ee-b281-4671-9be3-0b1d05c403b4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -82.52879753090434, -61.07125685796241, -56.07962948917531, -56.07962280510873
LBFGS Accumulation History: 3 points
Removed measurement 1433e522 to history. Total: 3
th(0)=-82.52879753090434;dx=-1.551505384467885E-6
Armijo: th(3.628800000000001E7)=-77.01140911067431; dx=3.685072805818556E-7 evalInputDelta=-5.517388420230034
New Minimum: -82.52879753090434 > -85.25387060836192
WOLF (strong): th(1.8144000000000004E7)=-85.25387060836192; dx=5.160146746139629E-7 evalInputDelta=2.72507307745758
New Minimum: -85.25387060836192 > -88.49304157959445
END: th(6048000.000000001)=-88.49304157959445; dx=-3.750302504511639E-7 evalInputDelta=5.964244048690105
Fitness changed from -82.52879753090434 to -88.49304157959445
Iteration 6 complete. Error: -88.49304157959445 Total: 10.8638; Orientation: 0.9568; Line Search: 7.5215
Adding measurement 416d8859 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.509e+04, gradient 8.325e-04, dot -0.492; [2817d6ee-b281-4671-9be3-0b1d05c403b4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -88.49304157959445, -61.07125685796241, -56.07962948917531, -56.07962280510873
LBFGS Accumulation History: 3 points
Removed measurement 416d8859 to history. Total: 3
th(0)=-88.49304157959445;dx=-6.931101488509527E-7
New Minimum: -88.49304157959445 > -92.81009763042424
END: th(1.3030021005312836E7)=-92.81009763042424; dx=-6.670277097262903E-8 evalInputDelta=4.317056050829791
Fitness changed from -88.49304157959445 to -92.81009763042424
Iteration 7 complete. Error: -92.81009763042424 Total: 6.6931; Orientation: 1.0338; Line Search: 3.8773
Adding measurement 3a836116 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.737e+04, gradient 9.942e-04, dot -0.356; [2817d6ee-b281-4671-9be3-0b1d05c403b4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -92.81009763042424, -61.07125685796241, -56.07962948917531, -56.07962280510873
LBFGS Accumulation History: 3 points
Removed measurement 3a836116 to history. Total: 3
th(0)=-92.81009763042424;dx=-9.883702975373912E-7
Armijo: th(2.8072329265690096E7)=-90.5259784249085; dx=3.103396009539841E-7 evalInputDelta=-2.2841192055157364
New Minimum: -92.81009763042424 > -95.31143457232204
WOLF (strong): th(1.4036164632845048E7)=-95.31143457232204; dx=3.1753709744874834E-7 evalInputDelta=2.5013369418978044
New Minimum: -95.31143457232204 > -96.04491726536006
END: th(4678721.544281683)=-96.04491726536006; dx=-3.674328545871431E-7 evalInputDelta=3.2348196349358176
Fitness changed from -92.81009763042424 to -96.04491726536006
Iteration 8 complete. Error: -96.04491726536006 Total: 10.5023; Orientation: 0.9524; Line Search: 7.5501
Adding measurement 4430cd2d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.284e+04, gradient 6.676e-04, dot -0.607; [2817d6ee-b281-4671-9be3-0b1d05c403b4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -96.04491726536006, -61.07125685796241, -56.07962948917531, -56.07962280510873
LBFGS Accumulation History: 3 points
Removed measurement 4430cd2d to history. Total: 3
th(0)=-96.04491726536006;dx=-4.456370498952584E-7
New Minimum: -96.04491726536006 > -99.25473906183552
END: th(1.0080000000000004E7)=-99.25473906183552; dx=-2.1373646610100614E-7 evalInputDelta=3.2098217964754667
Fitness changed from -96.04491726536006 to -99.25473906183552
Iteration 9 complete. Error: -99.25473906183552 Total: 6.6230; Orientation: 0.9435; Line Search: 3.7066
Adding measurement 5b42585c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.462e+04, gradient 7.126e-04, dot -0.530; [2817d6ee-b281-4671-9be3-0b1d05c403b4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -99.25473906183552, -61.07125685796241, -56.07962948917531, -56.07962280510873
LBFGS Accumulation History: 3 points
Removed measurement 5b42585c to history. Total: 3
th(0)=-99.25473906183552;dx=-5.078091395797787E-7
New Minimum: -99.25473906183552 > -101.79094148588172
WOLF (strong): th(2.1716701675521396E7)=-101.79094148588172; dx=5.455589300347736E-8 evalInputDelta=2.536202424046195
New Minimum: -101.79094148588172 > -101.89379556033771
END: th(1.0858350837760698E7)=-101.89379556033771; dx=-5.847080685105186E-8 evalInputDelta=2.6390564985021854
Fitness changed from -99.25473906183552 to -101.89379556033771
Iteration 10 complete. Error: -101.89379556033771 Total: 8.6371; Orientation: 0.9452; Line Search: 5.6733
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -101.89379556033771 (> -Infinity) after 95.446s (< 5400.000s)
Returns
-101.89379556033771