Code from BasicOptimizer.scala:88 executed in 131.49 seconds (5.031 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: 1399784166122
Reset training subject: 1402840158006
Adding measurement 1478ff88 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=1.681102141737938;dx=-3.1270517450555364E-6
New Minimum: 1.681102141737938 > 1.6810927242040634
WOLFE (weak): th(2.154434690031884)=1.6810927242040634; dx=-3.128783869401545E-6 evalInputDelta=9.417533874511719E-6
New Minimum: 1.6810927242040634 > 1.68108369410038
WOLFE (weak): th(4.308869380063768)=1.68108369410038; dx=-3.1289716338985816E-6 evalInputDelta=1.84476375579834E-5
New Minimum: 1.68108369410038 > 1.681047111749649
WOLFE (weak): th(12.926608140191302)=1.681047111749649; dx=-3.129478409739858E-6 evalInputDelta=5.5029988288879395E-5
New Minimum: 1.681047111749649 > 1.6808820515871048
WOLFE (weak): th(51.70643256076521)=1.6808820515871048; dx=-3.136324174256798E-6 evalInputDelta=2.2009015083312988E-4
New Minimum: 1.6808820515871048 > 1.6800023764371872
WOLFE (weak): th(258.53216280382605)=1.6800023764371872; dx=-3.1269020870512448E-6 evalInputDelta=0.0010997653007507324
New Minimum: 1.6800023764371872 > 1.6745084375143051
WOLFE (weak): th(1551.1929768229563)=1.6745084375143051; dx=-3.1270844803136666E-6 evalInputDelta=0.0065937042236328125
New Minimum: 1.6745084375143051 > 1.6351603418588638
WOLFE (weak): th(10858.350837760694)=1.6351603418588638; dx=-3.0949093227326136E-6 evalInputDelta=0.0459417998790741
New Minimum: 1.6351603418588638 > 1.330362230539322
END: th(86866.80670208555)=1.330362230539322; dx=-2.794063390849659E-6 evalInputDelta=0.35073991119861603
Fitness changed from 1.681102141737938 to 1.330362230539322
Iteration 1 complete. Error: 1.330362230539322 Total: 34.1731; Orientation: 0.0193; Line Search: 25.6648
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/b791dfaf-3296-4acc-957d-2a7e02c1c7f6.jpg)
Adding measurement 6f539184 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=1.330362230539322;dx=-2.5188652424604294E-6
New Minimum: 1.330362230539322 > 0.7
...skipping 5667 bytes...
ation magnitude: 1.109e+03, gradient 5.047e-04, dot -0.627; [c5b80be2-b34a-4ab0-a004-2c5b240d7eec = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.8223538547754288, 0.7713976949453354, 1.330362230539322, 1.681102141737938
LBFGS Accumulation History: 3 points
Removed measurement 700b863d to history. Total: 3
th(0)=-0.8223538547754288;dx=-2.5435189297542E-7
Armijo: th(3360000.0000000014)=3.283397674560547; dx=2.00790777082553E-6 evalInputDelta=-4.105751529335976
Armijo: th(1680000.0000000007)=-0.15172110497951508; dx=8.866491710577078E-7 evalInputDelta=-0.6706327497959137
New Minimum: -0.8223538547754288 > -0.8808712512254715
WOLF (strong): th(560000.0000000002)=-0.8808712512254715; dx=4.730566556637404E-8 evalInputDelta=0.058517396450042725
END: th(140000.00000000006)=-0.8575559630990028; dx=-1.89772067605223E-7 evalInputDelta=0.035202108323574066
Fitness changed from -0.8223538547754288 to -0.8808712512254715
Iteration 9 complete. Error: -0.8808712512254715 Total: 18.6968; Orientation: 0.2882; Line Search: 15.7975
Adding measurement 71632c14 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.562e+02, gradient 4.186e-04, dot -0.686; [c5b80be2-b34a-4ab0-a004-2c5b240d7eec = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.8808712512254715, 0.7713976949453354, 1.330362230539322, 1.681102141737938
LBFGS Accumulation History: 3 points
Removed measurement 71632c14 to history. Total: 3
th(0)=-0.8808712512254715;dx=-1.7386286545491216E-7
New Minimum: -0.8808712512254715 > -0.9260646775364876
END: th(301620.8566044639)=-0.9260646775364876; dx=-6.81732454386381E-8 evalInputDelta=0.04519342631101608
Fitness changed from -0.8808712512254715 to -0.9260646775364876
Iteration 10 complete. Error: -0.9260646775364876 Total: 8.6318; Orientation: 0.2779; Line Search: 5.7083
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/ac086313-7ee0-491f-bb4f-e9fa0a09b5d3.jpg)
Final threshold in iteration 11: -0.9260646775364876 (> -Infinity) after 131.487s (< 3600.000s)
-0.9260646775364876