BasicOptimizer.scala:89 executed in 222.35 seconds (2.695 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: 3419071631183
Reset training subject: 3423945015300
Adding measurement 761155d4 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-9.41784818470478;dx=-5.181506564527244E-6
New Minimum: -9.41784818470478 > -9.417862012982368
WOLFE (weak): th(2.154434690031884)=-9.417862012982368; dx=-5.1712230965185354E-6 evalInputDelta=1.3828277587890625E-5
New Minimum: -9.417862012982368 > -9.41787539422512
WOLFE (weak): th(4.308869380063768)=-9.41787539422512; dx=-5.171620417448362E-6 evalInputDelta=2.720952033996582E-5
New Minimum: -9.41787539422512 > -9.417930006980896
WOLFE (weak): th(12.926608140191302)=-9.417930006980896; dx=-5.172114966852089E-6 evalInputDelta=8.182227611541748E-5
New Minimum: -9.417930006980896 > -9.418174430727959
WOLFE (weak): th(51.70643256076521)=-9.418174430727959; dx=-5.169582546870506E-6 evalInputDelta=3.262460231781006E-4
New Minimum: -9.418174430727959 > -9.419480949640274
WOLFE (weak): th(258.53216280382605)=-9.419480949640274; dx=-5.171499531488656E-6 evalInputDelta=0.0016327649354934692
New Minimum: -9.419480949640274 > -9.427636697888374
WOLFE (weak): th(1551.1929768229563)=-9.427636697888374; dx=-5.1604744942243155E-6 evalInputDelta=0.00978851318359375
New Minimum: -9.427636697888374 > -9.48602831363678
WOLFE (weak): th(10858.350837760694)=-9.48602831363678; dx=-5.1119237772783955E-6 evalInputDelta=0.0681801289319992
New Minimum: -9.48602831363678 > -9.936513781547546
END: th(86866.80670208555)=-9.936513781547546; dx=-4.5562706846821324E-6 evalInputDelta=0.5186655968427658
Fitness changed from -9.41784818470478 to -9.936513781547546
Iteration 1 complete. Error: -9.936513781547546 Total: 60.9115; Orientation: 0.0278; Line Search: 45.6728
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a1defbb4-e7a5-409c-842a-e3b86ec8e72c.jpg)
Adding measurement 5a797485 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-9.936513781547546;dx=-4.251883106932615E-6
New Minimum: -9.936513781547546 > -10.797467142343521
END: th(187148.86177126726)=-10.797467142343521; dx=-3.2389698475909455E-6 evalInputDelta=0.8609533607959747
Fitness changed from -9.936513781547546 to -10.797467142343521
Iteration 2 complete. Error: -10.797467142343521 Total: 15.6724; Orientation: 0.0281; Line Search: 10.0278
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/b5c0661e-1122-4ddd-971e-3a1c852db544.jpg)
Adding measurement 367eda91 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-10.797467142343521;dx=-3.077684847979892E-6
New Minimum: -10.797467142343521 > -12.005778536200523
END: th(403200.00000000006)=-12.005778536200523; dx=-1.9093591806004096E-6 evalInputDelta=1.2083113938570023
Fitness changed from -10.797467142343521 to -12.005778536200523
Iteration 3 complete. Error: -12.005778536200523 Total: 14.7405; Orientation: 0.0295; Line Search: 9.7166
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/23e59f0d-8e94-449b-9828-6a428901130d.jpg)
Adding measurement 539a35e4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.026e+03, gradient 1.465e-03, dot -0.827; [48f49b2d-af78-42a2-9977-0ff1340831a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -12.005778536200523, -10.797467142343521, -9.936513781547546, -9.41784818470478
LBFGS Accumulation History: 3 points
Removed measurement 539a35e4 to history. Total: 3
th(0)=-12.005778536200523;dx=-2.1453830484832964E-6
New Minimum: -12.005778536200523 > -13.371559411287308
END: th(868668.0670208557)=-13.371559411287308; dx=-8.523105119366911E-7 evalInputDelta=1.3657808750867844
Fitness changed from -12.005778536200523 to -13.371559411287308
Iteration 4 complete. Error: -13.371559411287308 Total: 16.2375; Orientation: 0.5845; Line Search: 10.0551
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/4e909d1c-2cf4-4800-a8d2-c56e1de01e32.jpg)
Adding measurement 6459e74c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.122e+03, gradient 1.304e-03, dot -0.631; [48f49b2d-af78-42a2-9977-0ff1340831a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -13.371559411287308, -10.797467142343521, -9.936513781547546, -9.41784818470478
LBFGS Accumulation History: 3 points
Removed measurement 6459e74c to history. Total: 3
th(0)=-13.371559411287308;dx=-1.697122389025284E-6
New Minimum: -13.371559411287308 > -14.545374244451523
END: th(1871488.617712673)=-14.545374244451523; dx=-1.6782518395199035E-7 evalInputDelta=1.173814833164215
Fitness changed from -13.371559411287308 to -14.545374244451523
Iteration 5 complete. Error: -14.545374244451523 Total: 15.9922; Orientation: 0.5834; Line Search: 10.0166
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/579f6b0b-d747-4a48-9a6a-1de1499c4e02.jpg)
Adding measurement 1bf0ece to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.297e+03, gradient 1.287e-03, dot -0.407; [48f49b2d-af78-42a2-9977-0ff1340831a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -14.545374244451523, -10.797467142343521, -9.936513781547546, -9.41784818470478
LBFGS Accumulation History: 3 points
Removed measurement 1bf0ece to history. Total: 3
th(0)=-14.545374244451523;dx=-1.6537472909280463E-6
New Minimum: -14.545374244451523 > -14.689106851816177
WOLF (strong): th(4032000.0000000014)=-14.689106851816177; dx=2.3988621246643466E-7 evalInputDelta=0.14373260736465454
New Minimum: -14.689106851816177 > -15.378409743309021
WOLF (strong): th(2016000.0000000007)=-15.378409743309021; dx=2.4247922302971087E-7 evalInputDelta=0.8330354988574982
New Minimum: -15.378409743309021 > -15.42952185869217
END: th(672000.0000000002)=-15.42952185869217; dx=-5.131055424194297E-7 evalInputDelta=0.8841476142406464
Fitness changed from -14.545374244451523 to -15.42952185869217
Iteration 6 complete. Error: -15.42952185869217 Total: 25.8339; Orientation: 0.6099; Line Search: 20.0766
Adding measurement 79a20e4a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.514e+03, gradient 9.199e-04, dot -0.522; [48f49b2d-af78-42a2-9977-0ff1340831a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -15.42952185869217, -10.797467142343521, -9.936513781547546, -9.41784818470478
LBFGS Accumulation History: 3 points
Removed measurement 79a20e4a to history. Total: 3
th(0)=-15.42952185869217;dx=-8.443100343548271E-7
New Minimum: -15.42952185869217 > -16.137772142887115
END: th(1447780.1117014263)=-16.137772142887115; dx=-1.3842273513535678E-7 evalInputDelta=0.7082502841949463
Fitness changed from -15.42952185869217 to -16.137772142887115
Iteration 7 complete. Error: -16.137772142887115 Total: 16.3059; Orientation: 0.6264; Line Search: 10.1948
Adding measurement 4c41bd49 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.473e+03, gradient 9.090e-04, dot -0.474; [48f49b2d-af78-42a2-9977-0ff1340831a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.137772142887115, -10.797467142343521, -9.936513781547546, -9.41784818470478
LBFGS Accumulation History: 3 points
Removed measurement 4c41bd49 to history. Total: 3
th(0)=-16.137772142887115;dx=-8.257764797578977E-7
New Minimum: -16.137772142887115 > -16.41563531756401
WOLF (strong): th(3119147.6961877886)=-16.41563531756401; dx=1.801990051153178E-7 evalInputDelta=0.27786317467689514
New Minimum: -16.41563531756401 > -16.719492703676224
WOLF (strong): th(1559573.8480938943)=-16.719492703676224; dx=3.614746011790895E-8 evalInputDelta=0.5817205607891083
END: th(519857.94936463144)=-16.535221219062805; dx=-4.3826790274266904E-7 evalInputDelta=0.3974490761756897
Fitness changed from -16.137772142887115 to -16.719492703676224
Iteration 8 complete. Error: -16.719492703676224 Total: 25.4016; Orientation: 0.5780; Line Search: 19.9970
Adding measurement 5ba7e616 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.413e+03, gradient 8.804e-04, dot -0.438; [48f49b2d-af78-42a2-9977-0ff1340831a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.719492703676224, -10.797467142343521, -9.936513781547546, -9.41784818470478
LBFGS Accumulation History: 3 points
Removed measurement 5ba7e616 to history. Total: 3
th(0)=-16.719492703676224;dx=-7.745384688941925E-7
New Minimum: -16.719492703676224 > -17.26124605536461
END: th(1120000.0000000005)=-17.26124605536461; dx=-1.004925658059548E-7 evalInputDelta=0.541753351688385
Fitness changed from -16.719492703676224 to -17.26124605536461
Iteration 9 complete. Error: -17.26124605536461 Total: 15.1760; Orientation: 0.5857; Line Search: 9.8046
Adding measurement 6aa262dc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.477e+03, gradient 6.086e-04, dot -0.566; [48f49b2d-af78-42a2-9977-0ff1340831a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -17.26124605536461, -10.797467142343521, -9.936513781547546, -9.41784818470478
LBFGS Accumulation History: 3 points
Removed measurement 6aa262dc to history. Total: 3
th(0)=-17.26124605536461;dx=-3.7010497112351603E-7
New Minimum: -17.26124605536461 > -17.720967710018158
END: th(2412966.852835711)=-17.720967710018158; dx=-2.5775462345511283E-9 evalInputDelta=0.4597216546535492
Fitness changed from -17.26124605536461 to -17.720967710018158
Iteration 10 complete. Error: -17.720967710018158 Total: 15.7969; Orientation: 0.5985; Line Search: 9.8582
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/b9613420-4f12-40b8-ba56-455ba4ce4cb1.jpg)
Final threshold in iteration 11: -17.720967710018158 (> -Infinity) after 222.348s (< 5400.000s)
Returns
-17.720967710018158