Code from BasicOptimizer.scala:88 executed in 727.76 seconds (6.293 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: 15512508609895
Reset training subject: 15526193650179
Adding measurement 4d35a1b1 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=0.9969267398118973;dx=-5.736360653210889E-8
New Minimum: 0.9969267398118973 > 0.9969266802072525
WOLFE (weak): th(2.154434690031884)=0.9969266802072525; dx=-5.736351982312654E-8 evalInputDelta=5.9604644775390625E-8
New Minimum: 0.9969266802072525 > 0.9969265311956406
WOLFE (weak): th(4.308869380063768)=0.9969265311956406; dx=-5.7363479805294664E-8 evalInputDelta=2.086162567138672E-7
New Minimum: 0.9969265311956406 > 0.996925875544548
WOLFE (weak): th(12.926608140191302)=0.996925875544548; dx=-5.7363330428182224E-8 evalInputDelta=8.642673492431641E-7
New Minimum: 0.996925875544548 > 0.996923454105854
WOLFE (weak): th(51.70643256076521)=0.996923454105854; dx=-5.7362913119054085E-8 evalInputDelta=3.285706043243408E-6
New Minimum: 0.996923454105854 > 0.996909573674202
WOLFE (weak): th(258.53216280382605)=0.996909573674202; dx=-5.736175384189926E-8 evalInputDelta=1.71661376953125E-5
New Minimum: 0.996909573674202 > 0.996824212372303
WOLFE (weak): th(1551.1929768229563)=0.996824212372303; dx=-5.735534146306018E-8 evalInputDelta=1.025274395942688E-4
New Minimum: 0.996824212372303 > 0.996209129691124
WOLFE (weak): th(10858.350837760694)=0.996209129691124; dx=-5.730163531245037E-8 evalInputDelta=7.176101207733154E-4
New Minimum: 0.996209129691124 > 0.9912088885903358
WOLFE (weak): th(86866.80670208555)=0.9912088885903358; dx=-5.688578637583661E-8 evalInputDelta=0.005717851221561432
New Minimum: 0.9912088885903358 > 0.947399690747261
WOLFE (weak): th(781801.26031877)=0.947399690747261; dx=-5.2870757946574965E-8 evalInputDelta=0.04952704906463623
New Minimum: 0.947399690747261 > 0.6983815357089043
END: th(7818012.6031877)=0.6983815357089043; dx=-1.4921682782530135E-8 evalInputDelta=0.298545204102993
Fitness changed from 0.9969267398118973 to 0.6983815357089043
Iteration 1 complete. Error: 0.6983815357089043 Tota
...skipping 6351 bytes...
history element from -0.3144894987344742, 0.45166005194187164, 0.6983815357089043, 0.9969267398118973
LBFGS Accumulation History: 3 points
Removed measurement 4532bfa1 to history. Total: 3
th(0)=-0.3144894987344742;dx=-9.216176333726024E-9
New Minimum: -0.3144894987344742 > -0.4024449586868286
WOLF (strong): th(5.0400000000000015E7)=-0.4024449586868286; dx=3.137283346660159E-10 evalInputDelta=0.08795545995235443
New Minimum: -0.4024449586868286 > -0.4242880046367645
END: th(2.5200000000000007E7)=-0.4242880046367645; dx=-2.485126910192074E-9 evalInputDelta=0.10979850590229034
Fitness changed from -0.3144894987344742 to -0.4242880046367645
Iteration 9 complete. Error: -0.4242880046367645 Total: 58.6163; Orientation: 1.6343; Line Search: 42.8389
Adding measurement 3cfa7d82 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.062e+04, gradient 1.124e-04, dot -0.497; [f21d8e66-7038-4204-8337-ee51c6253914 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.4242880046367645, 0.45166005194187164, 0.6983815357089043, 0.9969267398118973
LBFGS Accumulation History: 3 points
Removed measurement 3cfa7d82 to history. Total: 3
th(0)=-0.4242880046367645;dx=-1.2643242626493868E-8
Armijo: th(5.429175418880349E7)=-0.35772235691547394; dx=1.9203538564037464E-9 evalInputDelta=-0.06656564772129059
New Minimum: -0.4242880046367645 > -0.46073663234710693
WOLF (strong): th(2.7145877094401743E7)=-0.46073663234710693; dx=1.9378110830886405E-9 evalInputDelta=0.03644862771034241
New Minimum: -0.46073663234710693 > -0.4924849718809128
END: th(9048625.698133914)=-0.4924849718809128; dx=-4.2814213483821264E-9 evalInputDelta=0.06819696724414825
Fitness changed from -0.4242880046367645 to -0.4924849718809128
Iteration 10 complete. Error: -0.4924849718809128 Total: 73.5461; Orientation: 1.6353; Line Search: 58.2054
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/699305c7-a2ec-466e-82d3-ea2e12eb202c.jpg)
Final threshold in iteration 11: -0.4924849718809128 (> -Infinity) after 727.763s (< 3600.000s)
-0.4924849718809128