BasicOptimizer.scala:89 executed in 211.69 seconds (2.553 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: 23480704076204
Reset training subject: 23485310328547
Adding measurement 34e23734 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.7766459584236145;dx=-6.548460064823847E-7
New Minimum: -0.7766459584236145 > -0.7766463831067085
END: th(2.154434690031884)=-0.7766463831067085; dx=-5.484008037999089E-7 evalInputDelta=4.246830940246582E-7
Fitness changed from -0.7766459584236145 to -0.7766463831067085
Iteration 1 complete. Error: -0.7766463831067085 Total: 21.4352; Orientation: 0.0501; Line Search: 8.7987
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/f87d9083-3c58-4b5d-aad4-f7f1f9cb0305.jpg)
Adding measurement 4597ce7 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.7766463831067085;dx=-5.484008351688637E-7
New Minimum: -0.7766463831067085 > -0.7766477912664413
WOLFE (weak): th(4.641588833612779)=-0.7766477912664413; dx=-5.483749145032066E-7 evalInputDelta=1.4081597328186035E-6
New Minimum: -0.7766477912664413 > -0.7766490578651428
WOLFE (weak): th(9.283177667225559)=-0.7766490578651428; dx=-5.48374770197637E-7 evalInputDelta=2.6747584342956543E-6
New Minimum: -0.7766490578651428 > -0.7766541913151741
WOLFE (weak): th(27.849533001676676)=-0.7766541913151741; dx=-5.483618030315538E-7 evalInputDelta=7.808208465576172E-6
New Minimum: -0.7766541913151741 > -0.7766770124435425
WOLFE (weak): th(111.3981320067067)=-0.7766770124435425; dx=-5.482941155358119E-7 evalInputDelta=3.062933683395386E-5
New Minimum: -0.7766770124435425 > -0.7767992615699768
WOLFE (weak): th(556.9906600335335)=-0.7767992615699768; dx=-5.481942347913684E-7 evalInputDelta=1.5287846326828003E-4
New Minimum: -0.7767992615699768 > -0.7775621563196182
WOLFE (weak): th(3341.9439602012008)=-0.7775621563196182; dx=-5.475713337367931E-7 evalInputDelta=9.157732129096985E-4
New Minimum: -0.7775621563196182 > -0.7830288261175156
WOLFE (weak): th(23393.607721408407)=-0.7830288261175156; dx=-5.430452070858601E-7 evalInputDelta=0.006382443010807037
New Minimum: -0.7830288261175156 > -0.8259544223546982
WOLFE (weak): th(187148.86177126726)=-0.8259544223546982; dx=-5.055178938984128E-7 evalInputDelta=0.049308039247989655
New Minimum: -0.8259544223546982 > -1.086688056588173
END: th(1684339.7559414054)=-1.086688056588173; dx=-2.2124229980936504E-7 evalInputDelta=0.3100416734814644
Fitness changed from -0.7766463831067085 to -1.086688056588173
Iteration 2 complete. Error: -1.086688056588173 Total: 48.7085; Orientation: 0.0441; Line Search: 44.5140
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/8ab363a0-79ab-48ee-9a6a-e3de87fb51b3.jpg)
Adding measurement 62da6508 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-1.086688056588173;dx=-2.1073047052338144E-7
New Minimum: -1.086688056588173 > -1.3393779769539833
END: th(3628800.0000000005)=-1.3393779769539833; dx=-8.907254292710959E-8 evalInputDelta=0.2526899203658104
Fitness changed from -1.086688056588173 to -1.3393779769539833
Iteration 3 complete. Error: -1.3393779769539833 Total: 12.9862; Orientation: 0.0490; Line Search: 8.4467
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/8d0ea855-6821-45ad-b121-65820725e9c8.jpg)
Adding measurement 18b29c5b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.463e+03, gradient 3.338e-04, dot -0.601; [6628c928-dc45-43d5-90fd-09923ae57431 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.3393779769539833, -1.086688056588173, -0.7766463831067085, -0.7766459584236145
LBFGS Accumulation History: 3 points
Removed measurement 18b29c5b to history. Total: 3
th(0)=-1.3393779769539833;dx=-1.1143750882150383E-7
New Minimum: -1.3393779769539833 > -1.576248586177826
END: th(7818012.603187701)=-1.576248586177826; dx=-2.9434925054466248E-8 evalInputDelta=0.23687060922384262
Fitness changed from -1.3393779769539833 to -1.576248586177826
Iteration 4 complete. Error: -1.576248586177826 Total: 14.1085; Orientation: 1.0046; Line Search: 9.0954
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/d63d7f1b-5e37-4d67-a251-331bebfd48c5.jpg)
Adding measurement 506838cd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.566e+03, gradient 2.941e-04, dot -0.417; [6628c928-dc45-43d5-90fd-09923ae57431 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.576248586177826, -1.086688056588173, -0.7766463831067085, -0.7766459584236145
LBFGS Accumulation History: 3 points
Removed measurement 506838cd to history. Total: 3
th(0)=-1.576248586177826;dx=-8.648897885310891E-8
New Minimum: -1.576248586177826 > -1.7234051078557968
WOLF (strong): th(1.6843397559414055E7)=-1.7234051078557968; dx=8.02988795085021E-9 evalInputDelta=0.1471565216779709
New Minimum: -1.7234051078557968 > -1.7311010509729385
END: th(8421698.779707028)=-1.7311010509729385; dx=-7.851786064604885E-9 evalInputDelta=0.1548524647951126
Fitness changed from -1.576248586177826 to -1.7311010509729385
Iteration 5 complete. Error: -1.7311010509729385 Total: 18.9472; Orientation: 1.0394; Line Search: 12.9573
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/1bd5507b-625a-4b57-9fed-9842a2546f92.jpg)
Adding measurement 14e3a725 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.825e+03, gradient 2.620e-04, dot -0.373; [6628c928-dc45-43d5-90fd-09923ae57431 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.7311010509729385, -1.086688056588173, -0.7766463831067085, -0.7766459584236145
LBFGS Accumulation History: 3 points
Removed measurement 14e3a725 to history. Total: 3
th(0)=-1.7311010509729385;dx=-6.866050077195701E-8
New Minimum: -1.7311010509729385 > -1.7846600413322449
WOLF (strong): th(1.8144000000000004E7)=-1.7846600413322449; dx=2.2780426760621465E-8 evalInputDelta=0.053558990359306335
New Minimum: -1.7846600413322449 > -1.855163961648941
WOLF (strong): th(9072000.000000002)=-1.855163961648941; dx=2.0471662437134084E-9 evalInputDelta=0.1240629106760025
END: th(3024000.0000000005)=-1.8096309527754784; dx=-3.609918128489087E-8 evalInputDelta=0.07852990180253983
Fitness changed from -1.7311010509729385 to -1.855163961648941
Iteration 6 complete. Error: -1.855163961648941 Total: 22.2839; Orientation: 1.0035; Line Search: 17.0005
Adding measurement 38f651b9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.986e+03, gradient 2.427e-04, dot -0.339; [6628c928-dc45-43d5-90fd-09923ae57431 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.855163961648941, -1.086688056588173, -0.7766463831067085, -0.7766459584236145
LBFGS Accumulation History: 3 points
Removed measurement 38f651b9 to history. Total: 3
th(0)=-1.855163961648941;dx=-5.890640274186211E-8
New Minimum: -1.855163961648941 > -1.9476332291960716
END: th(6515010.502656418)=-1.9476332291960716; dx=-6.1137204969342664E-9 evalInputDelta=0.09246926754713058
Fitness changed from -1.855163961648941 to -1.9476332291960716
Iteration 7 complete. Error: -1.9476332291960716 Total: 13.4152; Orientation: 1.0120; Line Search: 8.1157
Adding measurement 3a1c74d2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.368e+03, gradient 1.859e-04, dot -0.462; [6628c928-dc45-43d5-90fd-09923ae57431 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.9476332291960716, -1.086688056588173, -0.7766463831067085, -0.7766459584236145
LBFGS Accumulation History: 3 points
Removed measurement 3a1c74d2 to history. Total: 3
th(0)=-1.9476332291960716;dx=-3.4571729701818787E-8
New Minimum: -1.9476332291960716 > -1.996447004377842
WOLF (strong): th(1.4036164632845048E7)=-1.996447004377842; dx=1.2740252336150403E-8 evalInputDelta=0.048813775181770325
New Minimum: -1.996447004377842 > -2.014614313840866
END: th(7018082.316422524)=-2.014614313840866; dx=-4.674549381936175E-9 evalInputDelta=0.06698108464479446
Fitness changed from -1.9476332291960716 to -2.014614313840866
Iteration 8 complete. Error: -2.014614313840866 Total: 18.9010; Orientation: 1.0448; Line Search: 13.6738
Adding measurement 1b5f9efe to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.512e+03, gradient 1.776e-04, dot -0.444; [6628c928-dc45-43d5-90fd-09923ae57431 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.014614313840866, -1.086688056588173, -0.7766463831067085, -0.7766459584236145
LBFGS Accumulation History: 3 points
Removed measurement 1b5f9efe to history. Total: 3
th(0)=-2.014614313840866;dx=-3.1535700179681604E-8
New Minimum: -2.014614313840866 > -2.05391675978899
WOLF (strong): th(1.5120000000000006E7)=-2.05391675978899; dx=5.209497279497514E-9 evalInputDelta=0.03930244594812393
New Minimum: -2.05391675978899 > -2.0651980713009834
END: th(7560000.000000003)=-2.0651980713009834; dx=-9.038356622244881E-10 evalInputDelta=0.05058375746011734
Fitness changed from -2.014614313840866 to -2.0651980713009834
Iteration 9 complete. Error: -2.0651980713009834 Total: 18.3008; Orientation: 1.0495; Line Search: 12.6400
Adding measurement 7545de08 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.500e+03, gradient 1.763e-04, dot -0.413; [6628c928-dc45-43d5-90fd-09923ae57431 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.0651980713009834, -1.086688056588173, -0.7766463831067085, -0.7766459584236145
LBFGS Accumulation History: 3 points
Removed measurement 7545de08 to history. Total: 3
th(0)=-2.0651980713009834;dx=-3.108530510914818E-8
Armijo: th(1.6287526256641047E7)=-2.046030804514885; dx=2.1108942677019057E-8 evalInputDelta=-0.01916726678609848
New Minimum: -2.0651980713009834 > -2.1093823984265327
WOLF (strong): th(8143763.128320524)=-2.1093823984265327; dx=6.9219244114827275E-9 evalInputDelta=0.044184327125549316
END: th(2714587.7094401745)=-2.0981596037745476; dx=-1.734318139276604E-8 evalInputDelta=0.03296153247356415
Fitness changed from -2.0651980713009834 to -2.1093823984265327
Iteration 10 complete. Error: -2.1093823984265327 Total: 22.5313; Orientation: 1.0073; Line Search: 17.1643
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/1d2c0dfc-ba58-493e-bfe5-ec1077d3b7ac.jpg)
Final threshold in iteration 11: -2.1093823984265327 (> -Infinity) after 211.689s (< 5400.000s)
Returns
-2.1093823984265327