BasicOptimizer.scala:89 executed in 212.27 seconds (3.286 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: 683751362713700
Reset training subject: 683755924454900
Adding measurement d5fc8af to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-1393.854951205469;dx=-0.008033955836230646
New Minimum: -1393.854951205469 > -1393.8735595454848
WOLFE (weak): th(2.154434690031884)=-1393.8735595454848; dx=-0.007826102383213596 evalInputDelta=0.018608340015816793
New Minimum: -1393.8735595454848 > -1393.8922124755559
WOLFE (weak): th(4.308869380063768)=-1393.8922124755559; dx=-0.007831997170358077 evalInputDelta=0.03726127008690128
New Minimum: -1393.8922124755559 > -1393.966642355548
WOLFE (weak): th(12.926608140191302)=-1393.966642355548; dx=-0.00782775394452073 evalInputDelta=0.11169115007896835
New Minimum: -1393.966642355548 > -1394.3017965992872
WOLFE (weak): th(51.70643256076521)=-1394.3017965992872; dx=-0.00782403138263451 evalInputDelta=0.44684539381819377
New Minimum: -1394.3017965992872 > -1396.0871212069826
WOLFE (weak): th(258.53216280382605)=-1396.0871212069826; dx=-0.007813995130002523 evalInputDelta=2.232170001513623
New Minimum: -1396.0871212069826 > -1407.1684334151332
WOLFE (weak): th(1551.1929768229563)=-1407.1684334151332; dx=-0.007716434425106276 evalInputDelta=13.313482209664244
New Minimum: -1407.1684334151332 > -1482.304624562711
END: th(10858.350837760694)=-1482.304624562711; dx=-0.006908584675084894 evalInputDelta=88.44967335724209
Fitness changed from -1393.854951205469 to -1482.304624562711
Iteration 1 complete. Error: -1482.304624562711 Total: 49.8343; Orientation: 0.0998; Line Search: 35.9804
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/66b40f77-10e7-4abd-ba81-467717dc7b9e.jpg)
Adding measurement 78ae23aa to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-1482.304624562711;dx=-0.006436694142942845
New Minimum: -1482.304624562711 > -1629.7091765097232
END: th(23393.607721408407)=-1629.7091765097232; dx=-0.004994243639536416 evalInputDelta=147.40455194701212
Fitness changed from -1482.304624562711 to -1629.7091765097232
Iteration 2 complete. Error: -1629.7091765097232 Total: 14.5082; Orientation: 0.0861; Line Search: 9.2165
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/e55c08b1-0d37-4ca7-9812-28fce8244087.jpg)
Adding measurement 559cd35d to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-1629.7091765097232;dx=-0.004538118592221661
New Minimum: -1629.7091765097232 > -1836.2620319551347
END: th(50400.00000000001)=-1836.2620319551347; dx=-0.0029706096468156916 evalInputDelta=206.55285544541152
Fitness changed from -1629.7091765097232 to -1836.2620319551347
Iteration 3 complete. Error: -1836.2620319551347 Total: 14.6262; Orientation: 0.0954; Line Search: 9.2437
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/927d652f-dd30-4298-af52-6f217c25e930.jpg)
Adding measurement 5f7f00d6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.182e+04, gradient 5.477e-02, dot -0.846; [f5a04b32-439c-4d6c-91ee-2108f2ac8221 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1836.2620319551347, -1629.7091765097232, -1482.304624562711, -1393.854951205469
LBFGS Accumulation History: 3 points
Removed measurement 5f7f00d6 to history. Total: 3
th(0)=-1836.2620319551347;dx=-0.002997438738046575
New Minimum: -1836.2620319551347 > -2095.1381816004405
END: th(108583.50837760697)=-2095.1381816004405; dx=-0.001558087655134255 evalInputDelta=258.87614964530576
Fitness changed from -1836.2620319551347 to -2095.1381816004405
Iteration 4 complete. Error: -2095.1381816004405 Total: 16.1355; Orientation: 1.7345; Line Search: 9.1630
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/ef207696-dcca-4735-b576-ff00ae28858e.jpg)
Adding measurement 369c2ef3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.253e+04, gradient 5.158e-02, dot -0.648; [f5a04b32-439c-4d6c-91ee-2108f2ac8221 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2095.1381816004405, -1629.7091765097232, -1482.304624562711, -1393.854951205469
LBFGS Accumulation History: 3 points
Removed measurement 369c2ef3 to history. Total: 3
th(0)=-2095.1381816004405;dx=-0.00265577960556354
New Minimum: -2095.1381816004405 > -2329.9493556727793
END: th(233936.07721408413)=-2329.9493556727793; dx=-2.9737454109469183E-4 evalInputDelta=234.81117407233887
Fitness changed from -2095.1381816004405 to -2329.9493556727793
Iteration 5 complete. Error: -2329.9493556727793 Total: 16.2109; Orientation: 1.6784; Line Search: 8.9330
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/d30ac0fa-96c1-41b2-88d8-3937c2f9ee12.jpg)
Adding measurement 5b0b5f5a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.119e+04, gradient 6.230e-02, dot -0.367; [f5a04b32-439c-4d6c-91ee-2108f2ac8221 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2329.9493556727793, -1629.7091765097232, -1482.304624562711, -1393.854951205469
LBFGS Accumulation History: 3 points
Removed measurement 5b0b5f5a to history. Total: 3
th(0)=-2329.9493556727793;dx=-0.003874679428641235
Armijo: th(504000.0000000002)=-2174.938734769327; dx=8.385649352377295E-4 evalInputDelta=-155.0106209034525
New Minimum: -2329.9493556727793 > -2444.8331231394914
WOLF (strong): th(252000.0000000001)=-2444.8331231394914; dx=8.435164119027964E-4 evalInputDelta=114.88376746671202
New Minimum: -2444.8331231394914 > -2528.4395385296443
END: th(84000.00000000003)=-2528.4395385296443; dx=-7.640559051000027E-4 evalInputDelta=198.49018285686498
Fitness changed from -2329.9493556727793 to -2528.4395385296443
Iteration 6 complete. Error: -2528.4395385296443 Total: 25.1832; Orientation: 1.7335; Line Search: 18.1475
Adding measurement 2877d9de to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.841e+04, gradient 4.891e-02, dot -0.491; [f5a04b32-439c-4d6c-91ee-2108f2ac8221 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2528.4395385296443, -1629.7091765097232, -1482.304624562711, -1393.854951205469
LBFGS Accumulation History: 3 points
Removed measurement 2877d9de to history. Total: 3
th(0)=-2528.4395385296443;dx=-0.0023916185435547367
New Minimum: -2528.4395385296443 > -2679.1974544628097
WOLF (strong): th(180972.5139626783)=-2679.1974544628097; dx=1.6369893955628292E-6 evalInputDelta=150.75791593316535
END: th(90486.25698133915)=-2660.580011952281; dx=-6.479810003388489E-4 evalInputDelta=132.14047342263666
Fitness changed from -2528.4395385296443 to -2679.1974544628097
Iteration 7 complete. Error: -2679.1974544628097 Total: 19.8912; Orientation: 1.6140; Line Search: 13.5635
Adding measurement 48c2cac0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.129e+04, gradient 6.129e-02, dot -0.371; [f5a04b32-439c-4d6c-91ee-2108f2ac8221 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2679.1974544628097, -1629.7091765097232, -1482.304624562711, -1393.854951205469
LBFGS Accumulation History: 3 points
Removed measurement 48c2cac0 to history. Total: 3
th(0)=-2679.1974544628097;dx=-0.003749037807063141
New Minimum: -2679.1974544628097 > -2755.567818073074
WOLF (strong): th(194946.7310117368)=-2755.567818073074; dx=0.0010392627551955508 evalInputDelta=76.37036361026412
New Minimum: -2755.567818073074 > -2839.374402927518
WOLF (strong): th(97473.3655058684)=-2839.374402927518; dx=5.893032858245386E-5 evalInputDelta=160.1769484647084
END: th(32491.121835289465)=-2784.103895331494; dx=-0.0021498352495909322 evalInputDelta=104.90644086868451
Fitness changed from -2679.1974544628097 to -2839.374402927518
Iteration 8 complete. Error: -2839.374402927518 Total: 24.4643; Orientation: 1.6890; Line Search: 18.0727
Adding measurement 551620ea to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.771e+04, gradient 5.042e-02, dot -0.454; [f5a04b32-439c-4d6c-91ee-2108f2ac8221 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2839.374402927518, -1629.7091765097232, -1482.304624562711, -1393.854951205469
LBFGS Accumulation History: 3 points
Removed measurement 551620ea to history. Total: 3
th(0)=-2839.374402927518;dx=-0.0025415497978804142
New Minimum: -2839.374402927518 > -2947.836155555461
END: th(70000.00000000003)=-2947.836155555461; dx=-5.962646859091346E-4 evalInputDelta=108.46175262794304
Fitness changed from -2839.374402927518 to -2947.836155555461
Iteration 9 complete. Error: -2947.836155555461 Total: 15.3898; Orientation: 1.6060; Line Search: 9.0803
Adding measurement 67dd2602 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.310e+04, gradient 4.142e-02, dot -0.562; [f5a04b32-439c-4d6c-91ee-2108f2ac8221 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2947.836155555461, -1629.7091765097232, -1482.304624562711, -1393.854951205469
LBFGS Accumulation History: 3 points
Removed measurement 67dd2602 to history. Total: 3
th(0)=-2947.836155555461;dx=-0.0017093949778502675
New Minimum: -2947.836155555461 > -3052.9408772526203
END: th(150810.42830223194)=-3052.9408772526203; dx=-1.7157964964113686E-4 evalInputDelta=105.10472169715922
Fitness changed from -2947.836155555461 to -3052.9408772526203
Iteration 10 complete. Error: -3052.9408772526203 Total: 15.1169; Orientation: 1.6198; Line Search: 9.1107
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/e29c5ef5-b8df-49c3-9c16-c08fd20db598.jpg)
Final threshold in iteration 11: -3052.9408772526203 (> -Infinity) after 212.270s (< 5400.000s)
Returns
-3052.9408772526203