Code from BasicOptimizer.scala:75 executed in 1015.98 seconds (11.192 gc):
val lineSearchInstance: LineSearchStrategy = lineSearchFactory
IterativeTrainer.wrap(trainable)
.setOrientation(orientation())
.setMonitor(new TrainingMonitor() {
override def clear(): Unit = trainingMonitor.clear()
override def log(msg: String): Unit = trainingMonitor.log(msg)
override def onStepFail(currentPoint: Step): Boolean = {
BasicOptimizer.this.onStepFail(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, currentPoint)
trainingMonitor.onStepComplete(currentPoint)
super.onStepComplete(currentPoint)
}
})
.setTimeout(trainingMinutes, TimeUnit.MINUTES)
.setMaxIterations(trainingIterations)
.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
.runAndFree
.asInstanceOf[lang.Double]
Reset training subject: 1229391743257900
Reset training subject: 1229401361432200
Adding measurement 642a16aa to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=5.287908980107837;dx=-3.094295265967074E-5
New Minimum: 5.287908980107837 > 5.287879757390167
WOLFE (weak): th(2.154434690031884)=5.287879757390167; dx=-3.0942426500125266E-5 evalInputDelta=2.922271767058504E-5
New Minimum: 5.287879757390167 > 5.287850756355261
WOLFE (weak): th(4.308869380063768)=5.287850756355261; dx=-3.094200656377487E-5 evalInputDelta=5.822375257658052E-5
New Minimum: 5.287850756355261 > 5.28773408787692
WOLFE (weak): th(12.926608140191302)=5.28773408787692; dx=-3.094005378249155E-5 evalInputDelta=1.748922309170453E-4
New Minimum: 5.28773408787692 > 5.287209523241683
WOLFE (weak): th(51.70643256076521)=5.287209523241683; dx=-3.0929792316809514E-5 evalInputDelta=6.994568661546907E-4
New Minimum: 5.287209523241683 > 5.284414879298989
WOLFE (weak): th(258.53216280382605)=5.284414879298989; dx=-3.0890610194131535E-5 evalInputDelta=0.003494100808848266
New Minimum: 5.284414879298989 > 5.267032699623408
WOLFE (weak): th(1551.1929768229563)=5.267032699623408; dx=-3.063843131033659E-5 evalInputDelta=0.0208762804844298
New Minimum: 5.267032699623408 > 5.145159443445822
WOLFE (weak): th(10858.350837760694)=5.145159443445822; dx=-2.8847509432065624E-5 evalInputDelta=0.1427495366620155
New Minimum: 5.145159443445822 > 4.3962749084194
END: th(86866.80670208555)=4.3962749084194; dx=-1.7648301454018534E-5 evalInputDelta=0.8916340716884372
Fitness changed from 5.287908980107837 to 4.3962749084194
Iteration 1 complete. Error: 4.3962749084194 Total: 100.7295; Orientation: 0.0179; Line Search: 74.3552
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/16af6f49-efea-4a03-aa88-34fd49493ac9.jpg)
Adding measurement 41ccb3b9 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=4.3962749084194;dx=-1.3137062311639748E-5
New Minimum: 4.3962749084194 > 3
...skipping 24273 bytes...
97f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.943e+03, gradient 2.230e-04, dot -0.669; [22931ca1-97fe-4192-828b-bea0a20819d4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.10458586501349038, -0.12316478012422875, -0.14147676779636165, -0.15643816496198376
LBFGS Accumulation History: 3 points
Removed measurement 5edc3e29 to history. Total: 4
th(0)=-0.15643816496198376;dx=-4.9744085338682924E-8
New Minimum: -0.15643816496198376 > -0.16050121305270504
END: th(3917235.946577146)=-0.16050121305270504; dx=-6.353063479827753E-9 evalInputDelta=0.004063048090721277
Fitness changed from -0.15643816496198376 to -0.16050121305270504
Iteration 29 complete. Error: -0.16050121305270504 Total: 24.5177; Orientation: 0.2087; Line Search: 16.2735
Adding measurement 19fec3d6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.670e+03, gradient 3.505e-04, dot -0.493; [22931ca1-97fe-4192-828b-bea0a20819d4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.12316478012422875, -0.14147676779636165, -0.15643816496198376, -0.16050121305270504
LBFGS Accumulation History: 3 points
Removed measurement 64021427 to history. Total: 4
th(0)=-0.16050121305270504;dx=-1.228372106958678E-7
Armijo: th(8439429.012345687)=0.23924613490819682; dx=1.3398394799939118E-7 evalInputDelta=-0.39974734796090183
Armijo: th(4219714.506172843)=-0.07323487471075642; dx=9.28818680885585E-8 evalInputDelta=-0.08726633834194862
New Minimum: -0.16050121305270504 > -0.18532069101327353
END: th(1406571.5020576145)=-0.18532069101327353; dx=-1.8052327371119404E-9 evalInputDelta=0.024819477960568492
Fitness changed from -0.16050121305270504 to -0.18532069101327353
Iteration 30 complete. Error: -0.18532069101327353 Total: 40.7062; Orientation: 0.2097; Line Search: 32.3117
<a id="p-21"></a>Iteration 30
<a id="p-20"></a>![Iteration 30](etc/bcc691f9-95fc-4780-b236-853abf02b2e3.jpg)
Final threshold in iteration 31: -0.18532069101327353 (> -Infinity) after 1015.966s (< 3600.000s)
-0.18532069101327353