Code from BasicOptimizer.scala:88 executed in 492.60 seconds (7.593 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: 5392163665099
Reset training subject: 5395746506525
Adding measurement 50bc386c to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=6.801559634506702;dx=-5.480854129097932E-7
New Minimum: 6.801559634506702 > 6.801558122038841
WOLFE (weak): th(2.154434690031884)=6.801558122038841; dx=-5.480875744206422E-7 evalInputDelta=1.5124678611755371E-6
New Minimum: 6.801558122038841 > 6.80155748128891
WOLFE (weak): th(4.308869380063768)=6.80155748128891; dx=-5.480851114020048E-7 evalInputDelta=2.1532177925109863E-6
New Minimum: 6.80155748128891 > 6.801553472876549
WOLFE (weak): th(12.926608140191302)=6.801553472876549; dx=-5.48079906784979E-7 evalInputDelta=6.161630153656006E-6
New Minimum: 6.801553472876549 > 6.801534853875637
WOLFE (weak): th(51.70643256076521)=6.801534853875637; dx=-5.480759674767046E-7 evalInputDelta=2.4780631065368652E-5
New Minimum: 6.801534853875637 > 6.801434047520161
WOLFE (weak): th(258.53216280382605)=6.801434047520161; dx=-5.480510556985168E-7 evalInputDelta=1.2558698654174805E-4
New Minimum: 6.801434047520161 > 6.800807222723961
WOLFE (weak): th(1551.1929768229563)=6.800807222723961; dx=-5.477779603311154E-7 evalInputDelta=7.524117827415466E-4
New Minimum: 6.800807222723961 > 6.796304643154144
WOLFE (weak): th(10858.350837760694)=6.796304643154144; dx=-5.46411379132732E-7 evalInputDelta=0.005254991352558136
New Minimum: 6.796304643154144 > 6.759870857000351
WOLFE (weak): th(86866.80670208555)=6.759870857000351; dx=-5.390745251896371E-7 evalInputDelta=0.04168877750635147
New Minimum: 6.759870857000351 > 6.450848370790482
END: th(781801.26031877)=6.450848370790482; dx=-4.7165018590329425E-7 evalInputDelta=0.35071126371622086
Fitness changed from 6.801559634506702 to 6.450848370790482
Iteration 1 complete. Error: 6.450848370790482 Total: 44.9849; Orientation: 0.0124; Line Search: 34.5140
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/b8173a61-1567-4586-94a3-305d61fd451a.jpg)
Adding measurement 78fd240
...skipping 15932 bytes...
): th(8.367258198334701E-5)=4.9129262417554855; dx=-1.1582988477770931E-7 evalInputDelta=0.0
Armijo: th(8.747588116440823E-5)=4.9129263162612915; dx=-1.158298844167301E-7 evalInputDelta=-7.450580596923828E-8
Armijo: th(8.557423157387762E-5)=4.9129263162612915; dx=-1.1582988463676938E-7 evalInputDelta=-7.450580596923828E-8
WOLFE (weak): th(8.462340677861232E-5)=4.9129262417554855; dx=-1.158298848305541E-7 evalInputDelta=0.0
Armijo: th(8.509881917624496E-5)=4.9129263162612915; dx=-1.158298846677544E-7 evalInputDelta=-7.450580596923828E-8
Armijo: th(8.486111297742864E-5)=4.9129263162612915; dx=-1.158298848195738E-7 evalInputDelta=-7.450580596923828E-8
Armijo: th(8.474225987802048E-5)=4.9129263162612915; dx=-1.1582988468408735E-7 evalInputDelta=-7.450580596923828E-8
WOLFE (weak): th(8.46828333283164E-5)=4.9129262417554855; dx=-1.1582988438301197E-7 evalInputDelta=0.0
WOLFE (weak): th(8.471254660316843E-5)=4.9129262417554855; dx=-1.1582988448659421E-7 evalInputDelta=0.0
WOLFE (weak): th(8.472740324059446E-5)=4.9129262417554855; dx=-1.1582988471495912E-7 evalInputDelta=0.0
WOLFE (weak): th(8.473483155930746E-5)=4.9129262417554855; dx=-1.1582988469826172E-7 evalInputDelta=0.0
Armijo: th(8.473854571866397E-5)=4.9129263162612915; dx=-1.1582988488855964E-7 evalInputDelta=-7.450580596923828E-8
Armijo: th(8.473668863898572E-5)=4.9129263162612915; dx=-1.1582988487712729E-7 evalInputDelta=-7.450580596923828E-8
WOLFE (weak): th(8.473576009914658E-5)=4.9129262417554855; dx=-1.1582988474470925E-7 evalInputDelta=0.0
Armijo: th(8.473622436906616E-5)=4.9129263162612915; dx=-1.1582988460913925E-7 evalInputDelta=-7.450580596923828E-8
mu ~= nu (8.473576009914658E-5): th(0.0)=4.9129262417554855
Fitness changed from 4.9129262417554855 to 4.9129262417554855
Static Iteration Total: 82.8580; Orientation: 0.0137; Line Search: 75.9188
Iteration 10 failed. Error: 4.9129262417554855
Previous Error: 0.0 -> 4.9129262417554855
Optimization terminated 10
Final threshold in iteration 10: 4.9129262417554855 (> -Infinity) after 492.598s (< 3600.000s)
4.9129262417554855