Code from BasicOptimizer.scala:88 executed in 263.86 seconds (5.731 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: 1615858548231
Reset training subject: 1621163884934
Adding measurement 4944df59 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=25.344871166162193;dx=-3.787807948248099E-6
New Minimum: 25.344871166162193 > 25.344851148314774
WOLFE (weak): th(2.154434690031884)=25.344851148314774; dx=-3.79560301497985E-6 evalInputDelta=2.0017847418785095E-5
New Minimum: 25.344851148314774 > 25.34483134932816
WOLFE (weak): th(4.308869380063768)=25.34483134932816; dx=-3.7822723734019568E-6 evalInputDelta=3.981683403253555E-5
New Minimum: 25.34483134932816 > 25.34475068282336
WOLFE (weak): th(12.926608140191302)=25.34475068282336; dx=-3.7905789764344696E-6 evalInputDelta=1.2048333883285522E-4
New Minimum: 25.34475068282336 > 25.34438900044188
WOLFE (weak): th(51.70643256076521)=25.34438900044188; dx=-3.7823628867390047E-6 evalInputDelta=4.8216572031378746E-4
New Minimum: 25.34438900044188 > 25.342458220664412
WOLFE (weak): th(258.53216280382605)=25.342458220664412; dx=-3.7663874426583356E-6 evalInputDelta=0.0024129454977810383
New Minimum: 25.342458220664412 > 25.330314863240346
WOLFE (weak): th(1551.1929768229563)=25.330314863240346; dx=-3.820265273603973E-6 evalInputDelta=0.014556302921846509
New Minimum: 25.330314863240346 > 25.240421221591532
WOLFE (weak): th(10858.350837760694)=25.240421221591532; dx=-3.912926200703898E-6 evalInputDelta=0.10444994457066059
New Minimum: 25.240421221591532 > 24.472916387952864
WOLFE (weak): th(86866.80670208555)=24.472916387952864; dx=-3.6960208878043907E-6 evalInputDelta=0.8719547782093287
New Minimum: 24.472916387952864 > 20.349088178947568
END: th(781801.26031877)=20.349088178947568; dx=-1.9962887821625495E-6 evalInputDelta=4.995782987214625
Fitness changed from 25.344871166162193 to 20.349088178947568
Iteration 1 complete. Error: 20.349088178947568 Total: 71.3572; Orientation: 0.0603; Line Search: 55.2338
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/ded95e40-9510-42a1-816e-b2c2bc0771bd.jpg)
...skipping 5845 bytes...
story. Total: 3
Rejected: LBFGS Orientation magnitude: 3.827e+03, gradient 1.959e-03, dot -0.201; [249c70f4-018d-4881-ad47-649898c30d6f = 1.000/1.000e+00]
Orientation rejected. Popping history element from 5.780640855431557, 13.373564507812262, 20.349088178947568, 25.344871166162193
LBFGS Accumulation History: 3 points
Removed measurement 1f738f47 to history. Total: 3
th(0)=5.780640855431557;dx=-3.821949256660549E-6
Armijo: th(1512000.0000000002)=6.243801090866327; dx=6.399856175617748E-8 evalInputDelta=-0.4631602354347706
Armijo: th(756000.0000000001)=6.125524044036865; dx=8.614355073150023E-7 evalInputDelta=-0.34488318860530853
New Minimum: 5.780640855431557 > 5.456463769078255
WOLF (strong): th(252000.00000000003)=5.456463769078255; dx=8.19014077441635E-7 evalInputDelta=0.324177086353302
END: th(63000.00000000001)=5.563196286559105; dx=-2.337037825682276E-6 evalInputDelta=0.21744456887245178
Fitness changed from 5.780640855431557 to 5.456463769078255
Iteration 9 complete. Error: 5.456463769078255 Total: 31.7195; Orientation: 0.2823; Line Search: 26.2765
Adding measurement 241159d5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.593e+03, gradient 7.637e-04, dot -0.220; [249c70f4-018d-4881-ad47-649898c30d6f = 1.000/1.000e+00]
Orientation rejected. Popping history element from 5.456463769078255, 13.373564507812262, 20.349088178947568, 25.344871166162193
LBFGS Accumulation History: 3 points
Removed measurement 241159d5 to history. Total: 3
th(0)=5.456463769078255;dx=-5.773201533632472E-7
New Minimum: 5.456463769078255 > 5.35023145377636
END: th(135729.3854720087)=5.35023145377636; dx=-5.027649400017727E-7 evalInputDelta=0.10623231530189514
Fitness changed from 5.456463769078255 to 5.35023145377636
Iteration 10 complete. Error: 5.35023145377636 Total: 17.5742; Orientation: 0.2466; Line Search: 12.0778
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/ee0de2b2-7ce3-478b-8767-18d754a4ae60.jpg)
Final threshold in iteration 11: 5.35023145377636 (> -Infinity) after 263.837s (< 1800.000s)
5.35023145377636