BasicOptimizer.scala:89 executed in 201.75 seconds (1.840 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: 10149093439135
Reset training subject: 10153449335675
Adding measurement 3832c826 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.24255672097206116;dx=-4.860723370557234E-7
New Minimum: -0.24255672097206116 > -0.24255692958831787
WOLFE (weak): th(2.154434690031884)=-0.24255692958831787; dx=-4.5163942253982205E-7 evalInputDelta=2.086162567138672E-7
New Minimum: -0.24255692958831787 > -0.2425573319196701
WOLFE (weak): th(4.308869380063768)=-0.2425573319196701; dx=-4.516159065230742E-7 evalInputDelta=6.109476089477539E-7
New Minimum: -0.2425573319196701 > -0.24255958199501038
WOLFE (weak): th(12.926608140191302)=-0.24255958199501038; dx=-4.516001398238308E-7 evalInputDelta=2.86102294921875E-6
New Minimum: -0.24255958199501038 > -0.24256838858127594
WOLFE (weak): th(51.70643256076521)=-0.24256838858127594; dx=-4.5159016011693796E-7 evalInputDelta=1.1667609214782715E-5
New Minimum: -0.24256838858127594 > -0.24261502921581268
WOLFE (weak): th(258.53216280382605)=-0.24261502921581268; dx=-4.515661282588073E-7 evalInputDelta=5.830824375152588E-5
New Minimum: -0.24261502921581268 > -0.24290692806243896
WOLFE (weak): th(1551.1929768229563)=-0.24290692806243896; dx=-4.5144588001661976E-7 evalInputDelta=3.502070903778076E-4
New Minimum: -0.24290692806243896 > -0.24500565230846405
WOLFE (weak): th(10858.350837760694)=-0.24500565230846405; dx=-4.5060934984869674E-7 evalInputDelta=0.002448931336402893
New Minimum: -0.24500565230846405 > -0.2619822472333908
WOLFE (weak): th(86866.80670208555)=-0.2619822472333908; dx=-4.427338596760576E-7 evalInputDelta=0.01942552626132965
New Minimum: -0.2619822472333908 > -0.4026045501232147
END: th(781801.26031877)=-0.4026045501232147; dx=-3.659862940858177E-7 evalInputDelta=0.16004782915115356
Fitness changed from -0.24255672097206116 to -0.4026045501232147
Iteration 1 complete. Error: -0.4026045501232147 Total: 56.1174; Orientation: 0.0451; Line Search: 42.8410
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/5a8246aa-2767-48cd-9c92-b4e92c733008.jpg)
Adding measurement 4bb07475 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.4026045501232147;dx=-3.2863662571708083E-7
New Minimum: -0.4026045501232147 > -0.6344331502914429
END: th(1684339.7559414052)=-0.6344331502914429; dx=-2.2495841507202948E-7 evalInputDelta=0.23182860016822815
Fitness changed from -0.4026045501232147 to -0.6344331502914429
Iteration 2 complete. Error: -0.6344331502914429 Total: 13.4471; Orientation: 0.0454; Line Search: 8.9744
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/17e68c0c-5cf8-4296-9e37-cd70314a6068.jpg)
Adding measurement 1df48b49 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.6344331502914429;dx=-2.001469608816447E-7
New Minimum: -0.6344331502914429 > -0.916964054107666
END: th(3628800.0)=-0.916964054107666; dx=-1.1827859768050097E-7 evalInputDelta=0.28253090381622314
Fitness changed from -0.6344331502914429 to -0.916964054107666
Iteration 3 complete. Error: -0.916964054107666 Total: 12.8958; Orientation: 0.0456; Line Search: 8.6175
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/f86eea97-e3fa-4be0-b7f3-b51ab30848f3.jpg)
Adding measurement 1a48fa35 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.352e+03, gradient 3.432e-04, dot -0.853; [1b2e71e0-7c01-4a92-83d0-8386f35cf1fa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.916964054107666, -0.6344331502914429, -0.4026045501232147, -0.24255672097206116
LBFGS Accumulation History: 3 points
Removed measurement 1a48fa35 to history. Total: 3
th(0)=-0.916964054107666;dx=-1.1777255501969649E-7
New Minimum: -0.916964054107666 > -1.2227474004030228
END: th(7818012.6031877)=-1.2227474004030228; dx=-4.997766199713097E-8 evalInputDelta=0.30578334629535675
Fitness changed from -0.916964054107666 to -1.2227474004030228
Iteration 4 complete. Error: -1.2227474004030228 Total: 14.1968; Orientation: 1.0373; Line Search: 9.0425
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/a8d026f8-117f-474b-b183-2a3e259536d3.jpg)
Adding measurement 117f1bcc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.818e+03, gradient 2.806e-04, dot -0.675; [1b2e71e0-7c01-4a92-83d0-8386f35cf1fa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.2227474004030228, -0.6344331502914429, -0.4026045501232147, -0.24255672097206116
LBFGS Accumulation History: 3 points
Removed measurement 117f1bcc to history. Total: 3
th(0)=-1.2227474004030228;dx=-7.872397145492304E-8
New Minimum: -1.2227474004030228 > -1.4670472294092178
END: th(1.684339755941405E7)=-1.4670472294092178; dx=-4.952744194677047E-9 evalInputDelta=0.24429982900619507
Fitness changed from -1.2227474004030228 to -1.4670472294092178
Iteration 5 complete. Error: -1.4670472294092178 Total: 14.8445; Orientation: 1.1322; Line Search: 8.8024
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/0d0880a4-c008-4ff9-9454-433b0ce61702.jpg)
Adding measurement 413ee68f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.108e+03, gradient 2.936e-04, dot -0.398; [1b2e71e0-7c01-4a92-83d0-8386f35cf1fa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.4670472294092178, -0.6344331502914429, -0.4026045501232147, -0.24255672097206116
LBFGS Accumulation History: 3 points
Removed measurement 413ee68f to history. Total: 3
th(0)=-1.4670472294092178;dx=-8.617360965646252E-8
Armijo: th(3.6288E7)=-1.2978773564100266; dx=3.6261176959274216E-8 evalInputDelta=-0.16916987299919128
New Minimum: -1.4670472294092178 > -1.5857762545347214
WOLF (strong): th(1.8144E7)=-1.5857762545347214; dx=2.352689783961199E-8 evalInputDelta=0.11872902512550354
New Minimum: -1.5857762545347214 > -1.6196223199367523
END: th(6048000.0)=-1.6196223199367523; dx=-2.2082986957445458E-8 evalInputDelta=0.15257509052753448
Fitness changed from -1.4670472294092178 to -1.6196223199367523
Iteration 6 complete. Error: -1.6196223199367523 Total: 22.0703; Orientation: 1.0455; Line Search: 17.1911
Adding measurement 67ecc61d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.692e+03, gradient 1.913e-04, dot -0.526; [1b2e71e0-7c01-4a92-83d0-8386f35cf1fa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.6196223199367523, -0.6344331502914429, -0.4026045501232147, -0.24255672097206116
LBFGS Accumulation History: 3 points
Removed measurement 67ecc61d to history. Total: 3
th(0)=-1.6196223199367523;dx=-3.659882056492742E-8
New Minimum: -1.6196223199367523 > -1.7547069191932678
END: th(1.3030021005312834E7)=-1.7547069191932678; dx=-6.204814193098447E-9 evalInputDelta=0.1350845992565155
Fitness changed from -1.6196223199367523 to -1.7547069191932678
Iteration 7 complete. Error: -1.7547069191932678 Total: 13.8771; Orientation: 1.0164; Line Search: 8.3277
Adding measurement 20449e31 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.841e+03, gradient 2.031e-04, dot -0.445; [1b2e71e0-7c01-4a92-83d0-8386f35cf1fa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.7547069191932678, -0.6344331502914429, -0.4026045501232147, -0.24255672097206116
LBFGS Accumulation History: 3 points
Removed measurement 20449e31 to history. Total: 3
th(0)=-1.7547069191932678;dx=-4.1242958520149E-8
Armijo: th(2.8072329265690092E7)=-1.7511599212884903; dx=1.4347570207239567E-8 evalInputDelta=-0.003546997904777527
New Minimum: -1.7547069191932678 > -1.8296361565589905
WOLF (strong): th(1.4036164632845046E7)=-1.8296361565589905; dx=6.2914977946781356E-9 evalInputDelta=0.07492923736572266
END: th(4678721.544281682)=-1.8185238689184189; dx=-1.528733046679914E-8 evalInputDelta=0.06381694972515106
Fitness changed from -1.7547069191932678 to -1.8296361565589905
Iteration 8 complete. Error: -1.8296361565589905 Total: 22.1835; Orientation: 1.0034; Line Search: 16.8570
Adding measurement 4bce7580 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.663e+03, gradient 2.095e-04, dot -0.380; [1b2e71e0-7c01-4a92-83d0-8386f35cf1fa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8296361565589905, -0.6344331502914429, -0.4026045501232147, -0.24255672097206116
LBFGS Accumulation History: 3 points
Removed measurement 4bce7580 to history. Total: 3
th(0)=-1.8296361565589905;dx=-4.390510919415185E-8
New Minimum: -1.8296361565589905 > -1.9333134442567825
WOLF (strong): th(1.0080000000000002E7)=-1.9333134442567825; dx=4.995287685270295E-10 evalInputDelta=0.10367728769779205
END: th(5040000.000000001)=-1.9095892012119293; dx=-1.9769406078298303E-8 evalInputDelta=0.07995304465293884
Fitness changed from -1.8296361565589905 to -1.9333134442567825
Iteration 9 complete. Error: -1.9333134442567825 Total: 17.6278; Orientation: 1.0041; Line Search: 12.1212
Adding measurement 59f54b9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.973e+03, gradient 1.593e-04, dot -0.442; [1b2e71e0-7c01-4a92-83d0-8386f35cf1fa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.9333134442567825, -0.6344331502914429, -0.4026045501232147, -0.24255672097206116
LBFGS Accumulation History: 3 points
Removed measurement 59f54b9 to history. Total: 3
th(0)=-1.9333134442567825;dx=-2.5365758510300014E-8
New Minimum: -1.9333134442567825 > -1.9964441061019897
END: th(1.0858350837760696E7)=-1.9964441061019897; dx=-1.0254475676515568E-9 evalInputDelta=0.06313066184520721
Fitness changed from -1.9333134442567825 to -1.9964441061019897
Iteration 10 complete. Error: -1.9964441061019897 Total: 14.4146; Orientation: 1.0657; Line Search: 8.7567
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/93ddf54a-8818-4530-a2b1-4fd79d5c0af7.jpg)
Final threshold in iteration 11: -1.9964441061019897 (> -Infinity) after 201.747s (< 5400.000s)
Returns
-1.9964441061019897