BasicOptimizer.scala:89 executed in 95.11 seconds (1.635 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: 280844370743300
Reset training subject: 280846528844700
Adding measurement 7455dacb to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-51.12033436078755;dx=-2.6796800452872537E-6
New Minimum: -51.12033436078755 > -51.120336193913026
END: th(2.154434690031884)=-51.120336193913026; dx=-2.334426314948317E-6 evalInputDelta=1.8331254736381197E-6
Fitness changed from -51.12033436078755 to -51.120336193913026
Iteration 1 complete. Error: -51.120336193913026 Total: 9.9354; Orientation: 0.2542; Line Search: 3.9012
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a3abeaa2-82b3-415d-9a25-cfda28aa9b7a.jpg)
Adding measurement 30b3d899 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-51.120336193913026;dx=-2.33442607432874E-6
New Minimum: -51.120336193913026 > -51.12034902578951
WOLFE (weak): th(4.641588833612779)=-51.12034902578951; dx=-2.3344245916165112E-6 evalInputDelta=1.283187648226658E-5
New Minimum: -51.12034902578951 > -51.120361857662765
WOLFE (weak): th(9.283177667225559)=-51.120361857662765; dx=-2.334424302216127E-6 evalInputDelta=2.566374973866914E-5
New Minimum: -51.120361857662765 > -51.12040218638633
WOLFE (weak): th(27.849533001676676)=-51.12040218638633; dx=-2.3344229575960048E-6 evalInputDelta=6.599247330285607E-5
New Minimum: -51.12040218638633 > -51.12060199641103
WOLFE (weak): th(111.3981320067067)=-51.12060199641103; dx=-2.3343793587805975E-6 evalInputDelta=2.6580249800645106E-4
New Minimum: -51.12060199641103 > -51.12164136256612
WOLFE (weak): th(556.9906600335335)=-51.12164136256612; dx=-2.334169464770004E-6 evalInputDelta=0.0013051686530971551
New Minimum: -51.12164136256612 > -51.12813921339065
WOLFE (weak): th(3341.9439602012008)=-51.12813921339065; dx=-2.332961479869771E-6 evalInputDelta=0.00780301947762041
New Minimum: -51.12813921339065 > -51.17482613684297
WOLFE (weak): th(23393.607721408407)=-51.17482613684297; dx=-2.323893231229005E-6 evalInputDelta=0.05448994292994058
New Minimum: -51.17482613684297 > -51.54572121706454
WOLFE (weak): th(187148.86177126726)=-51.54572121706454; dx=-2.2077234156259124E-6 evalInputDelta=0.42538502315151305
New Minimum: -51.54572121706454 > -54.22280059688217
END: th(1684339.7559414054)=-54.22280059688217; dx=-1.404334707038079E-6 evalInputDelta=3.1024644029691473
Fitness changed from -51.120336193913026 to -54.22280059688217
Iteration 2 complete. Error: -54.22280059688217 Total: 21.0276; Orientation: 0.0438; Line Search: 18.7703
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/6e26200f-f16e-40ea-8acd-11a72adc0825.jpg)
Adding measurement 56a09a5c to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-54.22280059688217;dx=-1.4396528338775192E-6
New Minimum: -54.22280059688217 > -58.61003696181881
END: th(3628800.0000000005)=-58.61003696181881; dx=-1.0202616462545251E-6 evalInputDelta=4.3872363649366335
Fitness changed from -54.22280059688217 to -58.61003696181881
Iteration 3 complete. Error: -58.61003696181881 Total: 5.8101; Orientation: 0.0414; Line Search: 3.6423
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/959bd1b3-b278-427f-9bfd-80d8789dd07b.jpg)
Adding measurement 6bfbab1c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.400e+04, gradient 1.149e-03, dot -0.748; [9eeff637-46cb-4bea-8cbe-b0e3ca4d1dad = 1.000/1.000e+00]
Orientation rejected. Popping history element from -58.61003696181881, -54.22280059688217, -51.120336193913026, -51.12033436078755
LBFGS Accumulation History: 3 points
Removed measurement 6bfbab1c to history. Total: 3
th(0)=-58.61003696181881;dx=-1.3199968786952099E-6
New Minimum: -58.61003696181881 > -65.28535871537686
END: th(7818012.603187701)=-65.28535871537686; dx=-5.856776548751464E-7 evalInputDelta=6.675321753558052
Fitness changed from -58.61003696181881 to -65.28535871537686
Iteration 4 complete. Error: -65.28535871537686 Total: 7.2664; Orientation: 1.4092; Line Search: 3.7703
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/67edcd27-aeeb-4f7b-9c9a-63b4f577a313.jpg)
Adding measurement 66589252 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.209e+04, gradient 1.381e-03, dot -0.497; [9eeff637-46cb-4bea-8cbe-b0e3ca4d1dad = 1.000/1.000e+00]
Orientation rejected. Popping history element from -65.28535871537686, -54.22280059688217, -51.120336193913026, -51.12033436078755
LBFGS Accumulation History: 3 points
Removed measurement 66589252 to history. Total: 3
th(0)=-65.28535871537686;dx=-1.9067028893383438E-6
New Minimum: -65.28535871537686 > -67.30809051989526
WOLF (strong): th(1.6843397559414055E7)=-67.30809051989526; dx=2.9695490589306863E-7 evalInputDelta=2.0227318045184006
New Minimum: -67.30809051989526 > -69.84876082545624
WOLF (strong): th(8421698.779707028)=-69.84876082545624; dx=2.4232267702893664E-7 evalInputDelta=4.56340211007938
END: th(2807232.926569009)=-69.19992709285297; dx=-8.200051334883065E-7 evalInputDelta=3.9145683774761153
Fitness changed from -65.28535871537686 to -69.84876082545624
Iteration 5 complete. Error: -69.84876082545624 Total: 10.6202; Orientation: 1.0939; Line Search: 7.3804
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/5f36a73d-25f6-4415-ac39-2bebac9fb3d8.jpg)
Adding measurement 1a48a582 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.029e+04, gradient 1.683e-03, dot -0.300; [9eeff637-46cb-4bea-8cbe-b0e3ca4d1dad = 1.000/1.000e+00]
Orientation rejected. Popping history element from -69.84876082545624, -54.22280059688217, -51.120336193913026, -51.12033436078755
LBFGS Accumulation History: 3 points
Removed measurement 1a48a582 to history. Total: 3
th(0)=-69.84876082545624;dx=-2.8333295387303354E-6
New Minimum: -69.84876082545624 > -77.38217134564748
WOLF (strong): th(6048000.000000001)=-77.38217134564748; dx=3.4301568598749756E-7 evalInputDelta=7.533410520191239
END: th(3024000.0000000005)=-76.21942795821295; dx=-1.2631035690270883E-6 evalInputDelta=6.370667132756708
Fitness changed from -69.84876082545624 to -77.38217134564748
Iteration 6 complete. Error: -77.38217134564748 Total: 8.6590; Orientation: 0.9859; Line Search: 5.6582
Adding measurement 795e8ef5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.182e+04, gradient 1.394e-03, dot -0.452; [9eeff637-46cb-4bea-8cbe-b0e3ca4d1dad = 1.000/1.000e+00]
Orientation rejected. Popping history element from -77.38217134564748, -54.22280059688217, -51.120336193913026, -51.12033436078755
LBFGS Accumulation History: 3 points
Removed measurement 795e8ef5 to history. Total: 3
th(0)=-77.38217134564748;dx=-1.9434139115088373E-6
New Minimum: -77.38217134564748 > -82.52229777426538
WOLF (strong): th(6515010.502656418)=-82.52229777426538; dx=2.2997874253460716E-7 evalInputDelta=5.140126428617904
END: th(3257505.251328209)=-81.83875975660435; dx=-7.519150653154451E-7 evalInputDelta=4.4565884109568685
Fitness changed from -77.38217134564748 to -82.52229777426538
Iteration 7 complete. Error: -82.52229777426538 Total: 8.3800; Orientation: 0.9712; Line Search: 5.7087
Adding measurement 686ace1f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.836e+04, gradient 1.366e-03, dot -0.446; [9eeff637-46cb-4bea-8cbe-b0e3ca4d1dad = 1.000/1.000e+00]
Orientation rejected. Popping history element from -82.52229777426538, -54.22280059688217, -51.120336193913026, -51.12033436078755
LBFGS Accumulation History: 3 points
Removed measurement 686ace1f to history. Total: 3
th(0)=-82.52229777426538;dx=-1.8671281913257085E-6
New Minimum: -82.52229777426538 > -87.098587548557
WOLF (strong): th(7018082.316422524)=-87.098587548557; dx=3.633705554403932E-7 evalInputDelta=4.576289774291624
END: th(3509041.158211262)=-86.91562889663837; dx=-5.903215406425984E-7 evalInputDelta=4.3933311223729845
Fitness changed from -82.52229777426538 to -87.098587548557
Iteration 8 complete. Error: -87.098587548557 Total: 8.3413; Orientation: 1.0194; Line Search: 5.5577
Adding measurement 1f4083ac to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.149e+04, gradient 1.378e-03, dot -0.414; [9eeff637-46cb-4bea-8cbe-b0e3ca4d1dad = 1.000/1.000e+00]
Orientation rejected. Popping history element from -87.098587548557, -54.22280059688217, -51.120336193913026, -51.12033436078755
LBFGS Accumulation History: 3 points
Removed measurement 1f4083ac to history. Total: 3
th(0)=-87.098587548557;dx=-1.8982017019002345E-6
New Minimum: -87.098587548557 > -91.73668188089461
WOLF (strong): th(7560000.000000003)=-91.73668188089461; dx=4.989326042485528E-7 evalInputDelta=4.638094332337602
New Minimum: -91.73668188089461 > -91.89269731763756
END: th(3780000.0000000014)=-91.89269731763756; dx=-5.669311608056715E-7 evalInputDelta=4.794109769080549
Fitness changed from -87.098587548557 to -91.89269731763756
Iteration 9 complete. Error: -91.89269731763756 Total: 8.1602; Orientation: 1.0169; Line Search: 5.4235
Adding measurement 14d43f13 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.378e+04, gradient 8.823e-04, dot -0.718; [9eeff637-46cb-4bea-8cbe-b0e3ca4d1dad = 1.000/1.000e+00]
Orientation rejected. Popping history element from -91.89269731763756, -54.22280059688217, -51.120336193913026, -51.12033436078755
LBFGS Accumulation History: 3 points
Removed measurement 14d43f13 to history. Total: 3
th(0)=-91.89269731763756;dx=-7.785198662944764E-7
New Minimum: -91.89269731763756 > -96.66872970955839
END: th(8143763.128320524)=-96.66872970955839; dx=-4.267783952686519E-7 evalInputDelta=4.776032391920836
Fitness changed from -91.89269731763756 to -96.66872970955839
Iteration 10 complete. Error: -96.66872970955839 Total: 6.5979; Orientation: 0.9817; Line Search: 3.6071
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/01320e17-b779-44e4-bdd5-6ef662f99551.jpg)
Final threshold in iteration 11: -96.66872970955839 (> -Infinity) after 95.099s (< 5400.000s)
Returns
-96.66872970955839