BasicOptimizer.scala:89 executed in 210.34 seconds (1.725 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: 2572716693604
Reset training subject: 2577111077473
Adding measurement 32f587b6 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=2.390913560986519;dx=-1.6263947162788196E-6
New Minimum: 2.390913560986519 > 2.3909120708703995
WOLFE (weak): th(2.154434690031884)=2.3909120708703995; dx=-1.5558281019184795E-6 evalInputDelta=1.4901161193847656E-6
New Minimum: 2.3909120708703995 > 2.3909103125333786
WOLFE (weak): th(4.308869380063768)=2.3909103125333786; dx=-1.5556012950745458E-6 evalInputDelta=3.248453140258789E-6
New Minimum: 2.3909103125333786 > 2.3909035101532936
WOLFE (weak): th(12.926608140191302)=2.3909035101532936; dx=-1.5555339896040066E-6 evalInputDelta=1.0050833225250244E-5
New Minimum: 2.3909035101532936 > 2.390873335301876
WOLFE (weak): th(51.70643256076521)=2.390873335301876; dx=-1.5556371496290377E-6 evalInputDelta=4.022568464279175E-5
New Minimum: 2.390873335301876 > 2.3907124400138855
WOLFE (weak): th(258.53216280382605)=2.3907124400138855; dx=-1.5560888475585379E-6 evalInputDelta=2.0112097263336182E-4
New Minimum: 2.3907124400138855 > 2.3897058591246605
WOLFE (weak): th(1551.1929768229563)=2.3897058591246605; dx=-1.5588075131653758E-6 evalInputDelta=0.001207701861858368
New Minimum: 2.3897058591246605 > 2.38239873200655
WOLFE (weak): th(10858.350837760694)=2.38239873200655; dx=-1.5813855487648948E-6 evalInputDelta=0.008514828979969025
New Minimum: 2.38239873200655 > 2.3200701251626015
WOLFE (weak): th(86866.80670208555)=2.3200701251626015; dx=-1.6723756208142305E-6 evalInputDelta=0.07084343582391739
New Minimum: 2.3200701251626015 > 1.8563162088394165
END: th(781801.26031877)=1.8563162088394165; dx=-1.0002426741074362E-6 evalInputDelta=0.5345973521471024
Fitness changed from 2.390913560986519 to 1.8563162088394165
Iteration 1 complete. Error: 1.8563162088394165 Total: 55.9146; Orientation: 0.0469; Line Search: 42.9671
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/c428db19-85d5-411a-927a-400e01e00c51.jpg)
Adding measurement 3e60bff6 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=1.8563162088394165;dx=-2.461204604563325E-6
New Minimum: 1.8563162088394165 > 1.1455396115779877
END: th(1684339.7559414052)=1.1455396115779877; dx=-4.6449805243014486E-7 evalInputDelta=0.7107765972614288
Fitness changed from 1.8563162088394165 to 1.1455396115779877
Iteration 2 complete. Error: 1.1455396115779877 Total: 12.7615; Orientation: 0.0448; Line Search: 8.5309
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/770506da-3e63-42b5-88e8-403030830c22.jpg)
Adding measurement 6e070faf to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=1.1455396115779877;dx=-1.281677530982644E-6
New Minimum: 1.1455396115779877 > 0.2948131710290909
END: th(3628800.0)=0.2948131710290909; dx=-1.7635599705675524E-7 evalInputDelta=0.8507264405488968
Fitness changed from 1.1455396115779877 to 0.2948131710290909
Iteration 3 complete. Error: 0.2948131710290909 Total: 13.2534; Orientation: 0.0446; Line Search: 8.7947
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/f4733183-70fc-43f6-ab2a-e8a1d4a3722d.jpg)
Adding measurement 7c235b57 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.395e+03, gradient 7.829e-04, dot -0.424; [e643ac39-95f7-479c-a2af-fea4cadf8114 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.2948131710290909, 1.1455396115779877, 1.8563162088394165, 2.390913560986519
LBFGS Accumulation History: 3 points
Removed measurement 7c235b57 to history. Total: 3
th(0)=0.2948131710290909;dx=-6.129940703117881E-7
New Minimum: 0.2948131710290909 > -0.4662235677242279
END: th(7818012.6031877)=-0.4662235677242279; dx=-3.873564747006922E-8 evalInputDelta=0.7610367387533188
Fitness changed from 0.2948131710290909 to -0.4662235677242279
Iteration 4 complete. Error: -0.4662235677242279 Total: 12.9347; Orientation: 1.0139; Line Search: 7.9517
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/828b6d55-b17d-4e4b-aff7-43a070fb009f.jpg)
Adding measurement 3287f468 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.754e+03, gradient 5.377e-04, dot -0.338; [e643ac39-95f7-479c-a2af-fea4cadf8114 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.4662235677242279, 1.1455396115779877, 1.8563162088394165, 2.390913560986519
LBFGS Accumulation History: 3 points
Removed measurement 3287f468 to history. Total: 3
th(0)=-0.4662235677242279;dx=-2.891362198039659E-7
New Minimum: -0.4662235677242279 > -0.9474105685949326
WOLF (strong): th(1.684339755941405E7)=-0.9474105685949326; dx=3.252518022169347E-8 evalInputDelta=0.48118700087070465
New Minimum: -0.9474105685949326 > -0.9816941916942596
END: th(8421698.779707026)=-0.9816941916942596; dx=-3.067608436032544E-8 evalInputDelta=0.5154706239700317
Fitness changed from -0.4662235677242279 to -0.9816941916942596
Iteration 5 complete. Error: -0.9816941916942596 Total: 18.8038; Orientation: 0.9971; Line Search: 13.5200
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/56194fae-9c77-4b98-a251-f1f0492d52ca.jpg)
Adding measurement 611091c2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.393e+03, gradient 3.466e-04, dot -0.333; [e643ac39-95f7-479c-a2af-fea4cadf8114 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.9816941916942596, 1.1455396115779877, 1.8563162088394165, 2.390913560986519
LBFGS Accumulation History: 3 points
Removed measurement 611091c2 to history. Total: 3
th(0)=-0.9816941916942596;dx=-1.2016349535248962E-7
New Minimum: -0.9816941916942596 > -1.3004421815276146
WOLF (strong): th(1.8144E7)=-1.3004421815276146; dx=1.6269258395975265E-8 evalInputDelta=0.31874798983335495
END: th(9072000.0)=-1.2880543917417526; dx=-2.8162086718862587E-8 evalInputDelta=0.306360200047493
Fitness changed from -0.9816941916942596 to -1.3004421815276146
Iteration 6 complete. Error: -1.3004421815276146 Total: 18.0636; Orientation: 1.0048; Line Search: 12.7253
Adding measurement 1420ffe5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.118e+03, gradient 3.729e-04, dot -0.193; [e643ac39-95f7-479c-a2af-fea4cadf8114 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.3004421815276146, 1.1455396115779877, 1.8563162088394165, 2.390913560986519
LBFGS Accumulation History: 3 points
Removed measurement 1420ffe5 to history. Total: 3
th(0)=-1.3004421815276146;dx=-1.3907993199970424E-7
New Minimum: -1.3004421815276146 > -1.4480514004826546
WOLF (strong): th(1.954503150796925E7)=-1.4480514004826546; dx=3.8248772068491786E-8 evalInputDelta=0.14760921895503998
New Minimum: -1.4480514004826546 > -1.5406652092933655
END: th(9772515.753984625)=-1.5406652092933655; dx=-4.200836713274863E-9 evalInputDelta=0.24022302776575089
Fitness changed from -1.3004421815276146 to -1.5406652092933655
Iteration 7 complete. Error: -1.5406652092933655 Total: 18.7705; Orientation: 0.9855; Line Search: 13.5484
Adding measurement 15dcb119 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.611e+03, gradient 2.232e-04, dot -0.243; [e643ac39-95f7-479c-a2af-fea4cadf8114 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5406652092933655, 1.1455396115779877, 1.8563162088394165, 2.390913560986519
LBFGS Accumulation History: 3 points
Removed measurement 15dcb119 to history. Total: 3
th(0)=-1.5406652092933655;dx=-4.9840265959466026E-8
New Minimum: -1.5406652092933655 > -1.6811948344111443
WOLF (strong): th(2.1054246949267566E7)=-1.6811948344111443; dx=1.492526192429725E-8 evalInputDelta=0.14052962511777878
New Minimum: -1.6811948344111443 > -1.697837196290493
END: th(1.0527123474633783E7)=-1.697837196290493; dx=-1.1150499413540316E-8 evalInputDelta=0.15717198699712753
Fitness changed from -1.5406652092933655 to -1.697837196290493
Iteration 8 complete. Error: -1.697837196290493 Total: 18.2522; Orientation: 1.0002; Line Search: 12.9972
Adding measurement 4501b976 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.985e+03, gradient 1.912e-04, dot -0.297; [e643ac39-95f7-479c-a2af-fea4cadf8114 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.697837196290493, 1.1455396115779877, 1.8563162088394165, 2.390913560986519
LBFGS Accumulation History: 3 points
Removed measurement 4501b976 to history. Total: 3
th(0)=-1.697837196290493;dx=-3.65530533576468E-8
New Minimum: -1.697837196290493 > -1.8096250891685486
WOLF (strong): th(2.2680000000000004E7)=-1.8096250891685486; dx=1.9947158914811872E-9 evalInputDelta=0.11178789287805557
END: th(1.1340000000000002E7)=-1.7973434031009674; dx=-6.57664714529436E-9 evalInputDelta=0.0995062068104744
Fitness changed from -1.697837196290493 to -1.8096250891685486
Iteration 9 complete. Error: -1.8096250891685486 Total: 18.7440; Orientation: 0.9920; Line Search: 13.3825
Adding measurement 5a19b17c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.189e+03, gradient 2.210e-04, dot -0.183; [e643ac39-95f7-479c-a2af-fea4cadf8114 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8096250891685486, 1.1455396115779877, 1.8563162088394165, 2.390913560986519
LBFGS Accumulation History: 3 points
Removed measurement 5a19b17c to history. Total: 3
th(0)=-1.8096250891685486;dx=-4.885988673096234E-8
New Minimum: -1.8096250891685486 > -1.81974808126688
WOLF (strong): th(2.4431289384961568E7)=-1.81974808126688; dx=2.808181014136881E-8 evalInputDelta=0.010122992098331451
New Minimum: -1.81974808126688 > -1.9304080978035927
WOLF (strong): th(1.2215644692480784E7)=-1.9304080978035927; dx=4.040958200607387E-9 evalInputDelta=0.1207830086350441
END: th(4071881.5641602613)=-1.8875301256775856; dx=-2.7772725530081333E-8 evalInputDelta=0.07790503650903702
Fitness changed from -1.8096250891685486 to -1.9304080978035927
Iteration 10 complete. Error: -1.9304080978035927 Total: 22.7635; Orientation: 0.9867; Line Search: 17.6561
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/3696677b-88a0-4dbd-b503-6540dd2197b0.jpg)
Final threshold in iteration 11: -1.9304080978035927 (> -Infinity) after 210.334s (< 5400.000s)
Returns
-1.9304080978035927