BasicOptimizer.scala:89 executed in 86.81 seconds (0.984 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: 306888424549200
Reset training subject: 306890142120900
Adding measurement 74c595d1 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-155.6553729242298;dx=-2.9440950988275788E-5
New Minimum: -155.6553729242298 > -155.6554192031175
END: th(2.154434690031884)=-155.6554192031175; dx=-1.8108578440131084E-5 evalInputDelta=4.627888770869504E-5
Fitness changed from -155.6553729242298 to -155.6554192031175
Iteration 1 complete. Error: -155.6554192031175 Total: 8.1781; Orientation: 0.0629; Line Search: 3.2143
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/ad598662-dccc-448b-9621-302b76e3f371.jpg)
Adding measurement 272aea6c to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-155.6554192031175;dx=-1.7962450914240972E-5
New Minimum: -155.6554192031175 > -155.65551176085168
WOLFE (weak): th(4.641588833612779)=-155.65551176085168; dx=-1.7965133026204305E-5 evalInputDelta=9.255773417748969E-5
New Minimum: -155.65551176085168 > -155.65559770726986
WOLFE (weak): th(9.283177667225559)=-155.65559770726986; dx=-1.7954503764131583E-5 evalInputDelta=1.7850415235898254E-4
New Minimum: -155.65559770726986 > -155.655974548697
WOLFE (weak): th(27.849533001676676)=-155.655974548697; dx=-1.7930690184874733E-5 evalInputDelta=5.553455794995443E-4
New Minimum: -155.655974548697 > -155.6576273511983
WOLFE (weak): th(111.3981320067067)=-155.6576273511983; dx=-1.793007317386548E-5 evalInputDelta=0.0022081480807969456
New Minimum: -155.6576273511983 > -155.6664860734899
WOLFE (weak): th(556.9906600335335)=-155.6664860734899; dx=-1.7927540892587948E-5 evalInputDelta=0.011066870372388848
New Minimum: -155.6664860734899 > -155.72178880246045
WOLFE (weak): th(3341.9439602012008)=-155.72178880246045; dx=-1.791097025044607E-5 evalInputDelta=0.0663695993429485
New Minimum: -155.72178880246045 > -156.11929523349903
WOLFE (weak): th(23393.607721408407)=-156.11929523349903; dx=-1.7855343412460216E-5 evalInputDelta=0.46387603038152747
New Minimum: -156.11929523349903 > -159.30673249371554
WOLFE (weak): th(187148.86177126726)=-159.30673249371554; dx=-1.7265972761118826E-5 evalInputDelta=3.65131329059804
New Minimum: -159.30673249371554 > -182.4104566781871
END: th(1684339.7559414054)=-182.4104566781871; dx=-1.0349697386619297E-5 evalInputDelta=26.7550374750696
Fitness changed from -155.6554192031175 to -182.4104566781871
Iteration 2 complete. Error: -182.4104566781871 Total: 18.4914; Orientation: 0.0619; Line Search: 16.2362
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/5885adc8-87bd-4cad-bb02-116f880431dd.jpg)
Adding measurement 19bb0f43 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-182.4104566781871;dx=-1.236466727299264E-5
New Minimum: -182.4104566781871 > -212.93227281517974
END: th(3628800.0000000005)=-212.93227281517974; dx=-4.390538892491588E-6 evalInputDelta=30.52181613699264
Fitness changed from -182.4104566781871 to -212.93227281517974
Iteration 3 complete. Error: -212.93227281517974 Total: 5.4588; Orientation: 0.0626; Line Search: 3.4818
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/1b5a87bc-4fae-4b8d-a7a9-1aaa7c3c1491.jpg)
Adding measurement 5351763f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.316e+04, gradient 3.070e-03, dot -0.424; [85ae265b-158d-486c-be4a-e3f2e32bc62f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -212.93227281517974, -182.4104566781871, -155.6554192031175, -155.6553729242298
LBFGS Accumulation History: 3 points
Removed measurement 5351763f to history. Total: 3
th(0)=-212.93227281517974;dx=-9.424508014421528E-6
New Minimum: -212.93227281517974 > -238.13739353982078
END: th(7818012.603187701)=-238.13739353982078; dx=-9.202219355414353E-8 evalInputDelta=25.205120724641034
Fitness changed from -212.93227281517974 to -238.13739353982078
Iteration 4 complete. Error: -238.13739353982078 Total: 6.4862; Orientation: 1.0658; Line Search: 3.4953
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/825f621d-a780-4d0a-a9e5-617c284c43c7.jpg)
Adding measurement 3a9a7e39 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.742e+03, gradient 3.660e-03, dot -0.165; [85ae265b-158d-486c-be4a-e3f2e32bc62f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -238.13739353982078, -182.4104566781871, -155.6554192031175, -155.6553729242298
LBFGS Accumulation History: 3 points
Removed measurement 3a9a7e39 to history. Total: 3
th(0)=-238.13739353982078;dx=-1.3391630953108531E-5
Armijo: th(1.6843397559414055E7)=-208.52029309463936; dx=3.2300850525915104E-6 evalInputDelta=-29.61710044518142
New Minimum: -238.13739353982078 > -247.70616428758052
WOLF (strong): th(8421698.779707028)=-247.70616428758052; dx=4.2597924800510965E-6 evalInputDelta=9.568770747759743
New Minimum: -247.70616428758052 > -262.84305924744484
END: th(2807232.926569009)=-262.84305924744484; dx=-2.8831422690688556E-6 evalInputDelta=24.705665707624064
Fitness changed from -238.13739353982078 to -262.84305924744484
Iteration 5 complete. Error: -262.84305924744484 Total: 9.4318; Orientation: 1.0501; Line Search: 6.5836
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/99500cbb-dc0f-4ab7-ac8e-3f9fc0126bde.jpg)
Adding measurement d2e0c97 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.296e+04, gradient 2.472e-03, dot -0.395; [85ae265b-158d-486c-be4a-e3f2e32bc62f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -262.84305924744484, -182.4104566781871, -155.6554192031175, -155.6553729242298
LBFGS Accumulation History: 3 points
Removed measurement d2e0c97 to history. Total: 3
th(0)=-262.84305924744484;dx=-6.1001869410385E-6
New Minimum: -262.84305924744484 > -279.20972754738926
END: th(6048000.000000001)=-279.20972754738926; dx=-1.1714898647202313E-7 evalInputDelta=16.366668299944422
Fitness changed from -262.84305924744484 to -279.20972754738926
Iteration 6 complete. Error: -279.20972754738926 Total: 6.2025; Orientation: 1.0231; Line Search: 3.2858
Adding measurement 30918e02 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.214e+04, gradient 2.934e-03, dot -0.261; [85ae265b-158d-486c-be4a-e3f2e32bc62f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -279.20972754738926, -182.4104566781871, -155.6554192031175, -155.6553729242298
LBFGS Accumulation History: 3 points
Removed measurement 30918e02 to history. Total: 3
th(0)=-279.20972754738926;dx=-8.597651820211656E-6
Armijo: th(1.3030021005312836E7)=-259.4421884149223; dx=3.012646596669355E-6 evalInputDelta=-19.767539132466936
New Minimum: -279.20972754738926 > -285.2473574786167
WOLF (strong): th(6515010.502656418)=-285.2473574786167; dx=3.1881319354948023E-6 evalInputDelta=6.037629931227457
New Minimum: -285.2473574786167 > -292.44621505640475
END: th(2171670.167552139)=-292.44621505640475; dx=-2.537218923216639E-6 evalInputDelta=13.23648750901549
Fitness changed from -279.20972754738926 to -292.44621505640475
Iteration 7 complete. Error: -292.44621505640475 Total: 9.3309; Orientation: 1.0587; Line Search: 6.6133
Adding measurement 6037871b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.087e+04, gradient 1.894e-03, dot -0.483; [85ae265b-158d-486c-be4a-e3f2e32bc62f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -292.44621505640475, -182.4104566781871, -155.6554192031175, -155.6553729242298
LBFGS Accumulation History: 3 points
Removed measurement 6037871b to history. Total: 3
th(0)=-292.44621505640475;dx=-3.579715498227569E-6
New Minimum: -292.44621505640475 > -303.70074418158595
END: th(4678721.544281682)=-303.70074418158595; dx=-1.278171120952781E-6 evalInputDelta=11.254529125181193
Fitness changed from -292.44621505640475 to -303.70074418158595
Iteration 8 complete. Error: -303.70074418158595 Total: 6.1104; Orientation: 1.0555; Line Search: 3.4893
Adding measurement 4c662be to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.096e+04, gradient 2.046e-03, dot -0.401; [85ae265b-158d-486c-be4a-e3f2e32bc62f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -303.70074418158595, -182.4104566781871, -155.6554192031175, -155.6553729242298
LBFGS Accumulation History: 3 points
Removed measurement 4c662be to history. Total: 3
th(0)=-303.70074418158595;dx=-4.184674397671339E-6
New Minimum: -303.70074418158595 > -304.9299776400345
WOLF (strong): th(1.0080000000000002E7)=-304.9299776400345; dx=1.2766810166056457E-6 evalInputDelta=1.2292334584485616
New Minimum: -304.9299776400345 > -311.1459229059606
WOLF (strong): th(5040000.000000001)=-311.1459229059606; dx=3.0839531552212533E-7 evalInputDelta=7.445178724374671
END: th(1680000.0000000002)=-309.23232471929373; dx=-2.089047436871914E-6 evalInputDelta=5.531580537707782
Fitness changed from -303.70074418158595 to -311.1459229059606
Iteration 9 complete. Error: -311.1459229059606 Total: 9.2473; Orientation: 1.0302; Line Search: 6.6568
Adding measurement 2aeb561b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.716e+04, gradient 2.383e-03, dot -0.284; [85ae265b-158d-486c-be4a-e3f2e32bc62f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -311.1459229059606, -182.4104566781871, -155.6554192031175, -155.6553729242298
LBFGS Accumulation History: 3 points
Removed measurement 2aeb561b to history. Total: 3
th(0)=-311.1459229059606;dx=-5.665659453089432E-6
New Minimum: -311.1459229059606 > -320.31232999406234
WOLF (strong): th(3619450.2792535652)=-320.31232999406234; dx=6.759394578663001E-7 evalInputDelta=9.166407088101721
END: th(1809725.1396267826)=-319.0752858058556; dx=-2.3792407300510796E-6 evalInputDelta=7.929362899894954
Fitness changed from -311.1459229059606 to -320.31232999406234
Iteration 10 complete. Error: -320.31232999406234 Total: 7.5803; Orientation: 1.0411; Line Search: 4.9907
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/3215553c-28cc-4829-afba-f8417e9c10bd.jpg)
Final threshold in iteration 11: -320.31232999406234 (> -Infinity) after 86.807s (< 5400.000s)
Returns
-320.31232999406234