BasicOptimizer.scala:89 executed in 44.11 seconds (0.730 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: 214749259862100
Reset training subject: 214749879145900
Adding measurement 3221c292 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-86.54110393382129;dx=-0.0377361521489028
New Minimum: -86.54110393382129 > -86.59295701528401
WOLFE (weak): th(2.154434690031884)=-86.59295701528401; dx=-0.037730449955520676 evalInputDelta=0.05185308146272405
New Minimum: -86.59295701528401 > -86.64476380644851
WOLFE (weak): th(4.308869380063768)=-86.64476380644851; dx=-0.03773121876497089 evalInputDelta=0.10365987262721887
New Minimum: -86.64476380644851 > -86.85170595908818
WOLFE (weak): th(12.926608140191302)=-86.85170595908818; dx=-0.037657028679797214 evalInputDelta=0.3106020252668884
New Minimum: -86.85170595908818 > -87.78568600464686
WOLFE (weak): th(51.70643256076521)=-87.78568600464686; dx=-0.03763245225339376 evalInputDelta=1.2445820708255724
New Minimum: -87.78568600464686 > -92.75294080072972
WOLFE (weak): th(258.53216280382605)=-92.75294080072972; dx=-0.036695074003706335 evalInputDelta=6.211836866908428
New Minimum: -92.75294080072972 > -120.89156178912127
END: th(1551.1929768229563)=-120.89156178912127; dx=-0.02948709227970992 evalInputDelta=34.35045785529998
Fitness changed from -86.54110393382129 to -120.89156178912127
Iteration 1 complete. Error: -120.89156178912127 Total: 6.1750; Orientation: 0.0169; Line Search: 4.4322
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/cd4f5048-9c68-4b0a-84c9-81029cd7e8d6.jpg)
Adding measurement 41416b6e to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-120.89156178912127;dx=-0.037544833954647756
New Minimum: -120.89156178912127 > -182.17777631340368
END: th(3341.943960201201)=-182.17777631340368; dx=-0.021358692051007815 evalInputDelta=61.286214524282414
Fitness changed from -120.89156178912127 to -182.17777631340368
Iteration 2 complete. Error: -182.17777631340368 Total: 1.7940; Orientation: 0.0184; Line Search: 1.2121
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/ed821f17-95bc-460b-b770-286076396d1d.jpg)
Adding measurement 3bb48782 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-182.17777631340368;dx=-0.04057647320066726
New Minimum: -182.17777631340368 > -267.04076780060603
END: th(7200.000000000001)=-267.04076780060603; dx=-0.013414972274934078 evalInputDelta=84.86299148720235
Fitness changed from -182.17777631340368 to -267.04076780060603
Iteration 3 complete. Error: -267.04076780060603 Total: 1.8093; Orientation: 0.0161; Line Search: 1.2339
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/290b4aeb-2d8a-49a3-8d04-c4c805a21288.jpg)
Adding measurement c1c1839 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.043e+04, gradient 2.224e-01, dot -0.269; [e3100392-55a3-413e-8759-2b394d7ef923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -267.04076780060603, -182.17777631340368, -120.89156178912127, -86.54110393382129
LBFGS Accumulation History: 3 points
Removed measurement c1c1839 to history. Total: 3
th(0)=-267.04076780060603;dx=-0.049477661699773134
New Minimum: -267.04076780060603 > -296.406187995718
END: th(15511.929768229566)=-296.406187995718; dx=-0.004142929785065152 evalInputDelta=29.365420195111994
Fitness changed from -267.04076780060603 to -296.406187995718
Iteration 4 complete. Error: -296.406187995718 Total: 2.1182; Orientation: 0.2898; Line Search: 1.2629
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/9f067886-cab5-4267-a032-1f23ba1d184e.jpg)
Adding measurement 2ebee78b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.640e+03, gradient 2.596e-01, dot -0.143; [e3100392-55a3-413e-8759-2b394d7ef923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -296.406187995718, -182.17777631340368, -120.89156178912127, -86.54110393382129
LBFGS Accumulation History: 3 points
Removed measurement 2ebee78b to history. Total: 3
th(0)=-296.406187995718;dx=-0.06741395758721422
Armijo: th(33419.43960201202)=-221.01363358773398; dx=-0.0011970847785238415 evalInputDelta=-75.39255440798405
New Minimum: -296.406187995718 > -365.4962869677738
END: th(16709.71980100601)=-365.4962869677738; dx=-0.006349685204927623 evalInputDelta=69.09009897205578
Fitness changed from -296.406187995718 to -365.4962869677738
Iteration 5 complete. Error: -365.4962869677738 Total: 3.0210; Orientation: 0.2914; Line Search: 2.1175
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/879e144b-bbc7-4f11-bfba-5e56f10133b1.jpg)
Adding measurement 18240a85 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.307e+03, gradient 2.461e-01, dot -0.133; [e3100392-55a3-413e-8759-2b394d7ef923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -365.4962869677738, -182.17777631340368, -120.89156178912127, -86.54110393382129
LBFGS Accumulation History: 3 points
Removed measurement 18240a85 to history. Total: 3
th(0)=-365.4962869677738;dx=-0.060566544588236085
Armijo: th(36000.000000000015)=-324.017695215708; dx=-8.274194132607271E-4 evalInputDelta=-41.478591752065824
New Minimum: -365.4962869677738 > -506.2651293823152
END: th(18000.000000000007)=-506.2651293823152; dx=-0.009595414630925609 evalInputDelta=140.76884241454138
Fitness changed from -365.4962869677738 to -506.2651293823152
Iteration 6 complete. Error: -506.2651293823152 Total: 2.7354; Orientation: 0.2838; Line Search: 1.8756
Adding measurement 763dade0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.919e+04, gradient 2.369e-01, dot -0.148; [e3100392-55a3-413e-8759-2b394d7ef923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -506.2651293823152, -182.17777631340368, -120.89156178912127, -86.54110393382129
LBFGS Accumulation History: 3 points
Removed measurement 763dade0 to history. Total: 3
th(0)=-506.2651293823152;dx=-0.05610703086853715
Armijo: th(38779.824420573925)=-436.4866927134083; dx=-0.0013041726195654581 evalInputDelta=-69.77843666890692
New Minimum: -506.2651293823152 > -656.8074914623143
END: th(19389.912210286962)=-656.8074914623143; dx=-0.010922195462451989 evalInputDelta=150.54236207999907
Fitness changed from -506.2651293823152 to -656.8074914623143
Iteration 7 complete. Error: -656.8074914623143 Total: 2.7269; Orientation: 0.3039; Line Search: 1.8650
Adding measurement 7c5350c2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.594e+04, gradient 2.368e-01, dot -0.160; [e3100392-55a3-413e-8759-2b394d7ef923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -656.8074914623143, -182.17777631340368, -120.89156178912127, -86.54110393382129
LBFGS Accumulation History: 3 points
Removed measurement 7c5350c2 to history. Total: 3
th(0)=-656.8074914623143;dx=-0.056062910828446284
Armijo: th(41774.29950251503)=-523.5208539163223; dx=-0.0013295758592256131 evalInputDelta=-133.286637545992
New Minimum: -656.8074914623143 > -782.0494344846527
END: th(20887.149751257515)=-782.0494344846527; dx=-0.010305101288484796 evalInputDelta=125.24194302233843
Fitness changed from -656.8074914623143 to -782.0494344846527
Iteration 8 complete. Error: -782.0494344846527 Total: 2.7858; Orientation: 0.3298; Line Search: 1.8733
Adding measurement 5bab05e2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.281e+05, gradient 2.375e-01, dot -0.161; [e3100392-55a3-413e-8759-2b394d7ef923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -782.0494344846527, -182.17777631340368, -120.89156178912127, -86.54110393382129
LBFGS Accumulation History: 3 points
Removed measurement 5bab05e2 to history. Total: 3
th(0)=-782.0494344846527;dx=-0.05642112673445439
Armijo: th(45000.00000000002)=-620.7281657364598; dx=-7.499275086269422E-4 evalInputDelta=-161.3212687481929
New Minimum: -782.0494344846527 > -902.5127983607547
END: th(22500.00000000001)=-902.5127983607547; dx=-0.009661120585229412 evalInputDelta=120.463363876102
Fitness changed from -782.0494344846527 to -902.5127983607547
Iteration 9 complete. Error: -902.5127983607547 Total: 3.0154; Orientation: 0.3240; Line Search: 2.1008
Adding measurement 3994c313 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.359e+04, gradient 2.413e-01, dot 0.257; [e3100392-55a3-413e-8759-2b394d7ef923 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-902.5127983607547;dx=-841.6925540095797
Armijo: th(48474.78052571741)=281.63291462327845; dx=0.015792727389154687 evalInputDelta=-1184.1457129840333
Armijo: th(24237.390262858706)=270.5423869864881; dx=0.03125769026157127 evalInputDelta=-1173.0551853472427
Armijo: th(8079.130087619568)=248.62768088892108; dx=0.09190354356924166 evalInputDelta=-1151.1404792496758
Armijo: th(2019.782521904892)=211.68033927637725; dx=0.3546923440089701 evalInputDelta=-1114.193137637132
Armijo: th(403.9565043809784)=140.51652347188633; dx=1.6299985375434487 evalInputDelta=-1043.029321832641
Armijo: th(67.3260840634964)=0.7034254345535942; dx=7.782490284492531 evalInputDelta=-903.2162237953082
Armijo: th(9.618012009070913)=-268.31392926328516; dx=30.46354092691796 evalInputDelta=-634.1988690974695
Armijo: th(1.2022515011338641)=-788.5052525923459; dx=-16.52637147295975 evalInputDelta=-114.00754576840882
New Minimum: -902.5127983607547 > -926.6596032541889
END: th(0.1335835001259849)=-926.6596032541889; dx=-369.7711112307626 evalInputDelta=24.14680489343425
Fitness changed from -902.5127983607547 to -926.6596032541889
Iteration 10 complete. Error: -926.6596032541889 Total: 6.9008; Orientation: 0.2831; Line Search: 6.0570
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/9c272f9f-f5eb-4893-b631-e7d1d9d16072.jpg)
Adding measurement 5953484 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 4.784e+04, gradient 2.358e-01, dot -0.147; [e3100392-55a3-413e-8759-2b394d7ef923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -926.6596032541889, -902.5127983607547, -182.17777631340368, -120.89156178912127, -86.54110393382129
Rejected: LBFGS Orientation magnitude: 1.273e+05, gradient 2.358e-01, dot -0.161; [e3100392-55a3-413e-8759-2b394d7ef923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -926.6596032541889, -902.5127983607547, -182.17777631340368, -120.89156178912127
LBFGS Accumulation History: 3 points
Removed measurement 5953484 to history. Total: 4
Removed measurement 3994c313 to history. Total: 3
th(0)=-926.6596032541889;dx=-0.055604531472527856
New Minimum: -926.6596032541889 > -926.6660879164801
END: th(0.2877969266873004)=-926.6660879164801; dx=-0.04474050409512274 evalInputDelta=0.0064846622912000385
Fitness changed from -926.6596032541889 to -926.6660879164801
Iteration 11 complete. Error: -926.6660879164801 Total: 2.4144; Orientation: 0.6314; Line Search: 1.2165
Adding measurement 70ec2a5f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.181e+07, gradient 2.358e-01, dot -0.144; [e3100392-55a3-413e-8759-2b394d7ef923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -926.6660879164801, -182.17777631340368, -120.89156178912127, -86.54110393382129
LBFGS Accumulation History: 3 points
Removed measurement 70ec2a5f to history. Total: 3
th(0)=-926.6660879164801;dx=-0.05560604747021265
New Minimum: -926.6660879164801 > -926.6800580313784
END: th(0.6200396825396828)=-926.6800580313784; dx=-0.044741825450729474 evalInputDelta=0.013970114898256725
Fitness changed from -926.6660879164801 to -926.6800580313784
Iteration 12 complete. Error: -926.6800580313784 Total: 2.3024; Orientation: 0.2865; Line Search: 1.2807
Adding measurement 185ca099 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.067e+07, gradient 2.358e-01, dot -0.144; [e3100392-55a3-413e-8759-2b394d7ef923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -926.6800580313784, -182.17777631340368, -120.89156178912127, -86.54110393382129
LBFGS Accumulation History: 3 points
Removed measurement 185ca099 to history. Total: 3
th(0)=-926.6800580313784;dx=-0.05561209846708448
New Minimum: -926.6800580313784 > -926.7102818861332
END: th(1.3358350012598492)=-926.7102818861332; dx=-0.04473001071327607 evalInputDelta=0.0302238547548086
Fitness changed from -926.6800580313784 to -926.7102818861332
Iteration 13 complete. Error: -926.7102818861332 Total: 2.0835; Orientation: 0.2914; Line Search: 1.2169
Adding measurement 2ca3de0f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.172e+07, gradient 2.358e-01, dot -0.144; [e3100392-55a3-413e-8759-2b394d7ef923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -926.7102818861332, -182.17777631340368, -120.89156178912127, -86.54110393382129
LBFGS Accumulation History: 3 points
Removed measurement 2ca3de0f to history. Total: 3
th(0)=-926.7102818861332;dx=-0.05559177656548758
New Minimum: -926.7102818861332 > -926.7752184874788
END: th(2.8779692668730044)=-926.7752184874788; dx=-0.04471694918712123 evalInputDelta=0.06493660134560741
Fitness changed from -926.7102818861332 to -926.7752184874788
Iteration 14 complete. Error: -926.7752184874788 Total: 2.1121; Orientation: 0.2976; Line Search: 1.2238
Adding measurement 8a2278e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.221e+07, gradient 2.358e-01, dot -0.144; [e3100392-55a3-413e-8759-2b394d7ef923 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -926.7752184874788, -182.17777631340368, -120.89156178912127, -86.54110393382129
LBFGS Accumulation History: 3 points
Removed measurement 8a2278e to history. Total: 3
th(0)=-926.7752184874788;dx=-0.055575972097212795
New Minimum: -926.7752184874788 > -926.9149045709225
END: th(6.200396825396829)=-926.9149045709225; dx=-0.044684089944097526 evalInputDelta=0.1396860834437348
Fitness changed from -926.7752184874788 to -926.9149045709225
Iteration 15 complete. Error: -926.9149045709225 Total: 2.0912; Orientation: 0.3156; Line Search: 1.2233
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/84cfac81-9aed-4b01-bed9-d3db535fb107.jpg)
Final threshold in iteration 16: -926.9149045709225 (> -Infinity) after 44.108s (< 5400.000s)
Returns
-926.9149045709225