Code from BasicOptimizer.scala:88 executed in 238.67 seconds (5.367 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: 2108744116271
Reset training subject: 2113170988738
Adding measurement 24e40503 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=3.703453704714775;dx=-3.539181655180652E-7
New Minimum: 3.703453704714775 > 3.703452557325363
WOLFE (weak): th(2.154434690031884)=3.703452557325363; dx=-3.5410415751913307E-7 evalInputDelta=1.1473894119262695E-6
New Minimum: 3.703452557325363 > 3.703451305627823
WOLFE (weak): th(4.308869380063768)=3.703451305627823; dx=-3.5408724320778837E-7 evalInputDelta=2.3990869522094727E-6
New Minimum: 3.703451305627823 > 3.703446701169014
WOLFE (weak): th(12.926608140191302)=3.703446701169014; dx=-3.541126582703071E-7 evalInputDelta=7.0035457611083984E-6
New Minimum: 3.703446701169014 > 3.7034257650375366
WOLFE (weak): th(51.70643256076521)=3.7034257650375366; dx=-3.5403753594368694E-7 evalInputDelta=2.7939677238464355E-5
New Minimum: 3.7034257650375366 > 3.7033144682645798
WOLFE (weak): th(258.53216280382605)=3.7033144682645798; dx=-3.5410838812531997E-7 evalInputDelta=1.392364501953125E-4
New Minimum: 3.7033144682645798 > 3.702618896961212
WOLFE (weak): th(1551.1929768229563)=3.702618896961212; dx=-3.539734270465513E-7 evalInputDelta=8.348077535629272E-4
New Minimum: 3.702618896961212 > 3.6976112127304077
WOLFE (weak): th(10858.350837760694)=3.6976112127304077; dx=-3.539578480029503E-7 evalInputDelta=0.005842491984367371
New Minimum: 3.6976112127304077 > 3.65678533911705
WOLFE (weak): th(86866.80670208555)=3.65678533911705; dx=-3.5290502838995E-7 evalInputDelta=0.046668365597724915
New Minimum: 3.65678533911705 > 3.2912182360887527
WOLFE (weak): th(781801.26031877)=3.2912182360887527; dx=-3.3955718902009345E-7 evalInputDelta=0.41223546862602234
New Minimum: 3.2912182360887527 > 1.377082496881485
END: th(7818012.6031877)=1.377082496881485; dx=-3.8969890716367893E-8 evalInputDelta=2.32637120783329
Fitness changed from 3.703453704714775 to 1.377082496881485
Iteration 1 complete. Error: 1.377082496881485 Total: 67.5
...skipping 6315 bytes...
d660-424c-8c00-93c915f6dd63 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.4475489556789398, 0.3088125139474869, 1.377082496881485, 3.703453704714775
LBFGS Accumulation History: 3 points
Removed measurement 4ae22e37 to history. Total: 3
th(0)=-1.4475489556789398;dx=-7.875242641299512E-9
New Minimum: -1.4475489556789398 > -1.5121698155999184
END: th(1.2600000000000004E7)=-1.5121698155999184; dx=-1.4332971112415453E-9 evalInputDelta=0.06462085992097855
Fitness changed from -1.4475489556789398 to -1.5121698155999184
Iteration 9 complete. Error: -1.5121698155999184 Total: 13.5913; Orientation: 0.4977; Line Search: 8.8498
Adding measurement 70abb598 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.553e+03, gradient 1.477e-04, dot -0.509; [d809a0fd-d660-424c-8c00-93c915f6dd63 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5121698155999184, 0.3088125139474869, 1.377082496881485, 3.703453704714775
LBFGS Accumulation History: 3 points
Removed measurement 70abb598 to history. Total: 3
th(0)=-1.5121698155999184;dx=-2.1789511385824068E-8
Armijo: th(2.7145877094401743E7)=2.0080325603485107; dx=1.6838145668910775E-7 evalInputDelta=-3.520202375948429
Armijo: th(1.3572938547200872E7)=-0.8646030575037003; dx=7.953724572128685E-8 evalInputDelta=-0.6475667580962181
New Minimum: -1.5121698155999184 > -1.5408029854297638
WOLF (strong): th(4524312.849066957)=-1.5408029854297638; dx=8.961284444355492E-9 evalInputDelta=0.02863316982984543
New Minimum: -1.5408029854297638 > -1.5408470034599304
END: th(1131078.2122667392)=-1.5408470034599304; dx=-1.4170168480117638E-8 evalInputDelta=0.028677187860012054
Fitness changed from -1.5121698155999184 to -1.5408470034599304
Iteration 10 complete. Error: -1.5408470034599304 Total: 28.7179; Orientation: 0.4852; Line Search: 23.4774
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/8e1d3879-415f-4d26-a8eb-781eec085b5e.jpg)
Final threshold in iteration 11: -1.5408470034599304 (> -Infinity) after 238.667s (< 3600.000s)
-1.5408470034599304