BasicOptimizer.scala:89 executed in 129.00 seconds (1.720 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: 74033797924300
Reset training subject: 74036413159000
Adding measurement 4978d3a5 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-16.19998698553222;dx=-7.404034338256616E-7
New Minimum: -16.19998698553222 > -16.19998778225253
WOLFE (weak): th(2.154434690031884)=-16.19998778225253; dx=-7.322665893980263E-7 evalInputDelta=7.967203110581522E-7
New Minimum: -16.19998778225253 > -16.199990172413234
WOLFE (weak): th(4.308869380063768)=-16.199990172413234; dx=-7.323746805445255E-7 evalInputDelta=3.1868810133062198E-6
New Minimum: -16.199990172413234 > -16.19999654617338
WOLFE (weak): th(12.926608140191302)=-16.19999654617338; dx=-7.31902162315886E-7 evalInputDelta=9.560641160533123E-6
New Minimum: -16.19999654617338 > -16.200029211654776
WOLFE (weak): th(51.70643256076521)=-16.200029211654776; dx=-7.322672567761041E-7 evalInputDelta=4.2226122555888423E-5
New Minimum: -16.200029211654776 > -16.20020050517403
WOLFE (weak): th(258.53216280382605)=-16.20020050517403; dx=-7.321744201563924E-7 evalInputDelta=2.1351964181093308E-4
New Minimum: -16.20020050517403 > -16.20127204445902
WOLFE (weak): th(1551.1929768229563)=-16.20127204445902; dx=-7.319048855422146E-7 evalInputDelta=0.0012850589268005308
New Minimum: -16.20127204445902 > -16.208980258532776
WOLFE (weak): th(10858.350837760694)=-16.208980258532776; dx=-7.314867562984146E-7 evalInputDelta=0.008993273000555746
New Minimum: -16.208980258532776 > -16.271571104149324
WOLFE (weak): th(86866.80670208555)=-16.271571104149324; dx=-7.226356332918088E-7 evalInputDelta=0.07158411861710334
New Minimum: -16.271571104149324 > -16.799335929774404
END: th(781801.26031877)=-16.799335929774404; dx=-6.018943196872372E-7 evalInputDelta=0.599348944242184
Fitness changed from -16.19998698553222 to -16.799335929774404
Iteration 1 complete. Error: -16.799335929774404 Total: 33.5114; Orientation: 0.0594; Line Search: 25.8137
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 73852f16 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-16.799335929774404;dx=-5.896107239023128E-7
New Minimum: -16.799335929774404 > -17.725271986655276
END: th(1684339.7559414052)=-17.725271986655276; dx=-3.678866906410367E-7 evalInputDelta=0.9259360568808717
Fitness changed from -16.799335929774404 to -17.725271986655276
Iteration 2 complete. Error: -17.725271986655276 Total: 8.4029; Orientation: 0.0589; Line Search: 5.1700
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 2dacbb09 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-17.725271986655276;dx=-5.188765966277365E-7
New Minimum: -17.725271986655276 > -18.78523183007784
END: th(3628800.0)=-18.78523183007784; dx=-1.6078776981869073E-7 evalInputDelta=1.0599598434225648
Fitness changed from -17.725271986655276 to -18.78523183007784
Iteration 3 complete. Error: -18.78523183007784 Total: 8.3150; Orientation: 0.0584; Line Search: 5.2858
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 14856ac3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.603e+03, gradient 7.523e-04, dot -0.621; [89879c8d-21df-499a-9a32-8a84d3a2e3a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -18.78523183007784, -17.725271986655276, -16.799335929774404, -16.19998698553222
LBFGS Accumulation History: 3 points
Removed measurement 14856ac3 to history. Total: 3
th(0)=-18.78523183007784;dx=-5.655473037681574E-7
New Minimum: -18.78523183007784 > -19.869150182890728
END: th(7818012.6031877)=-19.869150182890728; dx=-5.027834315974292E-8 evalInputDelta=1.083918352812887
Fitness changed from -18.78523183007784 to -19.869150182890728
Iteration 4 complete. Error: -19.869150182890728 Total: 9.1609; Orientation: 1.0462; Line Search: 5.0265
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 35fc612c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.208e+03, gradient 6.716e-04, dot -0.479; [89879c8d-21df-499a-9a32-8a84d3a2e3a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -19.869150182890728, -17.725271986655276, -16.799335929774404, -16.19998698553222
LBFGS Accumulation History: 3 points
Removed measurement 35fc612c to history. Total: 3
th(0)=-19.869150182890728;dx=-4.508511125169252E-7
New Minimum: -19.869150182890728 > -22.06333631217097
END: th(1.684339755941405E7)=-22.06333631217097; dx=-7.469027965922385E-9 evalInputDelta=2.1941861292802436
Fitness changed from -19.869150182890728 to -22.06333631217097
Iteration 5 complete. Error: -22.06333631217097 Total: 9.6015; Orientation: 1.1026; Line Search: 5.2313
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 5408007f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.053e+04, gradient 6.398e-04, dot -0.332; [89879c8d-21df-499a-9a32-8a84d3a2e3a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -22.06333631217097, -17.725271986655276, -16.799335929774404, -16.19998698553222
LBFGS Accumulation History: 3 points
Removed measurement 5408007f to history. Total: 3
th(0)=-22.06333631217097;dx=-4.0929559810349447E-7
New Minimum: -22.06333631217097 > -24.423469736629066
WOLF (strong): th(3.6288E7)=-24.423469736629066; dx=1.6814076814660485E-8 evalInputDelta=2.3601334244580947
New Minimum: -24.423469736629066 > -24.902669087054228
WOLF (strong): th(1.8144E7)=-24.902669087054228; dx=1.4748559184671419E-8 evalInputDelta=2.839332774883257
END: th(6048000.0)=-24.3152675214714; dx=-1.9094775978811002E-7 evalInputDelta=2.2519312093004302
Fitness changed from -22.06333631217097 to -24.902669087054228
Iteration 6 complete. Error: -24.902669087054228 Total: 14.3186; Orientation: 0.9799; Line Search: 10.1967
Adding measurement 7e690571 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.519e+04, gradient 6.186e-04, dot -0.327; [89879c8d-21df-499a-9a32-8a84d3a2e3a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -24.902669087054228, -17.725271986655276, -16.799335929774404, -16.19998698553222
LBFGS Accumulation History: 3 points
Removed measurement 7e690571 to history. Total: 3
th(0)=-24.902669087054228;dx=-3.825688250595829E-7
New Minimum: -24.902669087054228 > -27.843291576141173
WOLF (strong): th(1.3030021005312834E7)=-27.843291576141173; dx=3.0385802683843564E-9 evalInputDelta=2.9406224890869446
END: th(6515010.502656417)=-27.242473153463703; dx=-2.0356355378473156E-7 evalInputDelta=2.3398040664094744
Fitness changed from -24.902669087054228 to -27.843291576141173
Iteration 7 complete. Error: -27.843291576141173 Total: 11.3851; Orientation: 0.9623; Line Search: 7.7022
Adding measurement 1f0391f4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.484e+04, gradient 6.271e-04, dot -0.364; [89879c8d-21df-499a-9a32-8a84d3a2e3a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -27.843291576141173, -17.725271986655276, -16.799335929774404, -16.19998698553222
LBFGS Accumulation History: 3 points
Removed measurement 1f0391f4 to history. Total: 3
th(0)=-27.843291576141173;dx=-3.930888883223738E-7
New Minimum: -27.843291576141173 > -29.261800225721533
WOLF (strong): th(1.4036164632845046E7)=-29.261800225721533; dx=8.099222091242273E-8 evalInputDelta=1.4185086495803603
New Minimum: -29.261800225721533 > -29.717311107715126
END: th(7018082.316422523)=-29.717311107715126; dx=-2.245152603941248E-8 evalInputDelta=1.8740195315739534
Fitness changed from -27.843291576141173 to -29.717311107715126
Iteration 8 complete. Error: -29.717311107715126 Total: 11.5430; Orientation: 0.9651; Line Search: 7.8200
Adding measurement 3233a235 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.394e+04, gradient 6.235e-04, dot -0.401; [89879c8d-21df-499a-9a32-8a84d3a2e3a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -29.717311107715126, -17.725271986655276, -16.799335929774404, -16.19998698553222
LBFGS Accumulation History: 3 points
Removed measurement 3233a235 to history. Total: 3
th(0)=-29.717311107715126;dx=-3.8852115175879724E-7
New Minimum: -29.717311107715126 > -29.92295773624512
WOLF (strong): th(1.5120000000000004E7)=-29.92295773624512; dx=4.2985758721145105E-8 evalInputDelta=0.20564662852999405
New Minimum: -29.92295773624512 > -30.47900307084623
WOLF (strong): th(7560000.000000002)=-30.47900307084623; dx=7.775392196847953E-8 evalInputDelta=0.7616919631311028
New Minimum: -30.47900307084623 > -30.591326587167245
END: th(2520000.0000000005)=-30.591326587167245; dx=-1.7211911428277475E-7 evalInputDelta=0.8740154794521189
Fitness changed from -29.717311107715126 to -30.591326587167245
Iteration 9 complete. Error: -30.591326587167245 Total: 13.5791; Orientation: 0.9604; Line Search: 10.1625
Adding measurement 61d106cc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.965e+04, gradient 5.206e-04, dot -0.498; [89879c8d-21df-499a-9a32-8a84d3a2e3a1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -30.591326587167245, -17.725271986655276, -16.799335929774404, -16.19998698553222
LBFGS Accumulation History: 3 points
Removed measurement 61d106cc to history. Total: 3
th(0)=-30.591326587167245;dx=-2.7096201482621096E-7
New Minimum: -30.591326587167245 > -31.19606240253484
END: th(5429175.418880348)=-31.19606240253484; dx=-1.6756681976002548E-8 evalInputDelta=0.6047358153675937
Fitness changed from -30.591326587167245 to -31.19606240253484
Iteration 10 complete. Error: -31.19606240253484 Total: 8.7138; Orientation: 0.9864; Line Search: 5.2255
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -31.19606240253484 (> -Infinity) after 128.998s (< 5400.000s)
Returns
-31.19606240253484