Code from BasicOptimizer.scala:88 executed in 291.91 seconds (5.784 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: 1697857023282
Reset training subject: 1705118346937
Adding measurement 209d3981 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=8.514216050505638;dx=-3.2264505864679146E-7
New Minimum: 8.514216050505638 > 8.514214605093002
WOLFE (weak): th(2.154434690031884)=8.514214605093002; dx=-3.1443127412700577E-7 evalInputDelta=1.4454126358032227E-6
New Minimum: 8.514214605093002 > 8.5142133384943
WOLFE (weak): th(4.308869380063768)=8.5142133384943; dx=-3.169989262310189E-7 evalInputDelta=2.7120113372802734E-6
New Minimum: 8.5142133384943 > 8.514209941029549
WOLFE (weak): th(12.926608140191302)=8.514209941029549; dx=-3.1581674462382264E-7 evalInputDelta=6.109476089477539E-6
New Minimum: 8.514209941029549 > 8.514191821217537
WOLFE (weak): th(51.70643256076521)=8.514191821217537; dx=-3.167705751426076E-7 evalInputDelta=2.422928810119629E-5
New Minimum: 8.514191821217537 > 8.514090985059738
WOLFE (weak): th(258.53216280382605)=8.514090985059738; dx=-3.17063403349857E-7 evalInputDelta=1.2506544589996338E-4
New Minimum: 8.514090985059738 > 8.513464391231537
WOLFE (weak): th(1551.1929768229563)=8.513464391231537; dx=-3.1483958733469084E-7 evalInputDelta=7.516592741012573E-4
New Minimum: 8.513464391231537 > 8.508932679891586
WOLFE (weak): th(10858.350837760694)=8.508932679891586; dx=-3.142692046364341E-7 evalInputDelta=0.005283370614051819
New Minimum: 8.508932679891586 > 8.473949790000916
WOLFE (weak): th(86866.80670208555)=8.473949790000916; dx=-3.0434928700628176E-7 evalInputDelta=0.040266260504722595
New Minimum: 8.473949790000916 > 8.161401703953743
END: th(781801.26031877)=8.161401703953743; dx=-2.2601642607170548E-7 evalInputDelta=0.35281434655189514
Fitness changed from 8.514216050505638 to 8.161401703953743
Iteration 1 complete. Error: 8.161401703953743 Total: 84.0388; Orientation: 0.0261; Line Search: 64.2561
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/9799df81-828f-44b4-b3a4-28c2d99ce806.jpg)
Adding measurement 6f55
...skipping 5543 bytes...
91
Adding measurement 577351ac to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.328e+03, gradient 1.739e-04, dot -0.271; [5d4dbcdd-f276-4612-ac94-7d3810ed3d77 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.511692374944687, 7.349230706691742, 8.161401703953743, 8.514216050505638
LBFGS Accumulation History: 3 points
Removed measurement 577351ac to history. Total: 3
th(0)=1.511692374944687;dx=-2.983898202309063E-8
Armijo: th(4.536000000000001E7)=2.418316528201103; dx=8.877072903248951E-9 evalInputDelta=-0.9066241532564163
New Minimum: 1.511692374944687 > 1.3755958676338196
WOLF (strong): th(2.2680000000000004E7)=1.3755958676338196; dx=2.0356560809045045E-9 evalInputDelta=0.1360965073108673
New Minimum: 1.3755958676338196 > 1.2466346770524979
END: th(7560000.000000001)=1.2466346770524979; dx=-1.6874357384042747E-8 evalInputDelta=0.265057697892189
Fitness changed from 1.511692374944687 to 1.2466346770524979
Iteration 9 complete. Error: 1.2466346770524979 Total: 32.0715; Orientation: 0.3335; Line Search: 25.6569
Adding measurement 547daba to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.601e+03, gradient 1.390e-04, dot -0.335; [5d4dbcdd-f276-4612-ac94-7d3810ed3d77 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.2466346770524979, 7.349230706691742, 8.161401703953743, 8.514216050505638
LBFGS Accumulation History: 3 points
Removed measurement 547daba to history. Total: 3
th(0)=1.2466346770524979;dx=-1.8940265347917722E-8
New Minimum: 1.2466346770524979 > 1.0199294239282608
END: th(1.6287526256641043E7)=1.0199294239282608; dx=-6.733695114605583E-9 evalInputDelta=0.22670525312423706
Fitness changed from 1.2466346770524979 to 1.0199294239282608
Iteration 10 complete. Error: 1.0199294239282608 Total: 19.7826; Orientation: 0.3379; Line Search: 12.4285
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/ca8ca8ad-28f5-4ec5-a2be-28265d3a86f9.jpg)
Final threshold in iteration 11: 1.0199294239282608 (> -Infinity) after 291.906s (< 1800.000s)
1.0199294239282608