Code from BasicOptimizer.scala:75 executed in 402.94 seconds (4.989 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: 918076911611000
Reset training subject: 918080029027200
Adding measurement 79ba2c4e to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=2.8553613647818565;dx=-6.874001079324804E-6
New Minimum: 2.8553613647818565 > 2.8553518280386925
WOLFE (weak): th(2.154434690031884)=2.8553518280386925; dx=-6.865873208320384E-6 evalInputDelta=9.5367431640625E-6
New Minimum: 2.8553518280386925 > 2.855340853333473
WOLFE (weak): th(4.308869380063768)=2.855340853333473; dx=-6.8660207029760665E-6 evalInputDelta=2.05114483833313E-5
New Minimum: 2.855340853333473 > 2.855299338698387
WOLFE (weak): th(12.926608140191302)=2.855299338698387; dx=-6.865329610592175E-6 evalInputDelta=6.202608346939087E-5
New Minimum: 2.855299338698387 > 2.8551142141222954
WOLFE (weak): th(51.70643256076521)=2.8551142141222954; dx=-6.856548710601439E-6 evalInputDelta=2.471506595611572E-4
New Minimum: 2.8551142141222954 > 2.8541384413838387
WOLFE (weak): th(258.53216280382605)=2.8541384413838387; dx=-6.756168937736507E-6 evalInputDelta=0.0012229233980178833
New Minimum: 2.8541384413838387 > 2.8484594598412514
WOLFE (weak): th(1551.1929768229563)=2.8484594598412514; dx=-6.24024136759616E-6 evalInputDelta=0.006901904940605164
New Minimum: 2.8484594598412514 > 2.82115975394845
END: th(10858.350837760694)=2.82115975394845; dx=-4.163276461500625E-6 evalInputDelta=0.03420161083340645
Fitness changed from 2.8553613647818565 to 2.82115975394845
Iteration 1 complete. Error: 2.82115975394845 Total: 34.8300; Orientation: 0.0594; Line Search: 25.0893
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/d7799975-3d17-40b7-a726-e4e68354980b.jpg)
Adding measurement c24500f to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=2.82115975394845;dx=-7.148411050238039E-6
New Minimum: 2.82115975394845 > 2.775764249265194
END: th(23393.607721408407)=2.775764249265194; dx=-2.6349942294777934E-6 evalInputDelta=0.04539550468325615
Fitness changed from 2.82
...skipping 23695 bytes...
InputDelta=0.0066849589347839355
Fitness changed from -0.24750429391860962 to -0.2564815580844879
Iteration 28 complete. Error: -0.2564815580844879 Total: 20.2993; Orientation: 1.7284; Line Search: 15.6974
Adding measurement 68fd3f40 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.463e+03, gradient 4.662e-05, dot -0.521; [11185903-4a15-42c5-b209-eba27c41965b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.23110687732696533, -0.23977749049663544, -0.24750429391860962, -0.2564815580844879
LBFGS Accumulation History: 3 points
Removed measurement 107f505d to history. Total: 4
th(0)=-0.2564815580844879;dx=-2.1731554362801774E-9
New Minimum: -0.2564815580844879 > -0.26371896266937256
END: th(5875853.919865721)=-0.26371896266937256; dx=-7.178010723150835E-10 evalInputDelta=0.0072374045848846436
Fitness changed from -0.2564815580844879 to -0.26371896266937256
Iteration 29 complete. Error: -0.26371896266937256 Total: 10.7047; Orientation: 1.7534; Line Search: 6.1330
Adding measurement 770e18ff to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.395e+03, gradient 2.683e-05, dot -0.844; [11185903-4a15-42c5-b209-eba27c41965b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.23977749049663544, -0.24750429391860962, -0.2564815580844879, -0.26371896266937256
LBFGS Accumulation History: 3 points
Removed measurement 58c4973 to history. Total: 4
th(0)=-0.26371896266937256;dx=-7.200006426812454E-10
New Minimum: -0.26371896266937256 > -0.2695407271385193
END: th(1.2659143518518534E7)=-0.2695407271385193; dx=-5.595541915275267E-10 evalInputDelta=0.0058217644691467285
Fitness changed from -0.26371896266937256 to -0.2695407271385193
Iteration 30 complete. Error: -0.2695407271385193 Total: 11.4081; Orientation: 1.7677; Line Search: 6.6971
<a id="p-21"></a>Iteration 30
<a id="p-20"></a>![Iteration 30](etc/eb813ca6-8002-4790-a5ba-4f457b224076.jpg)
Final threshold in iteration 31: -0.2695407271385193 (> -Infinity) after 402.937s (< 3600.000s)
-0.2695407271385193