BasicOptimizer.scala:89 executed in 92.54 seconds (1.129 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: 281933179657800
Reset training subject: 281935062676800
Adding measurement 67d6113c to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-57.440473616778156;dx=-5.325117069137588E-6
New Minimum: -57.440473616778156 > -57.440480142489214
END: th(2.154434690031884)=-57.440480142489214; dx=-3.431453275701533E-6 evalInputDelta=6.525711057747685E-6
Fitness changed from -57.440473616778156 to -57.440480142489214
Iteration 1 complete. Error: -57.440480142489214 Total: 9.2223; Orientation: 0.0608; Line Search: 3.6583
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/3a7daa58-5e72-490e-9956-5cc96045d324.jpg)
Adding measurement 138fdd00 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-57.440480142489214;dx=-3.4314492602041903E-6
New Minimum: -57.440480142489214 > -57.44049971961796
WOLFE (weak): th(4.641588833612779)=-57.44049971961796; dx=-3.431445126952958E-6 evalInputDelta=1.957712874656181E-5
New Minimum: -57.44049971961796 > -57.44051603388681
WOLFE (weak): th(9.283177667225559)=-57.44051603388681; dx=-3.4314501189493035E-6 evalInputDelta=3.5891397594411956E-5
New Minimum: -57.44051603388681 > -57.4405780280662
WOLFE (weak): th(27.849533001676676)=-57.4405780280662; dx=-3.4314397128092925E-6 evalInputDelta=9.788557698442446E-5
New Minimum: -57.4405780280662 > -57.44086515812971
WOLFE (weak): th(111.3981320067067)=-57.44086515812971; dx=-3.4314658920127623E-6 evalInputDelta=3.8501564049653325E-4
New Minimum: -57.44086515812971 > -57.442395406646675
WOLFE (weak): th(556.9906600335335)=-57.442395406646675; dx=-3.4312947437435185E-6 evalInputDelta=0.0019152641574606832
New Minimum: -57.442395406646675 > -57.45194793427878
WOLFE (weak): th(3341.9439602012008)=-57.45194793427878; dx=-3.430573792878909E-6 evalInputDelta=0.011467791789563364
New Minimum: -57.45194793427878 > -57.52066757282902
WOLFE (weak): th(23393.607721408407)=-57.52066757282902; dx=-3.424256645412266E-6 evalInputDelta=0.08018743033980513
New Minimum: -57.52066757282902 > -58.076695020838656
WOLFE (weak): th(187148.86177126726)=-58.076695020838656; dx=-3.364648282943496E-6 evalInputDelta=0.6362148783494419
New Minimum: -58.076695020838656 > -62.65908877296007
END: th(1684339.7559414054)=-62.65908877296007; dx=-2.7374436284772045E-6 evalInputDelta=5.218608630470854
Fitness changed from -57.440480142489214 to -62.65908877296007
Iteration 2 complete. Error: -62.65908877296007 Total: 20.9099; Orientation: 0.0605; Line Search: 18.7934
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/2543880b-f8b1-4ae9-aaa5-3317742426ab.jpg)
Adding measurement 23e68de2 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-62.65908877296007;dx=-2.453221954742583E-6
New Minimum: -62.65908877296007 > -69.89463428454128
END: th(3628800.0000000005)=-69.89463428454128; dx=-1.5272324004229777E-6 evalInputDelta=7.235545511581215
Fitness changed from -62.65908877296007 to -69.89463428454128
Iteration 3 complete. Error: -69.89463428454128 Total: 5.7887; Orientation: 0.0605; Line Search: 3.6464
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/90206ad5-d86c-448e-bc4d-f290c64977ab.jpg)
Adding measurement 5bd89b0f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.760e+03, gradient 1.201e-03, dot -0.777; [d8bde9a3-e8f5-4006-a268-af3fc19e23b1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -69.89463428454128, -62.65908877296007, -57.440480142489214, -57.440473616778156
LBFGS Accumulation History: 3 points
Removed measurement 5bd89b0f to history. Total: 3
th(0)=-69.89463428454128;dx=-1.4415908213252437E-6
New Minimum: -69.89463428454128 > -78.06414304484326
END: th(7818012.603187701)=-78.06414304484326; dx=-6.825643973896166E-7 evalInputDelta=8.16950876030198
Fitness changed from -69.89463428454128 to -78.06414304484326
Iteration 4 complete. Error: -78.06414304484326 Total: 6.8517; Orientation: 1.0452; Line Search: 3.7130
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/6cfe20f5-24ae-465d-8535-3c1b4fec7cbb.jpg)
Adding measurement 11877b8a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.575e+03, gradient 1.007e-03, dot -0.547; [d8bde9a3-e8f5-4006-a268-af3fc19e23b1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -78.06414304484326, -62.65908877296007, -57.440480142489214, -57.440473616778156
LBFGS Accumulation History: 3 points
Removed measurement 11877b8a to history. Total: 3
th(0)=-78.06414304484326;dx=-1.0148384540827682E-6
New Minimum: -78.06414304484326 > -85.13668263023217
END: th(1.6843397559414055E7)=-85.13668263023217; dx=-7.841596812969877E-8 evalInputDelta=7.07253958538891
Fitness changed from -78.06414304484326 to -85.13668263023217
Iteration 5 complete. Error: -85.13668263023217 Total: 6.8040; Orientation: 1.0422; Line Search: 3.6688
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/898159ea-0042-4a90-bd95-dfcb012a99f6.jpg)
Adding measurement 386fa933 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.860e+03, gradient 1.244e-03, dot -0.226; [d8bde9a3-e8f5-4006-a268-af3fc19e23b1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -85.13668263023217, -62.65908877296007, -57.440480142489214, -57.440473616778156
LBFGS Accumulation History: 3 points
Removed measurement 386fa933 to history. Total: 3
th(0)=-85.13668263023217;dx=-1.5470545253065136E-6
Armijo: th(3.628800000000001E7)=-78.8617135578987; dx=3.8969597640767417E-7 evalInputDelta=-6.274969072333477
New Minimum: -85.13668263023217 > -87.49082359935474
WOLF (strong): th(1.8144000000000004E7)=-87.49082359935474; dx=5.313250166055518E-7 evalInputDelta=2.354140969122568
New Minimum: -87.49082359935474 > -90.96086560057044
END: th(6048000.000000001)=-90.96086560057044; dx=-3.3771420948639977E-7 evalInputDelta=5.824182970338271
Fitness changed from -85.13668263023217 to -90.96086560057044
Iteration 6 complete. Error: -90.96086560057044 Total: 10.7146; Orientation: 1.0010; Line Search: 7.4178
Adding measurement 2a2d067a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.545e+04, gradient 8.263e-04, dot -0.511; [d8bde9a3-e8f5-4006-a268-af3fc19e23b1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -90.96086560057044, -62.65908877296007, -57.440480142489214, -57.440473616778156
LBFGS Accumulation History: 3 points
Removed measurement 2a2d067a to history. Total: 3
th(0)=-90.96086560057044;dx=-6.827844994995206E-7
New Minimum: -90.96086560057044 > -95.18515551940611
END: th(1.3030021005312836E7)=-95.18515551940611; dx=-6.41109646185032E-8 evalInputDelta=4.224289918835666
Fitness changed from -90.96086560057044 to -95.18515551940611
Iteration 7 complete. Error: -95.18515551940611 Total: 6.6014; Orientation: 1.0328; Line Search: 3.8054
Adding measurement 40e4b791 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.671e+04, gradient 1.001e-03, dot -0.356; [d8bde9a3-e8f5-4006-a268-af3fc19e23b1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -95.18515551940611, -62.65908877296007, -57.440480142489214, -57.440473616778156
LBFGS Accumulation History: 3 points
Removed measurement 40e4b791 to history. Total: 3
th(0)=-95.18515551940611;dx=-1.0014717719356676E-6
Armijo: th(2.8072329265690096E7)=-92.66010117820844; dx=3.241300550489658E-7 evalInputDelta=-2.5250543411976736
New Minimum: -95.18515551940611 > -97.57713340555068
WOLF (strong): th(1.4036164632845048E7)=-97.57713340555068; dx=3.2488034019303256E-7 evalInputDelta=2.3919778861445735
New Minimum: -97.57713340555068 > -98.44393793793105
END: th(4678721.544281683)=-98.44393793793105; dx=-3.582525492788229E-7 evalInputDelta=3.2587824185249445
Fitness changed from -95.18515551940611 to -98.44393793793105
Iteration 8 complete. Error: -98.44393793793105 Total: 10.2839; Orientation: 1.0231; Line Search: 7.5269
Adding measurement 54a8655 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.233e+04, gradient 6.576e-04, dot -0.624; [d8bde9a3-e8f5-4006-a268-af3fc19e23b1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -98.44393793793105, -62.65908877296007, -57.440480142489214, -57.440473616778156
LBFGS Accumulation History: 3 points
Removed measurement 54a8655 to history. Total: 3
th(0)=-98.44393793793105;dx=-4.323729415143411E-7
New Minimum: -98.44393793793105 > -101.61882191338337
END: th(1.0080000000000004E7)=-101.61882191338337; dx=-2.1908467559001636E-7 evalInputDelta=3.1748839754523175
Fitness changed from -98.44393793793105 to -101.61882191338337
Iteration 9 complete. Error: -101.61882191338337 Total: 6.6020; Orientation: 1.0497; Line Search: 3.7860
Adding measurement 42c7d191 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.393e+04, gradient 7.018e-04, dot -0.541; [d8bde9a3-e8f5-4006-a268-af3fc19e23b1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -101.61882191338337, -62.65908877296007, -57.440480142489214, -57.440473616778156
LBFGS Accumulation History: 3 points
Removed measurement 42c7d191 to history. Total: 3
th(0)=-101.61882191338337;dx=-4.925001620347459E-7
New Minimum: -101.61882191338337 > -104.16302212411838
WOLF (strong): th(2.1716701675521396E7)=-104.16302212411838; dx=5.2256823928541905E-8 evalInputDelta=2.5442002107350135
New Minimum: -104.16302212411838 > -104.21742578687112
END: th(1.0858350837760698E7)=-104.21742578687112; dx=-6.390616441423522E-8 evalInputDelta=2.598603873487747
Fitness changed from -101.61882191338337 to -104.21742578687112
Iteration 10 complete. Error: -104.21742578687112 Total: 8.4609; Orientation: 1.0259; Line Search: 5.6596
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/07595e41-be70-44a6-9b0d-d887044c5335.jpg)
Final threshold in iteration 11: -104.21742578687112 (> -Infinity) after 92.544s (< 5400.000s)
Returns
-104.21742578687112