BasicOptimizer.scala:89 executed in 212.12 seconds (2.107 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: 16013071357504
Reset training subject: 16017084267229
Adding measurement 13414142 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.42736613750457764;dx=-5.80165593258434E-7
New Minimum: -0.42736613750457764 > -0.42736653983592987
END: th(2.154434690031884)=-0.42736653983592987; dx=-4.973591640348709E-7 evalInputDelta=4.023313522338867E-7
Fitness changed from -0.42736613750457764 to -0.42736653983592987
Iteration 1 complete. Error: -0.42736653983592987 Total: 20.5091; Orientation: 0.0449; Line Search: 8.1605
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/12ad5e03-83de-449d-b235-7e6424fc7b0e.jpg)
Adding measurement 209d18b5 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.42736653983592987;dx=-4.973553882743312E-7
New Minimum: -0.42736653983592987 > -0.42736783623695374
WOLFE (weak): th(4.641588833612779)=-0.42736783623695374; dx=-4.973401664569386E-7 evalInputDelta=1.296401023864746E-6
New Minimum: -0.42736783623695374 > -0.4273689389228821
WOLFE (weak): th(9.283177667225559)=-0.4273689389228821; dx=-4.973367505315518E-7 evalInputDelta=2.3990869522094727E-6
New Minimum: -0.4273689389228821 > -0.4273735284805298
WOLFE (weak): th(27.849533001676676)=-0.4273735284805298; dx=-4.973280187187878E-7 evalInputDelta=6.988644599914551E-6
New Minimum: -0.4273735284805298 > -0.42739439010620117
WOLFE (weak): th(111.3981320067067)=-0.42739439010620117; dx=-4.973383666851633E-7 evalInputDelta=2.785027027130127E-5
New Minimum: -0.42739439010620117 > -0.427505224943161
WOLFE (weak): th(556.9906600335335)=-0.427505224943161; dx=-4.972754674716776E-7 evalInputDelta=1.3868510723114014E-4
New Minimum: -0.427505224943161 > -0.4281974136829376
WOLFE (weak): th(3341.9439602012008)=-0.4281974136829376; dx=-4.970173203377991E-7 evalInputDelta=8.308738470077515E-4
New Minimum: -0.4281974136829376 > -0.4331684112548828
WOLFE (weak): th(23393.607721408407)=-0.4331684112548828; dx=-4.943750988660141E-7 evalInputDelta=0.005801871418952942
New Minimum: -0.4331684112548828 > -0.4728174954652786
WOLFE (weak): th(187148.86177126726)=-0.4728174954652786; dx=-4.7379162815871347E-7 evalInputDelta=0.045450955629348755
New Minimum: -0.4728174954652786 > -0.750007376074791
END: th(1684339.7559414054)=-0.750007376074791; dx=-2.775917456948097E-7 evalInputDelta=0.3226408362388611
Fitness changed from -0.42736653983592987 to -0.750007376074791
Iteration 2 complete. Error: -0.750007376074791 Total: 49.0887; Orientation: 0.0455; Line Search: 44.6489
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/a541e09a-5c31-429f-8ab5-d23fa3ca4511.jpg)
Adding measurement 205418f to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.750007376074791;dx=-2.5476495789466894E-7
New Minimum: -0.750007376074791 > -1.08502659201622
END: th(3628800.0000000005)=-1.08502659201622; dx=-1.2878951184177198E-7 evalInputDelta=0.33501921594142914
Fitness changed from -0.750007376074791 to -1.08502659201622
Iteration 3 complete. Error: -1.08502659201622 Total: 12.2818; Orientation: 0.0452; Line Search: 8.2715
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/10b1a086-1ebc-4136-a89a-3078aa4c7898.jpg)
Adding measurement 76a12106 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.137e+03, gradient 3.683e-04, dot -0.697; [7642dc5b-325f-4a54-91cf-8962ecabe4e3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.08502659201622, -0.750007376074791, -0.42736653983592987, -0.42736613750457764
LBFGS Accumulation History: 3 points
Removed measurement 76a12106 to history. Total: 3
th(0)=-1.08502659201622;dx=-1.356151710302897E-7
New Minimum: -1.08502659201622 > -1.411031886935234
END: th(7818012.603187701)=-1.411031886935234; dx=-4.701827880465326E-8 evalInputDelta=0.326005294919014
Fitness changed from -1.08502659201622 to -1.411031886935234
Iteration 4 complete. Error: -1.411031886935234 Total: 14.1520; Orientation: 1.1071; Line Search: 8.4599
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/6696a08c-c8a9-4cfb-988a-b076d6f39938.jpg)
Adding measurement bcd644a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.874e+03, gradient 2.977e-04, dot -0.500; [7642dc5b-325f-4a54-91cf-8962ecabe4e3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.411031886935234, -0.750007376074791, -0.42736653983592987, -0.42736613750457764
LBFGS Accumulation History: 3 points
Removed measurement bcd644a to history. Total: 3
th(0)=-1.411031886935234;dx=-8.86361020109431E-8
New Minimum: -1.411031886935234 > -1.6320573389530182
WOLF (strong): th(1.6843397559414055E7)=-1.6320573389530182; dx=9.311902355067938E-10 evalInputDelta=0.22102545201778412
END: th(8421698.779707028)=-1.6039987951517105; dx=-1.7194228737706638E-8 evalInputDelta=0.19296690821647644
Fitness changed from -1.411031886935234 to -1.6320573389530182
Iteration 5 complete. Error: -1.6320573389530182 Total: 18.7718; Orientation: 1.0956; Line Search: 12.9625
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/4abb6229-156f-4a23-9d1d-3c4d25686d55.jpg)
Adding measurement 420936c5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.222e+03, gradient 3.081e-04, dot -0.167; [7642dc5b-325f-4a54-91cf-8962ecabe4e3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.6320573389530182, -0.750007376074791, -0.42736653983592987, -0.42736613750457764
LBFGS Accumulation History: 3 points
Removed measurement 420936c5 to history. Total: 3
th(0)=-1.6320573389530182;dx=-9.492846191700072E-8
New Minimum: -1.6320573389530182 > -1.742302417755127
WOLF (strong): th(1.8144000000000004E7)=-1.742302417755127; dx=2.7221179683074024E-8 evalInputDelta=0.11024507880210876
New Minimum: -1.742302417755127 > -1.8112401068210602
END: th(9072000.000000002)=-1.8112401068210602; dx=-2.4423239336008283E-9 evalInputDelta=0.179182767868042
Fitness changed from -1.6320573389530182 to -1.8112401068210602
Iteration 6 complete. Error: -1.8112401068210602 Total: 19.2032; Orientation: 1.1584; Line Search: 13.0175
Adding measurement 3585c62 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.714e+03, gradient 2.148e-04, dot -0.291; [7642dc5b-325f-4a54-91cf-8962ecabe4e3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8112401068210602, -0.750007376074791, -0.42736653983592987, -0.42736613750457764
LBFGS Accumulation History: 3 points
Removed measurement 3585c62 to history. Total: 3
th(0)=-1.8112401068210602;dx=-4.6145758362951266E-8
New Minimum: -1.8112401068210602 > -1.8902199268341064
WOLF (strong): th(1.9545031507969253E7)=-1.8902199268341064; dx=1.823561603658554E-8 evalInputDelta=0.07897982001304626
New Minimum: -1.8902199268341064 > -1.9268948286771774
END: th(9772515.753984626)=-1.9268948286771774; dx=-5.72934768366597E-9 evalInputDelta=0.11565472185611725
Fitness changed from -1.8112401068210602 to -1.9268948286771774
Iteration 7 complete. Error: -1.9268948286771774 Total: 17.2438; Orientation: 1.0557; Line Search: 12.1423
Adding measurement 36e6d08a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.053e+03, gradient 1.764e-04, dot -0.367; [7642dc5b-325f-4a54-91cf-8962ecabe4e3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.9268948286771774, -0.750007376074791, -0.42736653983592987, -0.42736613750457764
LBFGS Accumulation History: 3 points
Removed measurement 36e6d08a to history. Total: 3
th(0)=-1.9268948286771774;dx=-3.110303160194884E-8
New Minimum: -1.9268948286771774 > -1.9907682090997696
WOLF (strong): th(2.105424694926757E7)=-1.9907682090997696; dx=6.87631168875397E-9 evalInputDelta=0.06387338042259216
New Minimum: -1.9907682090997696 > -2.0064533948898315
END: th(1.0527123474633785E7)=-2.0064533948898315; dx=-2.836924084519079E-9 evalInputDelta=0.07955856621265411
Fitness changed from -1.9268948286771774 to -2.0064533948898315
Iteration 8 complete. Error: -2.0064533948898315 Total: 19.5970; Orientation: 1.0405; Line Search: 13.9830
Adding measurement 7ea836e7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.160e+03, gradient 1.669e-04, dot -0.365; [7642dc5b-325f-4a54-91cf-8962ecabe4e3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.0064533948898315, -0.750007376074791, -0.42736653983592987, -0.42736613750457764
LBFGS Accumulation History: 3 points
Removed measurement 7ea836e7 to history. Total: 3
th(0)=-2.0064533948898315;dx=-2.7855469855155948E-8
New Minimum: -2.0064533948898315 > -2.013622358441353
WOLF (strong): th(2.2680000000000007E7)=-2.013622358441353; dx=1.264208625117687E-8 evalInputDelta=0.007168963551521301
New Minimum: -2.013622358441353 > -2.065493181347847
WOLF (strong): th(1.1340000000000004E7)=-2.065493181347847; dx=3.494202701358372E-9 evalInputDelta=0.05903978645801544
END: th(3780000.0000000014)=-2.047008231282234; dx=-1.5214707797516324E-8 evalInputDelta=0.04055483639240265
Fitness changed from -2.0064533948898315 to -2.065493181347847
Iteration 9 complete. Error: -2.065493181347847 Total: 23.4338; Orientation: 1.0130; Line Search: 18.0578
Adding measurement 6a7ef416 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.127e+03, gradient 1.788e-04, dot -0.300; [7642dc5b-325f-4a54-91cf-8962ecabe4e3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.065493181347847, -0.750007376074791, -0.42736653983592987, -0.42736613750457764
LBFGS Accumulation History: 3 points
Removed measurement 6a7ef416 to history. Total: 3
th(0)=-2.065493181347847;dx=-3.1952598013417484E-8
New Minimum: -2.065493181347847 > -2.12226802110672
WOLF (strong): th(8143763.128320524)=-2.12226802110672; dx=7.972780293796647E-10 evalInputDelta=0.056774839758872986
END: th(4071881.564160262)=-2.1107839792966843; dx=-1.3026616378114194E-8 evalInputDelta=0.04529079794883728
Fitness changed from -2.065493181347847 to -2.12226802110672
Iteration 10 complete. Error: -2.12226802110672 Total: 17.7632; Orientation: 1.0140; Line Search: 12.4300
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/99dcafcc-b6b0-423c-ac17-f278a73b8773.jpg)
Final threshold in iteration 11: -2.12226802110672 (> -Infinity) after 212.115s (< 5400.000s)
Returns
-2.12226802110672