BasicOptimizer.scala:89 executed in 1588.16 seconds (23.822 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: 635201153322200
Reset training subject: 635227883353600
Adding measurement 61e3d787 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-44.85485568743377;dx=-8.926274891998591E-6
New Minimum: -44.85485568743377 > -44.85488472201907
WOLFE (weak): th(2.154434690031884)=-44.85488472201907; dx=-8.91574186976091E-6 evalInputDelta=2.903458530312264E-5
New Minimum: -44.85488472201907 > -44.85491420243328
WOLFE (weak): th(4.308869380063768)=-44.85491420243328; dx=-8.898043255786558E-6 evalInputDelta=5.851499950892958E-5
New Minimum: -44.85491420243328 > -44.85503159993419
WOLFE (weak): th(12.926608140191302)=-44.85503159993419; dx=-8.912510021803704E-6 evalInputDelta=1.7591250042414686E-4
New Minimum: -44.85503159993419 > -44.85555646730783
WOLFE (weak): th(51.70643256076521)=-44.85555646730783; dx=-8.868651106585006E-6 evalInputDelta=7.0077987405881E-4
New Minimum: -44.85555646730783 > -44.85835817919477
WOLFE (weak): th(258.53216280382605)=-44.85835817919477; dx=-8.918123721447838E-6 evalInputDelta=0.0035024917609973727
New Minimum: -44.85835817919477 > -44.8758678280777
WOLFE (weak): th(1551.1929768229563)=-44.8758678280777; dx=-8.926388878383172E-6 evalInputDelta=0.021012140643932753
New Minimum: -44.8758678280777 > -45.00196305140251
WOLFE (weak): th(10858.350837760694)=-45.00196305140251; dx=-8.92282827154521E-6 evalInputDelta=0.14710736396874324
New Minimum: -45.00196305140251 > -46.03361342284046
WOLFE (weak): th(86866.80670208555)=-46.03361342284046; dx=-8.93921674983755E-6 evalInputDelta=1.1787577354066912
New Minimum: -46.03361342284046 > -55.32771521532561
WOLFE (weak): th(781801.26031877)=-55.32771521532561; dx=-8.447161452450947E-6 evalInputDelta=10.472859527891842
New Minimum: -55.32771521532561 > -83.55980681806749
WOLF (strong): th(7818012.6031877)=-83.55980681806749; dx=5.39338560581425E-7 evalInputDelta=38.70495113063372
END: th(4299906.931753235)=-81.8855869776805; dx=-1.8088790520258692E-6 evalInputDelta=37.030731290246734
Fitness changed from -44.85485568743377 to -83.55980681806749
Iteration 1 complete. Error: -83.55980681806749 Total: 340.3167; Orientation: 0.1513; Line Search: 269.8381
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a398122e-d62c-4796-a31b-6e28447aedb6.jpg)
Adding measurement 5449a473 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-83.55980681806749;dx=-1.3870554918491249E-5
New Minimum: -83.55980681806749 > -111.29627635728204
WOLF (strong): th(9263868.657677729)=-111.29627635728204; dx=2.8336596891699778E-6 evalInputDelta=27.736469539214553
New Minimum: -111.29627635728204 > -129.16383240000158
WOLF (strong): th(4631934.328838864)=-129.16383240000158; dx=5.496381975618856E-7 evalInputDelta=45.604025581934096
END: th(1543978.1096129548)=-112.02045272310417; dx=-9.361330967121504E-6 evalInputDelta=28.460645905036685
Fitness changed from -83.55980681806749 to -129.16383240000158
Iteration 2 complete. Error: -129.16383240000158 Total: 112.2902; Orientation: 0.1572; Line Search: 89.2534
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/84493d95-dc8e-4617-8ff2-95843fee55bd.jpg)
Adding measurement 756970a3 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-129.16383240000158;dx=-1.2653026724767008E-5
New Minimum: -129.16383240000158 > -163.35066249921147
END: th(3326400.0)=-163.35066249921147; dx=-6.771970068187708E-7 evalInputDelta=34.186830099209885
Fitness changed from -129.16383240000158 to -163.35066249921147
Iteration 3 complete. Error: -163.35066249921147 Total: 68.3240; Orientation: 0.1507; Line Search: 45.3282
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d565840b-8b3c-4352-b154-51ee47f6cb95.jpg)
Adding measurement 5ff2170 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.213e+04, gradient 2.926e-03, dot -0.603; [07c0db12-4b9b-4875-b4f9-cf030fd87cd9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -163.35066249921147, -129.16383240000158, -83.55980681806749, -44.85485568743377
LBFGS Accumulation History: 3 points
Removed measurement 5ff2170 to history. Total: 3
th(0)=-163.35066249921147;dx=-8.535047094739555E-6
New Minimum: -163.35066249921147 > -180.78513236886363
WOLF (strong): th(7166511.552922058)=-180.78513236886363; dx=1.480037493387944E-6 evalInputDelta=17.434469869652162
New Minimum: -180.78513236886363 > -185.69895410901592
END: th(3583255.776461029)=-185.69895410901592; dx=-3.888524534835971E-7 evalInputDelta=22.34829160980445
Fitness changed from -163.35066249921147 to -185.69895410901592
Iteration 4 complete. Error: -185.69895410901592 Total: 91.9857; Orientation: 2.7088; Line Search: 66.9777
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/efbeb292-927c-4ea9-8526-46b4b5864d30.jpg)
Adding measurement 64e3b72e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.079e+04, gradient 2.859e-03, dot -0.594; [07c0db12-4b9b-4875-b4f9-cf030fd87cd9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -185.69895410901592, -129.16383240000158, -83.55980681806749, -44.85485568743377
LBFGS Accumulation History: 3 points
Removed measurement 64e3b72e to history. Total: 3
th(0)=-185.69895410901592;dx=-8.157298479308901E-6
New Minimum: -185.69895410901592 > -196.9836466018981
WOLF (strong): th(7719890.548064774)=-196.9836466018981; dx=1.7953092383438355E-6 evalInputDelta=11.284692492882186
New Minimum: -196.9836466018981 > -205.8553028281191
WOLF (strong): th(3859945.274032387)=-205.8553028281191; dx=4.7500869572169096E-7 evalInputDelta=20.156348719103192
END: th(1286648.4246774623)=-198.76932018008495; dx=-4.97876312074906E-6 evalInputDelta=13.070366071069031
Fitness changed from -185.69895410901592 to -205.8553028281191
Iteration 5 complete. Error: -205.8553028281191 Total: 113.9545; Orientation: 3.5467; Line Search: 87.5845
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/0556400f-12dc-40ba-952a-54e1a56ecd26.jpg)
Adding measurement 18eba8ec to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.402e+04, gradient 2.815e-03, dot -0.542; [07c0db12-4b9b-4875-b4f9-cf030fd87cd9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -205.8553028281191, -129.16383240000158, -83.55980681806749, -44.85485568743377
LBFGS Accumulation History: 3 points
Removed measurement 18eba8ec to history. Total: 3
th(0)=-205.8553028281191;dx=-7.884292279786903E-6
New Minimum: -205.8553028281191 > -225.62665747467463
END: th(2772000.0)=-225.62665747467463; dx=-1.1449139888483647E-6 evalInputDelta=19.771354646555523
Fitness changed from -205.8553028281191 to -225.62665747467463
Iteration 6 complete. Error: -225.62665747467463 Total: 71.6340; Orientation: 2.7116; Line Search: 44.1682
Adding measurement 10a87453 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.040e+05, gradient 2.093e-03, dot -0.676; [07c0db12-4b9b-4875-b4f9-cf030fd87cd9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -225.62665747467463, -129.16383240000158, -83.55980681806749, -44.85485568743377
LBFGS Accumulation History: 3 points
Removed measurement 10a87453 to history. Total: 3
th(0)=-225.62665747467463;dx=-4.384745548396154E-6
New Minimum: -225.62665747467463 > -244.28592768170756
END: th(5972092.960768382)=-244.28592768170756; dx=-4.809647703073435E-7 evalInputDelta=18.659270207032932
Fitness changed from -225.62665747467463 to -244.28592768170756
Iteration 7 complete. Error: -244.28592768170756 Total: 67.2143; Orientation: 2.6870; Line Search: 43.4123
Adding measurement 420ff7d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.885e+04, gradient 2.642e-03, dot -0.504; [07c0db12-4b9b-4875-b4f9-cf030fd87cd9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -244.28592768170756, -129.16383240000158, -83.55980681806749, -44.85485568743377
LBFGS Accumulation History: 3 points
Removed measurement 420ff7d to history. Total: 3
th(0)=-244.28592768170756;dx=-6.952610632844069E-6
Armijo: th(1.2866484246774625E7)=-232.6904633944863; dx=2.1271459675169954E-6 evalInputDelta=-11.595464287221262
New Minimum: -244.28592768170756 > -257.7542619780448
WOLF (strong): th(6433242.1233873125)=-257.7542619780448; dx=2.1677037686680207E-6 evalInputDelta=13.468334296337218
New Minimum: -257.7542619780448 > -261.19997672735474
END: th(2144414.0411291043)=-261.19997672735474; dx=-2.828048256076789E-6 evalInputDelta=16.914049045647175
Fitness changed from -244.28592768170756 to -261.19997672735474
Iteration 8 complete. Error: -261.19997672735474 Total: 110.6368; Orientation: 2.7007; Line Search: 86.6636
Adding measurement 7f83d882 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.129e+05, gradient 1.690e-03, dot -0.721; [07c0db12-4b9b-4875-b4f9-cf030fd87cd9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -261.19997672735474, -129.16383240000158, -83.55980681806749, -44.85485568743377
LBFGS Accumulation History: 3 points
Removed measurement 7f83d882 to history. Total: 3
th(0)=-261.19997672735474;dx=-2.8438405719881763E-6
New Minimum: -261.19997672735474 > -277.72892589519853
END: th(4620000.000000001)=-277.72892589519853; dx=-1.8237462244395275E-6 evalInputDelta=16.52894916784379
Fitness changed from -261.19997672735474 to -277.72892589519853
Iteration 9 complete. Error: -277.72892589519853 Total: 67.8011; Orientation: 2.7677; Line Search: 43.7201
Adding measurement 3ff57438 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.215e+05, gradient 1.718e-03, dot -0.679; [07c0db12-4b9b-4875-b4f9-cf030fd87cd9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -277.72892589519853, -129.16383240000158, -83.55980681806749, -44.85485568743377
LBFGS Accumulation History: 3 points
Removed measurement 3ff57438 to history. Total: 3
th(0)=-277.72892589519853;dx=-2.9575448481783975E-6
New Minimum: -277.72892589519853 > -299.19582449786395
END: th(9953488.267947305)=-299.19582449786395; dx=-5.739730702595468E-7 evalInputDelta=21.466898602665424
Fitness changed from -277.72892589519853 to -299.19582449786395
Iteration 10 complete. Error: -299.19582449786395 Total: 69.1245; Orientation: 2.7161; Line Search: 44.3307
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/09a3e9df-ab1c-476c-bd89-213a0f3b4b04.jpg)
Adding measurement 371fbddc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.172e+05, gradient 2.264e-03, dot -0.475; [07c0db12-4b9b-4875-b4f9-cf030fd87cd9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -299.19582449786395, -129.16383240000158, -83.55980681806749, -44.85485568743377
LBFGS Accumulation History: 3 points
Removed measurement 371fbddc to history. Total: 3
th(0)=-299.19582449786395;dx=-5.10943933157368E-6
Armijo: th(2.1444140411291044E7)=-271.80777056772683; dx=1.696815288129627E-6 evalInputDelta=-27.38805393013712
New Minimum: -299.19582449786395 > -307.6654920243907
WOLF (strong): th(1.0722070205645522E7)=-307.6654920243907; dx=1.943852829771743E-6 evalInputDelta=8.469667526526734
New Minimum: -307.6654920243907 > -318.4211301538011
END: th(3574023.4018818405)=-318.4211301538011; dx=-1.5031379658534874E-6 evalInputDelta=19.22530565593712
Fitness changed from -299.19582449786395 to -318.4211301538011
Iteration 11 complete. Error: -318.4211301538011 Total: 112.2403; Orientation: 2.6587; Line Search: 87.3063
Adding measurement 12e555ac to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.227e+05, gradient 1.549e-03, dot -0.635; [07c0db12-4b9b-4875-b4f9-cf030fd87cd9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -318.4211301538011, -129.16383240000158, -83.55980681806749, -44.85485568743377
LBFGS Accumulation History: 3 points
Removed measurement 12e555ac to history. Total: 3
th(0)=-318.4211301538011;dx=-2.388788869345786E-6
New Minimum: -318.4211301538011 > -335.3985011806071
END: th(7700000.000000002)=-335.3985011806071; dx=-6.390898371611181E-7 evalInputDelta=16.977371026806054
Fitness changed from -318.4211301538011 to -335.3985011806071
Iteration 12 complete. Error: -335.3985011806071 Total: 68.1966; Orientation: 2.6838; Line Search: 43.8099
Adding measurement 1d14643f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.295e+05, gradient 1.832e-03, dot -0.521; [07c0db12-4b9b-4875-b4f9-cf030fd87cd9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -335.3985011806071, -129.16383240000158, -83.55980681806749, -44.85485568743377
LBFGS Accumulation History: 3 points
Removed measurement 1d14643f to history. Total: 3
th(0)=-335.3985011806071;dx=-3.350994471723914E-6
Armijo: th(1.658914711324551E7)=-331.16396480762853; dx=1.1777541041321858E-6 evalInputDelta=-4.234536372978596
New Minimum: -335.3985011806071 > -346.65270896082245
WOLF (strong): th(8294573.556622755)=-346.65270896082245; dx=7.262421417346504E-7 evalInputDelta=11.254207780215324
END: th(2764857.852207585)=-346.1508515872013; dx=-1.4653365348258274E-6 evalInputDelta=10.75235040659419
Fitness changed from -335.3985011806071 to -346.65270896082245
Iteration 13 complete. Error: -346.65270896082245 Total: 111.7983; Orientation: 2.6560; Line Search: 87.7600
Adding measurement 1266c8bd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.261e+05, gradient 2.186e-03, dot -0.419; [07c0db12-4b9b-4875-b4f9-cf030fd87cd9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -346.65270896082245, -129.16383240000158, -83.55980681806749, -44.85485568743377
LBFGS Accumulation History: 3 points
Removed measurement 1266c8bd to history. Total: 3
th(0)=-346.65270896082245;dx=-4.740912324895839E-6
New Minimum: -346.65270896082245 > -366.96144316375694
WOLF (strong): th(5956705.669803068)=-366.96144316375694; dx=6.709914200805109E-7 evalInputDelta=20.308734202934488
END: th(2978352.834901534)=-363.9046995877122; dx=-2.200825646015729E-6 evalInputDelta=17.25199062688972
Fitness changed from -346.65270896082245 to -366.96144316375694
Iteration 14 complete. Error: -366.96144316375694 Total: 90.9794; Orientation: 2.6435; Line Search: 66.7286
Adding measurement 6fc2f509 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.284e+05, gradient 1.716e-03, dot -0.491; [07c0db12-4b9b-4875-b4f9-cf030fd87cd9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -366.96144316375694, -129.16383240000158, -83.55980681806749, -44.85485568743377
LBFGS Accumulation History: 3 points
Removed measurement 6fc2f509 to history. Total: 3
th(0)=-366.96144316375694;dx=-2.9280197831379267E-6
New Minimum: -366.96144316375694 > -379.68881141259885
WOLF (strong): th(6416666.666666669)=-379.68881141259885; dx=2.6957034831816086E-7 evalInputDelta=12.727368248841913
END: th(3208333.3333333344)=-377.80906343796283; dx=-1.1831245108416612E-6 evalInputDelta=10.847620274205894
Fitness changed from -366.96144316375694 to -379.68881141259885
Iteration 15 complete. Error: -379.68881141259885 Total: 90.6281; Orientation: 2.6829; Line Search: 65.5613
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/a030a427-c0f8-47b8-8e03-d545eec5b60b.jpg)
Final threshold in iteration 16: -379.68881141259885 (> -Infinity) after 1588.155s (< 5400.000s)
Returns
-379.68881141259885