Code from BasicOptimizer.scala:75 executed in 559.42 seconds (6.812 gc):
val lineSearchInstance: LineSearchStrategy = lineSearchFactory
IterativeTrainer.wrap(trainable)
.setOrientation(orientation())
.setMonitor(new TrainingMonitor() {
override def clear(): Unit = trainingMonitor.clear()
override def log(msg: String): Unit = trainingMonitor.log(msg)
override def onStepFail(currentPoint: Step): Boolean = {
BasicOptimizer.this.onStepFail(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, currentPoint)
trainingMonitor.onStepComplete(currentPoint)
super.onStepComplete(currentPoint)
}
})
.setTimeout(trainingMinutes, TimeUnit.MINUTES)
.setMaxIterations(trainingIterations)
.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
.runAndFree
.asInstanceOf[lang.Double]
Reset training subject: 1328565902289100
Reset training subject: 1328572748537900
Adding measurement 4cd7d5e1 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=3.8857110738754272;dx=-3.0770370034131395E-6
New Minimum: 3.8857110738754272 > 3.885707437992096
WOLFE (weak): th(2.154434690031884)=3.885707437992096; dx=-3.0694850256585217E-6 evalInputDelta=3.635883331298828E-6
New Minimum: 3.885707437992096 > 3.8857036232948303
WOLFE (weak): th(4.308869380063768)=3.8857036232948303; dx=-3.0694792825035997E-6 evalInputDelta=7.450580596923828E-6
New Minimum: 3.8857036232948303 > 3.885689079761505
WOLFE (weak): th(12.926608140191302)=3.885689079761505; dx=-3.069471665521439E-6 evalInputDelta=2.199411392211914E-5
New Minimum: 3.885689079761505 > 3.885623052716255
WOLFE (weak): th(51.70643256076521)=3.885623052716255; dx=-3.069317048901083E-6 evalInputDelta=8.80211591720581E-5
New Minimum: 3.885623052716255 > 3.8852708488702774
WOLFE (weak): th(258.53216280382605)=3.8852708488702774; dx=-3.0686685922183832E-6 evalInputDelta=4.402250051498413E-4
New Minimum: 3.8852708488702774 > 3.88307186961174
WOLFE (weak): th(1551.1929768229563)=3.88307186961174; dx=-3.0664993213913544E-6 evalInputDelta=0.002639204263687134
New Minimum: 3.88307186961174 > 3.8673446476459503
WOLFE (weak): th(10858.350837760694)=3.8673446476459503; dx=-3.0461823596800017E-6 evalInputDelta=0.01836642622947693
New Minimum: 3.8673446476459503 > 3.746125265955925
WOLFE (weak): th(86866.80670208555)=3.746125265955925; dx=-2.8573607609732704E-6 evalInputDelta=0.13958580791950226
New Minimum: 3.746125265955925 > 3.144024208188057
END: th(781801.26031877)=3.144024208188057; dx=-1.494320242229835E-6 evalInputDelta=0.7416868656873703
Fitness changed from 3.8857110738754272 to 3.144024208188057
Iteration 1 complete. Error: 3.144024208188057 Total: 82.0334; Orientation: 0.0138; Line Search: 62.8415
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/8b4cd549-7c2c-4469-98f5-
...skipping 15238 bytes...
Search: 18.7765
Adding measurement 29892a77 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.519e+03, gradient 4.941e-04, dot -0.646; [dd676f2a-b326-4905-91b5-7d715bc56590 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.7233917564153671, 0.6741191446781158, 0.6500586345791817, 0.6467484086751938
LBFGS Accumulation History: 3 points
Removed measurement 1c92a549 to history. Total: 4
th(0)=0.6467484086751938;dx=-2.4418109913804437E-7
Armijo: th(7952893.680000515)=1.5876984894275665; dx=2.8480738208580955E-8 evalInputDelta=-0.9409500807523727
Armijo: th(3976446.8400002574)=0.7106366232037544; dx=-4.5051193622914676E-8 evalInputDelta=-0.06388821452856064
New Minimum: 0.6467484086751938 > 0.5401119142770767
END: th(1325482.2800000857)=0.5401119142770767; dx=-1.4219761616475484E-7 evalInputDelta=0.10663649439811707
Fitness changed from 0.6467484086751938 to 0.5401119142770767
Iteration 19 complete. Error: 0.5401119142770767 Total: 31.7107; Orientation: 0.3593; Line Search: 25.1457
Adding measurement 7d3c22a5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.225e+03, gradient 4.032e-04, dot -0.913; [dd676f2a-b326-4905-91b5-7d715bc56590 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.6741191446781158, 0.6500586345791817, 0.6467484086751938, 0.5401119142770767
LBFGS Accumulation History: 3 points
Removed measurement 5a8dcfbb to history. Total: 4
th(0)=0.5401119142770767;dx=-1.6259972164609816E-7
New Minimum: 0.5401119142770767 > 0.48737743496894836
END: th(2855665.0050547393)=0.48737743496894836; dx=-7.859463122375133E-8 evalInputDelta=0.05273447930812836
Fitness changed from 0.5401119142770767 to 0.48737743496894836
Iteration 20 complete. Error: 0.48737743496894836 Total: 19.2015; Orientation: 0.3577; Line Search: 12.7172
<a id="p-17"></a>Iteration 20
<a id="p-16"></a>![Iteration 20](etc/35cd4904-96c4-4ab8-9163-56c0792c5e98.jpg)
Final threshold in iteration 21: 0.48737743496894836 (> -Infinity) after 559.407s (< 3600.000s)
0.48737743496894836