BasicOptimizer.scala:89 executed in 62.39 seconds (1.464 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: 150349092456300
Reset training subject: 150350865000500
Adding measurement 5f399945 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-158.95259587177242;dx=-0.01858843205654758
New Minimum: -158.95259587177242 > -158.98914074552388
WOLFE (weak): th(2.154434690031884)=-158.98914074552388; dx=-0.017937733407421313 evalInputDelta=0.036544873751466866
New Minimum: -158.98914074552388 > -159.0256649392638
WOLFE (weak): th(4.308869380063768)=-159.0256649392638; dx=-0.01799273001084325 evalInputDelta=0.07306906749138875
New Minimum: -159.0256649392638 > -159.1718680978206
WOLFE (weak): th(12.926608140191302)=-159.1718680978206; dx=-0.017793018630596062 evalInputDelta=0.21927222604819008
New Minimum: -159.1718680978206 > -159.83016498966958
WOLFE (weak): th(51.70643256076521)=-159.83016498966958; dx=-0.017984540336109703 evalInputDelta=0.877569117897167
New Minimum: -159.83016498966958 > -163.3539640722716
WOLFE (weak): th(258.53216280382605)=-163.3539640722716; dx=-0.01797611579471765 evalInputDelta=4.401368200499178
New Minimum: -163.3539640722716 > -185.79082450096936
WOLFE (weak): th(1551.1929768229563)=-185.79082450096936; dx=-0.018490838279294396 evalInputDelta=26.838228629196948
New Minimum: -185.79082450096936 > -336.00970735605244
END: th(10858.350837760694)=-336.00970735605244; dx=-0.014826556960483918 evalInputDelta=177.05711148428003
Fitness changed from -158.95259587177242 to -336.00970735605244
Iteration 1 complete. Error: -336.00970735605244 Total: 10.3007; Orientation: 0.0153; Line Search: 6.8497
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a06cb5de-0a2e-4e67-99cc-195304c47eea.jpg)
Adding measurement 48ac5bda to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-336.00970735605244;dx=-0.02451920331685741
New Minimum: -336.00970735605244 > -714.1466498556161
END: th(23393.607721408407)=-714.1466498556161; dx=-0.010262097195645891 evalInputDelta=378.1369424995637
Fitness changed from -336.00970735605244 to -714.1466498556161
Iteration 2 complete. Error: -714.1466498556161 Total: 2.8277; Orientation: 0.0145; Line Search: 1.7363
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/f56cc2f0-0213-4038-93c2-a9602cac51b4.jpg)
Adding measurement 51bbd709 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-714.1466498556161;dx=-0.03688374408226379
New Minimum: -714.1466498556161 > -993.8955553779281
END: th(50400.00000000001)=-993.8955553779281; dx=-0.0014725532655784585 evalInputDelta=279.74890552231193
Fitness changed from -714.1466498556161 to -993.8955553779281
Iteration 3 complete. Error: -993.8955553779281 Total: 2.7059; Orientation: 0.0150; Line Search: 1.7556
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/61280efe-6b8e-4b58-8d1d-f254b167ae83.jpg)
Adding measurement 7f700516 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.545e+04, gradient 1.940e-01, dot -0.140; [751ef4d9-6109-41fc-8475-df0cdd085369 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -993.8955553779281, -714.1466498556161, -336.00970735605244, -158.95259587177242
LBFGS Accumulation History: 3 points
Removed measurement 7f700516 to history. Total: 3
th(0)=-993.8955553779281;dx=-0.03753792724026096
Armijo: th(108583.50837760697)=-907.5374303575583; dx=0.001909203197394405 evalInputDelta=-86.35812502036981
New Minimum: -993.8955553779281 > -1416.1149317763725
END: th(54291.75418880348)=-1416.1149317763725; dx=-5.309054410190195E-4 evalInputDelta=422.2193763984444
Fitness changed from -993.8955553779281 to -1416.1149317763725
Iteration 4 complete. Error: -1416.1149317763725 Total: 3.8389; Orientation: 0.3117; Line Search: 2.5834
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/5c88b8ac-85d5-4342-90b2-497cdec6aac8.jpg)
Adding measurement 747e376 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.167e+04, gradient 1.789e-01, dot -0.129; [751ef4d9-6109-41fc-8475-df0cdd085369 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1416.1149317763725, -714.1466498556161, -336.00970735605244, -158.95259587177242
LBFGS Accumulation History: 3 points
Removed measurement 747e376 to history. Total: 3
th(0)=-1416.1149317763725;dx=-0.03196354362056504
Armijo: th(116968.03860704206)=-1201.0327326929937; dx=0.0031290635588764083 evalInputDelta=-215.08219908337878
New Minimum: -1416.1149317763725 > -1847.0421624857404
END: th(58484.01930352103)=-1847.0421624857404; dx=-5.722484096281966E-4 evalInputDelta=430.9272307093679
Fitness changed from -1416.1149317763725 to -1847.0421624857404
Iteration 5 complete. Error: -1847.0421624857404 Total: 3.9407; Orientation: 0.2895; Line Search: 2.7335
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/4b75f86f-617d-4675-9863-046c6eae44c3.jpg)
Adding measurement 2b7bbfd9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.356e+04, gradient 1.714e-01, dot -0.133; [751ef4d9-6109-41fc-8475-df0cdd085369 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1847.0421624857404, -714.1466498556161, -336.00970735605244, -158.95259587177242
LBFGS Accumulation History: 3 points
Removed measurement 2b7bbfd9 to history. Total: 3
th(0)=-1847.0421624857404;dx=-0.029169915497449676
Armijo: th(126000.00000000004)=-1558.3578696820573; dx=0.004093539181957561 evalInputDelta=-288.6842928036831
New Minimum: -1847.0421624857404 > -2235.71140803101
WOLF (strong): th(63000.00000000002)=-2235.71140803101; dx=1.703048661667603E-4 evalInputDelta=388.6692455452694
END: th(21000.000000000007)=-2230.3125341530053; dx=-0.01186311241496939 evalInputDelta=383.27037166726495
Fitness changed from -1847.0421624857404 to -2235.71140803101
Iteration 6 complete. Error: -2235.71140803101 Total: 4.7395; Orientation: 0.2928; Line Search: 3.4944
Adding measurement 25eae298 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.067e+04, gradient 1.681e-01, dot -0.117; [751ef4d9-6109-41fc-8475-df0cdd085369 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2235.71140803101, -714.1466498556161, -336.00970735605244, -158.95259587177242
LBFGS Accumulation History: 3 points
Removed measurement 25eae298 to history. Total: 3
th(0)=-2235.71140803101;dx=-0.028206963791419418
New Minimum: -2235.71140803101 > -2642.9225300791545
END: th(45243.12849066957)=-2642.9225300791545; dx=-0.002515385570139441 evalInputDelta=407.2111220481447
Fitness changed from -2235.71140803101 to -2642.9225300791545
Iteration 7 complete. Error: -2642.9225300791545 Total: 2.9269; Orientation: 0.2979; Line Search: 1.7607
Adding measurement 7038b0ba to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.052e+05, gradient 1.520e-01, dot -0.136; [751ef4d9-6109-41fc-8475-df0cdd085369 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2642.9225300791545, -714.1466498556161, -336.00970735605244, -158.95259587177242
LBFGS Accumulation History: 3 points
Removed measurement 7038b0ba to history. Total: 3
th(0)=-2642.9225300791545;dx=-0.02283408478456976
Armijo: th(97473.3655058684)=-2633.4295130115024; dx=0.0024094161329556263 evalInputDelta=-9.49301706765209
New Minimum: -2642.9225300791545 > -2918.9660840784018
END: th(48736.6827529342)=-2918.9660840784018; dx=-0.0022418264521228397 evalInputDelta=276.04355399924725
Fitness changed from -2642.9225300791545 to -2918.9660840784018
Iteration 8 complete. Error: -2918.9660840784018 Total: 3.9858; Orientation: 0.2871; Line Search: 2.7589
Adding measurement 16a4fbce to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.473e+05, gradient 1.532e-01, dot -0.141; [751ef4d9-6109-41fc-8475-df0cdd085369 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2918.9660840784018, -714.1466498556161, -336.00970735605244, -158.95259587177242
LBFGS Accumulation History: 3 points
Removed measurement 16a4fbce to history. Total: 3
th(0)=-2918.9660840784018;dx=-0.02342166229065333
Armijo: th(105000.00000000004)=-2736.0370977017105; dx=0.002846131196237774 evalInputDelta=-182.92898637669123
New Minimum: -2918.9660840784018 > -3104.1464205156303
END: th(52500.00000000002)=-3104.1464205156303; dx=-6.029612795999536E-4 evalInputDelta=185.18033643722856
Fitness changed from -2918.9660840784018 to -3104.1464205156303
Iteration 9 complete. Error: -3104.1464205156303 Total: 3.7657; Orientation: 0.2825; Line Search: 2.6008
Adding measurement 24229291 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.056e+05, gradient 1.621e-01, dot -0.154; [751ef4d9-6109-41fc-8475-df0cdd085369 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3104.1464205156303, -714.1466498556161, -336.00970735605244, -158.95259587177242
LBFGS Accumulation History: 3 points
Removed measurement 24229291 to history. Total: 3
th(0)=-3104.1464205156303;dx=-0.02618994088133044
Armijo: th(113107.82122667394)=-2695.713449163319; dx=0.0044149755290598764 evalInputDelta=-408.43297135231114
New Minimum: -3104.1464205156303 > -3248.5044251162717
WOLF (strong): th(56553.91061333697)=-3248.5044251162717; dx=0.0018109899842296212 evalInputDelta=144.35800460064138
New Minimum: -3248.5044251162717 > -3323.865972027151
END: th(18851.30353777899)=-3323.865972027151; dx=-0.00822659816316456 evalInputDelta=219.71955151152088
Fitness changed from -3104.1464205156303 to -3323.865972027151
Iteration 10 complete. Error: -3323.865972027151 Total: 4.8064; Orientation: 0.2871; Line Search: 3.6726
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/fb16df5c-9f82-442b-b3d4-f3457aa5abf2.jpg)
Adding measurement 14ee3f70 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.160e+05, gradient 1.341e-01, dot -0.200; [751ef4d9-6109-41fc-8475-df0cdd085369 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3323.865972027151, -714.1466498556161, -336.00970735605244, -158.95259587177242
LBFGS Accumulation History: 3 points
Removed measurement 14ee3f70 to history. Total: 3
th(0)=-3323.865972027151;dx=-0.01789569973143755
New Minimum: -3323.865972027151 > -3495.5048276321977
END: th(40613.90229411183)=-3495.5048276321977; dx=-0.004876818862162456 evalInputDelta=171.6388556050465
Fitness changed from -3323.865972027151 to -3495.5048276321977
Iteration 11 complete. Error: -3495.5048276321977 Total: 3.1090; Orientation: 0.3177; Line Search: 1.7913
Adding measurement 23989e66 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.569e+05, gradient 1.410e-01, dot -0.193; [751ef4d9-6109-41fc-8475-df0cdd085369 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3495.5048276321977, -714.1466498556161, -336.00970735605244, -158.95259587177242
LBFGS Accumulation History: 3 points
Removed measurement 23989e66 to history. Total: 3
th(0)=-3495.5048276321977;dx=-0.019726780903237526
New Minimum: -3495.5048276321977 > -3513.386115985546
END: th(87500.00000000004)=-3513.386115985546; dx=-8.829622315274395E-4 evalInputDelta=17.881288353348282
Fitness changed from -3495.5048276321977 to -3513.386115985546
Iteration 12 complete. Error: -3513.386115985546 Total: 3.1149; Orientation: 0.3265; Line Search: 1.8771
Adding measurement 64434047 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.414e+05, gradient 1.732e-01, dot -0.163; [751ef4d9-6109-41fc-8475-df0cdd085369 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3513.386115985546, -714.1466498556161, -336.00970735605244, -158.95259587177242
LBFGS Accumulation History: 3 points
Removed measurement 64434047 to history. Total: 3
th(0)=-3513.386115985546;dx=-0.02978191593452423
Armijo: th(188513.03537778993)=-2258.523632818572; dx=0.00398398669754276 evalInputDelta=-1254.862483166974
Armijo: th(94256.51768889496)=-3281.758674857126; dx=0.005599194843023724 evalInputDelta=-231.62744112841983
New Minimum: -3513.386115985546 > -3815.9622639643594
END: th(31418.839229631656)=-3815.9622639643594; dx=-0.003541549733635282 evalInputDelta=302.5761479788134
Fitness changed from -3513.386115985546 to -3815.9622639643594
Iteration 13 complete. Error: -3815.9622639643594 Total: 4.7456; Orientation: 0.2780; Line Search: 3.6627
Adding measurement f13bf0a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.776e+06, gradient 1.457e-01, dot -0.198; [751ef4d9-6109-41fc-8475-df0cdd085369 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3815.9622639643594, -714.1466498556161, -336.00970735605244, -158.95259587177242
LBFGS Accumulation History: 3 points
Removed measurement f13bf0a to history. Total: 3
th(0)=-3815.9622639643594;dx=-0.021136856455972273
New Minimum: -3815.9622639643594 > -3863.415328436745
WOLF (strong): th(67689.83715685307)=-3863.415328436745; dx=3.4086735823653106E-4 evalInputDelta=47.45306447238545
New Minimum: -3863.415328436745 > -3960.6374486943387
END: th(33844.918578426536)=-3960.6374486943387; dx=-0.0036417086773073365 evalInputDelta=144.67518472997926
Fitness changed from -3815.9622639643594 to -3960.6374486943387
Iteration 14 complete. Error: -3960.6374486943387 Total: 3.7840; Orientation: 0.3083; Line Search: 2.6327
Adding measurement 9339f5e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.092e+06, gradient 1.396e-01, dot -0.206; [751ef4d9-6109-41fc-8475-df0cdd085369 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3960.6374486943387, -714.1466498556161, -336.00970735605244, -158.95259587177242
LBFGS Accumulation History: 3 points
Removed measurement 9339f5e to history. Total: 3
th(0)=-3960.6374486943387;dx=-0.01932336422256598
Armijo: th(72916.66666666672)=-3946.765257777564; dx=1.4849677449751457E-4 evalInputDelta=-13.872190916774798
New Minimum: -3960.6374486943387 > -4061.008372313458
END: th(36458.33333333336)=-4061.008372313458; dx=-0.0025717373947665044 evalInputDelta=100.37092361911937
Fitness changed from -3960.6374486943387 to -4061.008372313458
Iteration 15 complete. Error: -4061.008372313458 Total: 3.6865; Orientation: 0.2772; Line Search: 2.5600
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/5fe36c41-513b-4f08-a27f-9d36af0c3155.jpg)
Final threshold in iteration 16: -4061.008372313458 (> -Infinity) after 62.391s (< 5400.000s)
Returns
-4061.008372313458