BasicOptimizer.scala:89 executed in 314.89 seconds (5.594 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: 641033106656600
Reset training subject: 641039066531800
Adding measurement 78e05c28 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-72.12017351438396;dx=-1.2175569483204845E-6
New Minimum: -72.12017351438396 > -72.12017770335048
WOLFE (weak): th(2.154434690031884)=-72.12017770335048; dx=-1.191805930690626E-6 evalInputDelta=4.188966514107051E-6
WOLFE (weak): th(4.308869380063768)=-72.12017770335048; dx=-1.191375057975155E-6 evalInputDelta=4.188966514107051E-6
New Minimum: -72.12017770335048 > -72.12019027024857
WOLFE (weak): th(12.926608140191302)=-72.12019027024857; dx=-1.1917209083341073E-6 evalInputDelta=1.6755864606921023E-5
New Minimum: -72.12019027024857 > -72.12024472678164
WOLFE (weak): th(51.70643256076521)=-72.12024472678164; dx=-1.1915660893174288E-6 evalInputDelta=7.121239767116094E-5
New Minimum: -72.12024472678164 > -72.12052119777672
WOLFE (weak): th(258.53216280382605)=-72.12052119777672; dx=-1.1915506556565115E-6 evalInputDelta=3.4768339276070037E-4
New Minimum: -72.12052119777672 > -72.12225121190771
WOLFE (weak): th(1551.1929768229563)=-72.12225121190771; dx=-1.191579030063855E-6 evalInputDelta=0.0020776975237453144
New Minimum: -72.12225121190771 > -72.13473289281357
WOLFE (weak): th(10858.350837760694)=-72.13473289281357; dx=-1.1910046961010328E-6 evalInputDelta=0.014559378429609637
New Minimum: -72.13473289281357 > -72.23639490581233
WOLFE (weak): th(86866.80670208555)=-72.23639490581233; dx=-1.1853732012625387E-6 evalInputDelta=0.11622139142836829
New Minimum: -72.23639490581233 > -73.13891078701313
WOLFE (weak): th(781801.26031877)=-73.13891078701313; dx=-1.1224424416866934E-6 evalInputDelta=1.018737272629167
New Minimum: -73.13891078701313 > -79.46243206897473
END: th(7818012.6031877)=-79.46243206897473; dx=-4.961278955287359E-7 evalInputDelta=7.342258554590771
Fitness changed from -72.12017351438396 to -79.46243206897473
Iteration 1 complete. Error: -79.46243206897473 Total: 83.2663; Orientation: 0.1416; Line Search: 65.7892
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0f634988-ecdd-4e47-821c-a5e43656287b.jpg)
Adding measurement 19c95dfd to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-79.46243206897473;dx=-6.734273224979869E-7
New Minimum: -79.46243206897473 > -87.32453823033207
END: th(1.684339755941405E7)=-87.32453823033207; dx=-2.451063043953789E-7 evalInputDelta=7.862106161357332
Fitness changed from -79.46243206897473 to -87.32453823033207
Iteration 2 complete. Error: -87.32453823033207 Total: 18.7643; Orientation: 0.1280; Line Search: 11.9195
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/b9398147-d99f-4e56-ad46-08f88da23664.jpg)
Adding measurement 42ccc608 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-87.32453823033207;dx=-7.086230643501385E-7
New Minimum: -87.32453823033207 > -89.81258289561079
WOLF (strong): th(3.6288E7)=-89.81258289561079; dx=1.5042472618712756E-7 evalInputDelta=2.4880446652787214
New Minimum: -89.81258289561079 > -92.46576308613565
WOLF (strong): th(1.8144E7)=-92.46576308613565; dx=3.875336905828964E-8 evalInputDelta=5.141224855803586
END: th(6048000.0)=-90.99812674412377; dx=-3.776100447424321E-7 evalInputDelta=3.6735885137916995
Fitness changed from -87.32453823033207 to -92.46576308613565
Iteration 3 complete. Error: -92.46576308613565 Total: 31.1320; Orientation: 0.1242; Line Search: 23.8021
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/55b110ab-a199-4759-a2e9-356afaeb64de.jpg)
Adding measurement 2883a5ed to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.352e+04, gradient 9.185e-04, dot -0.582; [c9b110d7-f99d-4556-8dbc-a93b07e0fed7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -92.46576308613565, -87.32453823033207, -79.46243206897473, -72.12017351438396
LBFGS Accumulation History: 3 points
Removed measurement 2883a5ed to history. Total: 3
th(0)=-92.46576308613565;dx=-8.42956741244323E-7
New Minimum: -92.46576308613565 > -98.57113347010198
WOLF (strong): th(1.3030021005312834E7)=-98.57113347010198; dx=1.7612469236965745E-8 evalInputDelta=6.105370383966331
END: th(6515010.502656417)=-97.20287017453764; dx=-4.3657114223034723E-7 evalInputDelta=4.737107088401984
Fitness changed from -92.46576308613565 to -98.57113347010198
Iteration 4 complete. Error: -98.57113347010198 Total: 27.4756; Orientation: 2.6033; Line Search: 17.9039
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/63a1e1b2-88e6-4a7b-b86f-75bc1e6352c6.jpg)
Adding measurement 288eca50 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.929e+04, gradient 6.985e-04, dot -0.654; [c9b110d7-f99d-4556-8dbc-a93b07e0fed7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -98.57113347010198, -87.32453823033207, -79.46243206897473, -72.12017351438396
LBFGS Accumulation History: 3 points
Removed measurement 288eca50 to history. Total: 3
th(0)=-98.57113347010198;dx=-4.875746107514557E-7
New Minimum: -98.57113347010198 > -102.50619013583946
END: th(1.4036164632845046E7)=-102.50619013583946; dx=-5.227014125453466E-8 evalInputDelta=3.935056665737477
Fitness changed from -98.57113347010198 to -102.50619013583946
Iteration 5 complete. Error: -102.50619013583946 Total: 21.7707; Orientation: 2.4933; Line Search: 12.1568
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/27f7118a-2e72-4d59-86c2-986db6184a41.jpg)
Adding measurement 6b34e3bb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.620e+04, gradient 6.576e-04, dot -0.654; [c9b110d7-f99d-4556-8dbc-a93b07e0fed7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -102.50619013583946, -87.32453823033207, -79.46243206897473, -72.12017351438396
LBFGS Accumulation History: 3 points
Removed measurement 6b34e3bb to history. Total: 3
th(0)=-102.50619013583946;dx=-4.3184481940856485E-7
New Minimum: -102.50619013583946 > -104.52358526120977
WOLF (strong): th(3.0240000000000007E7)=-104.52358526120977; dx=1.3332276741014416E-7 evalInputDelta=2.0173951253703137
New Minimum: -104.52358526120977 > -105.98144094157955
END: th(1.5120000000000004E7)=-105.98144094157955; dx=-2.2993196522561223E-8 evalInputDelta=3.475250805740089
Fitness changed from -102.50619013583946 to -105.98144094157955
Iteration 6 complete. Error: -105.98144094157955 Total: 27.8200; Orientation: 2.5053; Line Search: 18.5667
Adding measurement 467bc5f7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.193e+04, gradient 6.517e-04, dot -0.616; [c9b110d7-f99d-4556-8dbc-a93b07e0fed7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -105.98144094157955, -87.32453823033207, -79.46243206897473, -72.12017351438396
LBFGS Accumulation History: 3 points
Removed measurement 467bc5f7 to history. Total: 3
th(0)=-105.98144094157955;dx=-4.2383660978526624E-7
New Minimum: -105.98144094157955 > -106.75185028864374
WOLF (strong): th(3.257505251328209E7)=-106.75185028864374; dx=1.7489753297526882E-7 evalInputDelta=0.770409347064188
New Minimum: -106.75185028864374 > -109.1777869809953
WOLF (strong): th(1.6287526256641045E7)=-109.1777869809953; dx=2.241858944547728E-8 evalInputDelta=3.1963460394157437
END: th(5429175.418880348)=-108.03312399158918; dx=-2.614075043890633E-7 evalInputDelta=2.051683050009629
Fitness changed from -105.98144094157955 to -109.1777869809953
Iteration 7 complete. Error: -109.1777869809953 Total: 30.9024; Orientation: 2.5286; Line Search: 22.8917
Adding measurement 586f904a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.538e+04, gradient 6.598e-04, dot -0.576; [c9b110d7-f99d-4556-8dbc-a93b07e0fed7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -109.1777869809953, -87.32453823033207, -79.46243206897473, -72.12017351438396
LBFGS Accumulation History: 3 points
Removed measurement 586f904a to history. Total: 3
th(0)=-109.1777869809953;dx=-4.3525625793955935E-7
New Minimum: -109.1777869809953 > -112.3720153626623
END: th(1.1696803860704206E7)=-112.3720153626623; dx=-6.51686237542353E-8 evalInputDelta=3.1942283816670027
Fitness changed from -109.1777869809953 to -112.3720153626623
Iteration 8 complete. Error: -112.3720153626623 Total: 20.2745; Orientation: 2.4345; Line Search: 12.0086
Adding measurement 7d9c8091 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.893e+04, gradient 5.005e-04, dot -0.715; [c9b110d7-f99d-4556-8dbc-a93b07e0fed7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -112.3720153626623, -87.32453823033207, -79.46243206897473, -72.12017351438396
LBFGS Accumulation History: 3 points
Removed measurement 7d9c8091 to history. Total: 3
th(0)=-112.3720153626623;dx=-2.502027713024389E-7
New Minimum: -112.3720153626623 > -115.53501362703345
END: th(2.5200000000000007E7)=-115.53501362703345; dx=-2.731764464821118E-8 evalInputDelta=3.1629982643711543
Fitness changed from -112.3720153626623 to -115.53501362703345
Iteration 9 complete. Error: -115.53501362703345 Total: 20.5698; Orientation: 2.5706; Line Search: 12.0111
Adding measurement 63092e9d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.296e+04, gradient 6.577e-04, dot -0.515; [c9b110d7-f99d-4556-8dbc-a93b07e0fed7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -115.53501362703345, -87.32453823033207, -79.46243206897473, -72.12017351438396
LBFGS Accumulation History: 3 points
Removed measurement 63092e9d to history. Total: 3
th(0)=-115.53501362703345;dx=-4.3202114672834447E-7
Armijo: th(5.429175418880349E7)=-108.34761896785119; dx=2.647951435701635E-7 evalInputDelta=-7.18739465918226
New Minimum: -115.53501362703345 > -116.58423020306348
WOLF (strong): th(2.7145877094401743E7)=-116.58423020306348; dx=1.9728061359739622E-7 evalInputDelta=1.0492165760300338
New Minimum: -116.58423020306348 > -118.4322466572629
END: th(9048625.698133914)=-118.4322466572629; dx=-1.396051668258736E-7 evalInputDelta=2.897233030229444
Fitness changed from -115.53501362703345 to -118.4322466572629
Iteration 10 complete. Error: -118.4322466572629 Total: 31.8209; Orientation: 2.4347; Line Search: 23.4475
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/cf09373c-f098-49d8-945f-c790605d5aad.jpg)
Final threshold in iteration 11: -118.4322466572629 (> -Infinity) after 314.889s (< 5400.000s)
Returns
-118.4322466572629