BasicOptimizer.scala:89 executed in 133.64 seconds (1.571 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: 333632865095600
Reset training subject: 333635477594000
Adding measurement 35608d89 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-127.97890019691405;dx=-2.896332330735504E-5
New Minimum: -127.97890019691405 > -127.97895295127071
END: th(2.154434690031884)=-127.97895295127071; dx=-2.1732767793203136E-5 evalInputDelta=5.275435665907935E-5
Fitness changed from -127.97890019691405 to -127.97895295127071
Iteration 1 complete. Error: -127.97895295127071 Total: 13.0604; Orientation: 0.0597; Line Search: 5.1469
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/ccf61c09-5874-4caf-b02b-f3e4eb6f3344.jpg)
Adding measurement 13219f08 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-127.97895295127071;dx=-2.1626524778957898E-5
New Minimum: -127.97895295127071 > -127.97906599624744
WOLFE (weak): th(4.641588833612779)=-127.97906599624744; dx=-2.162106854315832E-5 evalInputDelta=1.1304497672881553E-4
New Minimum: -127.97906599624744 > -127.97917904112433
WOLFE (weak): th(9.283177667225559)=-127.97917904112433; dx=-2.1614147929389346E-5 evalInputDelta=2.2608985361216583E-4
New Minimum: -127.97917904112433 > -127.9796312196333
WOLFE (weak): th(27.849533001676676)=-127.9796312196333; dx=-2.160901848182453E-5 evalInputDelta=6.782683625914387E-4
New Minimum: -127.9796312196333 > -127.98165846697769
WOLFE (weak): th(111.3981320067067)=-127.98165846697769; dx=-2.1596855120001983E-5 evalInputDelta=0.00270551570697819
New Minimum: -127.98165846697769 > -127.99248749344987
WOLFE (weak): th(556.9906600335335)=-127.99248749344987; dx=-2.1597922974302655E-5 evalInputDelta=0.013534542179158393
New Minimum: -127.99248749344987 > -128.06012368445775
WOLFE (weak): th(3341.9439602012008)=-128.06012368445775; dx=-2.1567727063692582E-5 evalInputDelta=0.0811707331870366
New Minimum: -128.06012368445775 > -128.54492374610646
WOLFE (weak): th(23393.607721408407)=-128.54492374610646; dx=-2.141068257560801E-5 evalInputDelta=0.5659707948357493
New Minimum: -128.54492374610646 > -132.34478868245586
WOLFE (weak): th(187148.86177126726)=-132.34478868245586; dx=-1.9783427390134687E-5 evalInputDelta=4.365835731185143
New Minimum: -132.34478868245586 > -152.18675460466318
END: th(1684339.7559414054)=-152.18675460466318; dx=-5.373954900787552E-6 evalInputDelta=24.207801653392465
Fitness changed from -127.97895295127071 to -152.18675460466318
Iteration 2 complete. Error: -152.18675460466318 Total: 29.2014; Orientation: 0.0605; Line Search: 26.1291
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/b0f6385f-3f1b-4a94-9232-5b0e9730227e.jpg)
Adding measurement 7292fe4 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-152.18675460466318;dx=-9.640279095110896E-6
New Minimum: -152.18675460466318 > -168.9150820953534
END: th(3628800.0000000005)=-168.9150820953534; dx=-6.489225822452116E-7 evalInputDelta=16.72832749069022
Fitness changed from -152.18675460466318 to -168.9150820953534
Iteration 3 complete. Error: -168.9150820953534 Total: 8.2079; Orientation: 0.0624; Line Search: 5.2693
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/86a10dbd-cdd7-4f58-b689-319129e3e0f1.jpg)
Adding measurement 3fd043ca to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.487e+03, gradient 3.146e-03, dot -0.320; [1564b177-6f38-48ac-92aa-f00df3ec8ad1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -168.9150820953534, -152.18675460466318, -127.97895295127071, -127.97890019691405
LBFGS Accumulation History: 3 points
Removed measurement 3fd043ca to history. Total: 3
th(0)=-168.9150820953534;dx=-9.88555690786956E-6
Armijo: th(7818012.603187701)=-163.3697147079753; dx=3.596473975933063E-6 evalInputDelta=-5.545367387378093
New Minimum: -168.9150820953534 > -178.31716408747073
WOLF (strong): th(3909006.3015938504)=-178.31716408747073; dx=2.134860662074574E-6 evalInputDelta=9.402081992117331
New Minimum: -178.31716408747073 > -178.45807948256447
END: th(1303002.1005312835)=-178.45807948256447; dx=-3.6164277623961344E-6 evalInputDelta=9.542997387211074
Fitness changed from -168.9150820953534 to -178.45807948256447
Iteration 4 complete. Error: -178.45807948256447 Total: 14.6285; Orientation: 1.0638; Line Search: 10.6108
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/2ef6029e-dca3-4429-86d9-f4a360b574d5.jpg)
Adding measurement 7f325001 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.805e+03, gradient 2.132e-03, dot -0.555; [1564b177-6f38-48ac-92aa-f00df3ec8ad1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -178.45807948256447, -152.18675460466318, -127.97895295127071, -127.97890019691405
LBFGS Accumulation History: 3 points
Removed measurement 7f325001 to history. Total: 3
th(0)=-178.45807948256447;dx=-4.5376771645702E-6
New Minimum: -178.45807948256447 > -187.99969430712832
END: th(2807232.926569009)=-187.99969430712832; dx=-1.9874944459783808E-6 evalInputDelta=9.541614824563851
Fitness changed from -178.45807948256447 to -187.99969430712832
Iteration 5 complete. Error: -187.99969430712832 Total: 9.2546; Orientation: 1.0376; Line Search: 5.1877
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/b34e405a-cda3-4be3-9ae7-6094cbc77f22.jpg)
Adding measurement 538b73a3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.417e+04, gradient 2.164e-03, dot -0.548; [1564b177-6f38-48ac-92aa-f00df3ec8ad1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -187.99969430712832, -152.18675460466318, -127.97895295127071, -127.97890019691405
LBFGS Accumulation History: 3 points
Removed measurement 538b73a3 to history. Total: 3
th(0)=-187.99969430712832;dx=-4.677269617063257E-6
New Minimum: -187.99969430712832 > -194.42589028237532
WOLF (strong): th(6048000.000000001)=-194.42589028237532; dx=5.494709152578984E-7 evalInputDelta=6.426195975246998
New Minimum: -194.42589028237532 > -195.12475050603337
END: th(3024000.0000000005)=-195.12475050603337; dx=-6.363702023285124E-7 evalInputDelta=7.1250561989050425
Fitness changed from -187.99969430712832 to -195.12475050603337
Iteration 6 complete. Error: -195.12475050603337 Total: 11.6793; Orientation: 0.9847; Line Search: 7.7619
Adding measurement 675ca17a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.575e+04, gradient 2.365e-03, dot -0.445; [1564b177-6f38-48ac-92aa-f00df3ec8ad1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -195.12475050603337, -152.18675460466318, -127.97895295127071, -127.97890019691405
LBFGS Accumulation History: 3 points
Removed measurement 675ca17a to history. Total: 3
th(0)=-195.12475050603337;dx=-5.5892600447440595E-6
Armijo: th(6515010.502656418)=-192.9840086826876; dx=2.502909669934766E-6 evalInputDelta=-2.1407418233457634
New Minimum: -195.12475050603337 > -201.17971753748873
WOLF (strong): th(3257505.251328209)=-201.17971753748873; dx=1.0928368211974493E-6 evalInputDelta=6.054967031455362
END: th(1085835.0837760696)=-200.15385082827956; dx=-2.8458187083517597E-6 evalInputDelta=5.029100322246194
Fitness changed from -195.12475050603337 to -201.17971753748873
Iteration 7 complete. Error: -201.17971753748873 Total: 13.5449; Orientation: 1.0033; Line Search: 10.0510
Adding measurement 67460d9d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.491e+04, gradient 2.685e-03, dot -0.321; [1564b177-6f38-48ac-92aa-f00df3ec8ad1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -201.17971753748873, -152.18675460466318, -127.97895295127071, -127.97890019691405
LBFGS Accumulation History: 3 points
Removed measurement 67460d9d to history. Total: 3
th(0)=-201.17971753748873;dx=-7.197494952027283E-6
New Minimum: -201.17971753748873 > -208.64364323291667
WOLF (strong): th(2339360.772140841)=-208.64364323291667; dx=7.665834021016631E-7 evalInputDelta=7.463925695427946
END: th(1169680.3860704205)=-207.6683734582613; dx=-2.8087249535514617E-6 evalInputDelta=6.4886559207725725
Fitness changed from -201.17971753748873 to -208.64364323291667
Iteration 8 complete. Error: -208.64364323291667 Total: 10.9644; Orientation: 0.9733; Line Search: 7.5725
Adding measurement 6da7b303 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.129e+04, gradient 2.123e-03, dot -0.461; [1564b177-6f38-48ac-92aa-f00df3ec8ad1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -208.64364323291667, -152.18675460466318, -127.97895295127071, -127.97890019691405
LBFGS Accumulation History: 3 points
Removed measurement 6da7b303 to history. Total: 3
th(0)=-208.64364323291667;dx=-4.499711403540911E-6
New Minimum: -208.64364323291667 > -214.35865979929534
WOLF (strong): th(2520000.0000000005)=-214.35865979929534; dx=1.0672671150211876E-7 evalInputDelta=5.715016566378665
END: th(1260000.0000000002)=-213.1832541105108; dx=-2.115704831457076E-6 evalInputDelta=4.539610877594129
Fitness changed from -208.64364323291667 to -214.35865979929534
Iteration 9 complete. Error: -214.35865979929534 Total: 11.1440; Orientation: 1.0005; Line Search: 7.6358
Adding measurement 66c66b98 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.272e+04, gradient 2.000e-03, dot -0.466; [1564b177-6f38-48ac-92aa-f00df3ec8ad1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -214.35865979929534, -152.18675460466318, -127.97895295127071, -127.97890019691405
LBFGS Accumulation History: 3 points
Removed measurement 66c66b98 to history. Total: 3
th(0)=-214.35865979929534;dx=-3.996349432984162E-6
New Minimum: -214.35865979929534 > -218.83525814630752
WOLF (strong): th(2714587.709440174)=-218.83525814630752; dx=4.2857191470246506E-7 evalInputDelta=4.476598347012185
END: th(1357293.854720087)=-218.35252200507313; dx=-1.4965395690486176E-6 evalInputDelta=3.9938622057777877
Fitness changed from -214.35865979929534 to -218.83525814630752
Iteration 10 complete. Error: -218.83525814630752 Total: 11.5204; Orientation: 0.9975; Line Search: 7.8933
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/13f997e0-9428-4165-8803-7bd6ac970acf.jpg)
Final threshold in iteration 11: -218.83525814630752 (> -Infinity) after 133.635s (< 5400.000s)
Returns
-218.83525814630752