Code from BasicOptimizer.scala:88 executed in 1615.37 seconds (5.083 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: 3019432585537
Reset training subject: 3054027040411
Adding measurement 56b81ad3 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=4.532928913831711;dx=-2.2178476999143616E-7
New Minimum: 4.532928913831711 > 4.532928138971329
WOLFE (weak): th(2.154434690031884)=4.532928138971329; dx=-2.0581601446491054E-7 evalInputDelta=7.748603820800781E-7
New Minimum: 4.532928138971329 > 4.532927006483078
WOLFE (weak): th(4.308869380063768)=4.532927006483078; dx=-2.2309430191437864E-7 evalInputDelta=1.9073486328125E-6
New Minimum: 4.532927006483078 > 4.532922238111496
WOLFE (weak): th(12.926608140191302)=4.532922238111496; dx=-2.0176234169263641E-7 evalInputDelta=6.67572021484375E-6
New Minimum: 4.532922238111496 > 4.532903343439102
WOLFE (weak): th(51.70643256076521)=4.532903343439102; dx=-2.20847243573059E-7 evalInputDelta=2.5570392608642578E-5
New Minimum: 4.532903343439102 > 4.5328017473220825
WOLFE (weak): th(258.53216280382605)=4.5328017473220825; dx=-2.0916251144545506E-7 evalInputDelta=1.271665096282959E-4
New Minimum: 4.5328017473220825 > 4.5321658700704575
WOLFE (weak): th(1551.1929768229563)=4.5321658700704575; dx=-2.1853336544707218E-7 evalInputDelta=7.630437612533569E-4
New Minimum: 4.5321658700704575 > 4.527596026659012
WOLFE (weak): th(10858.350837760694)=4.527596026659012; dx=-2.2124473461719647E-7 evalInputDelta=0.005332887172698975
New Minimum: 4.527596026659012 > 4.490417718887329
WOLFE (weak): th(86866.80670208555)=4.490417718887329; dx=-2.2009969805535824E-7 evalInputDelta=0.042511194944381714
New Minimum: 4.490417718887329 > 4.168483927845955
END: th(781801.26031877)=4.168483927845955; dx=-1.9552946425740904E-7 evalInputDelta=0.3644449859857559
Fitness changed from 4.532928913831711 to 4.168483927845955
Iteration 1 complete. Error: 4.168483927845955 Total: 456.4430; Orientation: 0.0248; Line Search: 352.1950
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/4a55fe05-da7b-4728-8194-6e37c744a4c7.jpg)
Adding measu
...skipping 5611 bytes...
nged from 1.8339366167783737 to 1.4361620843410492
Iteration 8 complete. Error: 1.4361620843410492 Total: 175.9342; Orientation: 0.6322; Line Search: 140.4152
Adding measurement 3e9c000d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.110e+04, gradient 2.677e-04, dot -0.206; [eef3e0f5-3fe0-4db4-9c92-1a7cf6437498 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.4361620843410492, 3.5413201302289963, 4.168483927845955, 4.532928913831711
LBFGS Accumulation History: 3 points
Removed measurement 3e9c000d to history. Total: 3
th(0)=1.4361620843410492;dx=-6.964769760901791E-8
New Minimum: 1.4361620843410492 > 1.2334044724702835
END: th(7560000.000000001)=1.2334044724702835; dx=-2.6268871475586842E-8 evalInputDelta=0.20275761187076569
Fitness changed from 1.4361620843410492 to 1.2334044724702835
Iteration 9 complete. Error: 1.2334044724702835 Total: 106.4011; Orientation: 0.6370; Line Search: 70.4975
Adding measurement 5186349f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.356e+03, gradient 2.624e-04, dot -0.168; [eef3e0f5-3fe0-4db4-9c92-1a7cf6437498 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.2334044724702835, 3.5413201302289963, 4.168483927845955, 4.532928913831711
LBFGS Accumulation History: 3 points
Removed measurement 5186349f to history. Total: 3
th(0)=1.2334044724702835;dx=-6.483363967294519E-8
Armijo: th(1.6287526256641043E7)=2.0112677812576294; dx=-4.2777367914124344E-10 evalInputDelta=-0.7778633087873459
New Minimum: 1.2334044724702835 > 1.1394499391317368
END: th(8143763.128320522)=1.1394499391317368; dx=-1.8874207642204834E-8 evalInputDelta=0.09395453333854675
Fitness changed from 1.2334044724702835 to 1.1394499391317368
Iteration 10 complete. Error: 1.1394499391317368 Total: 141.9200; Orientation: 0.7697; Line Search: 106.5011
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/be41f88e-7e81-4446-9951-65cbc88952f8.jpg)
Final threshold in iteration 11: 1.1394499391317368 (> -Infinity) after 1615.366s (< 1800.000s)
1.1394499391317368