BasicOptimizer.scala:89 executed in 135.30 seconds (1.862 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: 109609178252000
Reset training subject: 109611975766300
Adding measurement 36db692d to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-29.21265147604402;dx=-1.1650076932287763E-6
New Minimum: -29.21265147604402 > -29.212652923441123
END: th(2.154434690031884)=-29.212652923441123; dx=-8.793058759381463E-7 evalInputDelta=1.4473971035044997E-6
Fitness changed from -29.21265147604402 to -29.212652923441123
Iteration 1 complete. Error: -29.212652923441123 Total: 13.6178; Orientation: 0.0645; Line Search: 5.5159
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 7fd4728a to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-29.212652923441123;dx=-8.787150499885214E-7
New Minimum: -29.212652923441123 > -29.212658713028823
WOLFE (weak): th(4.641588833612779)=-29.212658713028823; dx=-8.781338207501794E-7 evalInputDelta=5.789587699922549E-6
New Minimum: -29.212658713028823 > -29.212663055218844
WOLFE (weak): th(9.283177667225559)=-29.212663055218844; dx=-8.76950771254479E-7 evalInputDelta=1.0131777720800983E-5
New Minimum: -29.212663055218844 > -29.21268042397248
WOLFE (weak): th(27.849533001676676)=-29.21268042397248; dx=-8.768361416399777E-7 evalInputDelta=2.750053135613939E-5
New Minimum: -29.21268042397248 > -29.21276147801956
WOLFE (weak): th(111.3981320067067)=-29.21276147801956; dx=-8.760347443500284E-7 evalInputDelta=1.0855457843561567E-4
New Minimum: -29.21276147801956 > -29.2131899028182
WOLFE (weak): th(556.9906600335335)=-29.2131899028182; dx=-8.760861782732699E-7 evalInputDelta=5.369793770775289E-4
New Minimum: -29.2131899028182 > -29.21587030994798
WOLFE (weak): th(3341.9439602012008)=-29.21587030994798; dx=-8.757466529405148E-7 evalInputDelta=0.0032173865068578777
New Minimum: -29.21587030994798 > -29.235154176774113
WOLFE (weak): th(23393.607721408407)=-29.235154176774113; dx=-8.749838860096598E-7 evalInputDelta=0.022501253332990245
New Minimum: -29.235154176774113 > -29.39185695224613
WOLFE (weak): th(187148.86177126726)=-29.39185695224613; dx=-8.661811229464541E-7 evalInputDelta=0.17920402880500674
New Minimum: -29.39185695224613 > -30.739052318402393
END: th(1684339.7559414054)=-30.739052318402393; dx=-7.680068735812591E-7 evalInputDelta=1.5263993949612704
Fitness changed from -29.212652923441123 to -30.739052318402393
Iteration 2 complete. Error: -30.739052318402393 Total: 30.0810; Orientation: 0.0660; Line Search: 26.7161
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 41effced to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-30.739052318402393;dx=-7.981084038160251E-7
New Minimum: -30.739052318402393 > -33.31393724666153
END: th(3628800.0000000005)=-33.31393724666153; dx=-5.47678979139993E-7 evalInputDelta=2.574884928259138
Fitness changed from -30.739052318402393 to -33.31393724666153
Iteration 3 complete. Error: -33.31393724666153 Total: 8.6979; Orientation: 0.0659; Line Search: 5.4682
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 6d5dcc56 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.524e+04, gradient 7.416e-04, dot -0.824; [396da059-1979-4333-92d9-afd0c875123f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -33.31393724666153, -30.739052318402393, -29.212652923441123, -29.21265147604402
LBFGS Accumulation History: 3 points
Removed measurement 6d5dcc56 to history. Total: 3
th(0)=-33.31393724666153;dx=-5.497065581817113E-7
New Minimum: -33.31393724666153 > -36.91435348371017
END: th(7818012.603187701)=-36.91435348371017; dx=-3.1019791760878405E-7 evalInputDelta=3.600416237048641
Fitness changed from -33.31393724666153 to -36.91435348371017
Iteration 4 complete. Error: -36.91435348371017 Total: 9.6020; Orientation: 1.1507; Line Search: 5.3515
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 68561159 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.258e+04, gradient 6.577e-04, dot -0.604; [396da059-1979-4333-92d9-afd0c875123f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -36.91435348371017, -30.739052318402393, -29.212652923441123, -29.21265147604402
LBFGS Accumulation History: 3 points
Removed measurement 68561159 to history. Total: 3
th(0)=-36.91435348371017;dx=-4.317205736332516E-7
New Minimum: -36.91435348371017 > -41.03440710415703
END: th(1.6843397559414055E7)=-41.03440710415703; dx=-1.2652786050234345E-7 evalInputDelta=4.1200536204468605
Fitness changed from -36.91435348371017 to -41.03440710415703
Iteration 5 complete. Error: -41.03440710415703 Total: 9.6290; Orientation: 1.1388; Line Search: 5.2282
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 1e82dad5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.382e+04, gradient 6.936e-04, dot -0.392; [396da059-1979-4333-92d9-afd0c875123f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -41.03440710415703, -30.739052318402393, -29.212652923441123, -29.21265147604402
LBFGS Accumulation History: 3 points
Removed measurement 1e82dad5 to history. Total: 3
th(0)=-41.03440710415703;dx=-4.801375875311927E-7
New Minimum: -41.03440710415703 > -43.59672371065232
WOLF (strong): th(3.628800000000001E7)=-43.59672371065232; dx=3.162642229068559E-8 evalInputDelta=2.562316606495287
New Minimum: -43.59672371065232 > -44.24447559244639
END: th(1.8144000000000004E7)=-44.24447559244639; dx=-1.5443414939267962E-9 evalInputDelta=3.210068488289359
Fitness changed from -41.03440710415703 to -44.24447559244639
Iteration 6 complete. Error: -44.24447559244639 Total: 12.1684; Orientation: 1.1403; Line Search: 7.9809
Adding measurement 3969ef57 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.553e+04, gradient 7.335e-04, dot -0.302; [396da059-1979-4333-92d9-afd0c875123f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.24447559244639, -30.739052318402393, -29.212652923441123, -29.21265147604402
LBFGS Accumulation History: 3 points
Removed measurement 3969ef57 to history. Total: 3
th(0)=-44.24447559244639;dx=-5.376680345662735E-7
New Minimum: -44.24447559244639 > -44.960051227372624
WOLF (strong): th(3.9090063015938506E7)=-44.960051227372624; dx=9.946170597698124E-8 evalInputDelta=0.7155756349262319
New Minimum: -44.960051227372624 > -47.56648457292907
WOLF (strong): th(1.9545031507969253E7)=-47.56648457292907; dx=9.035923859757772E-8 evalInputDelta=3.3220089804826785
END: th(6515010.502656418)=-47.16085941479275; dx=-2.644365071695176E-7 evalInputDelta=2.9163838223463614
Fitness changed from -44.24447559244639 to -47.56648457292907
Iteration 7 complete. Error: -47.56648457292907 Total: 14.7936; Orientation: 1.0731; Line Search: 10.8189
Adding measurement 4e25265 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.921e+04, gradient 7.426e-04, dot -0.270; [396da059-1979-4333-92d9-afd0c875123f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -47.56648457292907, -30.739052318402393, -29.212652923441123, -29.21265147604402
LBFGS Accumulation History: 3 points
Removed measurement 4e25265 to history. Total: 3
th(0)=-47.56648457292907;dx=-5.504736507302129E-7
New Minimum: -47.56648457292907 > -51.567626582518976
WOLF (strong): th(1.4036164632845048E7)=-51.567626582518976; dx=1.586824872366773E-8 evalInputDelta=4.0011420095899055
END: th(7018082.316422524)=-50.769340711585464; dx=-2.604962178327354E-7 evalInputDelta=3.2028561386563936
Fitness changed from -47.56648457292907 to -51.567626582518976
Iteration 8 complete. Error: -51.567626582518976 Total: 12.0169; Orientation: 1.0778; Line Search: 8.1483
Adding measurement 6d96d646 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.867e+04, gradient 5.953e-04, dot -0.391; [396da059-1979-4333-92d9-afd0c875123f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -51.567626582518976, -30.739052318402393, -29.212652923441123, -29.21265147604402
LBFGS Accumulation History: 3 points
Removed measurement 6d96d646 to history. Total: 3
th(0)=-51.567626582518976;dx=-3.5390876385421783E-7
New Minimum: -51.567626582518976 > -54.01600596763734
WOLF (strong): th(1.5120000000000006E7)=-54.01600596763734; dx=1.2460010686798972E-8 evalInputDelta=2.448379385118365
END: th(7560000.000000003)=-53.618696125327226; dx=-1.4489374270631856E-7 evalInputDelta=2.05106954280825
Fitness changed from -51.567626582518976 to -54.01600596763734
Iteration 9 complete. Error: -54.01600596763734 Total: 12.3388; Orientation: 1.1409; Line Search: 8.5481
Adding measurement 4a74a3ef to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.456e+04, gradient 6.046e-04, dot -0.387; [396da059-1979-4333-92d9-afd0c875123f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -54.01600596763734, -30.739052318402393, -29.212652923441123, -29.21265147604402
LBFGS Accumulation History: 3 points
Removed measurement 4a74a3ef to history. Total: 3
th(0)=-54.01600596763734;dx=-3.6508353462821537E-7
New Minimum: -54.01600596763734 > -55.98652529060636
WOLF (strong): th(1.6287526256641047E7)=-55.98652529060636; dx=6.66388852179689E-8 evalInputDelta=1.970519322969018
New Minimum: -55.98652529060636 > -56.09146335196841
END: th(8143763.128320524)=-56.09146335196841; dx=-9.792502192449372E-8 evalInputDelta=2.0754573843310666
Fitness changed from -54.01600596763734 to -56.09146335196841
Iteration 10 complete. Error: -56.09146335196841 Total: 11.9064; Orientation: 1.1282; Line Search: 8.1140
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -56.09146335196841 (> -Infinity) after 135.303s (< 5400.000s)
Returns
-56.09146335196841