Code from BasicOptimizer.scala:75 executed in 513.38 seconds (5.246 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: 925870839899000
Reset training subject: 925874869991000
Adding measurement 1aa35f4c to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=2.964318693615496;dx=-1.9068884796384384E-5
New Minimum: 2.964318693615496 > 2.964292922988534
WOLFE (weak): th(2.154434690031884)=2.964292922988534; dx=-1.907207378747076E-5 evalInputDelta=2.5770626962184906E-5
New Minimum: 2.964292922988534 > 2.964265713468194
WOLFE (weak): th(4.308869380063768)=2.964265713468194; dx=-1.9073233983309967E-5 evalInputDelta=5.2980147302150726E-5
New Minimum: 2.964265713468194 > 2.964157839305699
WOLFE (weak): th(12.926608140191302)=2.964157839305699; dx=-1.9076221784422917E-5 evalInputDelta=1.60854309797287E-4
New Minimum: 2.964157839305699 > 2.9636743180453777
WOLFE (weak): th(51.70643256076521)=2.9636743180453777; dx=-1.9098647278751806E-5 evalInputDelta=6.443755701184273E-4
New Minimum: 2.9636743180453777 > 2.9610852524638176
WOLFE (weak): th(258.53216280382605)=2.9610852524638176; dx=-1.9170627606786888E-5 evalInputDelta=0.003233441151678562
New Minimum: 2.9610852524638176 > 2.9456185437738895
END: th(1551.1929768229563)=2.9456185437738895; dx=-1.6893240707713973E-5 evalInputDelta=0.018700149841606617
Fitness changed from 2.964318693615496 to 2.9456185437738895
Iteration 1 complete. Error: 2.9456185437738895 Total: 40.2077; Orientation: 0.0684; Line Search: 28.6789
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/d7e32615-5a28-434d-958d-b474e3d90ae4.jpg)
Adding measurement 2969e876 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=2.9456185437738895;dx=-1.7216685128610013E-5
New Minimum: 2.9456185437738895 > 2.913273999467492
END: th(3341.943960201201)=2.913273999467492; dx=-1.302261624404849E-5 evalInputDelta=0.03234454430639744
Fitness changed from 2.9456185437738895 to 2.913273999467492
Iteration 2 complete. Error: 2.913273999467492 Total: 12.1336; Orientation: 0.0697; Line Search: 8.1935
<a id="p-5"></a
...skipping 23848 bytes...
ror: 0.625671997666359 Total: 17.4800; Orientation: 1.9554; Line Search: 11.6470
Adding measurement 6b8b68dc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.765e+02, gradient 4.908e-04, dot -0.656; [7763c051-0b18-4c32-93e0-ceacd7de2c4b = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.7310589253902435, 0.6864546686410904, 0.6555265486240387, 0.625671997666359
LBFGS Accumulation History: 3 points
Removed measurement 72df11b6 to history. Total: 4
th(0)=0.625671997666359;dx=-2.4086828883238467E-7
New Minimum: 0.625671997666359 > 0.5993298292160034
WOLF (strong): th(419703.8514189801)=0.5993298292160034; dx=4.0033278425846345E-8 evalInputDelta=0.02634216845035553
New Minimum: 0.5993298292160034 > 0.5978938192129135
END: th(209851.92570949005)=0.5978938192129135; dx=-7.035219235352426E-8 evalInputDelta=0.027778178453445435
Fitness changed from 0.625671997666359 to 0.5978938192129135
Iteration 29 complete. Error: 0.5978938192129135 Total: 18.2638; Orientation: 1.9446; Line Search: 12.4462
Adding measurement 786a792e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.023e+02, gradient 3.347e-04, dot -0.845; [7763c051-0b18-4c32-93e0-ceacd7de2c4b = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.6864546686410904, 0.6555265486240387, 0.625671997666359, 0.5978938192129135
LBFGS Accumulation History: 3 points
Removed measurement 39d43ab8 to history. Total: 4
th(0)=0.5978938192129135;dx=-1.1199864047368748E-7
New Minimum: 0.5978938192129135 > 0.5697106271982193
END: th(452112.2685185191)=0.5697106271982193; dx=-5.366210517426379E-8 evalInputDelta=0.028183192014694214
Fitness changed from 0.5978938192129135 to 0.5697106271982193
Iteration 30 complete. Error: 0.5697106271982193 Total: 13.5777; Orientation: 2.0033; Line Search: 7.7396
<a id="p-21"></a>Iteration 30
<a id="p-20"></a>![Iteration 30](etc/5c63cece-6096-49ef-ab98-5cc8575abb47.jpg)
Final threshold in iteration 31: 0.5697106271982193 (> -Infinity) after 513.378s (< 3600.000s)
0.5697106271982193