BasicOptimizer.scala:89 executed in 7.83 seconds (0.355 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: 146313739149500
Reset training subject: 146313872409000
Adding measurement 46662fb0 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-13.613737438554427;dx=-0.6376820261622509
New Minimum: -13.613737438554427 > -15.368085593513927
WOLFE (weak): th(2.154434690031884)=-15.368085593513927; dx=-0.6254733897048748 evalInputDelta=1.7543481549594997
New Minimum: -15.368085593513927 > -17.160822691503423
WOLFE (weak): th(4.308869380063768)=-17.160822691503423; dx=-0.6423449583801699 evalInputDelta=3.547085252948996
New Minimum: -17.160822691503423 > -24.73763945213978
WOLFE (weak): th(12.926608140191302)=-24.73763945213978; dx=-0.6256922475902147 evalInputDelta=11.123902013585354
New Minimum: -24.73763945213978 > -60.47173563365678
END: th(51.70643256076521)=-60.47173563365678; dx=-0.5516807068545587 evalInputDelta=46.857998195102354
Fitness changed from -13.613737438554427 to -60.47173563365678
Iteration 1 complete. Error: -60.47173563365678 Total: 0.9206; Orientation: 0.0014; Line Search: 0.5657
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/65dd5e2b-bbd5-4745-9f98-67cfeb5b8758.jpg)
Adding measurement 5868492e to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-60.47173563365678;dx=-0.98769494933146
New Minimum: -60.47173563365678 > -189.96526203822108
END: th(111.39813200670669)=-189.96526203822108; dx=-0.4498225237947928 evalInputDelta=129.4935264045643
Fitness changed from -60.47173563365678 to -189.96526203822108
Iteration 2 complete. Error: -189.96526203822108 Total: 0.3505; Orientation: 0.0017; Line Search: 0.2300
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/96939698-bd84-4569-ad67-3ed0b6680e1a.jpg)
Adding measurement 2f764b1c to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-189.96526203822108;dx=-0.9191808376450159
New Minimum: -189.96526203822108 > -297.82950502342777
END: th(240.0)=-297.82950502342777; dx=-0.036041650546765676 evalInputDelta=107.86424298520669
Fitness changed from -189.96526203822108 to -297.82950502342777
Iteration 3 complete. Error: -297.82950502342777 Total: 0.3493; Orientation: 0.0015; Line Search: 0.2254
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/621cd6ba-b987-4313-a087-aec4468c3943.jpg)
Adding measurement 78a853bf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.636e+03, gradient 1.149e+00, dot -0.102; [1db6c8fb-0382-4b44-ac1e-6eae77cfb64f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -297.82950502342777, -189.96526203822108, -60.47173563365678, -13.613737438554427
LBFGS Accumulation History: 3 points
Removed measurement 78a853bf to history. Total: 3
th(0)=-297.82950502342777;dx=-1.2890235550717821
New Minimum: -297.82950502342777 > -326.8745817396942
WOLF (strong): th(517.0643256076521)=-326.8745817396942; dx=0.24307058644150176 evalInputDelta=29.045076716266408
New Minimum: -326.8745817396942 > -449.15347460528454
WOLF (strong): th(258.53216280382605)=-449.15347460528454; dx=0.1146781564786831 evalInputDelta=151.32396958185677
END: th(86.17738760127536)=-414.12973510724873; dx=-0.36638786278062463 evalInputDelta=116.30023008382096
Fitness changed from -297.82950502342777 to -449.15347460528454
Iteration 4 complete. Error: -449.15347460528454 Total: 0.6116; Orientation: 0.0294; Line Search: 0.4621
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/85d930b8-7a35-47a2-a7aa-35f5f0a9b745.jpg)
Adding measurement 19b93e71 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.840e+03, gradient 9.677e-01, dot -0.122; [1db6c8fb-0382-4b44-ac1e-6eae77cfb64f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -449.15347460528454, -189.96526203822108, -60.47173563365678, -13.613737438554427
LBFGS Accumulation History: 3 points
Removed measurement 19b93e71 to history. Total: 3
th(0)=-449.15347460528454;dx=-0.9074686840515851
New Minimum: -449.15347460528454 > -575.0510575157653
END: th(185.66355334451117)=-575.0510575157653; dx=-0.10838446931634135 evalInputDelta=125.89758291048071
Fitness changed from -449.15347460528454 to -575.0510575157653
Iteration 5 complete. Error: -575.0510575157653 Total: 0.3745; Orientation: 0.0278; Line Search: 0.2218
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/cd1566c8-1085-4051-8e4d-c423df90b0cf.jpg)
Adding measurement 23d775a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.947e+03, gradient 7.074e-01, dot -0.135; [1db6c8fb-0382-4b44-ac1e-6eae77cfb64f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -575.0510575157653, -189.96526203822108, -60.47173563365678, -13.613737438554427
LBFGS Accumulation History: 3 points
Removed measurement 23d775a to history. Total: 3
th(0)=-575.0510575157653;dx=-0.4774298070266362
New Minimum: -575.0510575157653 > -638.3684281040221
WOLF (strong): th(400.00000000000006)=-638.3684281040221; dx=0.072695948628758 evalInputDelta=63.317370588256836
New Minimum: -638.3684281040221 > -659.2364190865064
END: th(200.00000000000003)=-659.2364190865064; dx=-0.09539870403301887 evalInputDelta=84.18536157074118
Fitness changed from -575.0510575157653 to -659.2364190865064
Iteration 6 complete. Error: -659.2364190865064 Total: 0.4878; Orientation: 0.0290; Line Search: 0.3390
Adding measurement 49d8817f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.865e+03, gradient 6.960e-01, dot -0.157; [1db6c8fb-0382-4b44-ac1e-6eae77cfb64f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -659.2364190865064, -189.96526203822108, -60.47173563365678, -13.613737438554427
LBFGS Accumulation History: 3 points
Removed measurement 49d8817f to history. Total: 3
th(0)=-659.2364190865064;dx=-0.4671660652378491
New Minimum: -659.2364190865064 > -705.2215299109919
WOLF (strong): th(430.88693800637685)=-705.2215299109919; dx=0.01298758089089374 evalInputDelta=45.985110824485446
New Minimum: -705.2215299109919 > -727.3017341516518
END: th(215.44346900318843)=-727.3017341516518; dx=-0.05787759793736291 evalInputDelta=68.06531506514534
Fitness changed from -659.2364190865064 to -727.3017341516518
Iteration 7 complete. Error: -727.3017341516518 Total: 0.8505; Orientation: 0.0279; Line Search: 0.7108
Adding measurement 9972cdc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.108e+03, gradient 7.055e-01, dot -0.151; [1db6c8fb-0382-4b44-ac1e-6eae77cfb64f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -727.3017341516518, -189.96526203822108, -60.47173563365678, -13.613737438554427
LBFGS Accumulation History: 3 points
Removed measurement 9972cdc to history. Total: 3
th(0)=-727.3017341516518;dx=-0.48138651287032275
New Minimum: -727.3017341516518 > -787.4077723771845
WOLF (strong): th(464.158883361278)=-787.4077723771845; dx=0.07636887322276108 evalInputDelta=60.10603822553276
New Minimum: -787.4077723771845 > -817.604465802383
END: th(232.079441680639)=-817.604465802383; dx=-0.03713522123744313 evalInputDelta=90.30273165073118
Fitness changed from -727.3017341516518 to -817.604465802383
Iteration 8 complete. Error: -817.604465802383 Total: 0.4954; Orientation: 0.0277; Line Search: 0.3422
Adding measurement 1ff02b6c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.842e+03, gradient 7.125e-01, dot -0.183; [1db6c8fb-0382-4b44-ac1e-6eae77cfb64f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -817.604465802383, -189.96526203822108, -60.47173563365678, -13.613737438554427
LBFGS Accumulation History: 3 points
Removed measurement 1ff02b6c to history. Total: 3
th(0)=-817.604465802383;dx=-0.49028062452789395
New Minimum: -817.604465802383 > -827.3358976256258
WOLF (strong): th(500.00000000000017)=-827.3358976256258; dx=0.10235285284444601 evalInputDelta=9.731431823242815
New Minimum: -827.3358976256258 > -889.9368657382388
END: th(250.00000000000009)=-889.9368657382388; dx=-0.004933408063228129 evalInputDelta=72.33239993585585
Fitness changed from -817.604465802383 to -889.9368657382388
Iteration 9 complete. Error: -889.9368657382388 Total: 0.4796; Orientation: 0.0268; Line Search: 0.3408
Adding measurement 22586d1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.770e+03, gradient 7.019e-01, dot -0.201; [1db6c8fb-0382-4b44-ac1e-6eae77cfb64f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -889.9368657382388, -189.96526203822108, -60.47173563365678, -13.613737438554427
LBFGS Accumulation History: 3 points
Removed measurement 22586d1 to history. Total: 3
th(0)=-889.9368657382388;dx=-0.4767902618436066
New Minimum: -889.9368657382388 > -908.3493270763181
WOLF (strong): th(538.6086725079712)=-908.3493270763181; dx=0.13820367585336757 evalInputDelta=18.41246133807931
New Minimum: -908.3493270763181 > -974.4943560636973
END: th(269.3043362539856)=-974.4943560636973; dx=-0.011995617743066131 evalInputDelta=84.5574903254585
Fitness changed from -889.9368657382388 to -974.4943560636973
Iteration 10 complete. Error: -974.4943560636973 Total: 0.4765; Orientation: 0.0279; Line Search: 0.3412
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/39161c42-65d6-4a6e-8f10-1d416acec6a7.jpg)
Adding measurement 53c5a4f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.554e+03, gradient 6.610e-01, dot -0.201; [1db6c8fb-0382-4b44-ac1e-6eae77cfb64f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -974.4943560636973, -189.96526203822108, -60.47173563365678, -13.613737438554427
LBFGS Accumulation History: 3 points
Removed measurement 53c5a4f to history. Total: 3
th(0)=-974.4943560636973;dx=-0.4205795490319434
New Minimum: -974.4943560636973 > -1009.7428509278984
WOLF (strong): th(580.1986042015976)=-1009.7428509278984; dx=0.07474086270617995 evalInputDelta=35.24849486420112
New Minimum: -1009.7428509278984 > -1066.571786144749
END: th(290.0993021007988)=-1066.571786144749; dx=-0.045882773861036064 evalInputDelta=92.07743008105172
Fitness changed from -974.4943560636973 to -1066.571786144749
Iteration 11 complete. Error: -1066.571786144749 Total: 0.4904; Orientation: 0.0267; Line Search: 0.3406
Adding measurement 67b290ab to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.033e+04, gradient 6.310e-01, dot -0.251; [1db6c8fb-0382-4b44-ac1e-6eae77cfb64f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1066.571786144749, -189.96526203822108, -60.47173563365678, -13.613737438554427
LBFGS Accumulation History: 3 points
Removed measurement 67b290ab to history. Total: 3
th(0)=-1066.571786144749;dx=-0.3829838576685541
New Minimum: -1066.571786144749 > -1111.7807787509191
WOLF (strong): th(625.0000000000003)=-1111.7807787509191; dx=0.07175607470183366 evalInputDelta=45.20899260617011
New Minimum: -1111.7807787509191 > -1157.3138619233764
END: th(312.50000000000017)=-1157.3138619233764; dx=-0.07429545433709896 evalInputDelta=90.7420757786274
Fitness changed from -1066.571786144749 to -1157.3138619233764
Iteration 12 complete. Error: -1157.3138619233764 Total: 0.4810; Orientation: 0.0275; Line Search: 0.3454
Adding measurement 773ec18f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.167e+04, gradient 6.238e-01, dot -0.239; [1db6c8fb-0382-4b44-ac1e-6eae77cfb64f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1157.3138619233764, -189.96526203822108, -60.47173563365678, -13.613737438554427
LBFGS Accumulation History: 3 points
Removed measurement 773ec18f to history. Total: 3
th(0)=-1157.3138619233764;dx=-0.3727423641616458
New Minimum: -1157.3138619233764 > -1207.1382998646013
WOLF (strong): th(673.2608406349641)=-1207.1382998646013; dx=0.04699539257398336 evalInputDelta=49.824437941224915
New Minimum: -1207.1382998646013 > -1256.88255219014
END: th(336.63042031748205)=-1256.88255219014; dx=-0.06805828525016536 evalInputDelta=99.5686902667635
Fitness changed from -1157.3138619233764 to -1256.88255219014
Iteration 13 complete. Error: -1256.88255219014 Total: 0.4870; Orientation: 0.0267; Line Search: 0.3492
Adding measurement 6d4fd8af to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.753e+04, gradient 6.248e-01, dot -0.266; [1db6c8fb-0382-4b44-ac1e-6eae77cfb64f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1256.88255219014, -189.96526203822108, -60.47173563365678, -13.613737438554427
LBFGS Accumulation History: 3 points
Removed measurement 6d4fd8af to history. Total: 3
th(0)=-1256.88255219014;dx=-0.3757649688282251
New Minimum: -1256.88255219014 > -1299.2866311942103
WOLF (strong): th(725.2482552519972)=-1299.2866311942103; dx=0.06186529070995281 evalInputDelta=42.404079004070354
New Minimum: -1299.2866311942103 > -1358.3641816538009
END: th(362.6241276259986)=-1358.3641816538009; dx=-0.06618823723183657 evalInputDelta=101.48162946366097
Fitness changed from -1256.88255219014 to -1358.3641816538009
Iteration 14 complete. Error: -1358.3641816538009 Total: 0.4857; Orientation: 0.0276; Line Search: 0.3454
Adding measurement 521ad004 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.127e+04, gradient 6.526e-01, dot -0.282; [1db6c8fb-0382-4b44-ac1e-6eae77cfb64f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1358.3641816538009, -189.96526203822108, -60.47173563365678, -13.613737438554427
LBFGS Accumulation History: 3 points
Removed measurement 521ad004 to history. Total: 3
th(0)=-1358.3641816538009;dx=-0.4111767616078047
New Minimum: -1358.3641816538009 > -1388.476908342375
WOLF (strong): th(781.2500000000006)=-1388.476908342375; dx=0.09019089624745683 evalInputDelta=30.112726688574185
New Minimum: -1388.476908342375 > -1469.5315580143217
END: th(390.6250000000003)=-1469.5315580143217; dx=-0.039412958019169754 evalInputDelta=111.16737636052085
Fitness changed from -1358.3641816538009 to -1469.5315580143217
Iteration 15 complete. Error: -1469.5315580143217 Total: 0.4801; Orientation: 0.0273; Line Search: 0.3420
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/1e3ad5fa-4301-48b9-af81-f2f0a2ce2d46.jpg)
Final threshold in iteration 16: -1469.5315580143217 (> -Infinity) after 7.830s (< 5400.000s)
Returns
-1469.5315580143217